sys.credentials (Transact-SQL)sys.credentials (Transact-SQL)

适用于: SQL Server AZURE SQL 托管实例  是 azure Synapse Analytics 并行数据仓库

为每个服务器级凭据返回一行。Returns one row for each server-level credential.

列名称Column name 数据类型Data type 说明Description
credential_idcredential_id intint 凭据的 ID。ID of the credential. 在服务器中是唯一的。Is unique in the server.
namename sysnamesysname 凭据的名称。Name of the credential. 在服务器中是唯一的。Is unique in the server.
credential_identitycredential_identity nvarchar(4000)nvarchar(4000) 要使用的标识的名称。Name of the identity to use. 这通常是一个 Windows 用户。This will generally be a Windows user. 它不必是唯一的。It does not have to be unique.
create_datecreate_date datetimedatetime 创建凭据的时间。Time at which the credential was created.
modify_datemodify_date datetimedatetime 上次修改凭据的时间。Time at which the credential was last modified.
target_typetarget_type nvarchar (100)nvarchar(100) 凭据类型。Type of credential. 对于传统凭据,返回 NULL;对于映射到加密提供程序的凭据,返回 CRYPTOGRAPHIC PROVIDER。Returns NULL for traditional credentials, CRYPTOGRAPHIC PROVIDER for credentials mapped to a cryptographic provider. 有关外部密钥管理提供程序的详细信息,请参阅 (EKM)的可扩展密钥管理 For more information about external key management providers, see Extensible Key Management (EKM).
target_idtarget_id intint 该凭据映射到的对象的 ID。ID of the object that the credential is mapped to. 对于传统凭据,返回 0;对于映射到加密提供程序的凭据,返回非 0 值。Returns 0 for traditional credentials and non-0 for credentials mapped to a cryptographic provider. 有关外部密钥管理提供程序的详细信息,请参阅 (EKM)的可扩展密钥管理 For more information about external key management providers, see Extensible Key Management (EKM).

备注Remarks

有关数据库级凭据,请参阅 sys.database_scoped_credentialsFor database-level credentials, see sys.database_scoped_credentials.

权限Permissions

需要 VIEW ANY DEFINITION 权限或 ALTER ANY CREDENTIAL 权限。Requires either VIEW ANY DEFINITION permission or ALTER ANY CREDENTIAL permission. 此外,不能拒绝主体 VIEW ANY DEFINITION 权限。In addition, the principal must not be denied VIEW ANY DEFINITION permission.

另请参阅See Also

sys.database_scoped_credentials sys.database_scoped_credentials
凭据(数据库引擎) Credentials (Database Engine)
安全性目录视图 (Transact-SQL) Security Catalog Views (Transact-SQL)
主体(数据库引擎) Principals (Database Engine)
CREATE CREDENTIAL (Transact-SQL)CREATE CREDENTIAL (Transact-SQL)