| title | CERT_ID (Transact-SQL) | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 07/24/2017 | ||||
| ms.prod | sql-non-specified | ||||
| ms.reviewer | |||||
| ms.suite | |||||
| ms.technology |
|
||||
| ms.tgt_pltfrm | |||||
| ms.topic | language-reference | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | 59cc06f5-272e-4936-8afe-afba7aba8eea | ||||
| caps.latest.revision | 23 | ||||
| author | BYHAM | ||||
| ms.author | rickbyh | ||||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx_md]
Returns the ID of a certificate.
Transact-SQL Syntax Conventions
Cert_ID ( 'cert_name' ) ' cert_name '
Is the name of a certificate in the database.
int
Certificate names are visible in the sys.certificates catalog view.
Requires some permission on the certificate and that the caller has not been denied VIEW DEFINITION permission on the certificate.
The following example returns the ID of a certificate called ABerglundCert3.
SELECT Cert_ID('ABerglundCert3');
GO sys.certificates (Transact-SQL)
CREATE CERTIFICATE (Transact-SQL)
Encryption Hierarchy