Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL Database users and their roles

Author  Topic 

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2006-10-13 : 14:37:55
Hi,
Is there any script around that would help me find:
1. number of logins on a server.
2. Which datbases they have access to and what levels of permissions?
3. Which Databases they own on a server, or alternately: which databases are being owned by which owners?

The thing is I am migrating some servers from 7/2000 to 2005.
I feel this is a good time to cut down on access. But instead of going through all servers and manually recording all info, I thought this info might be buried in the server somewhere...
I went through every single table in master database. There is no table that defines that uid 16384 is a DBO and so on.

So if anybody wrote a script to detail the above, and wouldn't mind sharing it, would be great.

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-10-13 : 15:14:56
Have you tried sp_helplogins?
Go to Top of Page

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2006-10-17 : 13:13:48
yep, that did not help much, it only gives logins and which are their main databases.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-10-17 : 14:08:43
Did you look at both tables that it returns - the second one tells you every user that is mapped to every login in every database. That's everything you wanted except permissions, which you can get in each database with sp_helprotect.

Go to Top of Page

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2006-10-18 : 16:06:07
That is cool, it worked.
Thank you sir.
Go to Top of Page
   

- Advertisement -