Avatar of rich55
rich55
 asked on

odbc connection error

SQLState: '01000'
[Microsoft][ODBC SQL Server Driver][TCP\IP Sockets]ConnectionOpen (SECCreateCredentials()).
Connection failed:
SQLState '08001'
SQL Server Error: 18
[Microsoft][ODBC SQL Server Driver][TCP\IP Sockets] SSL Security error

There is another entry that says the solution is a registry key, but doesn't give the key.  This conneciton is from a W2K3 Standard web server to a SQL 2005 db on a W2K3 server.  I have 2 other web servers with same config that work.  This error generates no sql logs.  The user id and pw have been verified to work on the sql server.
Microsoft IIS Web ServerMicrosoft Legacy OSMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
rich55

8/22/2022 - Mon
Brad Howe

Hi There,
You are getting the SSL error, because every connection attempt to SQL Server 2005 is automatically encrypted.  

Check the following registry key on the client machine.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib
If the Encrypt value is set to 1, then the client is requesting SSL.
      http://support.microsoft.com/?id=322144
Change this to zero and try again.

As well, Is your current SSL certificate on the SQL Server in order with the proper HOSTNAME?

Cheers,
Hades666
rich55

ASKER
What is the encrypt key supposed to look like?  The SuperSocketNetLIb key is there but with only a default value.
Brad Howe

The value is a DWORD called "Encrypt" Set it to '0'
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Brad Howe

You could also just turn off "Force Enctpytion" if it is not required.

http://msdn.microsoft.com/en-us/library/ms189067.aspx

"When the ForceEncryption option for the Database Engine is set to No, encryption can be requested by the client application but is not required. SQL Server must be restarted after you change the ForceEncryption setting."
rich55

ASKER
I added the dword value and set it to 0, rebooted and got the same error.  I made that change on the web server, not the SQL server.  I don't have any control of the SQL server.  I'm pretty sure it's my web server with the problem.  I have 2 other W2K3 web edition servers with same config that are working fine.
registry-shot..jpg
ASKER CERTIFIED SOLUTION
rich55

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.