473,395 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SQL Logins

How can I get a list of all SQL server logins that are on a given sql
server? What sql query would get me that? Or is there an sp that
gives me that. Also, if it could list what db they have rights to
that would be great also.
Jul 20 '05 #1
2 6861
Hi, Jpmc

As far the enterprise manager is concerned , it is almost a open book.
Any db cann be backed up & restored and the E.MANAGER might be
designed to view all the databases by any body. so only the log ins
are invisible when u restore the db.

but the db is in active when u try to open a db thru query analyser in
diff login which does not have the right to access the db.

The thing is u can work with any databases in E. manager .

i think u would be cleared .
With THANKS RAGHU
Jul 20 '05 #2
Len,

For a list of logins and their server roles check master..syslogins table.
To see if a login has access to a DB check DB..sysusers. syslogins table
gives you SID of each login, if this SID appears on a sysusers table in a DB
it means that user has access to this database.
To check user roles use sp_helprole and sp_helprolemember procedures.

In general, if you are looking for some kind of information that Enterprise
Manager can provide, simply run Profiler and go get the information using
EM, then check Profiler's log to get an idea how to do the same in your
program. This at least gives you some SP names to look up in Books Online.

Good luck,
Shervin

"Len Svitenko" <it******************@yahoo.com> wrote in message
news:60**************************@posting.google.c om...
How can I get a list of all SQL server logins that are on a given sql
server? What sql query would get me that? Or is there an sp that
gives me that. Also, if it could list what db they have rights to
that would be great also.

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Albe V° | last post by:
On a huge Sql-Server 7 installation, we have various client applications distributed along the Lan, accessing one main database. Each application accesses the db using one out of around ten...
1
by: Dave | last post by:
I am doing a complete backup on a sql 7 db and then doing a complete restore (with overwrite existing db) on a sql 2000 server. This is now our hot standby server. I have the process automated and...
1
by: David McGeorge | last post by:
I am confused about windows account, win dimain account, sql login accoun and sql database user account.... can you give me a fresh example to show the exact relationship between them and how they...
4
by: tchangmian | last post by:
Hi, I would like to create an auto-lock out module where users are unable to continue login attempt after 3-5 unsuccessful logins. In addition, the user account are automatically suspended after...
3
by: mgPA | last post by:
Short: How can I limit the number of concurrent logins to Access (2000) DB? Long: I seem to be having the problem discussed in previous postings of having more than 9 or 10 concurrent logins. ...
4
by: Burt | last post by:
Hi All, I need to develop an C# internet app with logins, eg you create a username and password, the password can be emailed to you if you forget it, you can change the password etc. Before I...
2
by: happyjenny52 | last post by:
Hi, I work as an IT Administrator and part of my job role is to use Enterprise Manager and Query Analyzer to backup the logins and permissions for each database on our SQL Servers. This...
8
by: Simon Gorski | last post by:
I have a large problem, and I believe there is not yet a way to solve this using IIS and ASP.NET. I hope someone has a solution which we couldn't find. The current situation When a user logs...
3
by: Inna | last post by:
Hello all, I am looking for the script, which I believe exists already.I need to be able to populate the script for security of one database and apply it to another database, even if it is located...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.