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

FIX: A minidump file is generated, and an error message is logged in the SQL Server error log when you run the DBCC MEMORYSTATUS statement in SQL Server 2005

Symptoms
This article describes the following about this hotfix release:The issues that are fixed by the hotfix packageThe prerequisites for installing the hotfix packageWhether you must restart the computer after you install the hotfix packageWhether the hotfix package is replaced by any other hotfix packageWhether you must make any registry changesThe files that are contained in the hotfix package
Resolution
When you run the DBCC MEMORYSTATUS statement in Microsoft SQL Server 2005, a minidump file is generated. Additionally, the following error message is logged in the SQL Server 2005 error log:

Date Time SPID ***Stack Dump being sent to T:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
Date Time SPID SqlDumpExceptionHandler: Process 128 generated fatal exception c0000094 EXCEPTION_INT_DIVIDE_BY_ZERO. SQL Server is terminating this process.
Date Time SPID *
Date Time SPID *
Date Time SPID * BEGIN STACK DUMP:
Date Time SPID * 07/27/07 09:55:00 spid 128
Date Time SPID *
Date Time SPID *
Date Time SPID * Exception Address = 0000000001911CC8
Module(sqlservr+0000000000911CC8)
Date Time SPID * Exception Code = c0000094
EXCEPTION_INT_DIVIDE_BY_ZERO

FIX: “Exception 0xc0000005 EXCEPTION_ACCESS_VIOLATION” and SQL Server 2008 R2 crashes when you start a SQL Server Extended event session

Symptoms
Microsoft distributes Microsoft SQL Server 2008 R2 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release.
Resolution
Consider the following scenario:You start a SQL Server Extended Event session in Microsoft SQL Server 2008 R2.You perform actions that are bound to events in the Xevent session on a case-sensitive database.In this scenario, SQL Server may crash, and then a mini-dump file is generated. Additionally, the following exception is logged in the SQL Server error log file:?

Exception 0xc0000005 EXCEPTION_ACCESS_VIOLATION

Error message when you try to install SQL Server 2005 Express Edition or SQL Server 2005 Express Edition with Advanced Services: “Server SQL Server is terminating because of fatal exception c000001d”

Symptoms
When you try toinstall Microsoft SQL Server 2005 Express Edition (SQL Server Express) or Microsoft SQL Server 2005 Express Edition with Advanced Services, the installation fails. Additionally, you receive the following error message:

Server SQL Server is terminating because of fatal exception c000001d.If you examine the SQL Server error log when this problem occurs, you see an error message that resembles one of the following:
Error message 1

SqlDumpExceptionHandler: Process 4 generated fatal exception c000001d EXCEPTION_ILLEGAL_INSTRUCTION. SQL Server is terminating this process.
Error message 2

2006-03-02 22:40:24.79 ServerError: 17311, Severity: 16, State: 1.
2006-03-02 22:40:24.79 ServerSQL Server is terminating because of fatal exception c000001d. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling.For more information about how to examine the SQL Server error log, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms187885.aspx(http://msdn2.microsoft.com/en-us/library/ms187885.aspx)
Resolution
This problem occurs because of one of the following reasons:The computer on which you try to install SQL Server Express or SQL Server Express with Advanced Services is equipped with a CPU that does not support cache prefetching.
The affected CPUs include VIA Eden CPUs and Transmeta CPUs. Typically, these CPUs are used in devices when low power consumption,low heat, or low noise is important.The media from which you try to install SQL Server Express or SQL Server Express with Advanced Services is corrupted.

FIX: The population process stops responding when you create an additional full-text catalog in SQL Server 2005

Symptoms
In Microsoft SQL Server 2005, when you create an additional full-text catalog, the population process stops responding. Additionally, you may find the following error message that is logged in the Application log:

An index corruption was detected in component ShadowMerge
If you run the following statement to enable the full-text tracing, and examine the Msftesql.xml log file, you find an exception is logged:

exec sp_fulltext_service ‘FTE_RetailTracingEnableFlag’, 1The exception record resembles the following:

<TRC time=”Time” tagname=”Exceptions” pid=”0×17d4″ tid=”0×174c“>
<MSG>
<Exception>
<HR>0xc0041800</HR>
<eip>49A09DBA</eip>
<module>d:\s3fte_main\babylon\tripoli\cindex\widset.hxx</module>
<line>1750</line>
</Exception>
</MSG>
</TRC>
Resolution
This issue occurs because one or more of the current Full-Text indexes is corrupted. The corruption prevents the master merge from running. Because the master merge cannot run, the chunk buffers become full.When the chunk buffers become full, you cannot create additional full-text catalogs because the full-text search service cannot obtain an available chunk buffer.

FIX: SQLDMO – Setting BULKCOPY.SuspendIndexing = True May Fail

Symptoms
When using SQLDMO BULKCOPY object in a Visual Basic application, BULKCOPY.ImportData fails if BULKCOPY.SuspendIndexing = True. The symptoms are different depending on whether or not there are indexes on the destination table.
With no index on the destination table, the application terminates with the following exception access violation:

Run time error ‘-2147221499 (80040005):
[SQL-DMO]Code Execution Exception:
EXCEPTION_ACCESS_VIOLATIONWith an existing index, the application terminates with the following message:

Run time error ‘-2147221296 (800400d0):
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name ‘table’where ‘table’ is the name of the destination table into which the data is imported.
Resolution
Set BULKCOPY.SuspendIndexing = False. Then in the Visual Basic code, explicitly drop and recreate the indexes on the table.

FIX: SQLAgent Exception Occurs when the System Maintains 613, 2661 or 4709 Jobs

Symptoms
The SQLAgent process may terminate with with following error messages:

2001-01-14 19:21:11 – ! [LOG] Exception 5 caught at line 335 of file ..\src\job.c.SQLServerAgent initiating self-termination
2001-01-14 19:21:29 – + [098] SQLServerAgent terminated (forcefully)
Resolution
SQLAgent creates a memory structure to support the xp_sqlagent_enum_jobs action. With SQL Server 2000 the structure is 588 bytes plus 4 bytes for overhead. However, an incorrect CAST to a LPTSTR, instead of a LPBYTE, results in an incorrect 4 byte shift.
When the (number of created jobs on the system * 588) + 4 = NT Page boundary the incorrect 4 byte cast results in the exception.