If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Which mode SQL Server is running???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-09, 18:46
frank.svs frank.svs is offline
Registered User
 
Join Date: Nov 2007
Posts: 41
Which mode SQL Server is running???

Hi Everyone,

After connecting to the instance, as a user/ developer can i know in which mode my SQL Server is running (i.e MULTI_USER mode or Single user mode). Is there any query to get this information.

Any help would be greatly appreciated.

Thank You.
Reply With Quote
  #2 (permalink)  
Old 07-02-09, 00:16
wilvis wilvis is offline
Registered User
 
Join Date: Jun 2009
Posts: 26
Not sure if you can check it via a query but the easiest way is to find out is to open SQL Server Management Studio and connect to your server / instance. If a database is in single user mode it will have "Single User" in brackets after the database name.
__________________
Wilvis
Databases Made Easy
Reply With Quote
  #3 (permalink)  
Old 07-02-09, 00:21
wilvis wilvis is offline
Registered User
 
Join Date: Jun 2009
Posts: 26
You got me curious so I did a search... it's actually pretty easy. You need to use the DATABASEPROPERTYEX statement... so run this SQL:

select DATABASEPROPERTYEX ('yourdatabasenamehere', 'useraccess')

and it will return either multi_user or single_user
__________________
Wilvis
Databases Made Easy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On