Link to home
Start Free TrialLog in
Avatar of trwd
trwdFlag for United States of America

asked on

Microsoft SQL Native Client error '80004005' Named Pipes Provider: Could not open a connection to SQL Server [5]. "

Experts,
I am getting this error in an asp application. I am trying to set up a staging environment for this application and the app works in production. When I change the connection string to thit he production database the error disappears. However, I get this error when the application is pointed to the staging database. Named Pipes, TCP/IP and have been enabled. We will really appreciate your help. BTW, our database is a 2005 db.


the error I am getting on the page is,
Microsoft SQL Native Client error '80004005'
Named Pipes Provider: Could not open a connection to SQL Server [5].

Avatar of kevp75
kevp75
Flag of United States of America image

make sure you are using the correct provider.  Production and staging may be different versions?

also make sure you are using the correct server.   You may need to include a port number with it, but double check to make sure...
Avatar of trwd

ASKER

What do you mean by including the port number and Also, Different versions of what? We have the same versions of SQL Server and SQl is listening on the same ports on both systems.
post your connection string please  (make sure to take out the username/password/server values)
Avatar of trwd

ASKER

Sorry about that, the connection string is below
dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "provider=SQLNCLI;server=SR-FW-TRVT02.trv.org\TRVROE2005;Database=TRV-ROE-DB;UID=username;PWD=password
objConn.Open
ASKER CERTIFIED SOLUTION
Avatar of kevp75
kevp75
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of clockwatcher
clockwatcher

See the following for some troubleshooting.  

  http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx

I'd double check that named pipes is really enabled on your development sql server (since it's disabled by default).