sys.asymmetric_keys (Transact-SQL)

 

Updated: June 10, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns a row for each asymmetric key.

Column nameData typeDescription
namesysnameName of the key. Is unique within the database.
principal_idintID of the database principal that owns the key.
asymmetric_key_idintID of the key. Is unique within the database.
pvt_key_encryption_typechar(2)How the key is encrypted.

NA = Not encrypted

MK = Key is encrypted by the master key

PW = Key is encrypted by a user-defined password

SK = Key is encrypted by service master key.
pvt_key_encryption_type_descnvarchar(60)Description of how the private key is encrypted.

NO_PRIVATE_KEY

ENCRYPTED_BY_MASTER_KEY

ENCRYPTED_BY_PASSWORD

ENCRYPTED_BY_SERVICE_MASTER_KEY
thumbprintvarbinary(32)SHA-1 hash of the key. The hash is globally unique.
algorithmchar(2)Algorithm used with the key.

1R = 512-bit RSA

2R = 1024-bit RSA

3R = 2048-bit RSA
algorithm_descnvarchar(60)Description of the algorithm used with the key.

RSA_512

RSA_1024

RSA_2048
key_lengthintBit length of the key.
sidvarbinary(85)Login SID for this key. For Extensible Key Management keys this value will be NULL.
string_sidnvarchar(128)String representation of the login SID of the key. For Extensible Key Management keys this value will be NULL.
public_keyvarbinary(max)Public key.
attested_bynvarchar(260)System use only.
provider_typenvarchar(120)Type of cryptographic provider:

CRYPTOGRAPHIC PROVIDER = Extensible Key Management keys

NULL = Non-Extensible Key Management keys
cryptographic_provider_guiduniqueidentifierGUID for the cryptographic provider. For non-Extensible Key Management keys this value will be NULL.
cryptographic_provider_algidsql_variantAlgorithm ID for the cryptographic provider. For non-Extensible Key Management keys this value will be NULL.

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.

Security Catalog Views (Transact-SQL)
Extensible Key Management (EKM)
Catalog Views (Transact-SQL)
Encryption Hierarchy
CREATE ASYMMETRIC KEY (Transact-SQL)

Community Additions

ADD
Show: