Showing posts with label terminated. Show all posts
Showing posts with label terminated. Show all posts

Wednesday, March 21, 2012

Fatal System Error

Whats happening:

Error#: 40002
Error Item: 01000: [Microsoft...][ODBC...][SQL...]The Statement has
been terminated. > GETID 'INSERT INTO Table(Column1, Column2, Column 3,
Column4, Column5, Column6) VALUES
("","Value1","Value2","Value3","Value4","Value5")'

Error Message: 01000: Microsoft...][ODBC...][SQL...]The statement has
been terminated.

Active Form: frmForm
Form Name:

--
GETID Stored Procedure:
--

CREATE PROCEDURE GETID @.strsql text AS

PRINT cast(@.strsql as varchar(4000))

EXEC(" "
+@.strsql + " select @.@.identity as id")

GO
--

Anyone know what could be causing it? The database has changed - the
frontend code hasn't, so it has to be a database problem. What
happened was a few tables became incorrect so we restored them from a
backup. Everything else seems to work, apart from adding a new record
to this table.
You can edit current records etc..just not add.

Thanks in advance,[posted and mailed, please reply in news]

(lbillson@.netexperts.co.uk) writes:
> Whats happening:
> Error#: 40002
> Error Item: 01000: [Microsoft...][ODBC...][SQL...]The Statement has
> been terminated. > GETID 'INSERT INTO Table(Column1, Column2, Column 3,
> Column4, Column5, Column6) VALUES
> ("","Value1","Value2","Value3","Value4","Value5")'
> Error Message: 01000: Microsoft...][ODBC...][SQL...]The statement has
> been terminated.
>...
> Anyone know what could be causing it? The database has changed - the
> frontend code hasn't, so it has to be a database problem. What
> happened was a few tables became incorrect so we restored them from a
> backup. Everything else seems to work, apart from adding a new record
> to this table.

It appears that one error message has been lost somewhere. "The statement
has been terminated" is an accompanying message to the real error message.

I don't know what sort of client code you are using, but it seems that
the error handling needs a review. When working with SQL Server it's
essential to get all error message. And particularly the first error
message.

As for what have happened, it seems that the definition of the table has
changed, so that the statement is no longer correct. May be there is one
more column which is not nullable. You could also be running into a
key violation. Or, since you had restored some tables from backup, maybe
you are inserting a non-valid foreign key.

Your best bet is probably to run the query from Query Analyzer.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Fatal exception error in MSSQL2005 SP1

The SQL server was terminated by exception acess violation at 10pm but before
that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in advance
****************SQLDUMP.LOG**************
Memory
MemoryLoad = 90%
Total Physical = 2047 MB
Available Physical = 202 MB
Total Page File = 3947 MB
Available Page File = 2046 MB
Total Virtual = 2047 MB
Available Virtual = 93 MB
***Stack Dump being sent to C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is
terminating this process.
*
*******************************************************************************
*
* BEGIN STACK DUMP:
* 07/20/06 20:26:18 spid 70
*
*
* Exception Address = 7C8224B2 Module(ntdll+000224B2)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 00000003
* Input Buffer 510 bytes -
* select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contra
* cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
* substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fox
* Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedulep
* rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (se
* lect * from (Select *, case when left(duedate,2) > '78' then '19' + d
* uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf w
* here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603' a
* nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipal
* , kpsfkey, penaltotalinterest from (Select *, case when left(duedate,
* 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate fr
* om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dueda
* te between '20060603' and '20060803' and payoutflag <> 'Y') P on le
* ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) =
* substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' or
* der by loanrefno, kpsfkey
****************SQLDUMPER_ERRORLOG**************
07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges
() failed (00000514)
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
supplied
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x02A03570
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr
= 0x00000000
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
with file C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
used
07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: NoHi stephanie
Have you run this query successfully from query analyser? Have you run DBCC
CHECKDB and made sure that there are no hardware errors or other errors
reported in the event log?
You may want to look at re-writing the query. It is best not not use SELECT
* in production code as you will be selecting more than you are using. Post
DDL and sample data with the expected output from that data if you need help
re-writing this see http://www.aspfaq.com/etiquette.asp?id=5006
John
"stephanie" wrote:
> The SQL server was terminated by exception acess violation at 10pm but before
> that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in advance
> ****************SQLDUMP.LOG**************
> Memory
> MemoryLoad = 90%
> Total Physical = 2047 MB
> Available Physical = 202 MB
> Total Page File = 3947 MB
> Available Page File = 2046 MB
> Total Virtual = 2047 MB
> Available Virtual = 93 MB
> ***Stack Dump being sent to C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
> SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is
> terminating this process.
> *
> *******************************************************************************
> *
> * BEGIN STACK DUMP:
> * 07/20/06 20:26:18 spid 70
> *
> *
> * Exception Address = 7C8224B2 Module(ntdll+000224B2)
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 00000003
> * Input Buffer 510 bytes -
> * select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contra
> * cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
> * substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fox
> * Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedulep
> * rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (se
> * lect * from (Select *, case when left(duedate,2) > '78' then '19' + d
> * uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf w
> * here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603' a
> * nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipal
> * , kpsfkey, penaltotalinterest from (Select *, case when left(duedate,
> * 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate fr
> * om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dueda
> * te between '20060603' and '20060803' and payoutflag <> 'Y') P on le
> * ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) => * substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' or
> * der by loanrefno, kpsfkey
>
> ****************SQLDUMPER_ERRORLOG**************
> 07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges
> () failed (00000514)
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
> supplied
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr => 0x02A03570
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr
> = 0x00000000
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr => 0x00000000
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName => <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
> with file C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
> used
> 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
> 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
> C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
> 07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: No|||The query is working fine with running in query analyzer and there is no
error in dbcc checkdb. I found that there was an error in event viewer about
fatal exception with win32 or c++ when the MSSQL2005 stopped unexpectedly.
SQL Server is terminating because of fatal exception c0000005. This error
may be caused by an unhandled Win32 or C++ exception, or by an access
violation encountered during exception handling. Check the SQL error log for
any related stack dumps or messages. This exception forces SQL Server to
shutdown. To recover from this error, restart the server (unless SQLAgent is
configured to auto restart).
Thanks in advance!
"John Bell" wrote:
> Hi stephanie
> Have you run this query successfully from query analyser? Have you run DBCC
> CHECKDB and made sure that there are no hardware errors or other errors
> reported in the event log?
> You may want to look at re-writing the query. It is best not not use SELECT
> * in production code as you will be selecting more than you are using. Post
> DDL and sample data with the expected output from that data if you need help
> re-writing this see http://www.aspfaq.com/etiquette.asp?id=5006
> John
> "stephanie" wrote:
> > The SQL server was terminated by exception acess violation at 10pm but before
> > that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in advance
> > ****************SQLDUMP.LOG**************
> > Memory
> > MemoryLoad = 90%
> > Total Physical = 2047 MB
> > Available Physical = 202 MB
> > Total Page File = 3947 MB
> > Available Page File = 2046 MB
> > Total Virtual = 2047 MB
> > Available Virtual = 93 MB
> > ***Stack Dump being sent to C:\Program Files\Microsoft SQL
> > Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
> > SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
> > EXCEPTION_ACCESS_VIOLATION. SQL Server is
> > terminating this process.
> >
> > *
> > *******************************************************************************
> > *
> >
> > * BEGIN STACK DUMP:
> >
> > * 07/20/06 20:26:18 spid 70
> >
> > *
> >
> > *
> >
> > * Exception Address = 7C8224B2 Module(ntdll+000224B2)
> >
> > * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> >
> > * Access Violation occurred reading address 00000003
> >
> > * Input Buffer 510 bytes -
> >
> > * select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contra
> >
> > * cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
> >
> > * substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fox
> >
> > * Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedulep
> >
> > * rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (se
> >
> > * lect * from (Select *, case when left(duedate,2) > '78' then '19' + d
> >
> > * uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf w
> >
> > * here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603' a
> >
> > * nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipal
> >
> > * , kpsfkey, penaltotalinterest from (Select *, case when left(duedate,
> >
> > * 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate fr
> >
> > * om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dueda
> >
> > * te between '20060603' and '20060803' and payoutflag <> 'Y') P on le
> >
> > * ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) => >
> > * substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' or
> >
> > * der by loanrefno, kpsfkey
> >
> >
> > ****************SQLDUMPER_ERRORLOG**************
> > 07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges
> > () failed (00000514)
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
> > supplied
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr => > 0x02A03570
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr
> > = 0x00000000
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr => > 0x00000000
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName => > <NULL>
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
> > with file C:\Program Files\Microsoft SQL
> > Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
> > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
> > used
> > 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
> > 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
> > C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
> > 07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: No|||Hi Stephanie
There are a couple of issues logged at:
https://connect.microsoft.com/SQLServer/feedback/SearchResults.aspx?SearchQuery=c0000005
they mainly seem to be the 64 bit version. You could try the post SP1 hotfix
on a test server http://support.microsoft.com/Kb/918222 is publically
available and there are others available from PSS see
http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx
I think the issue may be related to the complexity of the query, so you may
want to try and re-write it or reduce it to find the point when it fails.
You may also want to raise a call with PSS and pass on any dump files that
you have.
John
"stephanie" wrote:
> The query is working fine with running in query analyzer and there is no
> error in dbcc checkdb. I found that there was an error in event viewer about
> fatal exception with win32 or c++ when the MSSQL2005 stopped unexpectedly.
> SQL Server is terminating because of fatal exception c0000005. This error
> may be caused by an unhandled Win32 or C++ exception, or by an access
> violation encountered during exception handling. Check the SQL error log for
> any related stack dumps or messages. This exception forces SQL Server to
> shutdown. To recover from this error, restart the server (unless SQLAgent is
> configured to auto restart).
>
> Thanks in advance!
> "John Bell" wrote:
> > Hi stephanie
> >
> > Have you run this query successfully from query analyser? Have you run DBCC
> > CHECKDB and made sure that there are no hardware errors or other errors
> > reported in the event log?
> >
> > You may want to look at re-writing the query. It is best not not use SELECT
> > * in production code as you will be selecting more than you are using. Post
> > DDL and sample data with the expected output from that data if you need help
> > re-writing this see http://www.aspfaq.com/etiquette.asp?id=5006
> >
> > John
> >
> > "stephanie" wrote:
> >
> > > The SQL server was terminated by exception acess violation at 10pm but before
> > > that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in advance
> > > ****************SQLDUMP.LOG**************
> > > Memory
> > > MemoryLoad = 90%
> > > Total Physical = 2047 MB
> > > Available Physical = 202 MB
> > > Total Page File = 3947 MB
> > > Available Page File = 2046 MB
> > > Total Virtual = 2047 MB
> > > Available Virtual = 93 MB
> > > ***Stack Dump being sent to C:\Program Files\Microsoft SQL
> > > Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
> > > SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
> > > EXCEPTION_ACCESS_VIOLATION. SQL Server is
> > > terminating this process.
> > >
> > > *
> > > *******************************************************************************
> > > *
> > >
> > > * BEGIN STACK DUMP:
> > >
> > > * 07/20/06 20:26:18 spid 70
> > >
> > > *
> > >
> > > *
> > >
> > > * Exception Address = 7C8224B2 Module(ntdll+000224B2)
> > >
> > > * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> > >
> > > * Access Violation occurred reading address 00000003
> > >
> > > * Input Buffer 510 bytes -
> > >
> > > * select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contra
> > >
> > > * cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
> > >
> > > * substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fox
> > >
> > > * Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedulep
> > >
> > > * rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (se
> > >
> > > * lect * from (Select *, case when left(duedate,2) > '78' then '19' + d
> > >
> > > * uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf w
> > >
> > > * here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603' a
> > >
> > > * nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipal
> > >
> > > * , kpsfkey, penaltotalinterest from (Select *, case when left(duedate,
> > >
> > > * 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate fr
> > >
> > > * om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dueda
> > >
> > > * te between '20060603' and '20060803' and payoutflag <> 'Y') P on le
> > >
> > > * ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) => > >
> > > * substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' or
> > >
> > > * der by loanrefno, kpsfkey
> > >
> > >
> > > ****************SQLDUMPER_ERRORLOG**************
> > > 07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges
> > > () failed (00000514)
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
> > > supplied
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr => > > 0x02A03570
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr
> > > = 0x00000000
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr => > > 0x00000000
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName => > > <NULL>
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
> > > with file C:\Program Files\Microsoft SQL
> > > Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
> > > 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
> > > used
> > > 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
> > > 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
> > > C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
> > > 07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: Nosql

Fatal exception error in MSSQL2005 SP1

The SQL server was terminated by exception acess violation at 10pm but befor
e
that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in advanc
e
****************SQLDUMP.LOG**************
Memory
MemoryLoad = 90%
Total Physical = 2047 MB
Available Physical = 202 MB
Total Page File = 3947 MB
Available Page File = 2046 MB
Total Virtual = 2047 MB
Available Virtual = 93 MB
***Stack Dump being sent to C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is
terminating this process.
*
****************************************
************************************
***
*
* BEGIN STACK DUMP:
* 07/20/06 20:26:18 spid 70
*
*
* Exception Address = 7C8224B2 Module(ntdll+000224B2)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 00000003
* Input Buffer 510 bytes -
* select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contra
* cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
* substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fox
* Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedulep
* rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (se
* lect * from (Select *, case when left(duedate,2) > '78' then '19' + d
* uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf w
* here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603' a
* nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipal
* , kpsfkey, penaltotalinterest from (Select *, case when left(duedate,
* 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate fr
* om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dueda
* te between '20060603' and '20060803' and payoutflag <> 'Y') P on le
* ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) =
* substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' or
* der by loanrefno, kpsfkey
****************SQLDUMPER_ERRORLOG******
********
07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges
() failed (00000514)
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
supplied
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x
0
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr =
0x02A03570
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr
= 0x00000000
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr =
0x00000000
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName =
<NULL>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NUL
L>
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
with file C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
used
07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not us
ed
07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: NoHi stephanie
Have you run this query successfully from query analyser? Have you run DBCC
CHECKDB and made sure that there are no hardware errors or other errors
reported in the event log?
You may want to look at re-writing the query. It is best not not use SELECT
* in production code as you will be selecting more than you are using. Post
DDL and sample data with the expected output from that data if you need help
re-writing this see http://www.aspfaq.com/etiquette.asp?id=5006
John
"stephanie" wrote:

> The SQL server was terminated by exception acess violation at 10pm but bef
ore
> that, I got some dump logs between 8pm to 10pm. Any idea? Thanks in adva
nce
> ****************SQLDUMP.LOG**************
> Memory
> MemoryLoad = 90%
> Total Physical = 2047 MB
> Available Physical = 202 MB
> Total Page File = 3947 MB
> Available Page File = 2046 MB
> Total Virtual = 2047 MB
> Available Virtual = 93 MB
> ***Stack Dump being sent to C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\LOG\SQLDump0002.txt
> SqlDumpExceptionHandler: Process 70 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is
> terminating this process.
> *
> ****************************************
**********************************
*****
> *
> * BEGIN STACK DUMP:
> * 07/20/06 20:26:18 spid 70
> *
> *
> * Exception Address = 7C8224B2 Module(ntdll+000224B2)
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 00000003
> * Input Buffer 510 bytes -
> * select a.currencycode, a.glmasterno, a.loanrefno, a.customerid, a.contr
a
> * cttype, a.NewLoanBaln, a.TtlAccrueInt, substring(b.duedate,5,2) + '/' +
> * substring(b.duedate,3,2) + '/' + substring(b.duedate,1,2) as DueDate_Fo
x
> * Pro, b.* from eximbills_drawfm00 a right join (select I.*, P.schedule
p
> * rincipal as MerchedPrincipal, P.penaltotalinterest as Ppenality from (s
e
> * lect * from (Select *, case when left(duedate,2) > '78' then '19' +
d
> * uedate else '20' + duedate end as modi_duedate from eximbills_drawfpsf
w
> * here right(kpsfkey,1) = 'I') z where modi_duedate between '20060603'
a
> * nd '20060803' and payoutflag <> 'Y') I join (select scheduleprincipa
l
> * , kpsfkey, penaltotalinterest from (Select *, case when left(duedate
,
> * 2) > '78' then '19' + duedate else '20' + duedate end as modi_duedate f
r
> * om eximbills_drawfpsf where right(kpsfkey,1) = 'P') x where modi_dued
a
> * te between '20060603' and '20060803' and payoutflag <> 'Y') P on l
e
> * ft(I.kpsfkey,25) = left(P.kpsfkey,25)) b on rtrim(ltrim(a.loanrefno)) =
> * substring(b.kpsfkey,1,12) where rtrim(ltrim(a.recordtype)) <> '009' o
r
> * der by loanrefno, kpsfkey
>
> ****************SQLDUMPER_ERRORLOG******
********
> 07/20/06 20:24:58, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivilege
s
> () failed (00000514)
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4
> supplied
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 1744
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags =
0x0
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr =
> 0x02A03570
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordP
tr
> = 0x00000000
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr =
> 0x00000000
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NUL
L>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName =
> <NULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <N
ULL>
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Dump is associated
> with file C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
> 07/20/06 20:24:58, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not
> used
> 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not
used
> 07/20/06 20:25:03, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed:
> C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.mdmp
> 07/20/06 20:25:03, ACTION, sqlservr.exe, Watson Invoke: No|||The query is working fine with running in query analyzer and there is no
error in dbcc checkdb. I found that there was an error in event viewer about
fatal exception with win32 or c++ when the MSSQL2005 stopped unexpectedly.
SQL Server is terminating because of fatal exception c0000005. This error
may be caused by an unhandled Win32 or C++ exception, or by an access
violation encountered during exception handling. Check the SQL error log for
any related stack dumps or messages. This exception forces SQL Server to
shutdown. To recover from this error, restart the server (unless SQLAgent is
configured to auto restart).
Thanks in advance!
"John Bell" wrote:
[vbcol=seagreen]
> Hi stephanie
> Have you run this query successfully from query analyser? Have you run DBC
C
> CHECKDB and made sure that there are no hardware errors or other errors
> reported in the event log?
> You may want to look at re-writing the query. It is best not not use SELEC
T
> * in production code as you will be selecting more than you are using. Pos
t
> DDL and sample data with the expected output from that data if you need he
lp
> re-writing this see http://www.aspfaq.com/etiquette.asp?id=5006
> John
> "stephanie" wrote:
>|||Hi Stephanie
There are a couple of issues logged at:
https://connect.microsoft.com/SQLSe...0
000005
they mainly seem to be the 64 bit version. You could try the post SP1 hotfix
on a test server http://support.microsoft.com/Kb/918222 is publically
available and there are others available from PSS see
[url]http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx[/ur
l]
I think the issue may be related to the complexity of the query, so you may
want to try and re-write it or reduce it to find the point when it fails.
You may also want to raise a call with PSS and pass on any dump files that
you have.
John
"stephanie" wrote:
[vbcol=seagreen]
> The query is working fine with running in query analyzer and there is no
> error in dbcc checkdb. I found that there was an error in event viewer abo
ut
> fatal exception with win32 or c++ when the MSSQL2005 stopped unexpectedly.
> SQL Server is terminating because of fatal exception c0000005. This error
> may be caused by an unhandled Win32 or C++ exception, or by an access
> violation encountered during exception handling. Check the SQL error log f
or
> any related stack dumps or messages. This exception forces SQL Server to
> shutdown. To recover from this error, restart the server (unless SQLAgent
is
> configured to auto restart).
>
> Thanks in advance!
> "John Bell" wrote:
>