Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Kill All Users in A Given Database

    Nice script!

    RequestID added to #tmpUsers for SQL2005

    -----------------------

    Alter PROCEDURE KillALLUsers @dbname varchar(50) as

    SET NOCOUNT ON

    DECLARE @strSQL varchar(255)

    PRINT 'Killing Users'

    PRINT '-----------------'

    CREATE table #tmpUsers(

    spid int,

    eid int,

    status varchar(30),

    loginname varchar(50),

    hostname varchar(50),

    blk int,

    dbname varchar(50),

    cmd varchar(30),

    request_id int)

    INSERT...

Viewing post 1 (of 1 total)