Skip to content

Latest commit

 

History

History
75 lines (59 loc) · 3.3 KB

asymkeyproperty-transact-sql.md

File metadata and controls

75 lines (59 loc) · 3.3 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
ASYMKEYPROPERTY (Transact-SQL)
ASYMKEYPROPERTY (Transact-SQL)
VanMSFT
vanto
07/24/2017
sql
t-sql
reference
ASYMKEYPROPERTY_TSQL
ASYMKEYPROPERTY
ASYMKEYPROPERTY
TSQL

ASYMKEYPROPERTY (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

This function returns the properties of an asymmetric key.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

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

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Arguments

Key_ID
The Key_ID of an asymmetric key in the database. If you only know the key name, use ASYMKEY_ID to find the Key_ID. Key_ID has 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.

Return types

sql_variant

Permissions

Requires appropriate permission(s) on the asymmetric key, and requires that the caller has not been denied VIEW permission on the asymmetric key. See CREATE ASYMMETRIC KEY (Transact-SQL) for more information about asymmetric key permissions.

Examples

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

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

See also

CREATE ASYMMETRIC KEY (Transact-SQL)
ALTER ASYMMETRIC KEY (Transact-SQL)
DROP ASYMMETRIC KEY (Transact-SQL)
SIGNBYASYMKEY (Transact-SQL)
VERIFYSIGNEDBYASYMKEY (Transact-SQL)
Encryption Hierarchy
sys.asymmetric_keys (Transact-SQL)
Security Catalog Views (Transact-SQL)
ASYMKEY_ID (Transact-SQL)
SYMKEYPROPERTY (Transact-SQL)