Ошибка 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

One of the challenges especially with SQL Express is that you need to enable some protocols on the network level first in order to connect to it. You might see an error message the one below when you try to connect to SQL – stating SQLState 08001 and Error 17.

In order to resolve this, you need to enable named pipes and TCP in the SQL Server Configuration Manager that was installed by default on your system. See the image below on how it should look like. Please note that you need to restart the SQL service in order for those changes to take effect.

Please note – there might be a need of additional configuration like the Windows Firewall or other parameters, the above just addresses a rather common issue.

Tags: databasesql

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

  • 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

Debugging

«SQL Server does not exist or access denied.» One error. Dozens of possible causes. Read on for a bunch of practical troubleshooting tips.

  • Mike Wolfe

Feb 28, 2022
6 min read

Troubleshooting SQL Server Connection Errors

One of the most frustrating things to troubleshoot in Access is when you can’t connect to SQL Server.

Connection failed: SQL Server does not exist or access denied.

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.

This error is annoying because:

  • it often involves a 60-second timeout
  • it’s impossible to trap using traditional VBA error handling
  • the error message is close to useless
  • there are so many possible causes for this error
  • it often occurs on a user’s computer making it (A) hard to troubleshoot and (B) impossible to reproduce on a development computer

In this article, I want to take you through some of the troubleshooting steps that I use when trying to resolve this error.

Is the Server Reachable?

The first tool to use here is ping.  Open a command prompt and type the command ping followed by the name of the database server:

C:> ping MyDbServer

Can you ping the server by IP address but not by name?  If so, then there’s likely a DNS problem.  

C:> ping 10.20.30.40

Can’t ping the server by IP address or name?  Try a tracert next.  The trace will often bounce from node to node until it hits a deadend.  The last node prior to the deadend should provide a hint as to where the problem lies.

C:> tracert 10.20.30.40

If one or more of these tools fails to connect, it should help you narrow down the source of the problem.  HOWEVER, some network admins disable ICMP (the ping protocol), so just because ping fails that does not necessarily mean it’s a network problem.  Continue on to the next section.

TIP: Virtual private networks (VPNs) are frequent sources of intermittent network routing and DNS problems.  Try disconnecting any active VPNs (unless needed to connect to the database server).

Is the Port Blocked by a Firewall?

Ensure the SQL Server port is open and available.  The default port is 1433, but that can be set to something different.  You can use PowerShell to test TCP access:

Test-NetConnection -ComputerName MyDbServer -Port 3389 

If you can ping the computer but the above command fails, then chances are there is a firewall between your computer and the server blocking access to the SQL Server port.

Is TCP/IP Enabled at the Server?

If you are trying to connect to a brand new database server, then the problem could be at the server itself.  Open SQL Server Configuration Manager and make sure that TCP/IP is Enabled:

Does the User Have Needed Permissions?

When you can connect to the database from your development computer, but another user can’t connect from their computer, it could be a permissions issue.  One way to rule that out is to try running the application with your credentials from the user’s computer.

On the end user’s computer, launch Access as a different user:

Enter your user credentials and then try to connect to the database.  

If you are able to connect while running as a different user, then chances are it is a permissions problem.  

Verify that:

  • the user has been granted access to the database OR
  • if you assign rights to Active Directory security groups, verify they are a member of the expected security group

NOTE: this only makes sense if you are using Windows Authentication to connect to SQL Server.

Troubleshooting Tip: /runas /netonly
If you get a message about a missing «trust relationship» using the above approach, you may need to fall back on using a combination of the /runas and /netonly flags.  See here for details.  


Reader Clarification: Network vs. Database Permissions

UPDATE [2022-12-26]: As Philipp Stiefel points out in the comments below, there are two different kinds of permissions that could be blocking access to the database (or a particular table, stored procedure, view, etc.).  Here’s Philipp’s explanation:

The «access denied» part of the quoted error message only pertains to access on network level, as you covered in the «Server Reachable?» and «Port Blocked?» sections. The message does not apply to missing permissions in SQL Server. Missing permissions will raise the different error message: «Login failed for user ‘YourUserName'» (SQL Server-Error 18456). Being aware of these different error messages will get you to the cause of the problem quicker.

Thanks for the clarification and explanation, Philipp!


Monitor Access Attempts from SQL Server

Open SSMS and connect to the database server from your development computer.  Launch a «Standard» XEvent Profiler session.  

Then attempt to connect from the end user’s computer.  Review the entries logged in the XEvent session for hints as to why the user is failing to connect:

ODBC Data Source Administrator

If you don’t have access to the database server or a copy of SSMS, you can use the ODBC Data Source Administrator to do some basic debugging from the client side.

Press [Win] + [R] then type odbcad32.exe and click [OK]:

NOTE: Don’t worry about the «32» in the file name; this will open the 64-bit version if needed.

On the User DSN tab, click the [Add…] button.  Firstly, this will open up a list of available ODBC drivers.  One possible reason for failure is if the required ODBC driver is not installed on the end user’s computer.  This helps troubleshoot that possibility.

Follow the prompts to enter your server name and credentials.  The third screen should give you the option to set a default database.  If you check that box, you can use the dropdown to show all the databases that the user has access to.  If the desired database is missing from the list, but other databases are shown, then it’s likely a permission issue.

When you are finished creating your temporary DSN, you can click [Test Data Source…] to make sure everything is working correctly:

Viewing Available Tables from Excel

To see a list of tables the user has access to from a machine that does not have a full version of Access, but that does have a copy of Excel, you can use that to view what tables are available to the user.

Go to Data > Get Data > From Database > From SQL Server Database

Enter the requested information in the dialog boxes.  Assuming you are able to connect to the database, you should then see a list of tables to which the user has at least a minimal set of permissions:

Reader Tips

What methods and tricks do you use when troubleshooting SQL Server connections?  Let us know in the comments below.


Referenced articles

Checking Specific TCP Port Access to a Remote Machine

Troubleshooting network connections is tough. Generic error messages make it hard to identify the root of the problem. This PowerShell cmdlet can help.

No Longer SetMike Wolfe

Using Windows Authentication to Connect to SQL Server from Outside the Domain

You don’t need to join your computer to a domain to be able to connect to SQL Server using Windows Authentication. You just need to know this simple trick.

No Longer SetMike Wolfe

External references

Use the SSMS XEvent Profiler — SQL Server

The XEvent Profiler displays a live viewer of extended events. Learn why to use this profiler, key features, and how to get started viewing extended events.

Microsoft Docsyualan

Image by Christian Brinkmann from Pixabay

Понравилась статья? Поделить с друзьями:
  • Ошибка object required vba excel
  • Ошибка ocsp ответ еще не действителен
  • Ошибка ocf частотник шнайдер 312
  • Ошибка nvidia windows kernel mode driver
  • Ошибка nvidia streamer service что это