Connecting To SQL Server Instance using ODBC

  • We have recently migrated our web site in house. The site consists of a dataserver running Windows 2003 server and the web server running Windows 2000. The dataserver has always been hosted here with an odbc connection from the external web server.

    Heres my problem...

    Everything worked fine before moving the server.

    Since moving the webserver in house, and updating network config etc, i can no longer create a DNS connection through odbc to the dataserver from the webserver. Both servers are on the same internal network with an ip range of 192.168.2.1 to 192.168.2.4.

    my sql instance is configured on 192.168.2.3 and for arguements sake, lets call the instance 'TEST'. I enter the server details as 192.168.2.3/TEST using TCP/IP port 1433 (as before) and configure it to use SQL Authentication. I therefore enter a valid username and password (the same one used prior to bring the server in house). On trying to connect, I get the following error:

    Connection failed:

    SQL State : '01000'

    SQL Server Error : 11001

    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open[Connect[]].

    Connection failed:

    SQL State : '08000'

    SQL Server Error : 11

    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General Network error.

    I can ping each machine from each other and i can also share files between the two. ITs not a firewall issues as i have taken them out of the network and connected them together directly. I've checked sql server logs and nothing shows up.

    Can anyone shed any light on what could be wrong?

    Thanks in advance,

    Dave

     

     

  • Hi,

    the first thing I can tell you is a forward slash in 192.168.2.3/TEST  We call the named instance as computer_name\instance_name.

    the second thing that the UDP port 1434 should be open for named instances in addition to TCP port 1433

    There is a good website for the connection strings: http://www.connectionstrings.com to check for the correct syntax for ODBC connections.

    Also try different protocols: TCP/IP and Named Pipes and see if both or one or none are successful.

     

    Regards,Yelena Varsha

  • Go to the server itself and try to log in using your credentials. You might have orphaned the logins when you moved the server.

    -SQLBill

  • Another thought...you aren't seeing errors in SQL Server's logs. How about the server's Window Event Viewer logs?

    Thought....if you were getting TO the SQL Server, there would be login errors in the SQL Server Error Logs. You apparently aren't even finding the server with your login. DNS or Active Directory issue?

    Is the new server set for Windows or Mixed Authentication?

    -SQLBill

  • I've tried all of the above and still no joy.

    SQLBILL, I can still connect to the data server using the same login details as before on other machines. Also, i am not getting any errors in the wondows event viewer.

    Yelena, UDP port 1434 is open.

    I'm just about ready to take a hammer to the server now.

  • David,

    don't do that! I am sure it is a matter of the ports

    Do the following:

    1. Read the article

    http://msdn2.microsoft.com/en-us/library/ms165724.aspx

    Using SQL Server Browser  

    2. Check Server Network Utility for the instance what port this instance is using, it very well may not be 1433

    3. Make sure that SQL Browser service  is running or listener is listening

    4. Try to create an ODBC source on the Database machine (not on the web machine) to make sure you can connect from the same machine

    5. Try to use Named Pipes -  create an alias in Client Network Utility

    6. Check if you can connect FROM the database server to something else.

    Regards,Yelena Varsha

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply