Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disconect users from database before Restore

Status
Not open for further replies.

NilsBevaart

Programmer
Apr 14, 2003
53
NL
Hi all,

I am trying to set up a procedure for a data resoration to a database that might be in use at the time of restoration. I once read there are different ways to disconnect all current users to this database to be able to start the restore job.
I cannot, however, find the method and options for this. I remember there is a way to kill all connections directly or be able to block new connections, having the database free after all users disconnect themself

Any help or backround is appriciated.
Nils
 
There is no T-SQL command that would allow you to kill off all access to a specific database. If such a command did exist, dbas would have an easy time.
You can investigate the KILL command, but I doubt if you will be able to achieve your objective with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top