开发者

Checking if SQL Server database is running in MULTI_USER mode

开发者 https://www.devze.com 2023-01-19 11:52 出处:网络
Ho开发者_运维技巧w can I check what mode a particular database is in?try using the DATABASEPROPERTYEX

Ho开发者_运维技巧w can I check what mode a particular database is in?


try using the DATABASEPROPERTYEX

SELECT DATABASEPROPERTYEX('databasename','UserAccess')

if the database is in multi_user mode must return MULTI_USER


use sp_dboption like this

EXEC sp_dboption 'DB_NAME', 'single user'

to set it add the option third parameter. See below

Checking if SQL Server database is running in MULTI_USER mode

0

精彩评论

暂无评论...
验证码 换一张
取 消