Collections:
SINGLE_USER/MULTI_USER - Database User Access Options in SQL Server
How to set database to be SINGLE_USER in SQL Server?
✍: FYIcenter.com
Databases in SQL Server have three user access options:
You can use the "ALTER DATABASE" to change database user access options as shown in the tutorial below:
USE FyiCenterComData GO ALTER DATABASE FyiCentercomData SET SINGLE_USER GO
Now connect to server with another client session and try:
USE FyiCenterComData GO Msg 924, Level 14, State 1, Line 1 Database 'FyiCenterComData' is already open and can only have one user at a time.
Go back to the first session and re-set the database to MULTI_USER:
ALTER DATABASE FyiCenterComData SET MULTI_USER GO
⇒ System Databases Used by SQL Servers in SQL Server
⇐ READ_ONLY/READ_WRITE - Database Update Options in SQL Server
2016-11-20, 2884🔥, 0💬
Popular Posts:
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two char...
How to detect the collation coercibility associated to a given character string using the COERCIBILI...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...