I have a classic ASP application that has been running on Win2003,IIS6 and SQL2000 for 3 years without a single error.
We've just moved to SQL2005 enterprise and we're getting the following intermittent error.
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (PreLoginHandshake()).]General network error. Check your network documentation.
Any ideas where to start?
this is a common connection problem and without details like your current sql server configuration and connection string, we just can write our guesses,
first, if you have not installed latest service pack for sql serer 2005, please install it before trying the following suggestions,
second, you can check if you have enabled remote connections on sql server, to check this setting go to sql server surface area configuration -> surface area configuration for services and connections -> remote connections and enable remote connections by selection "local and remote connections" and using tcp/ip only.
if the previous step did not solve your problem, you can check your connection string, please examine the following connection strings,
for odbc connections:
- Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
for ole db connections
- Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
for .net connections
- Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
or
- Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;
- Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
or
- Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
also if you are connecting with an sql server account, please check if you have set authentication mode of sql server to mixed mode.
and finally if your sql server is on a seperate machine, please be sure that there is no firewall or router is locking the communication of iis and sql server.
if these won't help you to solve the problem, please give us some details like
- your connectionstring
- is your sql server is on another computer
- configuration details of your sql server (like active net libraries, authentication details)
thank-you for the quick reply. i will check all your suggestions and report back.
in the meantime, sql and webserver are all on the same server and the connection string is:-
databaseServer = "PROVIDER=SQLOLEDB;DATA SOURCE=pretty.ucc.usyd.edu.au;UID=xxx;PWD=xxx;DATABASE=xxx"|||hi kadir,
i must confess i'm not an sql server expert.
1. latest service pack and mdac were already installed.
2. allow remote connections is enabled. i couldn't see where (see point 3) using tcp/ip was. i'm using the ms sql management studioto find this information.
3. using sql server configuration manager i could find the following.
sql server 2005 network config - protocols for msqlserver
shared memory enabled
named pipes disabled
tcp/ip enabled
via disabled
sql native client config - client protocols
shared memory enabled
tcp/ip enabled
names pipes enabled
via disabled
4. we are connecting using an sql account. however, i couldn't see the option to allow mixed. i could only choose between windows authentication and sql server authentication.
thanks|||ok, just found the sql server surface area configuration. will check and report back.
|||remote connections is set to "local and remote connections" and using tcp/ip only.|||sql server and windows authentication mode were selected. so it looks like everything was configured they way you wanted.|||
Hi peter, sorry for the delay,
sql server and iis is on same machine so can you please test the following connectionstrings:
Provider=SQLNCLI;Server=(local);Database=xxx;Uid=xxx;Pwd=xxx
or
Provider=SQLNCLI;Server=127.0.0.1;Database=xxx;Uid=xxx;Pwd=xxx
and please inform me about the result.
No comments:
Post a Comment