|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: 2 days ago @ 9:12 AM
Points: 738,
Visits: 1,125
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 17, 2012 8:32 AM
Points: 114,
Visits: 72
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 9:43 AM
Points: 8,
Visits: 245
|
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: 2 days ago @ 9:12 AM
Points: 738,
Visits: 1,125
|
|
Sorry, couldn't get the hyperlink. Could you please suggest where you can see the interlink?
Thanks.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 9:43 AM
Points: 8,
Visits: 245
|
|
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.
|
|
|
|