sys.certificates (Transact-SQL)sys.certificates (Transact-SQL)

适用对象:是SQL Server 是Azure SQL 数据库 是Azure Synapse Analytics (SQL DW) 是并行数据仓库 APPLIES TO: yesSQL Server yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) yesParallel Data Warehouse

为数据库中的每个证书返回一行。Returns a row for each certificate in the database.

列名称Column name 数据类型Data type 说明Description
路径名name sysnamesysname 证书的名称。Name of the certificate. 在该数据库中是唯一的。Is unique within the database.
certificate_idcertificate_id 整形int 证书的 ID。ID of the certificate. 在该数据库中是唯一的。Is unique within the database.
principal_idprincipal_id 整形int 拥有此证书的数据库主体的 ID。ID of the database principal that owns this certificate.
pvt_key_encryption_typepvt_key_encryption_type char (2)char(2) 私钥加密方式。How the private key is encrypted.

NA = 证书没有私钥NA = There is no private key for the certificate

MK = 使用主密钥加密私钥MK = Private key is encrypted by the master key

PW = 使用用户定义的密码加密私钥PW = Private key is encrypted by a user-defined password

SK = 使用服务主密钥加密私钥。SK = Private key is encrypted by the service master key.
pvt_key_encryption_type_descpvt_key_encryption_type_desc nvarchar (60)nvarchar(60) 对私钥加密方式的说明。Description of how the private key is encrypted.

NO_PRIVATE_KEYNO_PRIVATE_KEY

ENCRYPTED_BY_MASTER_KEYENCRYPTED_BY_MASTER_KEY

ENCRYPTED_BY_PASSWORDENCRYPTED_BY_PASSWORD

ENCRYPTED_BY_SERVICE_MASTER_KEYENCRYPTED_BY_SERVICE_MASTER_KEY
is_active_for_begin_dialogis_active_for_begin_dialog bitbit 如果为 1,则证书用于启动加密的服务对话。If 1, this certificate is used to initiate encrypted service dialogs.
issuer_nameissuer_name nvarchar (442)nvarchar(442) 证书颁发者的名称。Name of certificate issuer.
cert_serial_numbercert_serial_number nvarchar (64)nvarchar(64) 证书的序列号。Serial number of certificate.
sidsid varbinary (85)varbinary(85) 此证书的登录 SID。Login SID for this certificate.
string_sidstring_sid nvarchar(128)nvarchar(128) 此证书的登录 SID 的字符串表示形式。String representation of the login SID for this certificate
主题subject nvarchar (4000)nvarchar(4000) 此证书的主题。Subject of this certificate.
expiry_dateexpiry_date datetime 证书的过期时间。When certificate expires.
start_datestart_date datetime 证书生效的时间。When certificate becomes valid.
指纹thumbprint varbinary (32)varbinary(32) 证书的 SHA-1 哈希。SHA-1 hash of the certificate. SHA-1 哈希在全局内唯一。The SHA-1 hash is globally unique.
attested_byattested_by nvarchar(260)nvarchar(260) 仅供系统使用。System use only.
pvt_key_last_backup_datepvt_key_last_backup_date datetime 上次导出证书的私钥的日期和时间。The date and time the certificate's private key was last exported.

权限Permissions

目录视图中仅显示用户拥有的安全对象的元数据,或用户对其拥有某些权限的安全对象的元数据。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission.有关详细信息,请参阅元数据可见性配置For more information, see Metadata Visibility Configuration.

另请参阅See Also

Transact-sql)(安全目录视图 Security Catalog Views (Transact-SQL)
Transact-sql)的目录视图 ( Catalog Views (Transact-SQL)
加密层次结构 Encryption Hierarchy
(Transact-sql)创建证书CREATE CERTIFICATE (Transact-SQL)