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 Development (2000)
 Set to use TCP/IP, but Named Pipes Error

Author  Topic 

steveo
Starting Member

16 Posts

Posted - 2002-06-27 : 18:13:29
I have the latest patches and updates on my data/web server and occasionally get an error when accessing data on a sql server via a ASP app running on IIS 5.

I have an ODBC driver on the web server that is set for TCP/IP, but the error indicates that it is using Named Pipes.

Error in MyDataTable.DoQuery: [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.

Does it revert to named pipes in the event of a TCPIP problem? I don't have a problem with TCPIP that I am aware of, but I suppose it's possible. This only happens occasionally.

What I have done so far is remove all the ODBC and recreate them with TCP/IP selected in the client config.

Is there a way to force a tcp/ip connection?

MichaelP
Jedi Yak

2489 Posts

Posted - 2002-06-27 : 18:49:24
Lets see your connection string, and we'll go from there.

Michael

<Yoda>Use the Search page you must. Find answer you will.
Go to Top of Page

monkeybite
Posting Yak Master

152 Posts

Posted - 2002-06-27 : 18:51:22
How are you making your ODBC connection? Connection string? UDL file? System DSN?

If you're using a connection string, try appending this to it:
Network Library=DBMSSOCN

-- monkey


Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-06-27 : 19:09:58
quote:

Lets see your connection string, and we'll go from there.



Pleas include your IP address and SA password.

DavidM

"SQL-3 is an abomination.."
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2002-06-28 : 00:48:50
Well at least we'll get acurate DDL for his next questions :)

Anyway, post your connection string and be sure to CHANGE the IP, Username, and pass word when posting.

Michael

<Yoda>Use the Search page you must. Find answer you will.
Go to Top of Page

steveo
Starting Member

16 Posts

Posted - 2002-06-28 : 10:41:55
My connection string is like

DSN=MyDatabases;Database=DatabaseOne;

so it's using my MyDatabases system DSN.

The system DSNs client config is set for TCP/IP

Thanks for any help you can provide.
Go to Top of Page

monkeybite
Posting Yak Master

152 Posts

Posted - 2002-06-28 : 12:27:22
If you have the SQL Client Network Utility installed on your IIS server, try changing the default network library to TCP/IP. I've seen instances where setting the network library in the DSN doesn't always force the db connection to use that protocol.

If you don't have this installed, here's an article that describes how to change this in the registry:
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;Q250550[/url]

You might want to try changing your connection string to
DSN=MyDatabases;Database=DatabaseOne;Network Library=DBMSSOCN;

Is there any particular reason for using a system DSN within your application?


Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-06-28 : 19:54:23
Remember that DSNs use ODBC, whereas a direct Connection String can use OLE-DB (Provider=SQLOLEDB) which is generally considered to perform better.

Go to Top of Page
   

- Advertisement -