General Network Error. Check your network document.

  • When I ran osql commands, some commands were successful, some of them failed with the above error.

    What are possible reasons to come across this error. How to fix it?

    Any input will be greatly appreciated.

  • Can you run the same command from QA?

    _____________
    Code for TallyGenerator

  • Well the problem is with the security context and connection pooling. In the current design, after an application role is enabled on a client connection to SQL Server, you cannot reset the security context of that connection. Therefore, when the user ends the SQL Server session and disconnects from the server, the session is not reusable. However, OLE DB resource pooling returns the closed connection to the pool, and the error occurs when that connection is reused and the client application tries to reset the connection's security context by calling sp_setapprole again.

    The only available workaround is to disable OLE DB Resource Pooling, which ADO uses by default. You can do this by adding "OLE DB Services = -2" to the ADO Connection string, as shown here:

    'For SQLOLEDB provider

    'strConnect = "Provider=SQLOLEDB;server=SQL7Web;OLE DB Services = -2;uid=AppUser;pwd=AppUser;initial catalog=northwind"

    ' For MSDASQL provider

    'strConnect = "DSN=SQLNWind;UID=Test;PWD=Test; OLE DB Services= -2"

    Pooling can be disabled for the SQL Server .Net Data Provider by adding "Pooling=False" to the connection string.

    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q229/5/64.asp&NoWebContent=1


    FP

    True Love is Like A Ghost. Everyone Talks About It & Nobody have seen it.

  • The complete error message is as follow.

    [DBNETLIB]ConnectionRead (recv()).

    [DBNETLIB]General network error. Check your network documentation.

    We have no problem running our scripts on QA any time. On some servers, our scripts always failed using OSQL. On some servers, the scripts were successful sometimes, and failed sometimes.

    Of course, service packs on each servers are different. But I cannot draw any conclusion that the error originated from different service packs.

    Once again, any input will be greatly appeciated.

  • What's the size of recordset returned in QA?

    Where it goes when you run query from osql?

    _____________
    Code for TallyGenerator

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply