Sql state 08001 native 18 ошибка безопасности ssl

Форум КриптоПро
 » 
Средства криптографической защиты информации
 » 
КриптоПро CSP 4.0
 » 
Нет подключения к серверу MSSQL 2008 R2 EXP после обновления win 10 до 1803


Offline

namber39

 


#1
Оставлено
:

11 мая 2018 г. 17:49:11(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

После обновления win 10 до 1803 нет подключения к серверу MSSQL 2008 R2 express. Обновление КриптоПро до 4.0.9944 ситуацию не исправляет. MSSQL установлен именованный экземпляр. Подключение локальное.

Подключение не выполнено:
SQLState: «01000»
Ошибка SQL-сервер: 772
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (SECDoClientHandshake()).
Подключение не выполнено:
SQLState: «08001»
Ошибка SQL-сервер: 18
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Ошибка безопасности SSL

Отредактировано пользователем 11 мая 2018 г. 17:55:10(UTC)
 | Причина: Не указана


Вверх


Offline

basid

 


#2
Оставлено
:

11 мая 2018 г. 17:53:35(UTC)

basid

Статус: Активный участник

Группы: Участники

Зарегистрирован: 21.11.2010(UTC)
Сообщений: 990

Сказал(а) «Спасибо»: 6 раз
Поблагодарили: 133 раз в 119 постах

CredSSP updates for CVE-2018-0886?


Вверх


Offline

namber39

 


#3
Оставлено
:

14 мая 2018 г. 14:13:31(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

Обновления установлены.
Прошу разработчиков КриптоПро обратить внимание на данную проблему.

Win 10 x64 1803 домашняя, установлен именованнй экземпляр MSSQL 2008 R2 express. Без криптопро соединение с сервером SQL происходит нормально. Как только устанавливается криптопро — соединится с SQL сервером не возможно.
Tesl_odbc.pdf (46kb) загружен 8 раз(а).


Вверх


Offline

Андрей Николаевич Ч

 


#4
Оставлено
:

17 мая 2018 г. 7:23:10(UTC)

Андрей Николаевич Ч

Статус: Новичок

Группы: Участники

Зарегистрирован: 17.05.2018(UTC)
Сообщений: 3
Российская Федерация

Автор: namber39 Перейти к цитате

Обновления установлены.
Прошу разработчиков КриптоПро обратить внимание на данную проблему.

Win 10 x64 1803 домашняя, установлен именованнй экземпляр MSSQL 2008 R2 express. Без криптопро соединение с сервером SQL происходит нормально. Как только устанавливается криптопро — соединится с SQL сервером не возможно.
Tesl_odbc.pdf (46kb) загружен 8 раз(а).

Присоединюсь к автору. Такая же проблема на двух ПК после обновления операционной системы (Вин 10). Нет соединения с SQL сервер при установленном продукте КриптоПро CSP. Прошу разработчика рассмотреть данный вопрос в кротчайшие сроки.


Вверх


Offline

Максим Коллегин

 


#5
Оставлено
:

17 мая 2018 г. 8:40:30(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,332
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 682 раз в 601 постах

Спасибо за обратную связь.
В качестве временного решения пока можем предложить следующее:
удалить ключ в реестре HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Providers\Crypto-Pro Primitive Provider\UM\00010002 и перезагрузить машину
Работоспособность SQL Server будет восстановлена, но может на некоторых сайтах не работать ГОСТ TLS.

https://www.cryptopro.ru…vykh-versiyakh-windows-1

Отредактировано пользователем 17 мая 2018 г. 12:06:12(UTC)
 | Причина: Не указана

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

namber39

 


#6
Оставлено
:

17 мая 2018 г. 12:40:31(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

Что делать у кого нет такого ключа в реестре?
not_key.pdf (37kb) загружен 7 раз(а).

Отредактировано пользователем 17 мая 2018 г. 13:05:41(UTC)
 | Причина: Не указана


Вверх


Offline

Максим Коллегин

 


#7
Оставлено
:

17 мая 2018 г. 13:25:03(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,332
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 682 раз в 601 постах

Переустановить CSP и удалить ключ.

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

namber39

 


#8
Оставлено
:

17 мая 2018 г. 14:40:39(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

После переустановки раздел появился, ключ удалил. Тест связи прошел.Applause
test_yes.pdf (67kb) загружен 5 раз(а).


Вверх


Offline

Максим Коллегин

 


#9
Оставлено
:

21 мая 2018 г. 17:19:23(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,332
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 682 раз в 601 постах

Мы выложили сборку 4.0.9948, можно тестировать, вышеуказанная проблема исправлена.

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

Taanshu

 


#10
Оставлено
:

23 мая 2018 г. 11:07:54(UTC)

Taanshu

Статус: Новичок

Группы: Участники

Зарегистрирован: 18.07.2016(UTC)
Сообщений: 6
Российская Федерация
Откуда: Ижевск

Сказал(а) «Спасибо»: 1 раз

Автор: Максим Коллегин Перейти к цитате

Спасибо за обратную связь.
В качестве временного решения пока можем предложить следующее:
удалить ключ в реестре HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Providers\Crypto-Pro Primitive Provider\UM\00010002 и перезагрузить машину
Работоспособность SQL Server будет восстановлена, но может на некоторых сайтах не работать ГОСТ TLS.

А ошибка входа на сайт тоже связана со всем этим 1803? Версия 4.0.9948, но ошибка так и выходит.

Пример ошибки при попытке входа на защищенные странички сайта atsenergo:

Цитата:

Возможно, на сайте используются устаревшие или ненадежные параметры безопасности протокола TLS. Если это будет повторяться, обратитесь к владельцу веб-сайта.

Для параметров безопасности протокола TLS не установлены значения по умолчанию, что также могло стать причиной ошибки.


Вверх

Пользователи, просматривающие эту тему

Guest

Форум КриптоПро
 » 
Средства криптографической защиты информации
 » 
КриптоПро CSP 4.0
 » 
Нет подключения к серверу MSSQL 2008 R2 EXP после обновления win 10 до 1803

Быстрый переход
 

Вы не можете создавать новые темы в этом форуме.

Вы не можете отвечать в этом форуме.

Вы не можете удалять Ваши сообщения в этом форуме.

Вы не можете редактировать Ваши сообщения в этом форуме.

Вы не можете создавать опросы в этом форуме.

Вы не можете голосовать в этом форуме.

Errors like SQL server connection failed SQLState 08001 can be really annoying.

The SQL server connection failed 08001 occurs when creating an ODBC connection on the Microsoft SQL.

At Bobcares, we often get requests from our customers regarding the SQL sever connection error as part of our Server Management Services.

Today, we’ll see the reasons for this SQL sever connection instance and how our Support Engineers fix it.

When the SQL Server Connection failed: SQLState 08001 Occurs?

Mostly the error SQLStateServer Connection failed 08001 occurs when creating an ODBC connection on Microsoft SQL.

We click Next on the SQL login screen. Then using the login information provided, the ODBC manager will try to connect to the SQL Server. But after some waiting time, it displays the below error message.

SQL Server Connection failed : SQLState 08001

The main three reasons for the error SQL Server Connection failure are

  • If we provide a wrong server name.
  • If the SQL Server not configured to a network connection.
  • The other possibility of this instance if we provide an incorrect login name or password.

How to fix SQLState 08001 Error?

Recently, one of our customers approached us with an error message ‘SQL Server Connection failed: SQLState 08001′.

Our Support Engineers log in to SQL Server Management Studio and make sure that the database name and other details are correct. In case, if the database server name is wrong then this error can occur.

Sometimes the message appears when we use ‘localhost’ as the Database Server name on the Database Settings screen in Confirm. But we can log in to the database in SQL Server Management Studio as a user, using the Server name ‘localhost’. Then our Support Engineers make any of the below two changes to fix the error.

  1. In the Database Settings screen, we change the Database Server name to the server name or
  2. In the SQL Server Configuration Manager, we enable the Named Pipes values in the Client Protocols.

  Our Support Engineers follow any of the above two methods to fixes the error while creating an ODBC connection on Microsoft SQL.

[Need assistance in fixing the Error while creating an ODBC connection? – We can help you.]

Conclusion

In short, we’ve discussed that the SQL server connection failed SQLState 08001 occurs when creating an ODBC connection on the Microsoft SQL. Also, we saw how our Support Engineers fix the error for the customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Problem

Administrator is trying to create an ODBC connection (called ‘FAP’) for the Controller functionality ‘FAP’ to work.

During the creation process, an error appears.

Symptom

image-20191218093550-1

Microsoft SQL Server Login
Connection failed:
SQLState: ‘0100’
SQL Server Error: 772
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (SECDoClientHandshake()).
Connection failed:
SQLState: ‘08001’
SQL Server Error: 18
[Microsoft][ODBC SQL Server Driver][Shared Memory]SSL Security error

Cause

Both of the following are true:

(1) TLS 1.0 has been disabled on one (or both) of the following servers:

  • Planning Analytics (TM1) application server
  • Microsoft SQL server.

(2) Administrator is using the older ‘SQL Server‘ ODBC driver (see below, circled in red)

image-20191218093811-2

This is incompatible with TLS 1.2.

Resolving The Problem

Fix:

Change the ODBC connection to use the newer «SQL Server Native Client 11.0» driver (highlighted in green below):

image-20191218094339-1

Workaround:

Re-enable TLS 1.0 on the Planning Analaytics (TM1) and/or SQL servers.

  • TIP: For more details, see separate IBM Technote #728129.

Related Information

Document Location

Worldwide

[{«Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Product»:{«code»:»SS9S6B»,»label»:»IBM Cognos Controller»},»Component»:»»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»10.4.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

I’m trying to connect to a SQL Server using pyodbc 4.0.30 with Python 3.7. Everything was going great the past couple of days until today when I get this error:

OperationalError: (‘08001’, ‘[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error (18) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()). (1)’)`

My connection:

conn = pyodbc.connect('driver={SQL Server};server=redacted;database=uipcc_awdb;uid=redacted;pwd=redacted;trusted_connection=no;')

Please note I can connect normally to the database via SQL Server Management Studio, and no changes were made on my machine, the SQL Server, or the network.

I need to emphasize, I have tried to following which were mentioned in similar questions (but none worked):

  • adding sslverify=0 in the connection parameters
  • adding encrypt=0 in the connection parameters
  • Changing the OBDC drivers from my machine, didn’t work and ruined the connection from SQL Server Management Studio

Форум КриптоПро
 » 
Средства криптографической защиты информации
 » 
КриптоПро CSP 4.0
 » 
Нет подключения к серверу MSSQL 2008 R2 EXP после обновления win 10 до 1803


Offline

namber39

 


#1
Оставлено
:

11 мая 2018 г. 17:49:11(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

После обновления win 10 до 1803 нет подключения к серверу MSSQL 2008 R2 express. Обновление КриптоПро до 4.0.9944 ситуацию не исправляет. MSSQL установлен именованный экземпляр. Подключение локальное.

Подключение не выполнено:
SQLState: «01000»
Ошибка SQL-сервер: 772
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (SECDoClientHandshake()).
Подключение не выполнено:
SQLState: «08001»
Ошибка SQL-сервер: 18
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Ошибка безопасности SSL

Отредактировано пользователем 11 мая 2018 г. 17:55:10(UTC)
 | Причина: Не указана


Вверх

Offline

basid

 


#2
Оставлено
:

11 мая 2018 г. 17:53:35(UTC)

basid

Статус: Активный участник

Группы: Участники

Зарегистрирован: 21.11.2010(UTC)
Сообщений: 924

Сказал(а) «Спасибо»: 6 раз
Поблагодарили: 126 раз в 114 постах

CredSSP updates for CVE-2018-0886?


Вверх

Offline

namber39

 


#3
Оставлено
:

14 мая 2018 г. 14:13:31(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

Обновления установлены.
Прошу разработчиков КриптоПро обратить внимание на данную проблему.

Win 10 x64 1803 домашняя, установлен именованнй экземпляр MSSQL 2008 R2 express. Без криптопро соединение с сервером SQL происходит нормально. Как только устанавливается криптопро — соединится с SQL сервером не возможно.
Tesl_odbc.pdf (46kb) загружен 8 раз(а).


Вверх

Offline

Андрей Николаевич Ч

 


#4
Оставлено
:

17 мая 2018 г. 7:23:10(UTC)

Андрей Николаевич Ч

Статус: Новичок

Группы: Участники

Зарегистрирован: 17.05.2018(UTC)
Сообщений: 3
Российская Федерация

Автор: namber39 Перейти к цитате

Обновления установлены.
Прошу разработчиков КриптоПро обратить внимание на данную проблему.

Win 10 x64 1803 домашняя, установлен именованнй экземпляр MSSQL 2008 R2 express. Без криптопро соединение с сервером SQL происходит нормально. Как только устанавливается криптопро — соединится с SQL сервером не возможно.
Tesl_odbc.pdf (46kb) загружен 8 раз(а).

Присоединюсь к автору. Такая же проблема на двух ПК после обновления операционной системы (Вин 10). Нет соединения с SQL сервер при установленном продукте КриптоПро CSP. Прошу разработчика рассмотреть данный вопрос в кротчайшие сроки.


Вверх

Offline

Максим Коллегин

 


#5
Оставлено
:

17 мая 2018 г. 8:40:30(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,253
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 658 раз в 582 постах

Спасибо за обратную связь.
В качестве временного решения пока можем предложить следующее:
удалить ключ в реестре HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlCryptographyProvidersCrypto-Pro Primitive ProviderUM0010002 и перезагрузить машину
Работоспособность SQL Server будет восстановлена, но может на некоторых сайтах не работать ГОСТ TLS.

https://www.cryptopro.ru…vykh-versiyakh-windows-1

Отредактировано пользователем 17 мая 2018 г. 12:06:12(UTC)
 | Причина: Не указана

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

namber39

 


#6
Оставлено
:

17 мая 2018 г. 12:40:31(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

Что делать у кого нет такого ключа в реестре?
not_key.pdf (37kb) загружен 7 раз(а).

Отредактировано пользователем 17 мая 2018 г. 13:05:41(UTC)
 | Причина: Не указана


Вверх

Offline

Максим Коллегин

 


#7
Оставлено
:

17 мая 2018 г. 13:25:03(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,253
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 658 раз в 582 постах

Переустановить CSP и удалить ключ.

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

namber39

 


#8
Оставлено
:

17 мая 2018 г. 14:40:39(UTC)

namber39

Статус: Новичок

Группы: Участники

Зарегистрирован: 11.05.2018(UTC)
Сообщений: 4
Российская Федерация

После переустановки раздел появился, ключ удалил. Тест связи прошел.Applause
test_yes.pdf (67kb) загружен 5 раз(а).


Вверх

Offline

Максим Коллегин

 


#9
Оставлено
:

21 мая 2018 г. 17:19:23(UTC)

Максим Коллегин

Статус: Сотрудник

Группы: Администраторы

Зарегистрирован: 12.12.2007(UTC)
Сообщений: 6,253
Мужчина
Откуда: КРИПТО-ПРО

Сказал «Спасибо»: 21 раз
Поблагодарили: 658 раз в 582 постах

Мы выложили сборку 4.0.9948, можно тестировать, вышеуказанная проблема исправлена.

Знания в базе знаний, поддержка в техподдержке


Вверх

WWW


Offline

Taanshu

 


#10
Оставлено
:

23 мая 2018 г. 11:07:54(UTC)

Taanshu

Статус: Новичок

Группы: Участники

Зарегистрирован: 18.07.2016(UTC)
Сообщений: 6
Российская Федерация
Откуда: Ижевск

Сказал(а) «Спасибо»: 1 раз

Автор: Максим Коллегин Перейти к цитате

Спасибо за обратную связь.
В качестве временного решения пока можем предложить следующее:
удалить ключ в реестре HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlCryptographyProvidersCrypto-Pro Primitive ProviderUM0010002 и перезагрузить машину
Работоспособность SQL Server будет восстановлена, но может на некоторых сайтах не работать ГОСТ TLS.

А ошибка входа на сайт тоже связана со всем этим 1803? Версия 4.0.9948, но ошибка так и выходит.

Пример ошибки при попытке входа на защищенные странички сайта atsenergo:

Цитата:

Возможно, на сайте используются устаревшие или ненадежные параметры безопасности протокола TLS. Если это будет повторяться, обратитесь к владельцу веб-сайта.

Для параметров безопасности протокола TLS не установлены значения по умолчанию, что также могло стать причиной ошибки.


Вверх
Пользователи, просматривающие эту тему

Guest

Форум КриптоПро
 » 
Средства криптографической защиты информации
 » 
КриптоПро CSP 4.0
 » 
Нет подключения к серверу MSSQL 2008 R2 EXP после обновления win 10 до 1803

Быстрый переход
 

Вы не можете создавать новые темы в этом форуме.

Вы не можете отвечать в этом форуме.

Вы не можете удалять Ваши сообщения в этом форуме.

Вы не можете редактировать Ваши сообщения в этом форуме.

Вы не можете создавать опросы в этом форуме.

Вы не можете голосовать в этом форуме.

  • Remove From My Forums

locked

Error connecting to SQL 2005 Server — ConnectionOpen (SECCreateCredentials() and Error: 18 SSL Security error

  • Question

  • I have a few XP clients configured with an application to connect to SQL Server 2005.  The rest got connected without problem.  There’s only one which ‘hanged’ perpetually without response.  When I try to use ODBC with DSN to connect from the problematic pc, I get the following error:
    Connection failed:
    SQLState: ‘01000’
    [Microsoft][ODBC SQL Server Driver][TCPIP Sockets]ConnectionOpen (SECCreateCredentials()).
    Connection failed:
    SQLState ‘08001’
    SQL Server Error: 18
    [Microsoft][ODBC SQL Server Driver][TCPIP Sockets] SSL Security error

    Any advice what can I do to resolve this?

  • Remove From My Forums

locked

Error connecting to SQL 2005 Server — ConnectionOpen (SECCreateCredentials() and Error: 18 SSL Security error

  • Question

  • I have a few XP clients configured with an application to connect to SQL Server 2005.  The rest got connected without problem.  There’s only one which ‘hanged’ perpetually without response.  When I try to use ODBC with DSN to connect from the problematic pc, I get the following error:
    Connection failed:
    SQLState: ‘01000’
    [Microsoft][ODBC SQL Server Driver][TCPIP Sockets]ConnectionOpen (SECCreateCredentials()).
    Connection failed:
    SQLState ‘08001’
    SQL Server Error: 18
    [Microsoft][ODBC SQL Server Driver][TCPIP Sockets] SSL Security error

    Any advice what can I do to resolve this?

  • Remove From My Forums
  • Question

  • Hi Experts,

    We have old system with Windows 2003 Server Standard SP2 and Microsoft SQL 2005 Server.

    in the event viewer, I encounter this error:

    Event Type: Error
    Event Source: VSS
    Event Category: None
    Event ID: 6013
    Description:
    Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005. SQLSTATE: 08001, Native Error: 18
    Error state: 1, Severity: 16
    Source: Microsoft OLE DB Provider for SQL Server
    Error message: [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.

    I tried other suggestions on the net but with no luck.

    Hopefully someone could help on this..  Many Thanks in advance…

Answers

  • I finally SOLVED my Problem!!!!

    I deleted the certificate from Local Account then restart the SQL Services.

    Thank you Uri and Erland for you time and help. I can sleep better now… Thanks once again…

    • Marked as answer by

      Monday, July 17, 2017 10:38 AM

Errors like SQL server connection failed SQLState 08001 can be really annoying.

The SQL server connection failed 08001 occurs when creating an ODBC connection on the Microsoft SQL.

At Bobcares, we often get requests from our customers regarding the SQL sever connection error as part of our Server Management Services.

Today, we’ll see the reasons for this SQL sever connection instance and how our Support Engineers fix it.

When the SQL Server Connection failed: SQLState 08001 Occurs?

Mostly the error SQLStateServer Connection failed 08001 occurs when creating an ODBC connection on Microsoft SQL.

We click Next on the SQL login screen. Then using the login information provided, the ODBC manager will try to connect to the SQL Server. But after some waiting time, it displays the below error message.

SQL Server Connection failed : SQLState 08001

The main three reasons for the error SQL Server Connection failure are

  • If we provide a wrong server name.
  • If the SQL Server not configured to a network connection.
  • The other possibility of this instance if we provide an incorrect login name or password.

How to fix SQLState 08001 Error?

Recently, one of our customers approached us with an error message ‘SQL Server Connection failed: SQLState 08001′.

Our Support Engineers log in to SQL Server Management Studio and make sure that the database name and other details are correct. In case, if the database server name is wrong then this error can occur.

Sometimes the message appears when we use ‘localhost’ as the Database Server name on the Database Settings screen in Confirm. But we can log in to the database in SQL Server Management Studio as a user, using the Server name ‘localhost’. Then our Support Engineers make any of the below two changes to fix the error.

  1. In the Database Settings screen, we change the Database Server name to the server name or
  2. In the SQL Server Configuration Manager, we enable the Named Pipes values in the Client Protocols.

  Our Support Engineers follow any of the above two methods to fixes the error while creating an ODBC connection on Microsoft SQL.

[Need assistance in fixing the Error while creating an ODBC connection? – We can help you.]

Conclusion

In short, we’ve discussed that the SQL server connection failed SQLState 08001 occurs when creating an ODBC connection on the Microsoft SQL. Also, we saw how our Support Engineers fix the error for the customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

 
alsov ©

 
(2009-09-21 12:32)
[0]

Доброго времени суток!

Уже не знаю куда копать. Направьте на путь истинный.

Проблема в следующем.

Ни с того ни с сего на клиентском компе при попытке подключиться к mssql серверу начала вылезать ошибка.

При подключении через OLEDB провайдера

Подключение не выполнено:
SQLState: «01000»
Ошибка SQL-сервер: 772
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECDoClientHandshake()).
Подключение не выполнено:
SQLState: «08001»
Ошибка SQL-сервер: 18
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Ошибка безопасности SSL

А при подключении через SQLNCLI вот такая:

Connection failed:
SQLState: «08001»
SQL Server Error: -2146893052
[Microsoft][SQL Native Client]SSL Provider: Не удается установить связь с локальным администратором безопасности

Connection failed:
SQLState: «08001»
SQL Server Error: -2146893052
[Microsoft][SQL Native Client]Client unable to establish connection

Никто не сталкивался?
SSL на сервере не настроен да и не нужен на данный момент.

Заранее благодарен


 
alsov ©

 
(2009-09-21 12:39)
[1]

Стоило написать на форум, как проблема разрешилась чудным образом.

Делал примерно следующее (может кому пригодится)

В cliconfg поставил галку «Обязательное шифрование протокола»
Перезагрузился
Снял галку
Перезагрузился

Стало подключатся

Интересно что это было….


 
DrPass ©

 
(2009-09-21 21:14)
[2]

SSL и был. На сервере был включен, а на клиенте нет. Потому и отваливалось. Ты включил на клиенте, вот и заработало


 
alsov ©

 
(2009-09-22 08:51)
[3]

Так я же снял галку «Обязательное шифрование протокола»

То есть отключил. Или нет?


 
DrPass ©

 
(2009-09-22 09:43)
[4]

А, я «поставил» заметил, а «снял» — пропустил
Тогда это был банальный глюк. Они имеют место быть в программах


Problem

Tivoli Enterprise Portal workspaces for ITCAM agent for Microsoft SQL Server agent show no data. Agent’s collector log (*.out) has «SQLSTATE: 08001, Native error: 6» messages.

Symptom

Collector log (*.out) shows following errors:

FXR4024T (100412) (6096)Call Exit koqsql, Parms -logon itmmon -password …== -rdbms SQLSRVR 3 master «select convert(char,len(@@version),2),’1′» .
MSU0500I (100429) (6096)SQLSTATE: 08001, Native error: 6, Message: [Microsoft][ODBC SQL Server Driver][DBNETLIB]Specified SQL server not found.
MSU0500I (100429) (6096)SQLSTATE: 01000, Native error: 11004, Message: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
MSU0425E (100429) (6096)Database open failed. Server: SQLSRVR User:tivoli.
CGN1522S (100447) (6096)Restarting collector 08/26/13 10:04:47
GGN1505S (100447) (6096)Time = 2013/08/26 10:04:47, Collector ended

Cause

Agent is getting bad port for SQL connection.

Resolving The Problem

Set value of COLL_PORT = 0 in following registry path.
HKEY_LOCAL_MACHINESOFTWARECandleKOQ610<Instance Name>Environment

Restart the agent. Check Tivoli Enterprise Portal workspaces of SQL agent for monitoring data.

[{«Product»:{«code»:»SSDKXQ»,»label»:»Tivoli Composite Application Manager for Microsoft Applications»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Microsoft SQL Server Agent — 5724B96MO»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»6.3.0;6.3.1;6.3.1.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]

When creating a connection to SQL Server using an ODBC driver, you might receive this error:

Connection failed: SQLState: '08001'

Here are some common causes and corresponding fixes:

1. SQL Server service is not running on SQL Server.

You can try to start or restart SQL Server services, including SQL Server Database Engine, the SQL Server Agent, or the SQL Server Browser service.

2. SQL Server Browser service is not running on SQL Server.

This might cause the issue sometime so make sure to enable the “SQL Server Browser” Service and set to start Automatically.

3. TCP/IP protocol is not enabled for SQL Server.

Make sure the TCP/IP protocol is enabled by logging in to the SQL server, navigate to the “Sql Server Configuration Manager”, then enable the “TCP/IP” and the “Named Pipes” Protocols.

4. Firewall on SQL Server is blocking TCP port of SQL Server.

Check and reconfig the firewall rules to allow SQL Server access.

5. Firewall on SQL Server is blocking UDP port (1434) of SQL Server browser.

Again, check and reconfig the firewall rules to allow SQL Server access.


Need a good GUI tool for databases? TablePlus provides a native client that allows you to access and manage Oracle, MySQL, SQL Server, PostgreSQL, and many other databases simultaneously using an intuitive and powerful graphical interface.

Download TablePlus for Mac.

Not on Mac? Download TablePlus for Windows.

On Linux? Download TablePlus for Linux

Need a quick edit on the go? Download TablePlus for iOS

TablePlus in Dark mode

— 2 nodes cluster
— 3 SQL Server instances clustered
— Virtual machines, W2K8R2 on VMWare
— SAN using iSCSI

We have one instance that will start from the services.msc (both the engine and the agent) but not from the Failover Cluster Manager when attempting to bring the service online.  In reality the services start because during the ‘Online pending’
I am able to connect and query the databases on that instance although it is in the ‘Online pending’ state.  

The error messages suggest (at least to me) that the cluster is unable to connect to the SQL Server services that are up, therefore it goes into Failed state.  I can figure out why it can’t connect to it.

The error message we are getting are the following;

[sqsrvres] ODBC sqldriverconnect failed

[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server Native Client 10.0]SQL Server Network

Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

[sqsrvres] ODBC sqldriverconnect failed[sqsrvres] checkODBCConnectError: sqlstate = HYT00; native error = 0; message = [Microsoft][SQL Server Native Client 10.0]Login timeout
expired
[sqsrvres] ODBC sqldriverconnect failed

[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server
Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.
For more information see SQL Server Books Online.

[sqsrvres]
ODBC sqldriverconnect failed
[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server Native Client 10.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

[sqsrvres]
checkODBCConnectError: sqlstate = HYT00; native error = 0; message = [Microsoft][SQL Server Native Client 10.0]Login timeout expired
[sqsrvres]
ODBC sqldriverconnect failed
[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server.
Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
[sqsrvres] ODBC
sqldriverconnect failed
[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server Native Client 10.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
[sqsrvres] ODBC sqldriverconnect failed[sqsrvres] checkODBCConnectError: sqlstate = HYT00; native error = 0; message = [Microsoft][SQL Server Native Client 10.0]Login timeout expired[sqsrvres] ODBC sqldriverconnect failed[sqsrvres] checkODBCConnectError: sqlstate = 08001; native error = ffffffff; message = [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server.
Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

Fault bucket , type 0
Event Name: WSFC Resource Deadlock
Response: Not available
Cab Id: 0

Problem signature:
P1: SQL Server (MVSTG)
P2: SQL Server
P3: ONLINERESOURCE
P4:

P10:

Attached files:
These files may be available here:
C:ProgramDataMicrosoftWindowsWERReportQueueCritical_SQL Server (MVST_f6c6c38b8673478d1cca2c1659ac3f41af00e9_134c2c06

Analysis symbol:
Rechecking for solution: 0
Report Id: c8cfec1e-ef81-11e0-a201-0daf324d05056be606f
Report Status: 4

The content of the the file/log refered to in the Resource Deadlock message is the following:

Version=1
EventType=WSFC Resource Deadlock
EventTime=129623137530033421
ReportType=1
Consent=1
ReportIdentifier=c8cfec1e-ef81-11e0-a201-005056be606f
Response.type=4
Sig[0].Name=Resource Name
Sig[0].Value=SQL Server (MVSTG)
Sig[1].Name=Resource Type
Sig[1].Value=SQL Server
Sig[2].Name=Call Type
Sig[2].Value=ONLINERESOURCE
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7600.2.0.0.274.10
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=4105
FriendlyEventName=WSFC Resource Deadlock
ConsentKey=WSFC Resource Host Monitor
AppName=Failover Cluster Resource Host Subsystem
AppPath=C:WindowsClusterrhs.exe
ReportDescription=WSFC Resource Deadlock

Can
anyone help?  Thanks in advance!!!

Click here follow the steps to fix Native Error 17 Sql State 08001 and related errors.

Instructions

 

To Fix (Native Error 17 Sql State 08001) error you need to
follow the steps below:

Step 1:

 
Download
(Native Error 17 Sql State 08001) Repair Tool
   

Step 2:

 
Click the «Scan» button
   

Step 3:

 
Click ‘Fix All‘ and you’re done!
 

Compatibility:
Windows 7, 8, Vista, XP
Download Size: 6MB
Requirements: 300 MHz Processor, 256 MB Ram, 22 MB HDD

Limitations:
This download is a free evaluation version. To unlock all features and tools, a purchase is required.

Native Error 17 Sql State 08001 Error Codes are caused in one way or another by misconfigured system files
in your windows operating system.

If you have Native Error 17 Sql State 08001 errors then we strongly recommend that you

Download (Native Error 17 Sql State 08001) Repair Tool.

This article contains information that shows you how to fix
Native Error 17 Sql State 08001
both
(manually) and (automatically) , In addition, this article will help you troubleshoot some common error messages related to Native Error 17 Sql State 08001 error code that you may receive.

Note:
This article was updated on 2023-04-04 and previously published under WIKI_Q210794

Contents

  •   1. What is Native Error 17 Sql State 08001 error?
  •   2. What causes Native Error 17 Sql State 08001 error?
  •   3. How to easily fix Native Error 17 Sql State 08001 errors

What is Native Error 17 Sql State 08001 error?

The Native Error 17 Sql State 08001 error is the Hexadecimal format of the error caused. This is common error code format used by windows and other windows compatible software and driver vendors.

This code is used by the vendor to identify the error caused. This Native Error 17 Sql State 08001 error code has a numeric error number and a technical description. In some cases the error may have more parameters in Native Error 17 Sql State 08001 format .This additional hexadecimal code are the address of the memory locations where the instruction(s) was loaded at the time of the error.

What causes Native Error 17 Sql State 08001 error?

The Native Error 17 Sql State 08001 error may be caused by windows system files damage. The corrupted system files entries can be a real threat to the well being of your computer.

There can be many events which may have resulted in the system files errors. An incomplete installation, an incomplete uninstall, improper deletion of applications or hardware. It can also be caused if your computer is recovered from a virus or adware/spyware
attack or by an improper shutdown of the computer. All the above actives
may result in the deletion or corruption of the entries in the windows
system files. This corrupted system file will lead to the missing and wrongly
linked information and files needed for the proper working of the
application.

How to easily fix Native Error 17 Sql State 08001 error?

There are two (2) ways to fix Native Error 17 Sql State 08001 Error:

Advanced Computer User Solution (manual update):

1) Start your computer and log on as an administrator.

2) Click the Start button then select All Programs, Accessories, System Tools, and then click System Restore.

3) In the new window, select «Restore my computer to an earlier time» option and then click Next.

4) Select the most recent system restore point from the «On this list, click a restore point» list, and then click Next.

5) Click Next on the confirmation window.

6) Restarts the computer when the restoration is finished.

Novice Computer User Solution (completely automated):

1) Download (Native Error 17 Sql State 08001) repair utility.

2) Install program and click Scan button.

3) Click the Fix Errors button when scan is completed.

4) Restart your computer.

How does it work?

This tool will scan and diagnose, then repairs, your PC with patent
pending technology that fix your windows operating system registry
structure.
basic features: (repairs system freezing and rebooting issues , start-up customization , browser helper object management , program removal management , live updates , windows structure repair.)

  • Remove From My Forums
  • Question

  • I get following error message. How to fix it? It is sql server 2012

    SQLState = 08001, NativeError = 258
    Error = [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. 
    SQLState = 08001, NativeError = 258
    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in login response
    SQLState = S1T00, NativeError = 0
    Error = [Microsoft][SQL Server Native Client 10.0]Login timeout expired

    SQLState = 08001, NativeError = 0
    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in opening server connection

    SQLState = 08001, NativeError = 258

    Error = [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. 

    SQLState = 08001, NativeError = 258

    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in login response

    SQLState = S1T00, NativeError = 0

    Error = [Microsoft][SQL Server Native Client 10.0]Login timeout expired

    SQLState = 08001, NativeError = 0

    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in opening server connection

    SQLState = 08001, NativeError = 258

    Error = [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. 

    SQLState = 08001, NativeError = 258

    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in login response

    SQLState = S1T00, NativeError = 0

    Error = [Microsoft][SQL Server Native Client 10.0]Login timeout expired

    SQLState = 08001, NativeError = 0

    Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in opening server connection

Answers

  • Here’s a similar discussion of that topic:

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c895335c-9a88-488c-b39c-f54fd6cceba9/298-sqlserver-error-258-tcp-provider-timeout-error-258-sqlstate-08001?forum=sqldataaccess

    You may want to scan that thread to see if you can glean any helpful information.

    Good Luck,


    Phil Streiff, MCDBA, MCITP, MCSA

    • Proposed as answer by

      Wednesday, January 4, 2017 2:49 AM

    • Marked as answer by
      Olaf HelperMVP
      Monday, February 20, 2017 7:38 AM
    • Proposed as answer by
      Ed Price — MSFTMicrosoft employee
      Wednesday, January 4, 2017 2:49 AM
    • Marked as answer by
      Olaf HelperMVP
      Monday, February 20, 2017 7:38 AM
    • Proposed as answer by
      Ed Price — MSFTMicrosoft employee
      Wednesday, January 4, 2017 2:49 AM
    • Marked as answer by
      Olaf HelperMVP
      Monday, February 20, 2017 7:38 AM

I’m trying to connect to a SQL Server using pyodbc 4.0.30 with Python 3.7. Everything was going great the past couple of days until today when I get this error:

OperationalError: (‘08001’, ‘[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error (18) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()). (1)’)`

My connection:

conn = pyodbc.connect('driver={SQL Server};server=redacted;database=uipcc_awdb;uid=redacted;pwd=redacted;trusted_connection=no;')

Please note I can connect normally to the database via SQL Server Management Studio, and no changes were made on my machine, the SQL Server, or the network.

I need to emphasize, I have tried to following which were mentioned in similar questions (but none worked):

  • adding sslverify=0 in the connection parameters
  • adding encrypt=0 in the connection parameters
  • Changing the OBDC drivers from my machine, didn’t work and ruined the connection from SQL Server Management Studio

My server is windows 2008 server r2.
I found the following error on my server after disable tls 1.0 and SSLv3.

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

Currently, only TLS 1.2 is enabled on my server, and at the client side the TLS 1.2 is set on

Is it posible if [DBNETLIB] is running on TLS 1.2?

UditS's user avatar

UditS

1,92615 silver badges37 bronze badges

asked Apr 6, 2016 at 13:29

antah berantah's user avatar

2

There might be chances that ODBC 11.0 earlier version is been installed. In this case the connection string should be
Driver={ODBC Driver 11 for SQL Server};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;

And also check TLS 1.2 is enabled

answered Dec 12, 2018 at 16:04

Vijay Dodamani's user avatar

After disabling TLS 1.0 and 1.1 on Windows Server 2016 we were able to get our ASP Classic scripts database connections working again in the following way:

  1. Download and install Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL)
  2. Replace Provider=SQLOLEDB; with Provider=MSOLEDBSQL; in all connection strings for the ASP Classic scripts
  3. Done! (no restart needed)

Note: The previous (same name but different abbreviation) Microsoft OLE DB Provider for SQL Server (SQLOLEDB) and SQL Server Native Client OLE DB provider (SQLNCLI) remains deprecated and it is not recommended to use either for new development work. (source)

answered Jan 12, 2022 at 13:25

Jonas Äppelgran's user avatar

I had to do several things. The server was Windows 2016 Standard testing with a .txt file I changed to .UDL. This server was trying to connect to our Sql Server 2008 R2 SP3

On the 2016 box I installed SQL Server Native client 10.0

Get that here : https://www.microsoft.com/en-us/download/details.aspx?id=57606

Finally on the sql server box I had to install patch KB4057113 to enable TLS1.2

Note when testing the connection by opening the .UDL file don’t forget to change the provider to SQL Server Native Client 10.0

answered Jun 21, 2019 at 18:58

drzounds's user avatar

drzoundsdrzounds

3703 silver badges15 bronze badges

Similiar to Jonas Appelgran’s answer, but some slight changes to solve our issue.

  1. Download and install install Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL)
  2. Replace Provider=SQLOLEDB; with Provider=MSOLEDBSQL19; in all connection strings for the ASP Classic scripts (note the version of the driver was needed)
  3. At this point, was still getting the following error:

SSL Provider: The certificate chain was issued by an authority that is
not trusted.

After some research, I found that I also needed to either trust the server certificate or set the encryption to false in the connection string:

Trust Server Certificate=True;
and/or
Use Encryption for Data=False;

Need to update these depending on your situation but it was an internal intranet application only for us so either option was fine. (Otherwise you would need to create and install either a self-signed certificate or one from your organization’s CA.)

answered Jul 11, 2022 at 22:27

Tahari's user avatar

TahariTahari

1316 bronze badges

  1. Open Regedit (Wind+R > regedit)
  2. Locate HKLMSOFTWAREMicrosoftMSSQLServerMSSQLServerSuperSocketNetLib
  3. Create a new word value and name it «Certificate» set the value to this: «Certificate=0»
  4. Also modify the default REG_SZ and set the value to «Certificate=0»
  5. Restart the MSSQL service

Hope this helps since worked for me.

answered Dec 15, 2017 at 15:03

Waldy Al-Monte's user avatar


First published on MSDN on Jul 09, 2015

This blog is regarding one of most commonly faced issues that you may receive when connecting to the SQL Server. Mostly you may run into this issue after some improper Windows security update (say

KB2655992

in my case) or improper application of Poodle security fix.


ISSUE DESCRIPTION FROM SQL CONNECTIVITY STANDPOINT:

When we try to connect to the SQL Server instance using the SQL Server Management Studio, it may fail with the following error message,


Error:

TITLE: Connect to Server

——————————

Cannot connect to <mySQLServer>.

——————————

ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 — No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

For help, click:

http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkI…

——————————

BUTTONS:

OK

——————————

Using a UDL file, we saw the following error message,

—————————

Microsoft Data Link Error

—————————

Test connection failed because of an error in initializing provider. [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.

—————————

OK

—————————


Note:

Forcing the connection to use any other protocol like TCP, Named Pipes & Shared Memory also throws the same error message. The Dedicated administrator connection (DAC) was also throwing a “Login timeout expired.” error.


OUR FINDINGS & INFERENCE:

There are numerous reasons on why you may witness these error messages. But usually, if you see these 2 specific error messages from SQL Server Management Studio & UDL file. Then it is worth checking the below settings.

As per the error message received, “…


an error occurred during the pre-login handshake



.”

and “


[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error

.”

means that the client application was able to complete the TCP 3-way handshake properly (hence you notice “


A connection was successfully established with the server


”), but during the


pre-login handshake,


the client application checks with the SQL Server on the TDS protocol version to be used henceforth for the communication, the login passed by the client application (Windows authenticated login or SQL Authenticated Login), whether there is any client-side or SQL Server connection encryption using SSL certificates or TLS etc. If the SQL Server doesn’t respond to this request from the client in a timely fashion or fails to respond due to any internal machine-level issues, we end-up at this particular error message. (wiz. “…


an error occurred during the pre-login handshake”


)

These error messages are thrown from the actual SQL Server drivers / providers that are used to establish the connection to the SQL server. E.g (OLE DB provider for SQL Server / SQL Server Native Client etc.). So different SQL Drivers/ Providers throws different error messages for the same issue. When we tried the connection from the UDL file, we see a different error message for this reason, but this error message was more straightforward.


Error:

Test connection failed because of an error in initializing provider. [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.

Hence, we directly jumped to the SCHANNEL registry hive to check the values. Wiz.

Target hive:


HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNEL


CAUSE:

By default, you may not find the below registry keys, which is completely fine. But  in my case, when we checked the values for these registry keys on the target SQL Server, the following were the values.

i)

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 2.0Server


DisabledByDefault

was set to 1


Enabled

was set to 0

ii)

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsSSL 3.0Server


DisabledByDefault

was set to 1


Enabled

was set to 0

iii)

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0 Server


DisabledByDefault

was set to 0


Enabled

was set to 0

Based on these values, we figured-out that none of the security provider protocols were enabled. We confirmed that all SSL 2.0, SSL 3.0 & TLS 1.0 were disabled and this is not an ideal scenario.


RESOLUTION:

We enabled the TLS 1.0 protocol by setting the following value.

Under,


HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0 Server

Set

Enabled

to

1

Rebooted the SQL Server machine for the changes to reflect.

After the successful reboot, we were able to connect to the SQL Server locally without any issues. Also tested the connection from a remote server machine and confirmed that the connections to the SQL Server worked as expected without any issues. SQL server was just a victim here like any other application that uses windows security providers and since all the security provider’s protocols were disabled, the SQL Server wasn’t able to accept any new connection request.

Please drop in your comments or connect with Microsoft BI-ONE CSS team if you are still encountering the same issue even after performing the above steps.

Happy troubleshooting!!!!


Author: Krishnakumar Rukmangathan, Technical Advisor, SQL Server BI-ONE Developer team, Microsoft


Reviewed by: Sunil Kumar B.S, Escalation Engineer, SQL Server BI-ONE Developer team, Microsoft.

This article, suggests a way of resolving the below error message, when you are trying to access SQL Server using “Microsoft OLE DB Provider for SQL Server” and TLS 1.0: [DBNETLIB] [ConnectionOpen (SECDoClientHandshake()).] SSL Security Error

Prior to start writing this article, I was thinking of using a title like “How to still use TLS 1.0”, or something similar, but besides the fact that would have given a wrong message, it would not help so much because many people, usually search for such articles using the error message (SSL Security error)…

So, I anticipate that this article, with this title, would help as many people as possible 🙂

Drop me a line if you find the article useful and why not, subscribe to my newsletter to stay up to date with future articles!

A Few Words About TLS 1.0

TLS 1.0 is considered a deprecated protocol and it is not recommended anymore to be used to secure connections. That’s why many organizations (if not all) transitioned or are in the process of transitioning to newer versions of TLS such as TLS1.1 or above.

However, you may still encounter outdated applications that still need to use this protocol, even for a while for just performing a single operation. One such example, is to try and connect to a SQL Server instance via Microsoft OLE DB Driver for SQL Server using TLS 1.0.

If you are in such situation, I have good news, from a technical aspect, it is still possible to do this.

Read on to learn more.

SQL Server Support for TLS 1.0 and Above

SQL Server still supports all TLS protocols, currently from 1.0 to 1.2. However, depending on the version of SQL Server you have, especially in cases of older SQL Server versions, you might need a patch.

Read this article on SQLNetHub to learn more about SQL Server support for TLS versions.

Now let’s jump to the juicy part of this article and see how finally we can resolve the above error and manage to connect to SQL Server using Microsoft OLE DB Driver for SQL Server and TLS 1.0.

Note that if you are just trying to connect with TLS 1.0 for a while in order to perform a specific task, then make sure to revert the below changes in order to restore the security level of your systems back to their previous level.

Latest Microsoft OLE DB Driver for SQL Server

The first step towards resolving the SSL Security error, is to make sure that the version of the target SQL Server instance you want to connect to, is supported by the driver.

For example, Microsoft OLE DB Driver 18.1 for SQL Server supports connecting to SQL Server 2012 or later.

For older versions of SQL Server, you will need to find an earlier version of Microsoft OLE DB Provider for SQL Server as well.

You can find the latest version of the OLE DB driver here.

Useful details:

The Microsoft OLE DB Provider for SQL Server, allows ADO to access Microsoft SQL Server. However, This is an older driver and it is not recommended to be used driver for new development, since it is deprecated.

The new OLE DB provider is called the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) which will be updated with the most recent server features going forward (learn more)

Registry Changes

The next step is, to edit the Windows Registry (always be careful when messing up with Windows Registry – only certified engineers should do that).

To enable TLS 1.0 in Windows

In Windows Registry, add the below dword keys:

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0Server]

  • “Enabled”=dword:00000001
  • “DisabledByDefault”=dword:00000000

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.0Client]

  • “Enabled”=dword:00000001
  • “DisabledByDefault”=dword:00000000

To disable TLS 1.0 in Windows

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.1Server]

  • “Enabled”=dword:00000000
  • “DisabledByDefault”=dword:00000001

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNELProtocolsTLS 1.1Client]

  • “Enabled”=dword:00000000
  • “DisabledByDefault”=dword:00000001

Learn more about the above registry changes in this MS Docs article.

Local Security Policy

The next step is to check the Local Security Policy on the database server.

So, in Local Security Policy on the Database Server, make sure that the setting “System Cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing” is disabled.

If you want to learn more about this security option, you can check this MS Docs article.


Strengthen your SQL Server Administration Skills – Enroll to our Online Course!

Check our online course on Udemy titled “Essential SQL Server Administration Tips
(special limited-time discount included in link).

Via the course, you will learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!

Essential SQL Server Administration Tips - Online Course with Live Demonstrations and Hands-on Guides

(Lifetime Access/ Live Demos / Downloadable Resources and more!)

Enroll from $14.99


Server Protocols, Ciphers, Hashes and Client Protocols

The last step in this troubleshooting guide, is to use IISCrypto, which is an excellent free tool, that allows you to control which protocols, ciphers, and more are enabled (or not) on a Windows server.

That being set, you will need to run IISCrypto and make sure that the “TLS 1.0” Server and Client Protocols, as well as the”SHA” hash are enabled.

Here’s a screenshot of IISCrypto, running on my PC, having TLS 1.0 and “SHA” enabled for illustration purposes:

[DBNETLIB] [ConnectionOpen (SECDoClientHandshake()).] SSL Security Error - How to Resolve - Article on SQLNetHub

Note that, if finally you need to perform any changes using IISCrypto, you will need to restart the server.

Actually, for any changes you might need to perform, it is recommended to restart the server.

A Piece of Advice

As mentioned in this article’s beginning, TLS 1.0 is considered a deprecated protocol and it is not recommended anymore to be used to secure connections.

Instead, you should be using newer versions of TLS.

In case you just need to switch to TLS 1.0 for performing an ad hoc task, you need to make sure that after you completed the task, you revoked any changes you might have applied, and disable again TLS 1.0 and the “SHA” hash.

See More

Check out DBA Security Advisor, a SQL Server security tool to assess your SQL Server instances against a rich set of security checks and get security best practice recommendations.

Featured Online Courses:

  • SQL Server 2022: What’s New – New and Enhanced Features [New]
  • Data Management for Beginners – Main Principles
  • Introduction to Azure Database for MySQL
  • Working with Python on Windows and SQL Server Databases
  • Boost SQL Server Database Performance with In-Memory OLTP
  • Introduction to Azure SQL Database for Beginners
  • Essential SQL Server Administration Tips
  • SQL Server Fundamentals – SQL Database for Beginners
  • Essential SQL Server Development Tips for SQL Developers
  • Introduction to Computer Programming for Beginners
  • .NET Programming for Beginners – Windows Forms with C#
  • SQL Server 2019: What’s New – New and Enhanced Features
  • Entity Framework: Getting Started – Complete Beginners Guide
  • A Guide on How to Start and Monetize a Successful Blog
  • Data Management for Beginners – Main Principles

Read Also

  • DBA Security Advisor v2.3 is Now Out!
  • The OLE DB provider “SQLNCLI11” for linked server “…” supplied inconsistent metadata for a column… – How to Resolve
  • SQL Server 2022: What’s New – New and Enhanced Features (Course Preview)
  • How to Connect to SQL Server Databases from a Python Program
  • What is Data Security and which are its Main Characteristics?
  • Introduction to Azure Database for MySQL (Course Preview)
  • Data Management for Beginners – Main Principles (Course Preview)

Other SQL Server Security-Related Articles

  • How to Enable SSL Certificate-Based Encryption on a SQL Server Failover Cluster
  • Why You Need to Secure Your SQL Server Instances
  • Policy-Based Management in SQL Server
  • Should Windows “Built-InAdministrators” Group be SQL Server SysAdmins?
  • Frequent Password Expiration: Time to Revise it?
  • The “Public” Database Role in SQL Server
  • Encrypting SQL Server Databases
  • 10 Facts About SQL Server Transparent Data Encryption
  • Encrypting a SQL Server Database Backup
  • …check all

Subscribe to our newsletter and stay up to date!

Subscribe to our YouTube channel (SQLNetHub TV)

Easily generate snippets with Snippets Generator!

Secure your databases using DBA Security Advisor!

Generate dynamic T-SQL scripts with Dynamic SQL Generator!

Check our latest software releases!

Check our eBooks!

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 5.00 out of 5)

Loading… 

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub

Artemakis Artemiou

Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 20 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and {essentialDevTips.com}. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.

Views: 21,020

My server is windows 2008 server r2.
I found the following error on my server after disable tls 1.0 and SSLv3.

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

Currently, only TLS 1.2 is enabled on my server, and at the client side the TLS 1.2 is set on

Is it posible if [DBNETLIB] is running on TLS 1.2?

UditS's user avatar

UditS

1,92615 silver badges37 bronze badges

asked Apr 6, 2016 at 13:29

antah berantah's user avatar

2

There might be chances that ODBC 11.0 earlier version is been installed. In this case the connection string should be
Driver={ODBC Driver 11 for SQL Server};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;

And also check TLS 1.2 is enabled

answered Dec 12, 2018 at 16:04

Vijay Dodamani's user avatar

After disabling TLS 1.0 and 1.1 on Windows Server 2016 we were able to get our ASP Classic scripts database connections working again in the following way:

  1. Download and install Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL)
  2. Replace Provider=SQLOLEDB; with Provider=MSOLEDBSQL; in all connection strings for the ASP Classic scripts
  3. Done! (no restart needed)

Note: The previous (same name but different abbreviation) Microsoft OLE DB Provider for SQL Server (SQLOLEDB) and SQL Server Native Client OLE DB provider (SQLNCLI) remains deprecated and it is not recommended to use either for new development work. (source)

answered Jan 12, 2022 at 13:25

Jonas Äppelgran's user avatar

I had to do several things. The server was Windows 2016 Standard testing with a .txt file I changed to .UDL. This server was trying to connect to our Sql Server 2008 R2 SP3

On the 2016 box I installed SQL Server Native client 10.0

Get that here : https://www.microsoft.com/en-us/download/details.aspx?id=57606

Finally on the sql server box I had to install patch KB4057113 to enable TLS1.2

Note when testing the connection by opening the .UDL file don’t forget to change the provider to SQL Server Native Client 10.0

answered Jun 21, 2019 at 18:58

drzounds's user avatar

drzoundsdrzounds

3703 silver badges15 bronze badges

Similiar to Jonas Appelgran’s answer, but some slight changes to solve our issue.

  1. Download and install install Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL)
  2. Replace Provider=SQLOLEDB; with Provider=MSOLEDBSQL19; in all connection strings for the ASP Classic scripts (note the version of the driver was needed)
  3. At this point, was still getting the following error:

SSL Provider: The certificate chain was issued by an authority that is
not trusted.

After some research, I found that I also needed to either trust the server certificate or set the encryption to false in the connection string:

Trust Server Certificate=True;
and/or
Use Encryption for Data=False;

Need to update these depending on your situation but it was an internal intranet application only for us so either option was fine. (Otherwise you would need to create and install either a self-signed certificate or one from your organization’s CA.)

answered Jul 11, 2022 at 22:27

Tahari's user avatar

TahariTahari

1316 bronze badges

  1. Open Regedit (Wind+R > regedit)
  2. Locate HKLMSOFTWAREMicrosoftMSSQLServerMSSQLServerSuperSocketNetLib
  3. Create a new word value and name it «Certificate» set the value to this: «Certificate=0»
  4. Also modify the default REG_SZ and set the value to «Certificate=0»
  5. Restart the MSSQL service

Hope this helps since worked for me.

answered Dec 15, 2017 at 15:03

Waldy Al-Monte's user avatar

  • Remove From My Forums
  • Question

  • While connecting SQL server(Version 2016) from application server to configure the application, the below error is occuring.
    This SQL server instance is cluster instance(2 Node cluster). 

    [DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.

    TLS1.0 is disabled due to security reasons.TLS1.1 and TLS 1.2 is enabled on the servers. 

    Any one call tell how to fix the issue?

Answers

  • Hi Vigneshvp,

    Could you try to enable TLS1.0 to see if the error is gone and disable it after you completed the task? Please refer to

    [DBNETLIB] [ConnectionOpen (SECDoClientHandshake()).] SSL Security Error – How to Resolve.

    Best regards,
    Cathy Ji


    MSDN Community Support
    Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
     MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by

      Monday, August 5, 2019 1:17 PM

  • After enabling TLS1.0 , the issue got resolved. Thank you.

    • Marked as answer by
      Vigneshvp
      Monday, August 5, 2019 1:26 PM
  • Remove From My Forums
  • Question

  • When I am trying to test SQL connection from WebFOCUS Windows server ( under segment network) with SQL server 2008. I got the following error :

    Connection Failed:

    SQL State: ‘01000’

    SQL server Error: 772

    [Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen (SECDoClientHandshake())

    Connection Failed:

    SQL state: ‘08001’

    SQL Server Error :18

    [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL security error

Answers

  • Hi Neha,

    Could you ping the SQL Server successfully? Clients that have the Force Protocol Encryption option set ON on the client may fail to connect to SQL Server if clients specify an IP address for the server name.

    Please try:

    Use the server name to connect to SQL Server. You can use the SQL Server Client Network Utility to set up an alias for the server that is running SQL Server or implement name resolution by using WINS, DNS, or LMHOST file so that you can connect by server
    name.

    Or Set the Force Protocol Encryption option to ON on the server by using the SQL Server Server Network Utility. If you turn on encryption on the server, all the clients must connect by using encryption and you must install a certificate
    on the server. For more information, refer to the «Net-Library Encryption» topic in SQL Server 2000 Books Online.

    For more information please see:
    http://support.microsoft.com/kb/316779


    Best Regards,
    Iric
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by

      Thursday, August 9, 2012 2:11 AM

  • Remove From My Forums
  • Question

  • When I am trying to test SQL connection from WebFOCUS Windows server ( under segment network) with SQL server 2008. I got the following error :

    Connection Failed:

    SQL State: ‘01000’

    SQL server Error: 772

    [Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen (SECDoClientHandshake())

    Connection Failed:

    SQL state: ‘08001’

    SQL Server Error :18

    [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL security error

Answers

  • Hi Neha,

    Could you ping the SQL Server successfully? Clients that have the Force Protocol Encryption option set ON on the client may fail to connect to SQL Server if clients specify an IP address for the server name.

    Please try:

    Use the server name to connect to SQL Server. You can use the SQL Server Client Network Utility to set up an alias for the server that is running SQL Server or implement name resolution by using WINS, DNS, or LMHOST file so that you can connect by server
    name.

    Or Set the Force Protocol Encryption option to ON on the server by using the SQL Server Server Network Utility. If you turn on encryption on the server, all the clients must connect by using encryption and you must install a certificate
    on the server. For more information, refer to the «Net-Library Encryption» topic in SQL Server 2000 Books Online.

    For more information please see:
    http://support.microsoft.com/kb/316779


    Best Regards,
    Iric
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by

      Thursday, August 9, 2012 2:11 AM

Problem

Administrator is trying to create an ODBC connection (called ‘FAP’) for the Controller functionality ‘FAP’ to work.

During the creation process, an error appears.

Symptom

image-20191218093550-1

Microsoft SQL Server Login
Connection failed:
SQLState: ‘0100’
SQL Server Error: 772
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (SECDoClientHandshake()).
Connection failed:
SQLState: ‘08001’
SQL Server Error: 18
[Microsoft][ODBC SQL Server Driver][Shared Memory]SSL Security error

Cause

Both of the following are true:

(1) TLS 1.0 has been disabled on one (or both) of the following servers:

  • Planning Analytics (TM1) application server
  • Microsoft SQL server.

(2) Administrator is using the older ‘SQL Server‘ ODBC driver (see below, circled in red)

image-20191218093811-2

This is incompatible with TLS 1.2.

Resolving The Problem

Fix:

Change the ODBC connection to use the newer «SQL Server Native Client 11.0» driver (highlighted in green below):

image-20191218094339-1

Workaround:

Re-enable TLS 1.0 on the Planning Analaytics (TM1) and/or SQL servers.

  • TIP: For more details, see separate IBM Technote #728129.

Related Information

Document Location

Worldwide

[{«Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Product»:{«code»:»SS9S6B»,»label»:»IBM Cognos Controller»},»Component»:»»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»10.4.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

 
alsov ©
 
(2009-09-21 12:32)
[0]

Доброго времени суток!

Уже не знаю куда копать. Направьте на путь истинный.

Проблема в следующем.

Ни с того ни с сего на клиентском компе при попытке подключиться к mssql серверу начала вылезать ошибка.

При подключении через OLEDB провайдера

Подключение не выполнено:
SQLState: «01000»
Ошибка SQL-сервер: 772
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECDoClientHandshake()).
Подключение не выполнено:
SQLState: «08001»
Ошибка SQL-сервер: 18
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Ошибка безопасности SSL

А при подключении через SQLNCLI вот такая:

Connection failed:
SQLState: «08001»
SQL Server Error: -2146893052
[Microsoft][SQL Native Client]SSL Provider: Не удается установить связь с локальным администратором безопасности

Connection failed:
SQLState: «08001»
SQL Server Error: -2146893052
[Microsoft][SQL Native Client]Client unable to establish connection

Никто не сталкивался?
SSL на сервере не настроен да и не нужен на данный момент.

Заранее благодарен


 
alsov ©
 
(2009-09-21 12:39)
[1]

Стоило написать на форум, как проблема разрешилась чудным образом.

Делал примерно следующее (может кому пригодится)

В cliconfg поставил галку «Обязательное шифрование протокола»
Перезагрузился
Снял галку
Перезагрузился

Стало подключатся

Интересно что это было….


 
DrPass ©
 
(2009-09-21 21:14)
[2]

SSL и был. На сервере был включен, а на клиенте нет. Потому и отваливалось. Ты включил на клиенте, вот и заработало


 
alsov ©
 
(2009-09-22 08:51)
[3]

Так я же снял галку «Обязательное шифрование протокола»

То есть отключил. Или нет?


 
DrPass ©
 
(2009-09-22 09:43)
[4]

А, я «поставил» заметил, а «снял» — пропустил
Тогда это был банальный глюк. Они имеют место быть в программах :)


Понравилась статья? Поделить с друзьями:
  • Sql server ошибка 5172
  • Sql server ошибка 5171
  • Spore ошибка 2000 и 1004 на пиратке
  • Sql server ошибка 5030
  • Sql server ошибка 4046