473,804 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6886
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..syslogi ns 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_helprolememb er 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.co m> wrote in message
news:60******** *************** ***@posting.goo gle.com...
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
3291
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 logins. Most of them, have only DBDataReader right on the db, as they are consultation consolles only. In order to monitor db usage, the customer requires some kind of log of user access.
1
5907
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 it works great. The only problem I have now is the logins dont work. I have tried running EXEC sp_change_users_login 'Report', and the logins appear. However, when I run EXEC sp_helplogins 'joe', the results are empty. So, I am guessing all...
1
1666
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 work together?
4
3872
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 stipulated unsuccessful logins. Is there any sample coding in ASP or Javascript for me to refer to?? Thanks alot!!!
3
4451
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. If I can limit the number of concurrent logins to 8 or 9, that would satisfy our needs. Thanks
4
2820
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 reinvent the wheel, does anyone know of sample code online that will do this? Perhaps something from MS? I looked around but couldn't find anything.
2
1995
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 information is used as a backup in the event of a server failing so we then have something to fall back on if we need to add the same logins/permissions again. This takes ages to do, as I have to manually enter all the information
8
1740
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 in to our website, we implement a single login for multiple services (let's call them services A-D). This means, that on the backend, while sampleuser logs in to our service with only one username and password, he is automatically logged in to...
3
30310
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 on another server: 1. All logins which not exist have to be created and which exists ignored including the NT accounts 2. Users same as the old database + the existing ones stay in database 3. Passwords for the new logins. 4. All...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10319
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10070
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.