sys.database_permissions (Transact-SQL)
为数据库中每个权限或列异常权限返回一行。对于列,每个权限有与相应的对象级别权限不同的一行。如果列权限与相应的对象权限相同,则此处无该列权限行,实际使用的权限将是对象权限。
重要提示 |
---|
列级别权限的优先级高于同一实体的对象级别权限。 |
列名 |
数据类型 |
说明 |
---|---|---|
class |
tinyint |
标识权限所在的类。 0 = 数据库 1 = 对象或列 3 = 架构 4 = 数据库主体 5 = 程序集 6 = 类型 10 = XML 架构集合 15 = 消息类型 16 = 服务约定 17 = 服务 18 = 远程服务绑定 19 = 路由 23 = 全文目录 24 = 对称密钥 25 = 证书 26 = 非对称密钥 |
class_desc |
nvarchar(60) |
权限所针对的类的说明。 DATABASE OBJECT_OR_COLUMN SCHEMA DATABASE_PRINCIPAL ASSEMBLY TYPE XML_SCHEMA_COLLECTION MESSAGE_TYPE SERVICE_CONTRACT SERVICE REMOTE_SERVICE_BINDING ROUTE FULLTEXT_CATALOG SYMMETRIC_KEY CERTIFICATE ASYMMETRIC_KEY |
major_id |
int |
存在权限的对象的 ID,根据类解释。通常情况下,这只是应用于类所表示的内容的 ID 类型。非标准解释如下: 0 = 始终为 0 1, 8 = 对象 ID 为系统对象分配负值 ID。 |
minor_id |
int |
存在权限的对象的辅助 ID,根据类解释。多数情况下,该值为零。否则,将是如下值: 1 = 列 ID(如果是列)。否则,如果是对象,则为 0。 |
grantee_principal_id |
int |
向其授予权限的数据库主体 ID。 |
grantor_principal_id |
int |
这些权限的授权者的数据库主体 ID。 |
type |
char(4) |
数据库权限类型。有关权限类型的列表,请参阅下一个表。 |
permission_name |
nvarchar(128) |
权限名称。 |
state |
char(1) |
权限状态: D = 拒绝 R = 撤消 G = 授予 W = 带授权选项的授权 |
state_desc |
nvarchar(60) |
权限状态的说明: DENY REVOKE GRANT GRANT_WITH_GRANT_OPTION |
权限类型。 |
权限名称 |
适用于安全对象 |
---|---|---|
AL |
ALTER |
APPLICATION ROLE、ASSEMBLY、ASYMMETRIC KEY、CERTIFICATE、CONTRACT、DATABASE、FULLTEXT CATALOG、MESSAGE TYPE、OBJECT、REMOTE SERVICE BINDING、ROLE、ROUTE、SCHEMA、SERVICE、SYMMETRIC KEY、USER、XML SCHEMA COLLECTION |
ALAK |
ALTER ANY ASYMMETRIC KEY |
DATABASE |
ALAR |
ALTER ANY APPLICATION ROLE |
DATABASE |
ALAS |
ALTER ANY ASSEMBLY |
DATABASE |
ALCF |
ALTER ANY CERTIFICATE |
DATABASE |
ALDS |
ALTER ANY DATASPACE |
DATABASE |
ALED |
ALTER ANY DATABASE EVENT NOTIFICATION |
DATABASE |
ALFT |
ALTER ANY FULLTEXT CATALOG |
DATABASE |
ALMT |
ALTER ANY MESSAGE TYPE |
DATABASE |
ALRL |
ALTER ANY ROLE |
DATABASE |
ALRT |
ALTER ANY ROUTE |
DATABASE |
ALSB |
ALTER ANY REMOTE SERVICE BINDING |
DATABASE |
ALSC |
ALTER ANY CONTRACT |
DATABASE |
ALSK |
ALTER ANY SYMMETRIC KEY |
DATABASE |
ALSM |
ALTER ANY SCHEMA |
DATABASE |
ALSV |
ALTER ANY SERVICE |
DATABASE |
ALTG |
ALTER ANY DATABASE DDL TRIGGER |
DATABASE |
ALUS |
ALTER ANY USER |
DATABASE |
AUTH |
AUTHENTICATE |
DATABASE |
BADB |
BACKUP DATABASE |
DATABASE |
BALO |
BACKUP LOG |
DATABASE |
CL |
CONTROL |
APPLICATION ROLE、ASSEMBLY、ASYMMETRIC KEY、CERTIFICATE、CONTRACT、DATABASE、FULLTEXT CATALOG、MESSAGE TYPE、OBJECT、REMOTE SERVICE BINDING、ROLE、ROUTE、SCHEMA、SERVICE、SYMMETRIC KEY、TYPE、USER、XML SCHEMA COLLECTION |
CO |
CONNECT |
DATABASE |
CORP |
CONNECT REPLICATION |
DATABASE |
CP |
CHECKPOINT |
DATABASE |
CRAG |
CREATE AGGREGATE |
DATABASE |
CRAK |
CREATE ASYMMETRIC KEY |
DATABASE |
CRAS |
CREATE ASSEMBLY |
DATABASE |
CRCF |
CREATE CERTIFICATE |
DATABASE |
CRDB |
CREATE DATABASE |
DATABASE |
CRDF |
CREATE DEFAULT |
DATABASE |
CRED |
CREATE DATABASE DDL EVENT NOTIFICATION |
DATABASE |
CRFN |
CREATE FUNCTION |
DATABASE |
CRFT |
CREATE FULLTEXT CATALOG |
DATABASE |
CRMT |
CREATE MESSAGE TYPE |
DATABASE |
CRPR |
CREATE PROCEDURE |
DATABASE |
CRQU |
CREATE QUEUE |
DATABASE |
CRRL |
CREATE ROLE |
DATABASE |
CRRT |
CREATE ROUTE |
DATABASE |
CRRU |
CREATE RULE |
DATABASE |
CRSB |
CREATE REMOTE SERVICE BINDING |
DATABASE |
CRSC |
CREATE CONTRACT |
DATABASE |
CRSK |
CREATE SYMMETRIC KEY |
DATABASE |
CRSM |
CREATE SCHEMA |
DATABASE |
CRSN |
CREATE SYNONYM |
DATABASE |
CRSV |
CREATE SERVICE |
DATABASE |
CRTB |
CREATE TABLE |
DATABASE |
CRTY |
CREATE TYPE |
DATABASE |
CRVW |
CREATE VIEW |
DATABASE |
CRXS |
CREATE XML SCHEMA COLLECTION |
DATABASE |
DL |
DELETE |
DATABASE、OBJECT、SCHEMA |
EX |
EXECUTE |
ASSEMBLY、DATABASE、OBJECT、SCHEMA、TYPE、XML SCHEMA COLLECTION |
IM |
IMPERSONATE |
USER |
IN |
INSERT |
DATABASE、OBJECT、SCHEMA |
RC |
RECEIVE |
OBJECT |
RF |
REFERENCES |
ASSEMBLY、ASYMMETRIC KEY、CERTIFICATE、CONTRACT、DATABASE、FULLTEXT CATALOG、MESSAGE TYPE、OBJECT、SCHEMA、SYMMETRIC KEY、TYPE、XML SCHEMA COLLECTION |
SL |
SELECT |
DATABASE、OBJECT、SCHEMA |
SN |
SEND |
SERVICE |
SPLN |
SHOWPLAN |
DATABASE |
SUQN |
SUBSCRIBE QUERY NOTIFICATIONS |
DATABASE |
TO |
TAKE OWNERSHIP |
ASSEMBLY、ASYMMETRIC KEY、CERTIFICATE、CONTRACT, DATABASE、FULLTEXT CATALOG、MESSAGE TYPE、OBJECT、REMOTE SERVICE BINDING、ROLE、ROUTE、SCHEMA、SERVICE、SYMMETRIC KEY、TYPE、XML SCHEMA COLLECTION |
UP |
UPDATE |
DATABASE、OBJECT、SCHEMA |
VW |
VIEW DEFINITION |
APPLICATION ROLE、ASSEMBLY、ASYMMETRIC KEY、CERTIFICATE、CONTRACT、DATABASE、FULLTEXT CATALOG、MESSAGE TYPE、OBJECT、REMOTE SERVICE BINDING、ROLE、ROUTE、SCHEMA、SERVICE、SYMMETRIC KEY、TYPE、USER、XML SCHEMA COLLECTION |
VWCT |
VIEW CHANGE TRACKING |
TABLE、SCHEMA |
VWDS |
VIEW DATABASE STATE |
DATABASE |