Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sysdatabases & user access

Posted on 2010-08-20
3
Medium Priority
?
378 Views
Last Modified: 2012-06-27
is 'mode' have the value for the mode of the database?

http://msdn.microsoft.com/en-us/library/aa260406%28SQL.80%29.aspx
does not tell what it is?

or is there another place to check for SINGLE/MULTI user mode info for SQL 2000?

thanks
0
Comment
Question by:anushahanna
3 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 1100 total points
ID: 33490239
Bitmask 4096 of the status column in the same link

select case when status & 4096 = 4096 then 'Single User' else 'Multi User' end, *
from master..sysdatabases
0
 
LVL 38

Assisted Solution

by:Jim P.
Jim P. earned 900 total points
ID: 33490315
You can use the sp_dboption 'single user' into a variable and then evaluate from there.

http://msdn.microsoft.com/en-us/library/ms187310.aspx
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33502322
very excellent. Thanks.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question