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

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

FIX: SQL Server Process Terminates Attempting to Reset from an sp_OA Based Batch

Symptoms
The SQL Server process may unexpectedly terminate while attempting a ResetFromBatch after performing sp_OA based activities. ResetFromBatch is an internal routine used by SQL Server to make sure that a server process ID (spid) has successfully completed the processing of the current batch and is set up to receive the next client request.
If this error occurs the following stack trace may be seen in the SQL Server error log:

77F97AC6 Module(ntdll+00017AC6) (ZwGetContextThread+0000000B)009261F2 Module(sqlservr+005261F2) (ex_raise2(int,int,int,int,void *,char *)+000003F7)00926302 Module(sqlservr+00526302) (ex_raisecontrol(class SQLError,…)+00000087)00925A26 Module(sqlservr+00525A26) (ex_trans_cexcept(unsigned int,struct _EXCEPTION_POINTERS *)+000001FC)7800AFC3 Module(MSVCRT+0000AFC3) (__CxxLongjmpUnwind+00000115)7800A739 Module(MSVCRT+0000A739) (__unDNameEx+00004D0A)7800A708 Module(MSVCRT+0000A708) (__unDNameEx+00004CD9)7800A559 Module(MSVCRT+0000A559) (__unDNameEx+00004B2A)7800AE9E Module(MSVCRT+0000AE9E) (__CxxFrameHandler+00000026)77F92538 Module(ntdll+00012538) (RtlSetDaclSecurityDescriptor+00000174)77F8AF89 Module(ntdll+0000AF89) (RtlConsoleMultiByteToUnicodeN+0000045C)77F9FB9A Module(ntdll+0001FB9A) (KiUserExceptionDispatcher+0000000E)22DF38FF Module(odsole70+000038FF) (CCachedTypeInfo::`scalar deleting destructor’(unsigned int)+0000000F)22DF29DE Module(odsole70+000029DE) (CODSOLEThreadInfo::UnlinkCTypeInfo(class CCachedTypeInfo *)+00000046 Line 118+0000001C)22DF27DD Module(odsole70+000027DD) (CODSOLEThreadInfo::~CODSOLEThreadInfo(void)+0000007A Line 41+0000000F)22DF6BFF Module(odsole70+00006BFF) (CODSOLEThreadInfo::`scalar deleting destructor’(unsigned int)+0000000F)22DF49EB Module(odsole70+000049EB) (OAUninitialize(void *)+0000003D Line 214+0000001C)0086A624 Module(sqlservr+0046A624) (PSS::ResetFromBatch(class ExecutionContext *,struct srv_proc *)+00000020)00459B11 Module(sqlservr+00059B11) (language_exec(struct srv_proc *)+000006BF) 004175D8 Module(sqlservr+000175D8) (process_commands(struct srv_proc *)+000000E0)410735D0 Module(UMS+000035D0) (ProcessWorkRequests(class UmsWorkQueue *)+00000264)4107382C Module(UMS+0000382C) (ThreadStartRoutine(void *)+000000BC)7800BEA1 Module(MSVCRT+0000BEA1) (_beginthread+000000CE)77E92CA8 Module(KERNEL32+00012CA8) (CreateFileA+0000011B)
Resolution
The ResetFromBatch code line does not implement appropriate structured exception handling, which leads to an unhanded exception condition.

FIX: SQL Server Fails to Start When Computer Binds 48 or More Socket Addresses

Symptoms
Binding 48 or more addresses to the network of a SQL Server computer causes an access violation exception to occur and the SQL Server server fails to start.
The exception that is logged to the SQL Server error log is:

42CF1ABA Module(SSNETLIB+00001ABA) (ConnectionListen+000008CA)004E2CFA Module(sqlservr+000E2CFA) (FRunCM(class StartUp *)+000000D3)004E3FA3 Module(sqlservr+000E3FA3) (initCM(void *)+00000064)7800BEA1 Module(MSVCRT+0000BEA1) (_beginthread+000000CE)From build 8.00.194
Resolution
The Ssnetlib.dll file attempts to listen on the first 64 socket addresses. A buffer overrun occurs, which causes the exception.

FIX: SQL Server Exception Encountered in CQDynArray::Resize

Symptoms
Resize is an internal class method that is used to resize an array. PvReplace may incorrectly use the Resize method leading to an exception.
The following, or similar, top of the stack is logged in the SQL Server error log when the problem occurs:

0×0051ea81 Module(sqlservr+11ea81) (CQDynArray::Resize+69)
0×0043acc7 Module(sqlservr+3acc7) (CQDynArray::PvReplace+2e)
.
Resolution
Microsoft has confirmed this to be a problem in SQL Server7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799?(http://support.microsoft.com/kb/274799/) INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0For more information, contact your primary support provider.

FIX: SQL Server 2000 stops responding when you cancel a query or when a query time-out occurs, and error messages are logged in the SQL Server error log file

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
In rare situations, MicrosoftSQL Server 2000 stops responding when you cancel a query or when a query time-out occurs. Additionally, error messages that resemble the following are logged in the SQL Server error log file:

2006-07-06 11:04:11.82 spid59clean_tables_xact: active sdes for tabid 457768688
2006-07-06 11:04:12.23 spid59Using ‘dbghelp.dll’ version ‘4.0.5′ *Stack Dump being sent to e:\fastnet\MSSQL\log\SQLDump0009.txt
2006-07-06 11:04:12.51 spid59Error: 0, Severity: 19, State: 0
2006-07-06 11:04:12.51 spid59SqlDumpExceptionHandler: Process 59 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
* BEGIN STACK DUMP: *07/06/06 11:04:12 spid 59
*Exception Address = 00402836
*Exception Code= c0000005 EXCEPTION_ACCESS_VIOLATION
*Access Violation occurred writing address 00000004
* Input Buffer 514 bytes -
<Some query statements>
*******************************************************************************
* Short Stack Dump
* 00402836 Module(sqlservr+00002836)
* 00407EF3 Module(sqlservr+00007EF3)
* 0041CB9F Module(sqlservr+0001CB9F)
* 00414C76 Module(sqlservr+00014C76)
* 00404F9D Module(sqlservr+00004F9D)
* 006E732B Module(sqlservr+002E732B) (SQLExit+0017F834)
* 00642592 Module(sqlservr+00242592) (SQLExit+000DAA9B)
* 0049C46A Module(sqlservr+0009C46A)
* 41075309 Module(ums+00005309) (ProcessWorkRequests+000002D9 Line 456+00000000)
* 41074978 Module(ums+00004978) (ThreadStartRoutine+00000098 Line 263+00000007)
* 7C34940F Module(MSVCR71+0000940F) (endthread+000000AA)
* 7C57438B Module(KERNEL32+0000438B) (TlsSetValue+000000F0)
2006-07-06 11:04:31.18 spid59Stack Signature for the dump is 0×79DB129D
2006-07-06 11:04:31.34 spid59clean_tables_xact: active sdes for tabid 457768688
2006-07-06 11:06:01.39 serverStack Signature for the dump is 0×00000000
2006-07-06 11:06:01.39 serverError: 17883, Severity: 1, State: 0
2006-07-06 11:06:01.39 serverProcess 53:0 (b68) UMS Context 0×27F80DE8 appears to be non-yielding on Scheduler 1.This problem occurs if the following conditions are true: The query performs operations on binary large object (BLOB) data types. Examples of binary large object data types include the Text data type, the NText data type, and the Image data type. The query contains the UNION operator or the OUTER JOIN operator. The query spends significant time processing the binary large object data types.

FIX: Invalid Use of the Getdate Function May Cause Access Violation

Symptoms
An invalid use of the Getdate function within a function may cause an access violation and the following error message appears in Query Analyzer:

Server: Msg 443, Level 16, State 1, Procedure fnTestDate, Line 4
Invalid use of ‘getdate’ within a function.
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection BrokenYou may find the following error messages in the SQL Server error log when the access violation occurs:

00603513 Module(sqlservr+00203513) (walk_exp_tree+00000016)006034BD Module(sqlservr+002034BD) (get_expression_str+00000038)005C679A Module(sqlservr+001C679A) (yyparse+0000145C)00444BEC Module(sqlservr+00044BEC) (sqlpars+0000003C)00411685 Module(sqlservr+00011685) (CSQLSource::FTransform+0000013C)00449527 Module(sqlservr+00049527) (CSQLStrings::FTransform+000001A1)00413632 Module(sqlservr+00013632) (CSQLSource::Execute+0000015B)0044912C Module(sqlservr+0004912C) (language_exec+000003E1)00412B1F Module(sqlservr+00012B1F) (process_commands+000000E0)41073537 Module(UMS+00003537) (ProcessWorkRequests+0000024A)41073355 Module(UMS+00003355) (ThreadStartRoutine+000000BC)7800A27B Module(MSVCRT+0000A27B) (beginthread+000000CE)77DB2C18 Module(KERNEL32+00002C18) (GetModuleHandleA+0000007A)
Resolution
To 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