Thursday, 3 July 2008

How to take over a database...

--Disconnects people from the database

   1:  alter database dbname
   2:  set single_user with rollback immediate

--Allows only db owners to connect. This step must be run because if you leave it in single user mode then the Redgate GUI cannot connect.
--If you are copying and pasting the Redgate script into the same window as the above script then you do not need to run this step.

   1:  alter database dbname
   2:  set restricted_user

No comments: