简体   繁体   中英

SQL Server 2000 Server Errors

The same database and application acts weirdly on our test machine, but it works nice on other computers.

On the test machine:

  • We get SSL error exception. We fixed that based on an MS KB article, but after that it said
  • " Server error " or " General network error " and slowed down to 1-2 stored procedures/second.
  • The profiler said that we have 2000-2500 connections when the application runs. The same application has only 5-10 connection on other machines. I think the random error messages are caused by this huge connection count.

We reinstalled SQL Server, turned off the connection pool, and closed all datareaders.

What else can I do? Is there a "deeper" configuration tool for MSSQL2k? Any hidden component/ini/config/registry key? Or another profiler other than SQL Profiler that I can use?

Yet another possibility(:):

Multiple Fixes for SQL Server .NET Data Provider

When the SQLCommand.CommandTimeout is set to zero, you expect an infinite timeout. However, versions 1.1 and 1.0 of the SqlClient provider incorrectly timeout when a response from SQL Server is broken into two packets. Immediately upon receipt of the second packet, versions 1.1 and 1.0 of the provider incorrectly timeout. The fix that is included in this article fixes this issue so that the command will have an infinite timeout.

What happens if you turn off OLE DB Resource Pooling?:

'For SQLOLEDB provider
 'strConnect = "Provider=SQLOLEDB;server=MyServerName;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"

Another thing to look at is whether you are always specifying the type and direction of stored procedure parameters from ADO.NET.

What happens internally is sqlClient converts the parameters which you have set in ADO.NET to the relevant datatypes in the stored procedure parameters. But this can fail when you are sending nText parameters where it might result in a wrong conversion.

Also, I would check to see if you are sometimes passing very long statements in stored procedure parameters.

Thanx again Mitch, sadly none of those ideas was real solution. No suprise - it seems that those error messages from MSSQL are random .

Random , I mean:

  • After X[1] concurrent connection MSSQL stops to close connections automatically, and the connection pool grooves huge. Before X, I saw only 5-10 connections[2] / but after that there was 2500 and MSSQL chrased.
  • In this case, MSSQL throws non deterministic error messages like 'General failure' , 'User (null)' etc.
  • We had unclosed connection in our DAL (hidden since 2 years...brrr), and when we used that to much, it caused this wreid error.

[1] I have no idea about concrete value of X

[2] I've used this query:

    SELECT 
      DB_NAME(dbid) as DBName, 
      COUNT(dbid) as NumberOfConnections,
      loginame as LoginName 
    FROM
      sysprocesses
    WHERE 
      dbid > 0
    GROUP BY 
      dbid, loginame

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM