SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Roles
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

honey_191
Starting Member

49 Posts

Posted - 05/09/2008 :  15:37:09  Show Profile  Reply with Quote
Hi,can anybody tell me the script for how to find out for a particular login n for a particular database ,what are the database roles they have??

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 05/09/2008 :  15:49:03  Show Profile  Reply with Quote
So you think what I have given is a waste. Did you ever try that?
Go to Top of Page

honey_191
Starting Member

49 Posts

Posted - 05/09/2008 :  15:57:44  Show Profile  Reply with Quote
No,I mean can i get every thing in one query?
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 05/09/2008 :  16:26:18  Show Profile  Reply with Quote
Without trying how can you say that's not a right one.

Did you try with sp_helplogins? you will get all databases and associated role they have .
Go to Top of Page

honey_191
Starting Member

49 Posts

Posted - 05/12/2008 :  17:55:13  Show Profile  Reply with Quote
If i need to find out all the logins(suppose 700 logins) & all the databases,is there any script for this?
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37446 Posts

Posted - 05/12/2008 :  18:22:01  Show Profile  Visit tkizer's Homepage  Reply with Quote
honey_191, did you even try running sp_helplogins to see what it returns? How hard is it for you to test this?!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 05/12/2008 :  18:30:00  Show Profile  Reply with Quote
she thinks that doesn't work. She needs long-lengthy script.
Go to Top of Page

honey_191
Starting Member

49 Posts

Posted - 05/12/2008 :  21:29:02  Show Profile  Reply with Quote
Sorry Tara & sodeep,I tried sp_helplogins.If i use this i can able to get one login info at a time.But what if i have some 500 logins in a server,Do i need to run for each & every login?Is there any other options?Sorry to bother u..
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 05/12/2008 :  22:31:31  Show Profile  Reply with Quote
Just run sp_helplogins.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37446 Posts

Posted - 05/12/2008 :  22:40:13  Show Profile  Visit tkizer's Homepage  Reply with Quote
quote:
Originally posted by honey_191

Sorry Tara & sodeep,I tried sp_helplogins.If i use this i can able to get one login info at a time.But what if i have some 500 logins in a server,Do i need to run for each & every login?Is there any other options?Sorry to bother u..



You don't run it for every login. It outputs everything that you want. You apparently haven't tried it yet.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

honey_191
Starting Member

49 Posts

Posted - 05/12/2008 :  23:32:58  Show Profile  Reply with Quote
Yeh,I got it.Thanks for the help.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000