Friday, March 23, 2012

Retrieving User/Role Privileges - How ?

Hi,

I need to read and subsequently modify the privileges (rights) of a certain SQL Server user / role from within a Visual Basic Program.

Modifying seems to be easy using standard statements like GRANT/REVOKE. But what about reading all the rights a user has ?

I have researched SQL-DMO, but didn't find what I'm looking for.

Any idea ?

MikeTry the next command in query analyzer
sp_helprotect null, 'username' to get the rights
and
sp_helpuser to get the roles of an usersql

No comments:

Post a Comment