September 21, 2004 at 9:57 am
My web application connects to a SQL 2000 database via an ADO wrapper. If I run the app from the scripts directory of my own pc the connection to the database on a remote server is successful , but when I run the app on the same server as the database I get connection errors (most commonly "Server does not exist or access is denied"). The connection string of the ADO wrapper (component) contains the user name and password of the database and can be set to connect to the database from my pc. Can anyone suggest possible causes of this behaviour?
Thanks for any advice
Steve
September 22, 2004 at 2:03 am
I had same sort of problems once, and it turned out that we had to play with the way our client was connecting to the server, i.e. multiprotocol/named-pipes/TCPIP.
Try specifying different ways of connecting from the connStr, like so:
1. Using the SQL Client Network Utility, create a named alias for your SQLServer. In doing this, you can specify how the alias should connect to the server (i.e. TCPIP/named pipes/multiprotocol etc.). I usually use multiprotocol or TCPIP.
2. Make sure to use your named alias from the ADO connection string, like so:
Provider=SQLOLEDB.1;Password=[your SQL password];Persist Security Info=True;User ID=[your SQL login];Initial Catalog=[Your DB name];Data Source=[Your named alias]
Good luck,
- Avi
September 23, 2004 at 4:37 am
Thanks for the reply, Avi.
I don't have access to the remote server so I'm having to wait for someone else to tryh what you have suggested. I'll let you know the outcome when that happens.
Best wishes
Steve
September 23, 2004 at 6:39 am
Also if the database is local to that server you may want to have them add an alias to that server that matches the one you are using in CLient Network Utility. If you cannot get that then change to localhost or 127.0.0.1 when you push to server which will give you the local machine without regard for a specific alias.
September 24, 2004 at 3:24 am
Forgive my ignorance/inexperience here, but I'm not quite sure I understand.May I ask for clarification?
Having added the server alias of the remote server in the Client Network Utility on the remote server, what should my next move be? Is 127.0.0.1 = Local Host?
Thanks for your help
Steve
September 24, 2004 at 8:12 am
Avi and Antares686
Just heard from my colleague at the remote server that it's all working fine now. Putting the server alias in there did the trick. Thanks a lot for your help, it's much appreciated.
sincerely
Steve
September 24, 2004 at 9:54 am
Yes, 127.0.0.1 is the loopback address and effectively is the same as Local Host. Then you should be fine. Is it the same error still.
September 26, 2004 at 2:15 am
Glad to have helped.
- Avi
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply