Killing User Connection(session) connected to the Database.

  • Comments posted to this topic are about the item Killing User Connection(session) connected to the Database.


  • If your application or access to the database doesn't use dbo or sa authority you can just use:


    This will drop all user connections and rollback any non-committed transactions. When RESTRICTED_USER is specified, only members of the db_owner, dbcreator, or sysadmin roles can use the database.

    We use this to restrict access to a system so we can backup Production databases prior to a deployment.:-)

  • Hi Sourav,

    You've marked this as being compatible with SQL Scripts Manager ([/url]), but I don't think it is. Are you able to edit it to correct this?



  • Sorry, couldn't get the hyperlink. Could you please suggest where you can see the interlink?


  • Sorry, I wasn't clear in my previous post. When you created your post at, I believe you ticked the box to "Include code for SQL Scripts Manager", and then you pasted your T-SQL script into the box that's supposed to contain the XML-wrapped script that runs within the SQL Scripts Manager tool; whereas you needed to paste your code into the box entitled "Insert your SQL code here".

    So your script is now showing up at[/url], which is a list of scripts that have been wrapped up in the XML format that allows them to run within SQL Scripts Manager.

    Are you able to edit your contribution, to remove the SQL Scripts Manager content?

    Best regards,


Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply