SQL Server cannot find certificate

Reference Information:

I have one Window VPS on example.com. I am running IIS and SQL Server. I have a certificate for example.com that works fine with IIS. I want to use the same certificate for SQL Server to allow encrypted connections to clients. SQL Server Configuration Manager does not display the certificate in the drop-down list.

I believe the problem is that SQL Server does not consider the certificate to be valid because SQL Server considers that the server name does not match the certificate (example.com).

How to check what SQL Server considers the server name? If this is wrong, how can I change it?

+6
source share
1 answer

Ok, I figured out this problem.

  • The hostname on my machine was incorrect. It was not "example.com", but some name is randomly generated by windows. You can set this in the computer properties window.

  • The certificate was not registered for use on port 1433. I had to use netsh to allow the use of the certificate on port 1433. The instructions are here: http://msdn.microsoft.com/en-us/library/ms186362(v=SQL.100) .aspx

Those two steps, when I finished, I received a certificate that will appear in SQL Server Configuration Manager, but I still had a problem. I am trying to start SQL Server. It did not start with a log message saying that he could not find or read the SSL certificate.

  1. The final step was to verify that the account running SQL Server has permission to read the certificate. I went into the certificate snap-in, and then went to the properties under the certificate, and then on the Security tab I gave permission to read the Network Services account for the certificate. ( NOTE: I did not find references to this course. It was just some silly luck that I found this.)

After completing the steps that complete the SQL Server service startup without any problems.

+6
source

Source: https://habr.com/ru/post/908784/


All Articles