.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘Server’

PRB: An Access Violation Occurs If the Sqlsort.dll Version Is Not Compatible with the SQL Server Version

Symptoms
You receive one of the following error messages:When you connect to SQL Server 7.0 from SQL Server Enterprise Manager:

A connection could not be established to <ServerName>.
Reason: SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Please verify SQL Server is running and check your SQL Server registration properties (by right-clicking on the ServerName node) and try again.-Or-When you click Alerts under SQL Server Agent in SQL Server Enterprise Manager:

Error O: SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.Additionally, the Errorlog file in SQL Server 7.0 contains one of the following stack dumps:

SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..********************************************************************************* BEGIN STACK DUMP:*0x/xx/02 03:12:54 spid 7**Exception Address = 04004697 (Ordinal6 + 297)*Exception Code= c0000005 E*Access Violation occurred writing address 00000004* Input Buffer 54 bytes -*e x e cs p _ M S d b u s e r p r i vN ‘ v e r ‘ * …——-Short Stack Dump0×04004697 Module(sqlsort+4697) (Ordinal6+297)0×005bea83 Module(sqlservr+1bea83) (GetUnicodeRange+e7)0×00575825 Module(sqlservr+175825) (CLikeRangeUtil::LikeRangeTransW+2ec)0×00647680 Module(sqlservr+247680) (CXVariant::LikeRangeStart+7b)0×0056d35b Module(sqlservr+16d35b) (COptExpr::PexprFoldMain+103c)0×00443d71 Module(sqlservr+43d71) (COptExpr::PexprFoldMain+b8)0×00443c08 Module(sqlservr+43c08) (COptExpr::PexprFold+3f)0×004e0d3b Module(sqlservr+e0d3b) (CCvtTree::BuildSte+12e)0×004e0c15 Module(sqlservr+e0c15) (BuildSteFromTree+39)0×004e0b97 Module(sqlservr+e0b97) (CStmtCond::Init+4e)0×00438530 Module(sqlservr+38530) (CCompPlan::FCompileStep+f23)0×0043d00f Module(sqlservr+3d00f) (CProchdr::FCompile+5d9)0×0040ec53 Module(sqlservr+ec53) (CSQLSource::FTransform+234)0×0042140c Module(sqlservr+2140c) (CSQLObject::FTransform2+1ab)0×004e1cdc Module(sqlservr+e1cdc) (CSQLObject::FGetFromDisk+627)0×00420f96 Module(sqlservr+20f96) (CSQLObject::FTransform+21a)0×0040e7b9 Module(sqlservr+e7b9) (CSQLSource::Execute+11d)0×0046225f Module(sqlservr+6225f) (CStmtExec::XretLocalExec+127)0×0046211e Module(sqlservr+6211e) (CStmtExec::XretExecute+253)0×0040f487 Module(sqlservr+f487) (CMsqlExecContext::ExecuteStmts+11b)0×0040ef35 Module(sqlservr+ef35) (CMsqlExecContext::Execute+16b)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process. -Or-

********************************************************************************* BEGIN STACK DUMP:*0x/xx/02 16:49:07 spid 7**Exception Address = 105B498A*Exception Code= c0000005 E*Access Violation occurred reading address FFFFFFFF* Input Buffer 54 bytes -*e x e cs p _ M S d b u s e r p r i vN ‘ v e r ‘ ………Short Stack Dump0×105b498a Module(UNKNOWN+0)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process.***************************************************************************** BEGIN STACK DUMP:*0x/xx/02 16:47:50 spid 7**Exception Address = 105B48FA*Exception Code= c0000096 E* Input Buffer 188 bytes -*E X E C U T Em s d b . d b o . s p _ h e l p _ a l e r t@ o r d e *r _ b y=N ‘ s e v e r i t yA S C ,m e s s a g e _ i dA S *C ,d a t a b a s e _ n a m eD E S C ‘ *—————————————————————————Short Stack Dump0×105b48fa Module(UNKNOWN+0)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process.
Resolution
This behavior occurs if the versions of Sqlsort.dll and Sqlservr.exe are not compatible.

Internet Explorer Uses Proxy Server for Local IP Address Even if the “Bypass Proxy Server for Local Addresses” Option Is Turned On

Symptoms
When you connect to a Web server using the Internet Protocol (IP) address or Fully Qualified Domain Name (FQDN) on the local network, Microsoft Internet Explorer or Windows Internet Explorer connects through an assigned proxy server even if the Bypass proxy server for local addresses option is turned on.
However, if you connect to a Web server using the host name (for example, http://webserver) instead of the IP address (for example, http://10.0.0.1) or FQDN (for example, http://webserver.domainname.com), the proxy server is bypassed and Internet Explorer connects directly to the server.
Resolution
By default, only host names are checked when the Bypass proxy server for local addresses option is turned on.

FIX: An EXCEPTION_STACK_OVERFLOW exception may occur when you try to run a Transact-SQL query in SQL Server 2005

Symptoms
This article describes the following about this hotfix release: The issues that are fixed by this hotfix packageThe prerequisites for applying the hotfix packageWhether you must restart the computer after you apply the hotfix packageWhether the hotfix package is replaced by any other hotfix packageWhether you must make any registry changes after you apply the hotfix packageThe files that are contained in the hotfix package
Resolution
When you try to run a Transact-SQL query in Microsoft SQL Server 2005, an EXCEPTION_STACK_OVERFLOW exception may occur. When this problem occurs, the SQL Server service may stop unexpectedly.
Note This problem may only occur in SQL Server 2005 x64 editions.

How to troubleshoot a memory leak or an out-of-memory exception in the BizTalk Server process

Symptoms
Memory leaks are a common issue. You may have to try several steps to find the specific cause of a memory leak or an out-of-memory (OOM) exception in Microsoft BizTalk Server. This article discusses important things to consider when you are evaluating memory usage and possible memory-related issues. These considerations include the following:
Physical RAM
Large message processing
Use of the /3GB switch
Use of custom components
Which version of the Microsoft .NET Framework the system is running
The number of processors
Resolution
This article describes how to troubleshoot a memory leak or an out-of-memory exception in the BizTalk Server process of Microsoft BizTalk Server.

How to enable SQL Server connectivity on Windows XP Service Pack 2

Symptoms
This article describes how to enable SQL Server connectivity on Windows XP Service Pack 2.
By default, Windows Firewall is enabled on computers that are running Microsoft Windows XP Service Pack 2. Windows Firewall closes ports such as 445 that are used for file and printer sharing to prevent Internet computers from connecting to file and print shares on your computer or to other resources. When SQL Server is configured to listen for incoming client connections by using named pipes over a NetBIOS session, SQL Server communicates over TCP ports and these ports must be open. SQL Server clients that are trying to connect to SQL Server will be not be able to connect until SQL Server is set as an exception in Windows Firewall. To set SQL Server as an exception in Windows Firewall, use the steps that are listed in the “More Information” section.
Resolution
Create an exception for each instance of SQL Server The following method will open User Datagram Protocol (UDP) port 1434 in addition to the Transmission Control Protocol (TCP) port. If you want to open these ports manually, see the following article in the Microsoft Knowledge Base:
841252?(http://support.microsoft.com/kb/841252/) How to manually enable TCP/IP on Windows XP Service Pack 2 for SQL Server 2000
Note If you are running multiple instances of SQL Server, you will have to create an exception for each instance. Click Start, and then click Run. In the Run dialog box, type Firewall.cpl, and then click OK.In the Windows Firewall dialog box, click Add a Program on the Exceptions tab.In the Add Program dialog box, you can select an instance of SQL Server or you can click the Browse button to locate the instance of SQL Server that you want to add to the exception list. The default installation locations for SQL Server are listed in the following table.

Collapse this tableExpand this table
VersionFile pathSQL Server 7.0 Mssql\Binn\Sqlservr.exeSQL Server 2000 Default InstanceProgram Files\Microsoft SQL Server\Mssql\Binn\Sqlservr.exeSQL Server 2000 Named InstanceProgram Files\Microsoft SQL Server\Mssql$instancename\Binn\Sqlservr.exeSQL Server 2005 Default InstanceProgram Files\Microsoft SQL Server\MSSQL.x\MSSQL\Binn\sqlservr.exeSQL Server 2005 Named InstanceProgram Files\Microsoft SQL Server\MSSQL.x\MSSQL\Binn\sqlservr.exe
Note Each SQL Server 2005 instance is made up of a distinct set of services with specific settings for collations and other options. The directory structure, registry structure, and service names all reflect the specific instance ID of the SQL Server instance that is created during SQL Server 2005 Setup. x is the instance ID of the SQL Server instance that is created during SQL Server 2005 Setup.Select the name of the instance, and then click OK.Under Programs and Services, select the check box that is next to the name you selected in step 6, and then click OK. How to use Multiprotocol Remote Procedure Call (RPC)If you are using Multiprotocol, you must perform the steps in the “Create an exception for each instance of SQL Server” section as well as open the correct TCP ports on Windows Firewall.How to run RPC over TCPWarning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
To run RPC over TCP, follow these steps:Enable port 135 on Windows Firewall. To do this, follow these steps: Click Start, and then click Run.In the Run dialog box, type Firewall.cpl, and then click OK.On the Exceptions tab, click Add Port. In the Port number box, type 135, and then click the TCP button.In the Name box, type a name for the port such as MULTI, and then click OK.On the Exceptions tab, you will see the new service. To enable the port, click to select the check box next to your new service, and then click OK.Modify the \\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\RPC registry key.
Note If you have just installed SQL Server, this registry key does not exist. You will have to create the key and set the value. To do this, follow these steps: Click Start, and then click Run.In the Run dialog box, type Regedit, and then click OK. This will start Registry Editor.Locate the \\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\RPC Registry key.Set the RestrictRemoteClients key to 0. Quit Registry EditorRestart the computer that is running SQL Server.How to use RPC over Named PipesIf you are running RPC over Named Pipes, you must open port 445 on Windows Firewall. To do this, follow these steps: Click Start, and then click Run.In the Run dialog box, type Firewall.cpl, and then click OK.On the Exceptions tab, click Add Port. In the Port number box, type 445, and then click the TCP button.In the Name box, type a name for the port such as MULTI, and then click OK.On the Exceptions tab, you will see the new service. To enable the port, click to select the check box next to your new service, and then click OK.

FIX: Floating Point Exception (Error 3628) Might Occur for Queries That Need Merged Histograms

Symptoms
The following floating-point exception error message might occur for queries that require a “merged” histogram:

Server: Msg 3628, Level 16, State 1, Line 2 A floating point exception occurred in the user process. Current transaction is canceled.
Resolution
A float overflow exception occurs in SQL Server when it combines the histograms for two indexes to handle the cardinality estimation for outer-join operators.