RESTRICTED_USER

Before changing the database schema, I issue:

ALTER DATABASE SET RESTRICTED_USER

Upon completion:

ALTER DATABASE SET MULTI_USER

I understand that a running transaction will continue until completion.

Q: Is there a way to wait for all regular users to leave the database?

Q: Can ordinary users issue more transactions? Can they continue to work until disconnected from the server?

+5
source share
1 answer

From SQL Server Books Online

http://msdn.microsoft.com/en-us/library/aa933082(SQL.80).aspx

If the abort clause is omitted, the ALTER DATABASE query waits indefinitely for the transaction to complete or roll back on its own.

, SET RESTRICTED_USER , .

, db_owner dbcreator sysadmin .

+2

All Articles