Friday, March 9, 2012

Logins & its associated tables.

Hi All,

Does anyone knows the query/Script, which gives the list of tables the logins( SQL & Windows Authenticated) have access to.

In other words, the output should be logins and their access to respective tables.

Thanks for all your help.

Naj,

Exec sp_helprotect

Run the above statement in your database, you will see all your objects, not only tables and who has access to those objects. More info, refer Books online - search sp_helprotect

Sample output

--

Owner Object Grantee Grantor ProtectType Action Column

- - --

dbo NarasApp Naras\jay dbo Grant Select (All+New)

dbo NarasApp public dbo Grant Select (All+New)

--

Here Object column shows the name of object and Grantee column shows who has access on the object.

Thanks.

Naras.

No comments:

Post a Comment