Showing posts with label rights. Show all posts
Showing posts with label rights. Show all posts

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

Friday, March 9, 2012

Retrieving all user rights in SQL 2000/2005

How to retrieve all users (local and domain) in SQL and display there
rights in roles, SUID, database, etc.?Hello,
Take a look into sp_helplogins and sp_helprotect system stored procedures
in books online.
Thanks
Hari
<paul.leistra@.gmail.com> wrote in message
news:1175670638.835844.157430@.p77g2000hsh.googlegroups.com...

> How to retrieve all users (local and domain) in SQL and display there
> rights in roles, SUID, database, etc.?
>