Search code examples
sql-serverconnectionodbc

Diagnosing Connection to SQL Server


I'm trying to create an ODBC connection to SQL Server, but when i do, i get error:

Connection failed:
SQLState: '01000'
SQL Server Error: 10060
[Microsoft][ODBC_SQL Server Driver][TCP/IP Sockets] COnnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC_SQL Server Driver][TCP/IP Sockets] SQL Server does not exist or access denied.

Here's what I've tried:

  1. not a firewall issue: tried with firewall on SQL Server turned off, and client turned off. Also able to telnet 1433 from client and that works fine.
  2. not an access issue: I can login from many different computers, including the SQL Server itself using the account i'm using on client (using SQL Server authentication)
  3. i can ping the hostname and IP address. (i've tried both)

The only thing i can think of is that the client computer is windows server 2003, and has various roles setup:

  • File Server
  • Application Server
  • Terminal Server
  • Domain Controller
  • DNS Server

I don't know why these services are setup, but for the time being i can't shut them off. Would it be any of these, and if so, is there a way to disable any of the aspects of them, that might be blocking SQL.

Any advise truly appreciated!


Solution

  • Found the issue. For some reason, even though SQL was not in use on the client, it was installed, and by going to All Programs -> Microsoft SQL Server -> Client Network Utility, i found that the protocal TCP/IP was using port 4717. I have no idea why that port was in use, and even further, i'm not sure why it would even matter - I was just setting up an odbc connection, and not using sql server (on the client) at all. Either way, I changed this to the typical port (1433), and like boom, ODBC connection works like charm!