sys.sysprotects (Transact-SQL)

Contains information about permissions that have been applied to security accounts in the database by using the GRANT and DENY statements.

Important

This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping SQL Server 2000 System Tables to SQL Server 2005 System Views. This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Column name

Data type

Description

id

int

ID of the object to which these permissions apply.

uid

smallint

ID of user or group to which these permissions apply. Overflows or returns NULL if the number of users and roles exceeds 32,767. For more information, see Querying the SQL Server System Catalog.

action

tinyint

Can have one of the following permissions:

26 = REFERENCES

178 = CREATE FUNCTION

193 = SELECT

195 = INSERT

196 = DELETE

197 = UPDATE

198 = CREATE TABLE

203 = CREATE DATABASE

207 = CREATE VIEW

222 = CREATE PROCEDURE

224 = EXECUTE

228 = BACKUP DATABASE

233 = CREATE DEFAULT

235 = BACKUP LOG

236 = CREATE RULE

protecttype

tinyint

Can have the following values:

204 = GRANT_W_GRANT

205 = GRANT

206 = DENY

columns

varbinary(8000)

Bitmap of columns to which these SELECT or UPDATE permissions apply.

Bit 0 = All columns.

Bit 1 = Permissions apply to that column.

NULL = No information.

grantor

smallint

User ID of the user that issued the GRANT or DENY permissions. Overflows or returns NULL if the number of users and roles exceeds 32,767. For more information, see Querying the SQL Server System Catalog.