sysprotects

All databases

Description

sysprotects contains information on permissions that have been granted to, or revoked from, users, groups, and roles.

Columns

The columns for sysprotects are:

Name

Datatype

Description

id

int

ID of the object to which this permission applies.

uid

int

ID of the user, group, or role to which this permission applies.

action

smallint

One of the following permissions:

  • 151 = references

  • 167 = set proxy or set session authorization

  • 193 = select

  • 195 = insert

  • 196 = delete

  • 197 = update

  • 198 = create table

  • 203 = create database

  • 205 = grant

  • 206 = revoke

  • 207 = create view

  • 221 = create trigger

  • 222 = create procedure

  • 224 = execute

  • 228 = dump database

  • 233 = create default

  • 235 = dump transaction

  • 236 = create rule

protecttype

tinyint

One of the following values:

  • 0 = grant with grant

  • 1 = grant

  • 2 = revoke

columns

varbinary(133)

Bitmap of columns to which this select or update permission applies. The bits indicate the following:

  • 0 – indicates all columns

  • 1 – means permission applies to that column

  • NULL – means no information

grantor

int

User ID of the grantor. If the grantor is a System Administrator, the user ID of the object owner is used.

Indexes

Unique clustered index On id, action, grantor, uid, protecttype