Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to identify user who is granted permission with grant option 1

Status
Not open for further replies.

masds

Technical User
Mar 3, 2005
100
CA

I want check the what permissions a user have on a table, I can see he has SELECT permission on the table, but how do I know if he has permission to grant the SELECT to other users?
 
Check the Information_Schema view TABLE_PRIVILEGES in BOL, specifically the IS_GRANTABLE column.

TABLE_PRIVILEGES
Contains one row for each table privilege granted to or by the current user in the current database. The INFORMATION_SCHEMA.TABLE_PRIVILEGES view is based on the sysprotects and sysobjects system tables.

To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA view_name.

Column name Data type Description
GRANTOR nvarchar(128) Privilege grantor.
GRANTEE nvarchar(128) Privilege grantee.
TABLE_CATALOG nvarchar(128) Table qualifier.
TABLE_SCHEMA nvarchar(128) Table owner.
TABLE_NAME sysname Table name.
PRIVILEGE_TYPE varchar(10) Type of privilege.
IS_GRANTABLE varchar(3) Specifies whether the grantee has the ability to grant permissions to others.

--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 

Thanks John! that's exactly what I want
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top