Handy SQL Script to KILL PIDs for specific databases

This little script’s helped me numerous times when refreshing environments manually from backups and had to ensure there were no left-over connections left which would’ve made the restores fail. Without furtherĀ a due:

1234567891011121314151617181920212223242526DECLARE @dbspid AS int
DECLARE @killcommand AS varchar(50)
DECLARE ConnectionKiller CURSOR FOR
SELECT sysproc.spid FROM sysprocesses AS sysproc
INNER JOIN sysdatabases AS sysdb ON
sysdb.dbid = sysproc.dbid
WHERE sysdb.NAME IN (’[DBNAME]‘)
AND [...]

Transact SQL – JOINS 101

I’ve seen quite a bit of confusion as to the purpose and application of the four basic JOIN operations available for transact SQL. Even I dread coming out of my main comfort zone (my beloved INNER JOIN) sometimes. Nonetheless, JOINS are one of the most essential building blocks to some of the more complex [...]

Oracle DBCA through XMING

Someone remind me, why do I still bother? OK, hope this helps someone, some day out there stuck in the same boat I was not 5 minutes ago. I was trying to create a DB instance on an Oracle 10.2.0.4 deployment on RHEL 5.3 64-bit located on a remote server without an X11 environment. [...]