Uncategorized

Switch database to single user mode

EXEC [sp_dboption] 'MyDatabase', 'single user', 'TRUE'
EXEC [sp_dboption] -- display list of all avaiable options
EXEC [sp_dboption] 'MyDatabase' -- display list of options set to 1
EXEC [sp_dboption] 'MyDatabase', 'single user' -- display actual option setting
GO