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

FIX: Query with SET NO_BROWSETABLE Option Set ON May Generate Access Violation

Symptoms
When you execute an INSERT, DELETE or UPDATE query that operates on objects with underlying triggers, the query may terminate with the following error message and an Access Violation occurs:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.The Access Violation may occur when the following conditions are true:The table has underlying triggers for the INSERT, UPDATE or DELETE.The trigger queries the inserted or deleted trigger tables.The NO_BROWSETABLE option is set ON.The following stack dump appears in the SQL Server 7.0 error log:

———————————————————————Short Stack Dump 0×0041012f Module(sqlservr+1012f) (FHasObjPermissions+37)0×005c4e7f Module(sqlservr+1c4e7f) (CBrowseTablePerms::FSchemaChanged+66) 0×005c5094 Module(sqlservr+1c5094) (CBrowseMode::FSchemaChanged+20) 0×0053a072 Module(sqlservr+13a072) (CStmtSelect::XretExecute+9b)0×0040fd90 Module(sqlservr+fd90) (CMsqlExecContext::ExecuteStmts+11b) 0×0040f7d0 Module(sqlservr+f7d0) (CMsqlExecContext::Execute+16b) ———————————————————————
The following stack dump appears in the SQL Server 2000 error log:

———————————————————————-Short Stack Dump004181A1 Module(sqlservr+000181A1) (FHasObjPermissions+00000050)0056BD62 Module(sqlservr+0016BD62) (CBrowseTablePerms::FSchemaChanged+00000059)0056BFC2 Module(sqlservr+0016BFC2) (CBrowseMode::FSchemaChanged+00000020)005F6F05 Module(sqlservr+001F6F05) (CStmtSelect::XretExecute+000000C2)00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)005F663D Module(sqlservr+001F663D) (ExecTrigger+000000C9)005F6824 Module(sqlservr+001F6824) (ExecAfterTrigs+0000019D)005F6922 Module(sqlservr+001F6922) (ExecAfterTrigsIfAny+0000007A)0041A5ED Module(sqlservr+0001A5ED) (CStmtDML::XretExecuteNormal+0000052A)0041A346 Module(sqlservr+0001A346) (CStmtDML::XretExecute+0000001C)00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)0044AFA7 Module(sqlservr+0004AFA7) (CStmtPrepQuery::XretExecute+00000200)00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)00448916 Module(sqlservr+00048916) (language_exec+000003E1)00411D4C Module(sqlservr+00011D4C) (process_commands+000000E0 Line 712+00000002)41073379 Module(UMS+00003379) (ProcessWorkRequests+0000024A)41073071 Module(UMS+00003071) (ThreadStartRoutine+000000BD)7800A27B Module(MSVCRT+0000A27B) (_unDNameEx+0000484C)77E8758A Module(KERNEL32+0000758A) (FileTimeToSystemTime+0000012F)———————————————————————-
Resolution
SQL Server 2000To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/EN-US/) INF: How to Obtain the Latest SQL Server 2000 Service Pack
SQL Server 7.0To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
301511?(http://support.microsoft.com/kb/301511/EN-US/) INF: How to Obtain the Latest SQL Server 7.0 Service Pack

FIX: Query Using Nested IN and a CASE Clause Causes an Access Violation

Symptoms
Running a query with two or more nested IN clauses and a CASE statement may cause the connection to be broken and the following error to be returned:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.Connection Broken
Resolution
The query caused a handled exception in SQL Server, and the process was stopped.

FIX: Extended Stored Procedure “xp_logevent” Generates an Access Violation When Given Too Large a Parameter

Symptoms
Any string that is longer than 8000 bytes that is given as a second parameter to the xp_logevent stored procedure, causes the following error message to occur:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
ODBC: Msg 0, Level 20, State 1
Stored function ‘xp_logevent’ in the library ‘xplog70.dll’ generated an
access violation. SQL Server is terminating process 51.
Resolution
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/EN-US/) INF: How to Obtain the Latest SQL Server 2000 Service Pack

FIX: Exists with Full Outer Join May Generate Access Violation

Symptoms
When you execute a statement in which an EXISTS clause contains a FULL OUTER JOIN, an access violation may be raised, and you may receive the following error message:

SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.Connection BrokenThe SQL Server error log may contain an error similar to the following:

********************************************************************************* BEGIN STACK DUMP:*02/28/01 21:58:41 spid 51**Exception Address = 0055A73F (COptExpr::DeriveGroupProperties(unsigned long) + 00000016 Line 0+00000000)*Exception Code= c0000005 EXCEPTION_ACCESS_VIOLATION*Access Violation occurred reading address 00000014
Resolution
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/EN-US/) INF: How to Obtain the Latest SQL Server 2000 Service Pack

FIX: Error message when you execute a user-defined function in SQL Server 2005: “Invalid length parameter passed to the SUBSTRING function” or “A transport-level error has occurred when receiving …

Symptoms
This article describes the following about this hotfix release:The issues that are fixed by this hotfix packageThe prerequisites for installing the hotfix packageInformation about whether you must restart the computer after you install the hotfix packageInformation about whether the hotfix package is replaced by any other hotfix packageInformation about whether you must make any registry changesThe files that are contained in the hotfix package
Resolution
When you execute a user-defined function in SQL Server 2005, you receive an error message. This problem occurs if you run the following statement before you execute the user-defined function:

SET FMTONLY ONYou receive a different error message, depending on the version of SQL Server 2005 that you have installed. If you use SQL Server 2005 Service Pack 1 (SP1), you may also experience other problems.
The original release version of SQL Server 2005When you execute the user-defined function in the original version of SQL Server 2005, you receive the followingerror message.

Msg 536, Level 16, State 5, Line 4
Invalid length parameter passed to the SUBSTRING function.
SQL Server 2005 SP1When you execute the user-defined function in SQL Server 2005 SP1, you experience the following problems:You receive the following error message:

Msg 109, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 – The pipe has been ended.)The SQL Server service stops.The following access violation is logged in the SQL Server Errorlog file:

SqlDumpExceptionHandler: Process 53 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

FIX: Coalesce with Subquery May Generate an Access Violation

Symptoms
When you run a coalesce query that contains a subquery the following error message may occur:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Resolution
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/EN-US/) INF: How to Obtain the Latest SQL Server 2000 Service Pack