Export (0) Print
Expand All

ASYMKEYPROPERTY (Transact-SQL)

Returns the properties of an asymmetric key.

Topic link icon Transact-SQL Syntax Conventions

ASYMKEYPROPERTY (Key_ID , 'algorithm_desc' | 'string_sid' | 'sid')

Key_ID

Is the Key_ID of an asymmetric key in the database. To find the Key_ID when you only know the key name, use ASYMKEY_ID. Key_ID is data type int.

'algorithm_desc'

Specifies that the output returns the algorithm description of the asymmetric key. Only available for asymmetric keys created from an EKM module.

'string_sid'

Specifies that the output returns the SID of the asymmetric key in nvarchar() format.

'sid'

Specifies that the output returns the SID of the asymmetric key in binary format.

sql_variant

Requires some permission on the asymmetric key and that the caller has not been denied VIEW permission on the asymmetric key.

The following example returns the properties of the asymmetric key with Key_ID 256.

SELECT 
ASYMKEYPROPERTY(256, 'algorithm_desc') AS Algorithm,
ASYMKEYPROPERTY(256, 'string_sid') AS String_SID,
ASYMKEYPROPERTY(256, 'sid') AS SID ;
GO

Community Additions

ADD
Show:
© 2014 Microsoft