After a Powershell session at SQL Saturday (Phoenix #131) this weekend, I’m now suddenly on the lookout for handy powershell commands. The first one lets you see the number of Active* sessions on your IIS site (* because HTTP is stateless, it’s really the number of connections that have been opened recently – not what’s …
Category Archive: Windows Server
Windows Server functionality
Dec 17
Changing SQL Server data file locations in clustered instance using service SIDs
Recently I added a second LUN to a clustered instance of SQL Server to isolate the logs files (and another for the TempDB) and I mounted them to an empty NTFS folder as I’ve done before, but when I started SQL Server, I recieved the following error: The error means that SQL Server doesn’t have …
Dec 10
Launching Microsoft File Transfer Manager
In case you were in the middle of a download from MSDN or another Microsoft site that uses the transfer manager and you’ve accidentally closed it, you can find it at one of two locations: If you installed it from an MSI: x64 – C:\Program Files (x86)\Microsoft File Transfer Manager\TransferMgr.exe x86 – C:\Program Files\Microsoft File …
Dec 09
Dealing with an exception: “An attempt was made to access a socket in a way forbidden by its access permissions”
I was attempting to bind a remoting listening to a particular port and kept receiving an exception when attempting to bind on the production Windows 2008 R2 server itself – it always worked fine on both my development box and our test server. Here’s the exception: Though Googling gave some suggestions to run the process …
Nov 30
Clustering walkthrough for SQL Server 2008 on Windows 2008
I recently stumbled across a great walk-through for clustering SQL Server on newer versions of Windows. It’s really thorough – everything from setting up iSCSI (in this case, to simulate a shared disk when it’s physically attached to one node – not ideal, but lets you test the walk-through), adding the required server roles, preparing …
Sep 08
Slow SQL Server queries over a linked server from Windows Server 2008
We recently ran into an issue where linked server queries where sometimes taking significantly longer than they should have – queries that executed in under a second on the source server took two minutes when executed from a remote SQL Server over a linked server connection. We assumed it was something to do with our …
Jul 08
Get process ID for IIS App Pool
Ever try to debug something on a machine with many w3wp.exe worker processes and weren’t sure which one was yours? There’s a command line you can use to tell which is which: In IIS 6 (Windows XP/2003), type: It is located in C:\Windows\System32 which is almost always part of the PATH variable so you can …
May 26
Generate an x509 certificate with an SHA256 signature hash
When authenticating with a vendor using a custom webservice, the vendor requested that we use an x509 certificate with a 2048 byte key and an SHA256 hash (sometimes referred to as SHA2, though SHA2 actually refers to the group of hashes containing SHA256, 384, and 512). Since I’d used IIS to generate our certificate (IIS …
Sep 16
Expand a disk partition under Windows XP or Server 2003
Vista/Server 2008 include support for expanding hard disk partitions in the Disk Management MMC snap-in, but XP/2003 support it as well (if you’re not afraid of the command line). To expand a partition: Open a command window Type “DISKPART” and press Enter to run the partition manager “LIST DISK” and press enter to show general …
