Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Killing the DB :P

    Something like this will work:

    DECLARE @spid_table TABLE (spid smallint)

    DECLARE @spid smallint,

     @kill nvarchar(11)

    INSERT INTO @spid_table

    SELECT spid FROM master..sysprocesses

    WHERE dbid=DB_ID(db_name()) AND spid <> @@spid

    WHILE (SELECT count(spid) FROM @spid_table) > 0

    BEGIN

     SET @spid = (SELECT TOP 1...

Viewing post 1 (of 1 total)