SQL Server Q&A

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 ‘error’

FIX: Parallel Hash Join with Empty Result Set Incorrectly Flows Error Back on Client Connection

Symptoms
If you run a SQL Server Data Manipulation Language (DML) statement from a DB-Library based application against a Microsoft SQL Server 7.0 server, the error handler for the application may incorrectly fire and only report the following error message:

DB-LIBRARY Error 10007, Severity 5:
General SQL Server error: Check messages from the SQL Server.Note that this error message accompanies a wide range of SQL Server errors that are reported back to the client from the server. However, in this scenario the preceding error message is the only error reported and it is not accompanied by any other specific error messages.
Resolution
If a parallel hash join produces an empty result set, internal exception 3602 is used to coordinate the shutdown of worker threads that were created to process the parallel hash plan. The internal 3602 exception is an internal control exception that is used to direct processing flow inside SQL Server and is expected behavior in this case.
However, the fact that it is causing an error to be sent back on the client connection, which in turn causes the DB-Library error handler to fire is not expected behavior.

FIX: Index Tuning Wizard Execution May Generate Floating Point Exception

Symptoms
When you run the Index Tuning Wizard, this error message may occur:

Server: Msg 3628, Level 16, State 1, Line 2
A floating point exception occurred in the user process. Current transaction is canceled.
Resolution
When a double was out of range from an underflow or overflow, the Index Tuning Wizard incorrectly converted the number into the maximum or minimum float value.

FIX: Error messages after SQL Server 2005 or SQL Server 2000 has been running for some time on Windows Server 2003 or on Windows 2000: “Failed to load FileName.dll” and “Attempts to load any type …

Symptoms
When you run Microsoft SQL Server 2005 or Microsoft SQL Server 2000 on a Windows Server 2003-based computer or on a Windows 2000-based computer, you may receive an error message that contains the following error messages:

Failed to load FileName.dll

Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.This problem usually occurs after SQL Server has been running for some time.
The complete error message that you receive resembles the following:

Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Failed to load Msxmlsql.dll.
Data: System.Collections.ListDictionaryI,4092,NULL,NULL,2007-04-13 09:44:11.640,DB\SQLServer5,warning,2007-04-13 09:44:13.153,
The activated proc [dbo].[sp_sysmail_activate] running on queue msdb.dbo.ExternalMailQueue output the following:’The service queue “ExternalMailQueue” is currently disabled.’
Attempts to use XML related activity in TSQL fails.
Msg 6610, Level 16, State 1, Procedure sp_xml_preparedocument, Line 1
Failed to load Msxmlsql.dll.
Msg 6607, Level 16, State 3, Procedure
sp_xml_removedocument, Line 1sp_xml_removedocument: The value supplied for parameter number 1 is invalid.
Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.
Attempts to use extended stored procedures will result in
Msg 0, Level 16, State 0, Procedure xp_ss_backup, Line 1
Cannot load the DLL C:\Program Files\Microsoft SQL Server\MSSQL\Binn\SQLsafe_ExtendedStoredProc.dll, or one of the DLLs it references. Reason: 1114(A dynamic link library (DLL) initialization routine failed.).
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceSet::Initialize: CoCreateInstance failure on backup device ‘d4630f27-03a1-47ae-b7a7-4813a6809908′. Operating system error 0×8007045a(A dynamic link library (DLL) initialization routine failed.).
Resolution
This problem occurs because no thread local storage (TLS) slot is available for the SQL Server process (Sqlservr.exe). This is a problem in Windows Server 2003 and in Windows 2000.
When SQL Server unloads a DLL, the TLS slots that the DLL uses may not be released because of a problem in the TlsFree function. If SQL Server frequently loads various DLLs, and then unloads these DLLs, these DLLs use up all the available TLS slots. Eventually, SQL Server can no longer load a DLL that requires TLS slots.

FIX: Error message when you use SQL Server 2005 Report Manager to try to run a linked report: “An internal catalog exception has occurred”

Symptoms
When you use SQL Server 2005 Report Manager to try to run a linked report, you receive an error message that resembles the following:

An Internal Catalog Exception has occurredWhen you examine the Reporting Services log files after you receive the error message, you may notice the following call stack:

w3wp!library!1!1/27/2006-13:10:27:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., un-named assertion fired for component processing; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.w3wp!processing!7!1/27/2006-13:10:27:: a ASSERT: Assertion failed!Call stack:Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Initialize(Stream stream)Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader..ctor(Stream stream)Microsoft.ReportingServices.ReportProcessing.ChunkManager+DataChunkReader..ctor(DataSet dataSet, Int32 reportUniqueName, UInt32 subreportLevel, GetReportChunk getChunkCallback)This problem occurs when the following conditions are true: The linked report contains the user dependency. For example, you use the expression User!UserID for a field.The linked report has an execution property that is set to use snapshots.
Resolution
The problem occurs because the report properties are not replicated to the linked reports.

FIX: Error message when you try to add a configuration to a SQL Server 2005 Integration Services .dtsx package: “An error occurred while a new configuration was being added”

Symptoms
When you try to add a configuration to a Microsoft SQL Server 2005 Integration Services .dtsx package, you receive the following error message:

An error occurred while a new configuration was being added.
Additional information
The path is not of a legal form. (mscorlib)
Resolution
This problem occurs because the .dtsx package is not associated with a business intelligence solution.

FIX: Error message when you run a query that selects many columns and that joins many tables in SQL Server 2005 Service Pack 2: “The query processor could not produce a query plan”

Symptoms
In Microsoft SQL Server 2005 Service Pack 2, you run a query that selects many columns and that joins many tables. When you do this, you may receive the following error messages:
Error message 1

8624 error is being generated and a mini-dump written by the exception handler.
Error message 2

Msg 8624, Level 16, State 1, Line 1
Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.Additionally, a minidump file is generated in the SQL Server log.
Resolution
This issue occurs because the query runs under the execution context of the sp_cursoropen stored procedure. The SQL Server 2005 Database Engine generates an exception when SQL Server 2005 tries to create an execution plan.