SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Killing User Connection(session) connected to the Database.


Killing User Connection(session) connected to the Database.

Author
Message
SQL-DBA-01
SQL-DBA-01
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13409 Visits: 3712
Comments posted to this topic are about the item Killing User Connection(session) connected to the Database.

Thanks.
SQL@DOS
SQL@DOS
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 78
If your application or access to the database doesn't use dbo or sa authority you can just use:

ALTER DATABASE db_name SET RESTRICTED_USER With ROLLBACK IMMEDIATE

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.:-)



Colin Millerchip
Colin Millerchip
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 274
Hi Sourav,

You've marked this as being compatible with SQL Scripts Manager (http://www.red-gate.com/products/dba/sql-scripts-manager/), but I don't think it is. Are you able to edit it to correct this?

Thanks,


Colin.
SQL-DBA-01
SQL-DBA-01
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13409 Visits: 3712
Sorry, couldn't get the hyperlink. Could you please suggest where you can see the interlink?

Thanks.
Colin Millerchip
Colin Millerchip
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 274
Sorry, I wasn't clear in my previous post. When you created your post at http://www.sqlservercentral.com/Contributions/New/Script, 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 http://www.sqlservercentral.com/Scripts/rgtool/, 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,


Colin.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search