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)
 User permissions

Author  Topic 

sqlpal2007
Posting Yak Master

200 Posts

Posted - 2007-09-07 : 09:22:27
Hi All,

I need to find out the permissions a login has on all the databases on production server. I need to find that for all the sql logins (employees) who left the company. Just wanted to make sure their access is removed from all the databases.

Can anyone tell me how to do it? Is there any system stored procedure to find that out?

Thanks in advance
-P

nr
SQLTeam MVY

12543 Posts

Posted - 2007-09-07 : 09:58:49
To find out which databases they are mapped tojust look at sysusers in the database.
To see what the user has permsissions on see syspermissions in the database.
Note - users can gain permssions via a role too.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-08 : 00:10:07
Tried sp_helplogins?
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2007-09-08 : 14:54:36
an ounce of prevention is better than a pound of cure


use windows authentication for direct database access, this way your AD admin manages this type of cleanups...
1. create AD group for these
2. add AD accounts
3. add AD group to sql server
4. provide rights

so when your admin removes the account in the group, the person's db permissions gets removed as well

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -