How to Create SSL Certificate for SQL Server

Here is a quick way that I use to create a server-level certificate which allows me to use SSL encryption option in SQL Server Configuration Manager. If you have any questions throughout this process, feel free to contact me here. I will be more than happy to help you out.

Copy the below (in between the ==) into a blank textfile. To find your Fully Qualified Domain Name (or FQDN), open the Command Prompt (Run –> Type cmd then press ENTER), at the prompt type:

ipconfig /all

Your FQDN will be in the following format:

“Host Name.Primary Dns Suffix”

Take that FQDN and replace the MY.FQDN.COM with your FQDN below

Signature = $Windows NT$

Subject = “CN=MY.FQDN.COM
Exportable = TRUE
KeyLength = 2048
KeySpec = 1                         ; AT_KEYEXCHANGE
KeyUsage = 0xA0                     ; Digital Signature, Key Encipherment
MachineKeySet = True                ; The key belongs to the local computer account
ProviderName = “Microsoft RSA SChannel Cryptographic Provider”
ProviderType = 12
RequestType = PKCS10
========END COPY==========

Then save it as a .inf file. For example, MyServer.inf

*** Make sure you change the “Save as type” option to “All Files.” The default is “.txt” and if you don’t change it to “All Files” you will end up with a file like “MyServer.inf.txt” which will not work.

Next, open the Command Prompt and type the following:

certreq -new C:\certificate\MyServer.inf (see screenshot below)

How to Create SSL Certificate for SQL Server Cmd Prompt New
Once you hit [Enter], a pop-up will open and prompt you to pick a location to save the hash file. Just choose the same folder that your MyServer.inf file is in to lessen confusion.

Next, if you have a person who acts as the CA (Certificate Authority) or is the single point of contact for all certificate requests then all you have to do is rename the .inf file to a .csr file and send it to them as an attachment in an encrypted/secured email.

They will take that hash output, fill out a form, and submit it to the CA. After a few days (or weeks) they will receive an email with the complete certificate hash and they forward that to you.

I have worked in environments where I had to email the single point of contact as well as fill out the form myself. If you are required to go to and submit the request for a certificate yourself, and need help…check out instructions on how to do that below:

How to Request a DoD Server Certificate

2 Replies to “How to Create SSL Certificate for SQL Server”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.