When a server-wide privilege such as own database is granted on a database, the permission is recorded in master.dbo.sysprotects, with the database ID (dbid) stored in the ID field.
All grantable permission values are stored in master.dbo.spt_values. The columns in spt_values are overloaded as:
Parameter |
Value |
---|---|
name |
Permission name string. |
number |
Internal token number of the permission (sysprotects.action). |
type |
Identifier for permission entries: |
T – permissions available and grantable in releases prior to 15.7 ESD #1 and earlier and continue to be available and grantable in 15.7 ESD #2 and later whether the granular permissions option is on or off. |
|
GP – permissions only available and grantable when granular permissions option is on. |
|
ansi_w |
Execution scope of the permission: |
1 – server-wide |
|
2 – database-wide |
|
4 – object |
|
low |
Adaptive Server version in which the permission is first introduced: |
0 – exist in versions earlier than 15.7 ESD #2. |
|
157002 – introduced in 15.7 ESD #2. |
|
high |
Token number of the permission that manages the current permission when granular permissions option is on: |
117 – manage server permissions |
|
114 – manage security permissions |
|
106 – manage database permissions |
|
97 – manage any object permission |
|
msgnum |
Bitset of the permission token:
|