How 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With