Well, 10 steps, give or take. This could have been executed in fewer steps had we not chosen such a useful function as an example . This function, which is only supported in SQL Server 2005 with CLR enabled, essentially performs a reverse IP lookup (nslookup -type=ptr), uses System.Net.Dns.GetHostEntry and thus …
Recently, someone asked if there was a way to be notified when servers have been added to an Active Directory domain. I looked around the Internet and it seems there's not a direct way to do this without some large software package. So in lieu of having an instant notification, I created a script that tallies up newly …
My friend Brandon messaged me this morning telling me that he ran into the same issues with Office 2007 Professional (which he won & subsequently downloaded from Microsoft's website). The Office 2007 file extraction locked up even though memory & cpu usage was next-to-nothing so, eventually, he cancelled out …
I'm nearly a year behind on this but I just found the free 7MB CHM of the Scripting Guy archive which contains every published article from August 2004 to June 2006. This is a great compliment to the Windows IT Pro Master CD which is still 50%off (now $30).
Editor’s note (2025): AOL Instant Messenger (AIM) was discontinued in 2017. This post reflects observations from 2007 about AIM 6’s network behavior at that time. A friend asked me what port AIM used and I guessed something along the lines of 5190. I wanted to check to make sure and, after issuing the command netstat …
Here's some code that I'm posting mainly for my future reference. I do not recommend running this anywhere near a production machine. 1DECLARE @SQL varchar(8000) -- if you use nvarchar for whack table names, change this to 4000 2SET @SQL = '' 3 4SELECT @SQL = @SQL + 5 'ALTER DATABASE ' + NAME + ' …
As you probably know, Microsoft provides two undocumented/unsupported stored procedures for iterating through databases, sp_msforeachdb and sp_msforeachtable. I've always wondered, then, why the following code never showed up in Google searches: 1sp_MSforeachdb @command1 = 'EXEC sp_msForEachTable @COMMAND1= …
There are a few ways to do this but here's one that I like. I believe it works in SQL Server 7, 2000 and 2005. 1ALTER DATABASE myDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE 2GO 3USE myDatabaseName 4GO Go ahead and do what you need to do then set it back: 1ALTER DATABASE myDatabaseName SET MULTI_USER
This is more of a post for proper keywords. My previous entry titled "Import MaxMind City CSVs into SQL Server 2005" assumes the user has already conducted research to find that MaxMind's free GeoIP database provides the functionality to look up the location of an IP address. So, if you wish to quickly and …
I'd like to start this post by saying that BCP is limited and ghe-toe, but it gets the job done to some degree. One of the guys over at SQLteam.com wrote a really informative post on Flat File Bulk Import methods speed comparison in SQL Server 2005 that you should check out if you are into that sort of thing. BCP ranks …
Start typing to search
Search across posts, pages, and commands