Skip to content

Commit bef08d5

Browse files
DanielAdenijirwestMSFT
authored andcommitted
Refresh sys-certificates-transact-sql.md and add PR 8183
1 parent b2b1746 commit bef08d5

1 file changed

Lines changed: 36 additions & 34 deletions

File tree

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
title: "sys.certificates (Transact-SQL)"
3-
description: sys.certificates (Transact-SQL)
3+
description: sys.certificates returns a row for each certificate in the database.
44
author: VanMSFT
55
ms.author: vanto
6-
ms.date: "03/15/2017"
6+
ms.reviewer: randolphwest
7+
ms.date: 12/21/2022
78
ms.service: sql
89
ms.subservice: system-objects
910
ms.topic: "reference"
@@ -16,40 +17,41 @@ helpviewer_keywords:
1617
- "sys.certificates catalog view"
1718
dev_langs:
1819
- "TSQL"
19-
ms.assetid: e5046102-a65c-401e-b80d-05636884dec9
2020
monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current"
2121
---
2222
# sys.certificates (Transact-SQL)
23+
2324
[!INCLUDE [sql-asdb-asdbmi-asa-pdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
2425

25-
Returns a row for each certificate in the database.
26-
27-
|Column name|Data type|Description|
28-
|-----------------|---------------|-----------------|
29-
|**name**|**sysname**|Name of the certificate. Is unique within the database.|
30-
|**certificate_id**|**int**|ID of the certificate. Is unique within the database.|
31-
|**principal_id**|**int**|ID of the database principal that owns this certificate.|
32-
|**pvt_key_encryption_type**|**char(2)**|How the private key is encrypted.<br /><br /> NA = There is no private key for the certificate<br /><br /> MK = Private key is encrypted by the master key<br /><br /> PW = Private key is encrypted by a user-defined password<br /><br /> SK = Private key is encrypted by the service master key.|
33-
|**pvt_key_encryption_type_desc**|**nvarchar(60)**|Description of how the private key is encrypted.<br /><br /> NO_PRIVATE_KEY<br /><br /> ENCRYPTED_BY_MASTER_KEY<br /><br /> ENCRYPTED_BY_PASSWORD<br /><br /> ENCRYPTED_BY_SERVICE_MASTER_KEY|
34-
|**is_active_for_begin_dialog**|**bit**|If 1, this certificate is used to initiate encrypted service dialogs.|
35-
|**issuer_name**|**nvarchar(442)**|Name of certificate issuer.|
36-
|**cert_serial_number**|**nvarchar(64)**|Serial number of certificate.|
37-
|**sid**|**varbinary(85)**|Login SID for this certificate.|
38-
|**string_sid**|**nvarchar(128)**|String representation of the login SID for this certificate|
39-
|**subject**|**nvarchar(4000)**|Subject of this certificate.|
40-
|**expiry_date**|**datetime**|When certificate expires.|
41-
|**start_date**|**datetime**|When certificate becomes valid.|
42-
|**thumbprint**|**varbinary(32)**|SHA-1 hash of the certificate. The SHA-1 hash is globally unique.|
43-
|**attested_by**|**nvarchar(260)**|System use only.|
44-
|**pvt_key_last_backup_date**|**datetime**|The date and time the certificate's private key was last exported.|
45-
46-
## Permissions
47-
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
48-
49-
## See Also
50-
[Security Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/security-catalog-views-transact-sql.md)
51-
[Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
52-
[Encryption Hierarchy](../../relational-databases/security/encryption/encryption-hierarchy.md)
53-
[CREATE CERTIFICATE &#40;Transact-SQL&#41;](../../t-sql/statements/create-certificate-transact-sql.md)
54-
55-
26+
Returns a row for each certificate in the database.
27+
28+
| Column name | Data type | Description |
29+
| --- | --- | --- |
30+
| **name** | **sysname** | Name of the certificate. Is unique within the database. |
31+
| **certificate_id** | **int** | ID of the certificate. Is unique within the database. |
32+
| **principal_id** | **int** | ID of the database principal that owns this certificate. |
33+
| **pvt_key_encryption_type** | **char(2)** | How the private key is encrypted.<br /><br />NA = There is no private key for the certificate<br /><br />MK = Private key is encrypted by the master key<br /><br />PW = Private key is encrypted by a user-defined password<br /><br />SK = Private key is encrypted by the service master key. |
34+
| **pvt_key_encryption_type_desc** | **nvarchar(60)** | Description of how the private key is encrypted.<br /><br />NO_PRIVATE_KEY<br /><br />ENCRYPTED_BY_MASTER_KEY<br /><br />ENCRYPTED_BY_PASSWORD<br /><br />ENCRYPTED_BY_SERVICE_MASTER_KEY |
35+
| **is_active_for_begin_dialog** | **bit** | If 1, this certificate is used to initiate encrypted service dialogs. |
36+
| **issuer_name** | **nvarchar(442)** | Name of certificate issuer. |
37+
| **cert_serial_number** | **nvarchar(64)** | Serial number of certificate. |
38+
| **sid** | **varbinary(85)** | Login SID for this certificate. |
39+
| **string_sid** | **nvarchar(128)** | String representation of the login SID for this certificate |
40+
| **subject** | **nvarchar(4000)** | Subject of this certificate. |
41+
| **expiry_date** | **datetime** | Date and time when certificate expires. |
42+
| **start_date** | **datetime** | Date and time when certificate becomes valid. |
43+
| **thumbprint** | **varbinary(32)** | SHA-1 hash of the certificate. The SHA-1 hash is globally unique. |
44+
| **attested_by** | **nvarchar(260)** | System use only. |
45+
| **pvt_key_last_backup_date** | **datetime** | The date and time the certificate's private key was last exported. |
46+
| **key_length** | **int** | The certificate's key length.<br /><br />**Applies to:** [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] and later versions. |
47+
48+
## Permissions
49+
50+
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
51+
52+
## See also
53+
54+
- [Security Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/security-catalog-views-transact-sql.md)
55+
- [Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
56+
- [Encryption Hierarchy](../../relational-databases/security/encryption/encryption-hierarchy.md)
57+
- [CREATE CERTIFICATE (Transact-SQL)](../../t-sql/statements/create-certificate-transact-sql.md)

0 commit comments

Comments
 (0)