Author |
Topic |
honey_191
Starting Member
49 Posts |
Posted - 2008-05-09 : 15:37:09
|
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
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-09 : 15:49:03
|
So you think what I have given is a waste. Did you ever try that? |
|
|
honey_191
Starting Member
49 Posts |
Posted - 2008-05-09 : 15:57:44
|
No,I mean can i get every thing in one query? |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-09 : 16:26:18
|
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 . |
|
|
honey_191
Starting Member
49 Posts |
Posted - 2008-05-12 : 17:55:13
|
If i need to find out all the logins(suppose 700 logins) & all the databases,is there any script for this? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-12 : 18:22:01
|
honey_191, did you even try running sp_helplogins to see what it returns? How hard is it for you to test this?!Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-12 : 18:30:00
|
she thinks that doesn't work. She needs long-lengthy script. |
|
|
honey_191
Starting Member
49 Posts |
Posted - 2008-05-12 : 21:29:02
|
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.. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-12 : 22:31:31
|
Just run sp_helplogins. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-12 : 22:40:13
|
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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
|
|
honey_191
Starting Member
49 Posts |
Posted - 2008-05-12 : 23:32:58
|
Yeh,I got it.Thanks for the help. |
|
|
|