Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Trouble with ODBC connection

Author  Topic 

ssarma
Starting Member

4 Posts

Posted - 2007-07-29 : 20:18:40
Hi I have SQL server 2000 loaded on my laptop and I have an ODBC connection created to the server through which an application that I use connects to the server.

This works fine when I am on our company network. However when the network cable is unplugged the ODBC connection fails and comes up with the following error.

Connection failed:
SQLState: '01000'
SQL Server Error: 10065
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen(Connect())
connection failed:
SQLState: '09001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL server does not exist or access denied.

I have tried using Named pipes also with the same results except that in the error message [TCP/IP Sockets] is replaced by [Named Pipes] and the error number in the first set changes to '1231'

I am able to open and access SQL Server using enterprise manager and SQL query analyser.

The version of SQL is Microsoft SQL Server 2000 - 8.00.760 (SP3 - Developer edition)

I need to be able to work on my application with the laptop not plugged into the the domain. Please help.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-07-29 : 22:33:35
Do you use windows authentication in odbc dsn?
Go to Top of Page

donpolix
Yak Posting Veteran

97 Posts

Posted - 2007-07-29 : 23:18:54
It may be that it is trying to resolve the hostname from the DNS in your network. Try client config.

Donn Policarpio
Go to Top of Page

ssarma
Starting Member

4 Posts

Posted - 2007-07-30 : 00:57:32
quote:
Originally posted by rmiao

Do you use windows authentication in odbc dsn?



Thanks for the reply. I user SQL Authentication. However, I have tried with windows authentication too. This too results in the same error.
Go to Top of Page

donpolix
Yak Posting Veteran

97 Posts

Posted - 2007-07-30 : 01:16:13
Did you install sql as a default instance? Try connecting using "localhost" as your sql server.

Donn Policarpio
Go to Top of Page

ssarma
Starting Member

4 Posts

Posted - 2007-07-30 : 01:34:00
quote:
Originally posted by donpolix

Did you install sql as a default instance? Try connecting using "localhost" as your sql server.

Donn Policarpio



Thanks Donn, this works. But my application does not launch with the ODBC connection name set to localhost. Is there anyway I can get the over this and get the ODBC connection to go through even if I use the server name.
Go to Top of Page

ssarma
Starting Member

4 Posts

Posted - 2007-07-30 : 01:44:37
quote:
Originally posted by ssarma

quote:
Originally posted by donpolix

Did you install sql as a default instance? Try connecting using "localhost" as your sql server.

Donn Policarpio



Thanks Donn, this works. But my application does not launch with the ODBC connection name set to localhost. Is there anyway I can get the over this and get the ODBC connection to go through even if I use the server name.



The issue is now resolved. I have created an alias with the IP address 127.0.0.1 and this has solved the issue. Thanks everybody for your help.
Go to Top of Page

donpolix
Yak Posting Veteran

97 Posts

Posted - 2007-07-30 : 01:57:13
You might want to try client network utility (cliconfg). Or adding your hostname in your hosts file and specifying 127.0.0.1 as ip (which is not neat).

Donn Policarpio
Go to Top of Page
   

- Advertisement -