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.
| Author |
Topic |
|
pratikmehta
Starting Member
2 Posts |
Posted - 2006-04-11 : 09:58:21
|
| HiI am developing one db export utility now i have a problem i have a user name and i want to search that the user name which i have has rights on which table or tables.i mean i want a stored procedure in which i pass the username and it will return mw the list of db for which that user has right.Thanks Pratik Mehta |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-04-11 : 15:12:00
|
sp_helplogins will return that information. Read the specifics in Books Online.use mastergosp_addlogin junk, 'junk'goexec pubs..sp_grantdbaccess junkexec northwind..sp_grantdbaccess junkgosp_helplogins junkgoexec pubs..sp_dropuser junkexec northwind..sp_dropuser junkexec sp_droplogin junkoutput:LoginName SID DefDBName DefLangName AUser ARemote --------- ----------------------------------------------------- -------------------- ----- ------- junk 0xC2833AB7AE01E344A2EACA03AC9FDDD3 master us_english yes no (1 row(s) affected)LoginName DBName UserName UserOrAlias --------- ------------------ -------- ----------- junk Northwind junk User junk pubs junk User Be One with the OptimizerTG |
 |
|
|
|
|
|