You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/database-engine/configure-windows/certificate-requirements.md
+62-2Lines changed: 62 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ description: This article describes the requirements for SQL Server encryption a
4
4
author: VanMSFT
5
5
ms.author: vanto
6
6
ms.reviewer: randolphwest
7
-
ms.date: 08/26/2025
7
+
ms.date: 02/27/2026
8
+
ai-usage: ai-assisted
8
9
ms.service: sql
9
10
ms.subservice: configuration
10
11
ms.topic: concept-article
@@ -18,7 +19,7 @@ This article describes certificate requirements for [!INCLUDE [ssnoversion-md](.
18
19
19
20
For using Transport Layer Security (TLS) for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] encryption, you need to provision a certificate (one of the three digital types) that meets the following conditions:
20
21
21
-
- The certificate must be in either the local computer certificate store or the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service account certificate store. We recommend local computer certificate store as it avoids reconfiguring certificates with[!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] startup account changes.
22
+
- The certificate must be in either the local computer certificate store or the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service account certificate store. Use the local computer certificate store to avoid reconfiguring certificates when the[!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] startup account changes.
22
23
23
24
- The [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] service account must have the necessary permission to access the TLS certificate. For more information, see [Encrypt connections to SQL Server by importing a certificate](configure-sql-server-encryption.md).
24
25
@@ -101,6 +102,65 @@ For more information on SQL clusters, see [Before Installing Failover Clustering
101
102
102
103
In [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] and later versions, [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] Configuration Manager automatically validates all certificate requirements during the configuration phase itself. If [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] successfully starts after you configure a certificate, it's a good indication that [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] can use that certificate. But some client applications might still have other requirements for certificates that can be used for encryption, and you might experience different errors depending on the application being used. In that scenario, you need to check the client application's support documentation for more information on the subject.
103
104
105
+
### Verify KeySpec and Key Usage
106
+
107
+
The `KeySpec` requirement (`AT_KEYEXCHANGE`) is a common cause of certificate configuration failures. Use the following methods to verify that your certificate meets this requirement.
108
+
109
+
#### Use certutil
110
+
111
+
Run `certutil` with the `-v` option to display detailed certificate properties, including `KeySpec` and `Key Usage`:
112
+
113
+
```cmd
114
+
certutil -v -store My "<certificate_thumbprint>"
115
+
```
116
+
117
+
In the output, look for the following values:
118
+
119
+
```output
120
+
KeySpec = 1 -- AT_KEYEXCHANGE
121
+
Key Usage = Key Encipherment, Digital Signature (a0)
122
+
Enhanced Key Usage:
123
+
Server Authentication (1.3.6.1.5.5.7.3.1)
124
+
```
125
+
126
+
If `KeySpec = 2` (`AT_SIGNATURE`), the certificate can't be used for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] encryption.
127
+
128
+
#### Use PowerShell
129
+
130
+
Run the following PowerShell commands to check `KeySpec` for certificates in the local computer store:
Verify that `KeySpec` shows `Exchange` (corresponding to `AT_KEYEXCHANGE`). If it shows `Signature`, request a new certificate with the correct `KeySpec` setting.
146
+
147
+
### Create a certificate using AD CS
148
+
149
+
If your organization uses Active Directory Certificate Services (AD CS) as an internal certificate authority (CA), create a certificate that meets [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] requirements by following these steps:
150
+
151
+
1. Open the **Certificates** MMC snap-in for the local computer (`certlm.msc`).
152
+
1. Expand **Personal**, right-click **Certificates**, and select **All Tasks** > **Request New Certificate**.
153
+
1. Select **Active Directory Enrollment Policy** and select **Next**.
154
+
1. Choose a certificate template that supports server authentication. A **Web Server** or custom template configured for server authentication typically meets the requirements. Verify with your CA administrator that the template uses a legacy Cryptographic Service Provider (CSP) with `KeySpec = AT_KEYEXCHANGE`, not a Key Storage Provider (KSP).
155
+
1. On the **Certificate Properties** page:
156
+
- Set the **Common Name (CN)** to the hostname or FQDN of your [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance.
157
+
- On the **Subject Alternative Name** tab, add DNS entries for all hostnames that clients use to connect (hostname, FQDN, and any aliases).
158
+
1. Complete the enrollment wizard and verify the new certificate appears in **Personal** > **Certificates**.
159
+
1. Verify the `KeySpec` by using certutil or PowerShell as described in [Verify KeySpec and Key Usage](#verify-keyspec-and-key-usage).
160
+
161
+
> [!IMPORTANT]
162
+
> Certificates created with a Key Storage Provider (KSP), such as the **Microsoft Software Key Storage Provider**, use `KeySpec = 0` and aren't compatible with [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]. When creating your certificate template in AD CS, select a legacy CSP like **Microsoft RSA SChannel Cryptographic Provider** to ensure `KeySpec = AT_KEYEXCHANGE`.
163
+
104
164
You can use one of the following methods to check the validity of the certificate for use with [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)]:
105
165
106
166
-**sqlcheck tool**: `sqlcheck` is a command-line tool that examines the current computer and service account settings and produce a text report to the Console window that is useful for troubleshooting various connection errors. The output has the following information regarding certificates:
This article shows you how to install [SQL Server Machine Learning Services](../sql-server-machine-learning-services.md) on Windows. You can use Machine Learning Services to run Python and R scripts in-database.
19
20
20
-
> [!IMPORTANT]
21
+
> [!IMPORTANT]
21
22
> These instructions apply to [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)], [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)], and [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)]. For [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)], refer to [Install SQL Server 2022 Machine Learning Services on Windows](sql-machine-learning-services-windows-install-sql-2022.md).
22
23
24
+
## Python and R version reference
25
+
26
+
The following table shows the Python and R runtime versions included with each SQL Server release. Use this table to determine which language versions are available for your SQL Server instance.
27
+
28
+
| SQL Server version | Python version | R version |
> Starting with [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)], runtimes for R, Python, and Java are no longer installed with SQL Server Setup. Instead, install your desired custom runtimes and packages. For more information, see [Install SQL Server 2022 Machine Learning Services on Windows](sql-machine-learning-services-windows-install-sql-2022.md).
38
+
39
+
For more information about all supported versions, see [What is SQL Server Machine Learning Services?](../sql-server-machine-learning-services.md#python-and-r-versions)
40
+
23
41
<aid="bkmk_prereqs"></a>
24
42
25
43
## Preinstallation checklist
@@ -107,7 +125,7 @@ For local installations, you must run the setup as an administrator. If you inst
107
125
108
126
-**Python**
109
127
110
-
Select this option to add the Microsoft Python packages, the Python 3.5 executable, and select libraries from the Anaconda distribution.
128
+
Select this option to add the Microsoft Python packages, the Python executable, and select libraries from the Anaconda distribution. For the specific Python version included with your SQL Server release, see [Python and R version reference](#python-and-r-version-reference).
111
129
112
130
::: moniker range="=sql-server-ver15"
113
131
For information on installing and using Java, see [Install SQL Server Java Language Extension on Windows](../../language-extensions/install/windows-java.md).
@@ -387,6 +405,8 @@ To install and manage additional packages, you can set up user groups to share p
387
405
388
406
## Related content
389
407
408
+
- [What is SQL Server Machine Learning Services?](../sql-server-machine-learning-services.md)
409
+
- [Install SQL Server 2022 Machine Learning Services on Windows](sql-machine-learning-services-windows-install-sql-2022.md)
390
410
- [Python Tutorial: Deploy a linear regression model with SQL machine learning](../tutorials/python-ski-rental-linear-regression-deploy-model.md)
391
411
- [Python tutorial: Categorizing customers using k-means clustering with SQL machine learning](../tutorials/python-clustering-model.md)
392
412
- [Quickstart: Run simple R scripts with SQL machine learning](../tutorials/quickstart-r-create-script.md)
0 commit comments