How do I lock entire database? I want an exclusive lock on the db by
a user
who is the dbo of that database only (not sa
user).
The scenario is we have a web application and each week we need to do data uploads (with etl). During this upload, the users accessing the website should not be able to read data. This is why I want database lock.
Now the catch here is, the application access the data using user say abc. Abc is dbo for that database and the etl is also done by abc login. So will db locking help in this case as the website can also read the data being a abc user?
Thanks,
TanmayaYou can use the ALTER DATABASE Name SET RESTRICTED_USER command to switch the database to administrative mode.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment