I have SQL 2016 server and if I enabled TLS1.2 then I am not able to connect to dB seever.

Jaykumar 1 Reputation point
2023-01-21T11:44:23.14+00:00

I have SQL 2016 server and OS windows server 2016 and if I enabled TLS1.2 on dB server then I am not able to connect to dB seever from application server .I was received SSL related error.What are thing I need to update in my application server and database server

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,388 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,809 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,931 Reputation points
    2023-01-21T19:47:12.15+00:00

    most likely your sqlserver does not have a trusted certificate. so you need to add

    trustServerCertificate=true

    to the connection string


  2. Seeya Xi-MSFT 16,446 Reputation points
    2023-01-23T06:21:00.9033333+00:00

    Hi Jbowy,

    [DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error this error comming

    This is due to the SQLOLEDB provider not supporting TLS 1.2. If TLS 1.0 and TLS 1.1 are not present or enabled on the server it will break the provider's function, causing an error to appear. 

    Please refer to this thread: https://knowledge.broadcom.com/external/article/225667/connector-solution-user-rule-import-is-f.html

    Please download Microsoft® OLE DB Driver 18 for SQL Server® to your server which features backwards compatibility with SQLOLEDB and can be used as a replacement. Then change the connection string provider from SQLOLEDB to MSOLEDBSQL and recycle the site's application pool.

    For more detailed screenshots, you can go to the link above to check it out.

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  3. Erland Sommarskog 101.8K Reputation points MVP
    2023-01-25T22:10:01.1333333+00:00

    Asp.net and currently using sqloledb

    That's a very old provider (20+ years). It ships with the OS, but you should use MSOLEDBSQL19, which is the most recent provider. This may give you new problems, since MSOLEDBSQL19 defaults to requiring encryption by a trusted server certificate.