Zum Inhalt springen

Terminate a user session / process in SQLServer Flex

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

Ends a user process in SQLServer Flex that is based on the session ID.

Terminate the session / process with the stored procedure “kill_sessions”

Section titled “Terminate the session / process with the stored procedure “kill_sessions””

With the following Stored Procedure you will be able to end a user process / session for:

  • a database (currently only user databases are considered) - When specified, terminate all SPIDs inside of the database.

exec [msdb].[STACKIT].[kill_sessions] @database_name = ‘dbname

  • a user name - When specified, terminates all SPIDs under the login name.

exec [msdb].[STACKIT].[kill_sessions] @login_name = ‘loginname

  • a session ID - When specified, terminates the selected SPID.

exec [msdb].[STACKIT].[kill_sessions] @sID = number

Only users with the following database roles can execute the Stored Procedure.

  • ##STACKIT_ProcessManager##
  • ##STACKIT_ServerManager##