How to attach SSL/TLS certificate to SQL Server?

Опубликовано: 23 Март 2026
на канале: ARSLANOV
12,765
95

In this video, I will show you how to attach SSL certificate to standalone SQL Server instance.

SQL server certificate requirements:
https://learn.microsoft.com/en-us/sql...

Command to generate self-signed certificate for SQL Server:
========================================
New-SelfSignedCertificate -KeyExportPolicy Exportable -Subject "CN=AG2019-SQLVM-1.mydom.com" -NotBefore (Get-Date) -NotAfter (Get-Date).AddMonths(6) -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1") -CertStoreLocation "cert:\LocalMachine\My" -KeySpec KeyExchange -Provider "Microsoft RSA SChannel Cryptographic Provider" -KeyUsage CertSign -HashAlgorithm sha256
========================================
*** Please change CN to the full computer name. In my case, it is "WS20162.corp.contoso.com".

*** Please change 6 to the number of months accordingly until which you want the certificate to be valid.

⏭️ ►Next session:    • 2. Ways to encrypt connection to SQL Server  
📚 ►Full course on Encrypting connections to SQL Server-    • Full course on Encrypting connections to S...  
📷 ►Follow me on Instagram - https://www.instagram.com/arslanov_bo...
🧑‍💼►Follow me on LinkedIn -   / bobirmirzo-arslanov-548960173  

Watch all my playlists here:
🚀► Troubleshooting sessions:    • Troubleshooting  
🚀 ►SQL Server replication session:    • SQL Server replication  
🚀 ►SQL Server Always On Availability Group:    • SQL Server Always On Availability Groups (AG)  
🚀 ► SQL Server internals:    • SQL Internals  
🚀 ► Course in On-memory OLTP:    • Course on In-Memory OLTP