|
Kristen
Test
United Kingdom
22191 Posts |
Posted - 09/19/2006 : 08:13:11
|
What do you want to lock it for? If you want to prevent users accessing it whilst you perform a new version roll-out then:
ALTER DATABASE MyDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
or possibly
ALTER DATABASE MyDatabaseName SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
if the application is not logging on as SA - which is a VERY bad idea anyway!
If you just want to lock the database whilst you update a few records then there are better ways of solving that particular problem
Kristen |
 |
|