Background
Playing around with SSL Certs on SQL Server and ran into a nice well informed error.
Error Message
Image
Textual
=================================== Cannot connect to DB01. =================================== A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.) (.Net SqlClient Data Provider) ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-2146893022&LinkId=20476 ------------------------------ Server Name: DB01 Error Number: -2146893022 Severity: 20 State: 0
Remediation
Client
SQL Server Management Studio ( SSMS )
Outline
- Access the “Connection Properties” tab
- Determine whether you really want to Encrypt Connection
- Based on that determination, please check or uncheck “Encrypt” connection
- Determine whether you really want to Encrypt Connection
- Access the “Additional Connection Parameters” tab
- In the “Enter additional connection string parameters” group box
- Enter “TrustServerCertificate=Yes“
- In the “Enter additional connection string parameters” group box
Screen Shot
Screen Shot – Tab – Connection Properties
Screen Shot – Tab – Additional Connection Parameters
SQL Server Configuration Manager
Outline
- Launch SQL Server Configuration Manager
- Access each bitness specific configuration
- SQL Native Client [version] Configuration (32bit)
- SQL Native Client [version] Configuration
- Right click on the configuration node
- From the drop down menu, please select Properties
- The Flags window appears
- Set “Trust Server Certificate” to YES
Screen Shot
SQL Native Client [version] Configuration (32it) // SQL Native Client [version] Configuration
Flags
Listening
As always there is a lot more to it.
So please choose one of these two:
- Kenny Chesney Kid Rock- Luckenback, Texas
Got us feuding like the Hatfields and McCoys
This successful life we’re living’s
Out in Luckenbach, Texas, ain’t nobody feeling no pain
Ain’t nobody feeling no pain
The way we are doing it at 4 in the morning
In Detroit Michigan
Link - Ghetto Boys – My Mind is playing tricks on me
I feel like I am the one doing coke …
Now she is back with her mother
This year Halloween fell on a weekend
Me and Geto Boys are trick-or-treating
Link