netnerds.net
Home
Book
Links icon
GitHub Org GitHub Star Profile MVP Profile Twitch
About
Subscribe
  • T-SQL UDF: Convert Traditional IP into Numeric IP

    Jan 25, 2007 · 1 min read  ·
    Share on:

    This user-defined function (only available in SQL 2000 and above) is part of a larger project I'm working on. PARSENAME in SQL Server is my new favorite function.. Thanks to Jeff Smith for the heads up. CREATE FUNCTION [dbo].[IPtoNumeric] (@strIP varchar(255)) RETURNS bigint AS BEGIN DECLARE @intIPNum bigint IF …


    Read More
  • T-SQL: Parse Top Level Domain from URL

    Jan 17, 2007 · 2 min read  ·
    Share on:

    I keep track of all hits to my website RealCajunRecipes.com in a SQL table called hitcounter which has columns for the user's IP, browser, referring URL and the date. Recently, I saw a surge in traffic and wanted to know which domains were sending the traffic our way. After getting tired of issuing ad-hoc queries that …


    Read More
  • SQL: 6.5 Compatibility in SQL Server 2005

    May 15, 2006 · 3 min read  ·
    Share on:

    This isn't a very common scenario, but I figured I'd write about it anyway. We recently implemented a Windows 2003 Active Directory domain at work. I suggested to my employer that, going forward, we only install SQL Server 2005 when we need a database server (phasing out 2000). I'd also suggested consolidating a couple …


    Read More
  • SQL: Quickly count instances of a variable within a string.

    Apr 27, 2006 · 1 min read  ·
    Share on:

    Using SQL and want to know how many times 'http' appears in a string using about one line of code? Find out by creatively using the replace() function. Declare @myStr varchar(1500), @countStr varchar(100) Set @myStr = 'https://www.buydrugshere.com go here! https://www.onlinemortage.com right there!' Set @countStr = …


    Read More
  • VBScript & SQL: Centralize Windows Events in SQL Server

    Apr 12, 2006 · 4 min read  ·
    Share on:

    This is a barebones script that gathers server events across a domain and stores them in SQL Server using asyncronous notifications as seen in this sample of the code: strWQL = "Select * from __InstanceCreationEvent where TargetInstance isa 'Win32_NTLogEvent'" objWMIService.ExecNotificationQueryAsync …


    Read More
    • ««
    • «
    • 8
    • 9
    • 10
    • 11
    • 12
    • »
    • »»

Chrissy LeMaire

SQL & PowerShell MVP. GitHub Star. Creator of dbatools. Need to oil my knees.

preorder

dbatools

dbatools is an awesome PowerShell module that helps you migrate entire instances with a single command, plus a whole lot more.

available from dbatools.io and github

dbachecks

dbachecks validates SQL Server environments using crowdsourced DBA checklists and outputs to Power BI and is available on github.com 📊

recent posts

  • Rebuilding a Proxmox cluster node
  • Default PowerShell Paths (PSModulePath) on GitHub Runners
  • Add existing directory storage to proxmox without wiping it first
  • InspecTools on Offline Windows
  • Chef inspec: Unable to detect your platform
  • Migrating my WordPress sites to GitHub Pages
  • URL Shortening/Redirects using GitHub Pages and Jekyll
  • My Windows Terminal Retro Theme

categories

sql-server 115 powershell 106 general 63 security 58 windows 47 sharepoint 41 active-directory 37 linux 31 networking 30 vbscript 30 apple 22 virtualization 22 iis 19 apache 7 exchange 7
All Categories
active-directory37 apache7 apple22 asp-net2 bi4 db24 exchange7 general63 github3 iis19 linux31 livestreaming4 lync2 networking30 oracle1 powershell106 security58 sharepoint41 sql-server115 vbscript30 virtualization22 windows47 wpf7
[A~Z][0~9]
 

Copyright 2003 -  Chrissy LeMaire. All Rights Reserved