开发者

Checking if SQL Server database is running in MULTI_USER mode

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜