close all connections to current database

Useful if the database refuses to go offline for backup/restore DECLARE @DatabaseName nvarchar(50) DECLARE @SPId int DECLARE @CMD varchar(100) SET @DatabaseName = DB_NAME() DECLARE my_cursor CURSOR FAST_FORWARD FOR SELECT SPId FROM MASTER..SysProcesses WHERE DBId = DB_ID(@DatabaseName) AND SPId <> @@SPId OPEN my_cursor FETCH NEXT FROM my_cursor INTO @SPId WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CMD […]

Cannot install SQL 2005 (server and/or client)

Again the astoundingly complex Microsoft installer lost me several hours for an otherwise simple task. Things that can go wrong (and they all went wrong, under different circumstances, on several systems): 1. “Unexpected error occurred” – if you copy the contents of the two installation CDs, make sure one is in a subfolder called “Servers” […]

Why can’t I send e-mail from ASP (.Net) anymore?

Things that used to work mighty fine in 2000 server suddenly break in 2003. 1. CDONTS is no longer available, but it works if you copy one dll from a 2000 system and do a regsvr32 %windir%\system32\cdonts.dll 2. Classic ASP using CDO fails with error “cdo.message error 80070005”. Reason: the user IIS runs under (usually […]

Cannot uninstall application!?

Windows Installer is an unnecessarily complex tool, that checks weird things like domain policies or vendor digital signatures, when all you’d ask from it is to place a bloody shortcut on the desktop. It also tends to leave a lot of crap around when anything goes wrong. A few hints on how to fix it: […]

Bad Behavior has blocked 86 access attempts in the last 7 days.