Меню

Sql state 08001 error code 0 message ошибка при попытке подсоединения

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»;

Содержание

  1. Ошибка подключения к базе 7.7 SQL
  2. SQL Server Connection failed : SQLState 08001 – Let’s fix it!!
  3. When the SQL Server Connection failed: SQLState 08001 Occurs?
  4. How to fix SQLState 08001 Error?
  5. Conclusion
  6. PREVENT YOUR SERVER FROM CRASHING!
  7. 4 Comments
  8. TablePlus
  9. Connection failed — SQLState ‘08001’ in SQL Server
  10. Точка подключения службы не подключается в System Center Configuration Manager
  11. Проблемы
  12. Решение
  13. Сведения об исправлении
  14. Предварительные условия
  15. Необходимость перезагрузки
  16. Сведения о замене исправлений
  17. Sql server native error 08001
  18. Answered by:
  19. Question
  20. Answers
  21. All replies

Ошибка подключения к базе 7.7 SQL

База 1С SQL. Подключается 5 ПК. На одном из них переустановили систему, установили платформу 7.7, при попытке подключения к базе выдает ошибку:

SQL State:08001
Native:17
Messeg:[Microsoft][ODBC SQL Server Driver][DBNetLib] SQL Server не существует или отсутствует доступ.
SQL State:01000
Native:2
Messeg:[Microsoft][ODBC SQL Server Driver][DBNetLib] Connection open(Connect())

Помогите разобраться, как исправить?

Причин возникновения проблем с подключением к SQL Server-у может быть много, но есть простые методы диагностики и выявления проблем подключения к серверу.

Шаг 1.
Попробуйте «пропинговать» сервер БД как по имени так и по IP-адресу, командой
Ping [SQLServerDNSName], где SQLServerDNSName – DNS имя сервера БД в сети. Если возникли проблемы с пингом по имени, то необходимо устранить проблемы со службой DNS в Вашей сети. Если сервер не пингуется по IP-адресу, то необходимо решить проблемы, либо с маршрутизацией пакетов в сети, или проверить саму сеть на наличие физических обрывов.

Шаг 2.
Выполняется при условии, что шаг 1 выполнился успешно.
Простая проверка к соединения с сервером БД осуществляется командой
telnet [SQLServerIPAdress] [port] – где SQLServerIPAdress IP-адрес сервера, port-порт подключения к серверу, по умолчанию 1433. При удачном подключении, экран терминала telnet будет чистым с мигающим курсором. При неудачном подключении необходимо проверить порт подключения к серверу. Определение настроек порта на клиенте выполняется утилитой cliconfg.exe, на сервере — утилитой svrnetcn.exe.

Шаг 3.
Выполняется при условии, что шаги 1 и 2 выполнились успешно.
Часто на этом шаге при подключении возникает ошибка «Login failed for user [UserName]», где UserName-имя пользователя, под которым вы хотите подключиться к серверу БД. При возникновении такой ошибки необходимо проверить тип авторизации. По умолчанию при установке SQL Server-а разрешена только Windows авторизация. Если Вы подключаетесь под логином sa, то Вам необходимо установить на сервере БД смешанную(mixed) авторизацию. Также необходимо проверить пароль для логина, под которым Вы подключаетесь.

Источник

SQL Server Connection failed : SQLState 08001 – Let’s fix it!!

by Sharon Thomas | Jan 14, 2020

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.

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.

I got same situation or error message and the issue in my particular case was that the number of connections was set to a maximum of 500. similar issue happened when this limit is reached therefore you can either reboot the SQL instance to get rid of idle connections. But if this happens frequently change the number of connections to unlimited (Value 0).
Alemayehu G. Desta

Hello Alemayehu,
Indeed the connection limit does cause SQL errors.

Named Pipes Solution solved.

Hi Manoj,
Glad to know that the problem got fixed.

Источник

TablePlus

Connection failed — SQLState ‘08001’ in SQL Server

September 25, 2019

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

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.

Источник

Точка подключения службы не подключается в System Center Configuration Manager

Проблемы

Вы обнаружили, что System Center Configuration Manager сайта не может подключиться к SQL Server. Эта проблема возникает при выполнении следующих условий:

База данных сервера сайта настроена для обмена данными с помощью именованного экземпляра SQL сервера и пользовательского порта.

Роль «точка подключения службы» устанавливается на том же компьютере, где выполняется SQL Server.

В этом случае записи, похожие на следующие, записываются в файлы smsexec.log и hman.log на сервере сайта:

[08001][2][Microsoft][SQL Server Native Client 11.0]Поставщик именованных каналов: не удалось открыть подключение к SQL Server [2].
[HYT00][0][Microsoft][SQL Server Native Client 11.0]
Истекло время ожидания входа*** [08001][2][Microsoft][SQL Server Native Client 11.0]При установке подключения к SQL Server произошла ошибка, связанная с сетью или экземпляром. Сервер не найден или недоступен. Проверьте правильность имени экземпляра и SQL Server настроены для разрешения удаленных подключений. Дополнительные сведения см. в SQL Server электронной документации.
Не удалось подключиться к SQL Server, тип подключения: SMS ACCESS.

Решение

Сведения об исправлении

Поддерживаемое исправление доступно в служба поддержки Майкрософт. Однако это исправление предназначено только для устранения проблемы, описанной в этой статье. Примените это исправление только к системам, в которых возникла проблема, описанная в этой статье. Это исправление может получить дополнительное тестирование. Поэтому, если эта проблема серьезно не затрагивает вас, рекомендуется дождаться следующего обновления программного обеспечения, содержащего это исправление.

Если исправление доступно для скачивания, в верхней части этой статьи базы знаний есть раздел «Доступно скачивание исправлений». Если этот раздел не отображается, обратитесь в службу поддержки клиентов Майкрософт, чтобы получить исправление.

Обратите внимание, что при возникновении дополнительных проблем или необходимости устранения неполадок может потребоваться создать отдельный запрос на обслуживание. Обычные затраты на поддержку будут применяться к дополнительным вопросам поддержки и вопросам, которые не подходят для этого исправления. Полный список номеров телефонов службы поддержки и обслуживания майкрософт или создания отдельного запроса на обслуживание см. на следующем веб-сайте Майкрософт:

http://support.microsoft.com/contactus/?ws=supportОбратите внимание, что в форме «Доступно скачивание исправлений» отображаются языки, для которых доступно исправление. Если язык не отображается, исправление недоступно для этого языка.

Предварительные условия

Чтобы применить это исправление, необходимо установить версию выпуска System Center Configuration Manager версии 1511.

Необходимость перезагрузки

После применения этого исправления не нужно перезапускать компьютер.

Сведения о замене исправлений

Это исправление не заменяет ранее выпущенное исправление.

Источник

Sql server native error 08001

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

Client setup system as below

OS: Windows 2008 R2 64 bit and installed SQL native client 11.0 (SQL 2012) for DSN creation.

Successfully created DSN when using with default SQL server ODBC driver in client machine. (by using AG listener name)

when try to connect via SQL native client 11.0 ODBC driver does not allowed and throwing SQL state 08001 error and time out messages.

Pl. help, how overcome this time out errors? does it require to install any patches?

Answers

Yes.. In client machine win 2008 R2 — SQL 2012 SSMS installed, I can able connect only AG Listener Name.

Does not connect if adding parameter -M (multisubnetfailover)..

Maybe this will help (Connection times out when you use AlwaysOn availability group listener with MultiSubnetFailover parameter): https://support.microsoft.com/en-us/kb/2870437

As a side note, I’d see if you can talk the client into upgrading from Windows 2008 R2. I would not recommend using it for any new projects.

I hope you found this helpful! If you did, please vote it as helpful on the left. If it answered your question, please mark it as the answer below. 🙂

  • Edited by Daniel Janik Tuesday, August 2, 2016 5:20 AM
  • Proposed as answer by Lin Leng Microsoft contingent staff Sunday, August 14, 2016 2:53 PM
  • Marked as answer by Lin Leng Microsoft contingent staff Monday, August 15, 2016 2:00 AM

I recall there being several hotfixes and to-dos to make Availability groups work with Windows 2008 R2.

It’s been quite a while since I’ve thought about that configuration; so, I can’t tell you if it’s recommended or not. Last time I looked into it was 2014 and the answer was don’t run a SQL AG on Win 2008 R2. You’re much better off using Windows 2012 or later.

Again, I don’t know if that’s changed but I would also question configuring Windows 2008 R2 as a new server mid way through 2016. Didn’t mainstream support end in January 2015?

I hope you found this helpful! If you did, please vote it as helpful on the left. If it answered your question, please mark it as the answer below. 🙂

Источник

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

All right—I’ve figured it out.

First off, @Mark B was right—the issue was that I hadn’t yet made the database itself publicly accessible via the VPC security group of which it was a member. To do this, from the database detail screen in AWS, I:

  1. clicked (what for me was the one and only) link beneath the «VPC security groups» of the database’s dashboard, which directed me to the EC2 Security Groups screen
  2. clicked the security group link related to my database, which directed me to that group’s detail page
  3. clicked the «Edit inbound rules» button which directed me to the «Edit inbound rules» screen
  4. clicked the «Add rule» button, which caused a table row containing the following columns: «Type», «Protocol,» «Port Range,» «Source,» «Description — optional»
  5. selected «PostgreSQL» for the «Type» column, which caused the values of «TCP» and «5432» to populate the «Protocol» and «Port range» columns respectively, entered my machine’s IP address («123.456.789.012/32»—no quotes and no parentheses), and left «Description — optional» blank, because, well, it’s optional.

Finally, I guess I’d forgotten to explicitly name the database, and so my attempts to enter what for me was ostensibly the database’s name (that is, «database-1») resulted in a connection error indicating that «database-1» does not exist. So, for the sake of ease and simply verifying my database connection, I entered «postgres» as the database name in my database client (I’m presently using DataGrip), because «postgres» is the de facto name of a postgreSQL database.

And that should work. I’m sure this is all no-brainer stuff to those more experienced with AWS, but it’s new to me and presumably to many others.

Thanks again, @Mark B, for sending me down the right path.

All right—I’ve figured it out.

First off, @Mark B was right—the issue was that I hadn’t yet made the database itself publicly accessible via the VPC security group of which it was a member. To do this, from the database detail screen in AWS, I:

  1. clicked (what for me was the one and only) link beneath the «VPC security groups» of the database’s dashboard, which directed me to the EC2 Security Groups screen
  2. clicked the security group link related to my database, which directed me to that group’s detail page
  3. clicked the «Edit inbound rules» button which directed me to the «Edit inbound rules» screen
  4. clicked the «Add rule» button, which caused a table row containing the following columns: «Type», «Protocol,» «Port Range,» «Source,» «Description — optional»
  5. selected «PostgreSQL» for the «Type» column, which caused the values of «TCP» and «5432» to populate the «Protocol» and «Port range» columns respectively, entered my machine’s IP address («123.456.789.012/32»—no quotes and no parentheses), and left «Description — optional» blank, because, well, it’s optional.

Finally, I guess I’d forgotten to explicitly name the database, and so my attempts to enter what for me was ostensibly the database’s name (that is, «database-1») resulted in a connection error indicating that «database-1» does not exist. So, for the sake of ease and simply verifying my database connection, I entered «postgres» as the database name in my database client (I’m presently using DataGrip), because «postgres» is the de facto name of a postgreSQL database.

And that should work. I’m sure this is all no-brainer stuff to those more experienced with AWS, but it’s new to me and presumably to many others.

Thanks again, @Mark B, for sending me down the right path.

Problem

When you create a Data Source in Guardium for a MYSQL database, an error like the following is displayed:

[]Could not connect to: jdbc:mysql://192.168.102.124:3306/SAMPLE?autoReconnect=true’ for user: ‘MYSQL test_MYSQL(Security Assessment)’.
DatasourceConnectException: Could not connect to: ‘MYSQL MYSQL test 192. 168.102.124:3306’ for user: ‘guardvatest’.
MySQLNonTransientConnectionException: Could not create connection to database server.
Attempted reconnect 3 times. Giving up. SqlState: 08001 Error Code: 0[
]

Cause

In the error message:

    The IP of the MYSQL database server is 192.168.102.124

    The user name is guardvatest

    The database that cannot be accessed is SAMPLE

The userguardvatest does not have connect privileges to database SAMPLE at database server 192.168.102.124 from the Guardium appliance

Resolving The Problem

  1. Ensure that the MYSQL database can accept remote connections.
  2. Grant the required privileges for the user to connect from the Guardium appliance.

For instance, if the IP address of the Guardium appliance is 192.168.102.123:

    GRANT SELECT ON SAMPLE.* TO 'guardvatest'@'192.168.102.123' identified by 'xxxxx';

To enhance security, the level of privileges must be granted as minimally necessary.

If the appropriate privileges have been granted and the credentials have been verified to be correct, but the data source connection still fails with the same error, it is possible that the MYSQL database server has locked out the connection from the Guardium appliance due to excessive login failures. In order to correct this, execute the following command in the mysql database using the the appropriate user credentials:

    mysqladmin flush-hosts

Wait for a few seconds and retry connection test from the Guardium datasource connection test.

[{«Product»:{«code»:»SSMPHH»,»label»:»IBM Security Guardium»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»—«,»Platform»:[{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»9.1;9.0;8.2;8.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB24″,»label»:»Security Software»}}]

When you use MySQL JDBC driver to connect to MySQL database server. You may encounter bellow error messages.

try {
    Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/dev2qa?useSSL=false","test","666888");
} catch (SQLException ex) {
    ex.printStackTrace();
    System.out.println("SQL State : " + ex.getSQLState());
}

Below are the error messages.

INFO: Pre-instantiating singletons in org.s[email protected]36d64342: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,userAccountDao]; root of factory hierarchy
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

And the SQL State code is 08001. The reason for this error is that your MySQL JDBC jar file version does not match the MySQL database server version.

1. Get MySQL Database Server Version Number.

  1. Open System Preferences in macOS.
  2. Click the MySQL icon in the popup window.
  3. Then you can get the MySQL server version.

2. Download Matched MySQL Server JDBC Version Jar File.

  1. You can download the MySQL JDBC jar file from the maven repository. If your MySQL server version is 8.0.12 so you should download JDBC jars version 8.0.12 or 8.
  2. If you use maven and pom.xml to manage your project dependency jar files, you should specify the JDBC jar file version in the pom.xml as below.
    <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
       <version>8.0.12</version>
    </dependency>

Вот моя проблема, у меня есть мои дескрипторы подключения, как это:

$dbSrvName = 'servername';
$dbName = 'database';
$dbUser = 'user';
$dbPass = 'password';

$dbInfo = array(
'Database' => $dbName,
'UID' => $dbUser,
'PWD' => $dbPass
);

$this->dbConn = sqlsrv_connect($dbSrvName, $dbInfo);
if(!$this->dbConn)
{
die(print_r( sqlsrv_errors(), true), 1);
}

Когда я запускаю вывод из sqlsrv_errors (), я получаю следующее сообщение:

Массив ([0] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 26
[code] => 26 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент
невозможно установить соединение, так как во время
рукопожатия до входа в систему. Общие причины включают в себя попытки клиента
подключиться к неподдерживаемой версии SQL Server, сервер слишком занят
принимать новые подключения или ограничение ресурса (память или максимум)
разрешенные соединения) на сервере. [message] => [Microsoft] [SQL
Собственный клиент сервера 10.0] Клиент не может установить соединение
потому что во время рукопожатия перед входом в систему произошла ошибка.
Распространенные причины включают в себя попытку клиента подключиться к неподдерживаемому
версия SQL Server, сервер слишком занят, чтобы принимать новые подключения или
ограничение ресурсов (память или максимально допустимые соединения) на
сервер. ) [1] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 10054
[code] => 10054 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] TCP
Поставщик: существующее соединение было принудительно закрыто удаленным
хост. [message] => [Microsoft] [Собственный клиент SQL Server 10.0] TCP
Поставщик: существующее соединение было принудительно закрыто удаленным
хост. ) [2] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 26
[code] => 26 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент
невозможно установить соединение [сообщение] => [Microsoft] [SQL Server
Собственный клиент 10.0] Клиент не может установить соединение) [3] =>
Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 10054 [код] => 10054
[2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не может
установить соединение из-за ошибки prelogin [message] =>
[Microsoft] [Собственный клиент SQL Server 10.0] Клиент не может установить
соединение из-за сбоя prelogin)) [2014-12-31 08:35:25]

SQLSRV USED:
php_sqlsrv_53_ts_vc9.dll

Поэтому я боюсь, что версия SQL не совместима с этой версией sqlsrv. Есть идеи?

Заранее спасибо и с Новым годом!

0

Решение

Я предполагаю, что вы пытаетесь удаленно подключиться к серверу sql. Вы должны убедиться, что это действительно возможно с вашей конфигурацией сервера sql.

Затем необходимо убедиться, что учетная запись пользователя, с которой вы пытаетесь соединиться, имеет надлежащие разрешения

Затем необходимо также открыть брандмауэр на сервере …

Вот краткий список вещей, чтобы проверить.

Не удается подключиться удаленно

0

Другие решения

На самом деле, это было недоразумение! База данных, к которой я пытался подключиться, — Oracle. Таким образом, библиотека PHP не совместима.

Спасибо, в любом случае…

0

Вот моя проблема: у меня есть мои связи:

$dbSrvName = 'servername';
    $dbName = 'database';
    $dbUser = 'user';
    $dbPass = 'password';

    $dbInfo = array(
        'Database' => $dbName,
        'UID' => $dbUser,
        'PWD' => $dbPass            
    );

    $this->dbConn = sqlsrv_connect($dbSrvName, $dbInfo);
    if(!$this->dbConn)
    {
        die(print_r( sqlsrv_errors(), true), 1);
    }    

Когда я запускаю вывод из sqlsrv_errors(), я получаю следующее сообщение:

Массив ([0] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 26 [code] => 26 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не может чтобы установить соединение, потому что ошибка возникла во время рукопожатий до входа в систему. Общие причины включают в себя попытку клиента подключиться к неподдерживаемой версии SQL Server, сервер слишком занят, чтобы принимать новые подключения или ограничение ресурсов (память или максимально разрешенные подключения) на сервере. [message] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не смог установить соединение, потому что ошибка возникла во время рукопожатий до входа в систему. Общие причины включают попытку клиента подключиться к неподдерживаемой версии SQL Server, сервер слишком занят, чтобы принять новые соединения или ограничение ресурсов (память или максимально разрешенные соединения) на сервере.) [1] => Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 10054 [code] => 10054 [ 2] => [Microsoft] [Собственный клиент SQL Server 10.0] Поставщик TCP: существующее соединение было принудительно закрыто d удаленным хостом. [message] => [Microsoft] [Собственный клиент SQL Server 10.0] Поставщик TCP: существующее соединение было принудительно закрыто удаленным хостом. ) [2] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 26 [code] => 26 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не может установить соединение [сообщение] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не может установить соединение) [3] => Массив ([0] => 08001 [SQLSTATE] => 08001 [1] => 10054 [код ] => 10054 [2] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не смог установить соединение из-за отказа доповещения [сообщение] => [Microsoft] [Собственный клиент SQL Server 10.0] Клиент не смог установить соединение из-за prelogin failure)) [2014-12-31 08:35:25]

SQLSRV USED: php_sqlsrv_53_ts_vc9.dll

Поэтому я боюсь, что версия SQL несовместима с этой версией sqlsrv. Есть идеи?

Спасибо заранее и с Новым годом!

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Spt aki escape from tarkov ошибка
  • Spss ошибка при подключении к удаленному серверу