Archive

Posts Tagged ‘MSSQL Database managment’

Setting up Single user database connection on MSSQL Server

August 13th, 2009 harry 1 comment

**** Use coupon whukharry to avail a great discount of 10% on every order you placed at http://www.webhosting.uk.com/

mssql_hosting Setting up Single user database connection on MSSQL Server

Using single user database connection mode will help you to manage and maintain databases. Single User mode allows only one single user to connect a database hence if there are other users connected to the database and you  switched the database to single user mode then their connections to database will be closed without any warning message basically single user mode is used when you are doing maintenance activities.

Follow the steps to start MSSQL server in Single User mode :-

On your server in RDP :
Start >> Run >> type in CMD and hit Ok
>> it will open Command Prompt
>> execute the following command := net stop MSSqlServer ( this will stop the SQL service )
>> now to start SQL in Single User mode execute following command := sqlservr -m

Setting up a single database into Single User Mode !!!!

You can even set a single database in ’single user mode’ using an alternative procedure but this process can not be used to set the MASTER database into single user mode.

# Connect to the SQL Server using SQL Query Analyzer with SA user

Execute the following command :-
alter database database-name set SINGLE_USER ( where “database-name” is actual name of the database. )
This can not be used to place the databases MASTER, MSDB or TEMPDB in single user mode.
# To set the database back into normal multi-user mode execute the following command :-
alter database db-name set MULTI_USER

UK Dedicated Server Hosting