Wednesday, 7 September 2011

SQLServer 2000 Error

So this was a nasty little surprise I got from MS SQL Server 2000 after multiple batch job failures...


SqlDumpExceptionHandler: Process 83 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
* *******************************************************************************
*
* BEGIN STACK DUMP:
*   09/05/11 08:53:10 spid 83
*
*   Exception Address = 10029D26
*   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
*   Access Violation occurred writing address 00000000
* Input Buffer 740 bytes -
*  BEGIN TRANSACTION  DROP TABLE branch_stocktake.dbo.postgres_desc_1;  SEL
*  ECT * INTO branch_stocktake.dbo.postgres_desc_1 FROM OPENQUERY([MONAR], 
*  'SELECT stockno, stkgroup, description FROM mssql_import.postgres_descri
*  ptions limit 500000');  ALTER TABLE branch_stocktake.dbo.postgres_desc_1
*   ALTER COLUMN stockno varchar(15) COLLATE SQL_Latin1_General_CP1_CS_AS N
*  OT NULL;  
*  
*
*  MODULE                          BASE      END       SIZE
*
*        Edi: 00000000: 
*        Esi: 172E79E0: 3750534C  30303939  00503235  00393937  20474B34  4F54454D  
*        Eax: 0000000C: 
*        Ebx: 0BB49FD8: 0000000B  00000000  00000000  00000000  00000000  00000000  
*        Ecx: 00000003: 
*        Edx: 00000000: 
*        Eip: 10029D26: C88BA5F3  F303E183  5B5E5FA4  909090C3  90909090  90909090  
*        Ebp: 00000008: 
*      SegCs: 0000001B: 
*     EFlags: 00010206: 00610050  00680074  0043003D  005C003A  00490057  0044004E  
*        Esp: 0BB3B4F4: 0A030398  00000000  0A837260  10004E68  0BB49FD8  172E79E0  
*      SegSs: 00000023: 
* *******************************************************************************
* -------------------------------------------------------------------------------
* Short Stack Dump
* 10029D26 Module(UNKNOWN+00000000)
* -------------------------------------------------------------------------------

Along with a lot of other garbled rubbish I got:



CImageHelper::Init () Failed load of dbghelp.dll - Not enough storage is available to process this command.
***Symbol load failed - Proceed to dump without any symbols
*Stack Dump being sent to M:\Program Files\Microsoft SQL Server\MSSQL\log\SQLDump0009.txt




This actually caused another failure in the chain...


WARNING:  Failed to reserve contiguous memory of Size= 65536.

(alongside a lot of other memory based errors...)

After much head scratching, and a few google queries without any real light being shed, I thought about this a bit and changed my google query a little.

It turns out that the fault was disk space, despite there being over 3gb available on C:, about 57gb on M: and 57gb on T:, it was the C: drive at fault.

How? Well the pagefile settings on this server were set to a manual value using the C: Drive. The values? 2048-4096 meg. Ah. That'd do it. Windows wants 4gb of page space on a drive that only has 3gb remaining.

A simple move to M: cured it.