Ошибка odbc sqlstate 08001 номер ошибки 17

  • Remove From My Forums

 locked

Sql server ODBC connection error «Connection failed: SQLState: ‘08001’ SQL Server Error:17»

  • Question

  • Hi Everyone, 

                   I am having conundrum guys. I recently moved all my access linked database to new NAS device except one client all works fine with database where it comes out with error «

    Connection failed:
    SQLState: ‘01000’
    SQL Server Error: 1703
    [Microsoft][ODBC SQL Server Driver][Multi-Protocol]
    ConnectionOpen(RPCopen())
    Connection failed:
    SQLState:’08001′
    SQL Server Error:11
    [Microsoft][ODBC SQL Server Driver][Multi-Protocol]General 
    network error. Check your network documentation.

            When I test ODBC connection it completes successfully and I also checked permission and seems to be okey and also checked security in
    SQL database it has permission to  connect to corresponding database. To let you know guys I recently changed the password of that machine to blank and urged my colleague to change in next login so is it because of password
    its not connecting. I am using TCP/IP dynamic port in ODBC connection. One thing I dont understand is that why its functioning well in all clients except one which I checked previous day before changing password it was working fine.I am
    using sql server 2000 and access 2003 database.

    GUYS HELP HELP!!!!!

    Cheers


    bis

    • Edited by

      Thursday, June 9, 2011 2:42 PM

Answers

  • What is your client operating system? If it is Windows XP or earlier version, please first check the client settings:

    1. Check your SQL Server Client Network Utility settings.

    Open SQL Server Client Network Utility by running Cliconfg.exe from command prompt on your client machine, selected the General tab and make sure that the TCP/IP protocol and named pipes protocols that your
    SQL Server support are enabled. You can check what the protocols your SQL Server support by running SQL Server Server Network Utility at your server side. Make sure that they are equal and then you can create an alias with the sql server name with a
    specific protocol like TCP and TCP port in the Client Network Utility. The alias must be the name that you used to connect to your SQL Server instance.

    2. If the above does not work, please check if there is any problem of your MDAC with MDAC checker,

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1953 

    3. Make sure that your client operating system has the latest service pack installed.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help

    • Marked as answer by
      Alex Feng (SQL)
      Monday, June 20, 2011 10:18 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»;

Aug
01
2019

SQL-Server-does-not-exist-or-access-deniedWe are running Windows SQL Server 2016 Enterprise on Windows Server 2016. The server has an instance with databases in Always On High Availability group. People connect to the instance mostly from MS Access and MS Excel applications and from time to time they experience the following error:

—————————
Microsoft SQL Server Login
—————————
Connection failed:
SQLState: ‘01000’
SQL Server Error: 67
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection failed:
SQLState: ‘08001’
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

There can be a few reasons that cause this error. If you connect SQL Server from MS Office applications and you databases are in Always On availability group:

Make sure you use “MSOLEDBSQL.1” or “ODBC Driver 13 for SQL Server” driver instead of “SQL Server” driver

Instead of connection string like “DRIVER=SQL Server;SERVER=AlwaysOn Availability Group NameInstance Name;UID=User;PWD=Password;APP=Microsoft Office 2016;WSID=Host;DATABASE=DBName;

you  should have the string like

DRIVER=ODBC Driver 13 for SQL Server;SERVER=AlwaysOn Availability Group NameInstance Name;UID=User;PWD=Password;APP=Microsoft Office 2016;DATABASE=DBName;TrustServerCertificate=Yes;MultiSubnetFailover=Yes

or

Provider=MSOLEDBSQL.1;Password=Password;Persist Security Info=True;User ID=User;Initial Catalog=DBName;Data Source=AlwaysOn Availability Group NameInstance Name;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=Host;Initial File Name=””;Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False;Application Intent=READWRITE;MultisubnetFailover=True;Use FMTONLY=False

EXCEL-SQL-Server-does-not-exist-or-access-deniedIn this case the error SQL Server does not exist or access denied occurs because “SQL Server” driver cannot work properly with Always On groups. When connection to an instance is initiated AlwaysOn group’s FQDN is resolved to IP addresses of each instance and the driver picks random IP address. If IP of passive instance was chosen then we get the error.

Make sure TCP/IP protocol on SQL server is turned on and SQL Server Browser service on SQL server is running

To assign a TCP/IP port number to the SQL Server Database Engine

  1. In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.
  2. In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. (You will probably see both IP version 4 and IP version 6 addresses.) Right-click each address, and then click Properties to identify the IP address that you want to configure.
  3. If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.

    MSSQL-server-TCP-ports

  4. In the IPn Properties area box, in the TCP Port box, type the port number you want this IP address to listen on, and then click OK. Multiple ports may be specified by separating them with a comma.

    Note

    If the Listen All setting on the Protocol tab is set to “Yes”, then only TCP Port and TCP Dynamic Port values under the IPAll section will be used and individual IPn sections will be ignored in their entirety. If the Listen All setting is set to “No”, then the TCP Port and TCP Dynamic Port settings under the IPAll section will be ignored and the TCP Port, TCP Dynamic Port, and Enabled settings on the individual IPn sections will be used instead. Each IPn section has an Enabled setting with a default value of “No” which causes SQL Server to ignore this IP address even if it has a port defined.

  5. In the console pane, click SQL Server Services.
  6. In the details pane, right-click SQL Server (<instance name>) and then click Restart, to stop and restart SQL Server.
Connecting

After you have configured SQL Server to listen on a specific port, there are three ways to connect to a specific port with a client application:

  • Run the SQL Server Browser service on the server to connect to the Database Engine instance by name.
  • Create an alias on the client, specifying the port number.
  • Program the client to connect using a custom connection string.

Make sure firewall on SQL Server allows incoming connections

Try to ping the instance from a client computer. Open firewall settings on SQL Server and make sure incoming connections to instance’s TCP port (see above) are allowed.

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com

  • Remove From My Forums

 locked

Sql server ODBC connection error «Connection failed: SQLState: ‘08001’ SQL Server Error:17»

  • Question

  • Hi Everyone, 

                   I am having conundrum guys. I recently moved all my access linked database to new NAS device except one client all works fine with database where it comes out with error «

    Connection failed:
    SQLState: ‘01000’
    SQL Server Error: 1703
    [Microsoft][ODBC SQL Server Driver][Multi-Protocol]
    ConnectionOpen(RPCopen())
    Connection failed:
    SQLState:’08001′
    SQL Server Error:11
    [Microsoft][ODBC SQL Server Driver][Multi-Protocol]General 
    network error. Check your network documentation.

            When I test ODBC connection it completes successfully and I also checked permission and seems to be okey and also checked security in
    SQL database it has permission to  connect to corresponding database. To let you know guys I recently changed the password of that machine to blank and urged my colleague to change in next login so is it because of password
    its not connecting. I am using TCP/IP dynamic port in ODBC connection. One thing I dont understand is that why its functioning well in all clients except one which I checked previous day before changing password it was working fine.I am
    using sql server 2000 and access 2003 database.

    GUYS HELP HELP!!!!!

    Cheers


    bis

    • Edited by

      Thursday, June 9, 2011 2:42 PM

Answers

  • What is your client operating system? If it is Windows XP or earlier version, please first check the client settings:

    1. Check your SQL Server Client Network Utility settings.

    Open SQL Server Client Network Utility by running Cliconfg.exe from command prompt on your client machine, selected the General tab and make sure that the TCP/IP protocol and named pipes protocols that your
    SQL Server support are enabled. You can check what the protocols your SQL Server support by running SQL Server Server Network Utility at your server side. Make sure that they are equal and then you can create an alias with the sql server name with a
    specific protocol like TCP and TCP port in the Client Network Utility. The alias must be the name that you used to connect to your SQL Server instance.

    2. If the above does not work, please check if there is any problem of your MDAC with MDAC checker,

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1953 

    3. Make sure that your client operating system has the latest service pack installed.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help

    • Marked as answer by
      Alex Feng (SQL)
      Monday, June 20, 2011 10:18 AM

PHP Driver version or file name

latest

SQL Server version

2008 R2

Client operating system

Ubuntu 16.04.6 LTS (Docker container)

PHP version

7.3

Microsoft ODBC Driver version

latest

Table schema

Any table

Problem description

I am start using Docker for PHP development, and I want to connect to SQL Server from Laravel Project. I am not able to setup SQL Server driver on PHP-FPM container.

on SQL query I am getting this error:

SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] (SQL: select …

Please take in account I am trying to connect to an SQL Server 2008 R2 and upgrade server is not an option.. at least for now.

Expected behavior and actual behavior

Connection to SQL Server successfully

Repro code or steps to reproduce

I am using laradoc project to setup my needed docker containers.
https://laradock.io/

Simply follow steps from here: https://laradock.io/getting-started/#2-2-installation
and execute:
docker-composer up -d nginx mysql

this is the DockerFile script to install SQL Server driver on PHP-FPM container

###########################################################################

SQL SERVER:

###########################################################################

ARG INSTALL_MSSQL=false

RUN set -eux;
if [ ${INSTALL_MSSQL} = true ]; then
if [ $(php -r «echo PHP_MAJOR_VERSION;») = «5» ]; then
apt-get -y install freetds-dev libsybdb5
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so
&& docker-php-ext-install mssql pdo_dblib
&& php -m | grep -q ‘mssql’
&& php -m | grep -q ‘pdo_dblib’
;else
###########################################################################
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
###########################################################################
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
apt-get install -y apt-transport-https gnupg
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add —
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
&& apt-get update -yqq
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales
&& echo «en_US.UTF-8 zh_CN.UTF-8 UTF-8» > /etc/locale.gen
&& locale-gen
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales
&& echo «en_US.UTF-8 UTF-8» > /etc/locale.gen
# link local aliases
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias
&& locale-gen
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
&& if [ $(php -r «echo PHP_MINOR_VERSION;») = «0» ]; then
pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0
;else
pecl install pdo_sqlsrv sqlsrv
;fi
&& docker-php-ext-enable pdo_sqlsrv sqlsrv
&& php -m | grep -q ‘pdo_sqlsrv’
&& php -m | grep -q ‘sqlsrv’
;fi
;fi

Понравилась статья? Поделить с друзьями:
  • Ошибка odis 2522e
  • Ошибка odbc sqlstate 01s00
  • Ошибка odbc sqlstate 01000
  • Ошибка ocr на частотнике
  • Ошибка ocf частотник шнайдер 312