March 29, 2011 at 5:44 am
Comments posted to this topic are about the item Killing User Connection(session) connected to the Database.
Thanks.
April 8, 2011 at 7:10 am
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.:-)
April 18, 2011 at 10:45 am
April 18, 2011 at 2:09 pm
Sorry, couldn't get the hyperlink. Could you please suggest where you can see the interlink?
Thanks.
April 18, 2011 at 4:44 pm
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/[/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,
Colin.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply