Skip to content

Latest commit

 

History

History
69 lines (57 loc) · 2.82 KB

File metadata and controls

69 lines (57 loc) · 2.82 KB
title ASYMKEY_ID (Transact-SQL)
description ASYMKEY_ID (Transact-SQL)
author VanMSFT
ms.author vanto
ms.date 07/24/2017
ms.service sql
ms.subservice t-sql
ms.topic reference
ms.custom
ignite-2025
f1_keywords
AsymKey_ID
ASYMKEY_ID_TSQL
helpviewer_keywords
asymmetric keys [SQL Server], AsymKey_ID
ASYMKEY_ID function
encryption [SQL Server], asymmetric keys
identification numbers [SQL Server], asymmetric keys
IDs [SQL Server], asymmetric keys
cryptography [SQL Server], asymmetric keys
dev_langs
TSQL
monikerRange =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb

ASYMKEY_ID (Transact-SQL)

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

Returns the ID of an asymmetric key.

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

Syntax

ASYMKEY_ID ( 'Asym_Key_Name' )  

Arguments

Asym_Key_Name
The name of an asymmetric key in the database.

Return types

int

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

This example returns the ID of asymmetric key ABerglundKey11.

SELECT ASYMKEY_ID('ABerglundKey11');  
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)
ASYMKEYPROPERTY (Transact-SQL)
KEY_ID (Transact-SQL)