Cannot connect to SQL Server 2008 using ODBC connection through dsn system on windows 2012

I have a Windows 2012 server and I can connect to an instance of SQL Server 2008 through Visual Studio Server Explorer, creating a data connection. I can also use SQL Server Management Studio and connect to this SQL Server. But for some reason, when I try to connect using the ODBC Data Source Administrator to configure DSN, I get the following error.

Connection error:
SQLState: '01000'
SQL Error: 1
[Microsoft] [SQL Server ODBC driver] [DBNETLIB] ConnectionOpen (SECCreateCredentials ()).
Connection error:
SQLState: '08001'
SQL Error: 18
[Microsoft] [ODBC SQL Server Driver] [DBNETLIB] SSL Security Error

It seems I don’t know anything specifically about this and am wondering if anyone is familiar with this problem.

I would add that neither the client nor the server uses encryption, so it confuses me a bit that I get an error related to ssl.

+7
source share
4 answers

After enabling ODBC logging, an event message appeared
Fatal error occurred while creating SSL client credentials. The internal state of error 10013.

this did not lead me to a specific problem, but led me to correct a similar error.

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ SecurityProviders \ SCHANNEL \ Protocols \ TLS 1.0 \ Client \ Enabled must be turned from 0 to 1

+8
source

If TLS 1.0 and TLS 1.1 are disabled on your SQL Server (which is good security practice), you may need to disable it on client computers. I had a Win 2012 R2 server with this problem.

In the registry:

HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\ ... \TLS1.0\Client (and Server): set DisabledByDefault = 1, Enabled = 0 \TLS1.1\Client (and Server): set DisabledByDefault = 1, Enabled = 0 

You may need to restart your computer for the settings to take effect.

0
source

In Windows Server 2016 with SQL Server 2016, I disabled TLS 1.0 and 1.1 and got the problem with only one old site (other, newer sites on the server worked fine).

I tried updating the target assembly from 4.0 to 4.7, but that did not help.

The problem was in some really old code that called the database using OleDbDataReader , I updated it to SqlDataReader and this is OleDbDataReader .

I did not find it anywhere else, so I thought that a post here could help someone else in the future ...

0
source

Include below Local Security Policy β†’ Local Policies β†’ Security Settings β†’ "System Cryptography: Use FIPS Compatible Algorithms for Encryption, Hashing and Signing

and run gpupdate / force

-1
source

All Articles