With Windows SQL Server there are 3 user access mode settings per DB.
My question is, when exactly do you put a database in the "Single_User" of the "Restricted_User" mode?
For example, if you want to update the SQL Server and thus prevent further sessions from being established for the duration of the update?
Typical Restricted_User
and Single_User
are used when doing maintenance that needs to be done when the applications are offline but you still need to access the data or schema.
Examples
So basically when the DBAs/Developers wants to make sure nobody else can access the database but they still needs to be able to perform tasks.
In the enterprise environment this is often a fail-safe, as access to the database will probably be limited by firewalls, user policies when doing one of these tasks.
Patching SQL server or the OS is done when the service is stopped, as often OS patches require reboots and SQL Server patches require service restarts. When running in a clustered environment, it's done 1 node at the time, to maintain up-time. So restricted access is not used in these cases as the SQL Server is offline.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.