Microsoft Odbc Sql Server Driver Dbnetlib Sql

Thread: ODBC Connection to SQL Server Error:10060 microsoft odbc sql server driver dbnetlib sql

Hi all,

I am trying to setup an ODBC connection to a SQL Server,

Control Panel -- Admin Tools -- ODBC -- User DSN -- Type in Host Name -- SQL Authentication

Then I get this error,

Connection Failed:

SQL State: 01000

SQL Server: Error: 10060

Microsoft ODBC SQL Server Driver DBNETLIB ConnectionOpen Connect

SQL State: 08001

SQL Server Error: 17

Microsoft ODBC SQL Server Driver DBNETLIB SQL Server does not exist or access denied.

Things I have tried:

1 Enabled TCP/IP and Named-Pipes

2 Did the same on the server machine hosting SQLServer, able to log in with the same host name, and same SQL Authentication.

3 I can ping the server on my machine

Can anyone help.

Last edited by akira919; 04-27-12 at .

Did you try windows authentication. Is the server in mixed mode.

Originally Posted by akira919

I typed netstat -an in cmd, and if I am not mistakening what the article is saying,

The foreign address beside my host address has ports 1024 and 5000, so that means its not firewall problem.

Windows authentication would not work since I tried though my local computer account is not an account in the host server.

Do you have a sql account.

One obscure possibility is that the server is not in the AD published directory.

Yes, I hve a SQL Account, and I am certain that it works. Because I tried logging in with the SQL account on the server machine, and success.

It could be the possibility that my SQL Server Client is out of date, so I installed the SQL Server Native Client 10.0, and a new error message popped up:

Connection failed:

SQLState: 08001

SQL Server Error: 10060

Microsoft SQL Server Native Client 10.0 TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed ot respond.

SQLState: HYT00

SQL Server Error: 0

Microsoft SQL Server Native Client 10.0 Login timeout expired.

Ok, try using the ip address and not canonical name. Second try examining the host file and see if the ip is assigned to a different host name. Third, try using file system dsn and not user.

SQL Server Native Client 10.0 may not be backward compatible, so check your sql version.

Yes, I hve a SQL Account, and I am certain that it works. Because I tried logging in with the SQL account on the server machine, and success.

Tried 1, no luck.

2 not sure how to do that.

3 I have been using System DSN, but I jsut tried File DSN now too. No luck.

My Sql server is 2012.

Tried 1, no luck.

I was able to replicate the error message below. When I typed in the sql server that does not exist. When I typed a valid server everything worked fine. So I suspect the host name does not exist in the Active Directory or is incorrect in the host file. Either way, what happens when you select from the drop down list of available servers.

Connection failed:

What I did created the ODBC under the Administrator login in the system DSN

hope this help

See clear as mud

StePhan McKillen

the aim is store once, not store multiple times

Remember Optimize til you die.

Progaming environment:

Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010

VB based on my own environment: vb6 sp5

ASP based on my own environment: 5.6

VB-NET based on my own environment started 2007

SQL-2005 based on my own environment started 2008

MYLE

YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON T SHARE IT.

I was able to replicate the error message below. When I typed in the sql server that does not exist. When I typed a valid server everything worked fine. So I suspect the host name does not exist in the Active Directory or is incorrect in the host file. Either way, what happens when you select from the drop down list of available servers.

The drop down field is blank.

Try the ip address and use userdsn. Are you connected to network. If the name is blank could be it s not in the active directory.

BTW: This is an issue with sql server not found. So it s one of a few issues.

Last edited by corncrowe; 04-27-12 at .

Originally Posted by corncrowe

Just tried typing the ip address in the user dsn, no luck. I am definitely connected to the network, I can remote into the server machine.

Ok, then look for a file called imhost and open with notepad. Check to see if host is mapped to different ip and visa-versa. Also ping the canonical name. I think it might end up being an AD network issue because I was able to complete the ODBC connection with correct sql server name and ip address.

P.S. Make sure you delete any previously created dsn s and start from scratch each time. Just saying

This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows.

This file contains the mappings of IP addresses to computernames

NetBIOS names. Each entry should be kept on an individual line.

The IP address should be placed in the first column followed by the

corresponding computername. The address and the computername

should be separated by at least one space or tab. The character

is generally used to denote the start of a comment see the exceptions

below.

I have a question. Why are you using an odbc to connect with sql server database. If you are using a client application or programming language like visual basic.net then I d suggest oledb connection.

Here s a sample connection using dsnless object google :

Code:

Public Shared Function conGillespie _

As SqlConnection

Dim connectionString As String _

Integrated Security SSPI;Persist Security Info True;Asynchronous Processing true; _

Initial Catalog ClinicalPrograms;Data Source dev-sql2;Connection Timeout 0;

Dim conGillespieDB As SqlConnection _

New SqlConnection connectionString

conGillespieDB.Open

Return conGillespieDB

End Function

I turned of my firewall, and the connection went through. So I am absolutely sure it s a firewall issue.

I followed the instructions in this article, and everything worked well.

Thanks everyone.

Last edited by akira919; 04-30-12 at .

FAQs/Tutorials SQL Server FAQ. SQL Server FAQ - Getting Connection failed Error on ODBC DSN Creation. By: FYIcenter.com Continued from previous topic.

From the system that s not working, can you ping the SQL Server. If you can, start up the Client Configuration clicnfg.exe and check the Aliases tab.

Einar Jón said Works for me, but can crash/corrupt memory because the SQL handles are not initialized. Would recommend starting with: SQLHANDLE sqlenvhandle SQL.

  • Have you enabled the SQL Server Browser service as per How to configure SQL Server 2005 to allow remote connections.: If you are running SQL Server 2005 by using an.
  • Hi All, We re getting the following error whenever we run our billing system: Microsoft ODBC SQL Server Driver DBNETLIB Connectio nRead recv.
  • You have checked the firewall on the server. TCP/IP port numbers required to communicate to SQL over a firewall Hope this helps.
  • This forum is for SSC.com site suggestions Please post your question in the appropriate forum. Perhaps this one.
  • On Sep 14, pm, John wrote: We are trying to access the SQL Server from behind an ISA 2004 firewall. Even though I have created a rule for port 1433 on ISA.