Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Kill All User Sessions

    DECLARE @SQL VARCHAR(8000)

    SELECT @SQL=COALESCE(@SQL, '') + 'KILL ' + CAST(SPID AS VARCHAR(10)) + '; '

    FROM SYS.SYSPROCESSES

    SELECT @SQL

    EXEC(@SQL)

Viewing post 1 (of 1 total)