SQL Server General Network error.

Hi,

I am using .Net framework v 1.1 and SQL server 2000. I got the following output on firing "SELECT @@version" in my sql server. -

Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

I am getting the General Network error when i try to select, update or insert data from / into sql server. This error is randomly generated and some times just disappears. But i am sure that there must be some problem bcoz, now or then the same error is thrown. I am firing these queries from a windows service. Since it would be automatically working in background i want that a sure shot solution be implemented else the service wont work.

some where i read that due to connection pooling this error may occur, so i set connection pooling to false in my connection string but it worked for that time, and started to reoccur after some time.

Is it related to connection pooling or some settings in the sql server. By the way i am using the sql server on my network, it is not on the local machine. Is it something related to anti-virus softwares blocking connections to sql server ?

Can any one suggest a solution for this error.

The exception message is -

General network error. Check your network documentation.

[1400 byte] By [coolcoder] at [2007-12-22]
# 1

Unfortunately General Network Error (GNE) can have many different sources. In the more recent version of SqlClient that comes with .NET Framework 2.0 this message has been eliminated and replaced by more descriptive and useful messages.

Do you have any network security or anti-virus software running on the client machine? Here's a case where someone found that Norton Internet Security was causing connection failures: http://dotnetjunkies.com/WebLog/rtgurskevik/archive/2005/03/03/58301.aspx.

Microsoft's knowledge base has a good page for troubleshooting this problem in general: http://support.microsoft.com/kb/827422/en-us.

Hope this helps,
Vaughn

VaughnWashington-MSFT at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 2

Hi Vaughn,

Thanks for your reply. When i was searching the net for a solution i found the same post on dotnetjunkies.com and i tried it with my problem. But when i uninstalled the antivirus software, my sql server was still throwing this exception. So i tried increasing the connection pool size to 7500, which i again read from some of the posts on the net. when i did this a new error started to generate. Time out ! Then i set the timeout in my server, connection string and command object to 0 and it solved the problem for time out. But i suspect that complete solution is not reached yet !

Can you derive some conclusion over this scene? It seemed that general network error was just a false message but the underlying problem is different as u rightly told that the GNE has many sources.

Would it be a solution to install framework 2.0, but then what about the editor ? Since i use VS .NET 2003 and it is not compatible with framework 2.0.

coolcoder at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 3

GNE error can be generated for many reasons. Among them, reuse dead connection from connection pool is a common one. You can try to disable connection pooling to see if it can help.

If it dosn't solve your problem,

(1) check if SQL Server errorlog to see if there is any correlated event around the time the errors happened.

(2) Enable ETW tracing, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/data_access_tracing.asp

make sure to have following guid in your ctrl.guid file

{BD568F20-FCCD-B948-054E-DB3421115D61} 0x00000000 0 DBNETLIB.1

and make sure you have "DBNETLIB" in your etw trace output.

DBNETLIB, TextA, 0x00001D04, 127990971571700445, 60, 15, 3, "<Connect|ERR> getaddrinfo 0x2af9{WINERR} TcpHost "ms"{LPSTR}", 0, 0
DBNETLIB, TextA, 0x00001D04, 127990971626063480, 75, 30, 3, "<Connect|ERR> WrapperOpen", 0, 0
DBNETLIB, TextA, 0x00001D04, 127990971626063577, 75, 30, 3, "<ConnectionOpen|ERR> Reconnect", 0, 0
DBNETLIB, TextA, 0x00001D04, 127990971626063613, 75, 30, 3, "<TraceConnObj|INFO> ConnectionObject members", 0, 0

Then send us the {WINERR} code if any.


NanTu at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 4

Hi Nan Tu ,

I guess that the reply you posted was for SQL Server 2005. But i am using SQL Server 2000 and thats why i didnt find the ctrl.guid file on my machine and also the registry key you mentioned in your post ? I was not able to enable ETW tracing since i use SQL Server 2000.

If you can please suggest a solution for SQL Server 2000, it would be a great help ! Or if there is some other way of tracing in server 2000 then please post the details.

By the way thanks for you reply !

coolcoder at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 5

Actually the ETW traces mentioned in link applies to client side driver of both sqlserver 2000 (MDAC) and 2005(SNAC). It is true that there is no ETW traces for sqlserver 2000 server component. In your case, if you could get client driver etw trace, ie. the MDAC/Netlib, it would be very helpful. The trace point start with "DBNETLIB" is netlib for sql server 2000. It comes with MDAC2.8. I think you should at least have MDAC 2.8.

Does disable the pooling help to solve your problem? My appologies for any confusion.

NanTu at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 6

I had MDAC 2.7 on my machine. Now i updated it to MDAC 2.8 but i dont know anything about tracing and MDAC / Netlib things. Can you please specify the complete details about how to start tracing on SQL Server 2000 and how would it be helpfull for solving my problem.

By the way disabling pooling did not solved the problem. Also please specify how to take ETW trace and all.

Please dont mind about all my queries since i am a newbie for SQL Server tracing and other advanced features.

Thanks.

coolcoder at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 7
I have posted a blog under http://blogs.msdn.com/sql_protocols/archive/2006/08/04/688396.aspx for how to take ETW tracing for netlibs. You can experiment it out. Since your are using MDAC2.8, you should add {BD568F20-FCCD-B948-054E-DB3421115D61}0x000000000DBNETLIB.1 in your ctrl.guid file.
NanTu at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 8

Hi All,

Since last few weeks i was fed up with the GNE. But now there is some good news. No more GNE !

Actually i am posting this reply only to help all the visitors to this problem.

I was using SQL Client to connect to SQL Server 2000 and it generated weird errors now and then. But when i changed the SQL Client to Oledb data access class, all the errors related to GNE and data consistency problem errors were gone !

So as my problem was solved using Oledb you can also try the same.

Hope this solves your problems too.

Thanks

coolcoder at 2007-8-30 > top of Msdn Tech,SQL Server,SQL Server Data Access...

SQL Server

Site Classified