Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Mar 2012
    Posts
    17

    Unanswered: ODBC Connection to SQL Server Error:10060

    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())
    Connection Failed:
    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 16:07.

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Did you try windows authentication? Is the server in mixed mode?

    Quote Originally Posted by akira919 View Post
    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())
    Connection Failed:
    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?

  3. #3
    Join Date
    Apr 2012
    Posts
    213
    You have checked the firewall on the server?
    TCP/IP port numbers required to communicate to SQL over a firewall

    Hope this helps.

  4. #4
    Join Date
    Mar 2012
    Posts
    17
    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.

  5. #5
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by akira919 View Post
    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?

    [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
    One obscure possibility is that the server is not in the AD published directory.

  6. #6
    Join Date
    Mar 2012
    Posts
    17
    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.

    Connection failed:
    SQLState: 'HYT00'
    SQL Server Error: 0
    [Microsoft][SQL Server Native Client 10.0]Login timeout expired.

  7. #7
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    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.

    Quote Originally Posted by akira919 View Post
    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.

    Connection failed:
    SQLState: 'HYT00'
    SQL Server Error: 0
    [Microsoft][SQL Server Native Client 10.0]Login timeout expired.

  8. #8
    Join Date
    Mar 2012
    Posts
    17
    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.

  9. #9
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by akira919 View Post
    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.
    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:
    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.

    Connection failed:
    SQLState: 'HYT00'
    SQL Server Error: 0
    [Microsoft][SQL Server Native Client 10.0]Login timeout expired.

  10. #10
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,422
    Provided Answers: 8
    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.

  11. #11
    Join Date
    Mar 2012
    Posts
    17
    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.

  12. #12
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by akira919 View Post
    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 20:20.

  13. #13
    Join Date
    Mar 2012
    Posts
    17
    Quote Originally Posted by corncrowe View Post
    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.
    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.

  14. #14
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by akira919 View Post
    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).

  15. #15
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •