Tags: completes, database, error, fails, gtexecuted, itfails, job, message, microsoft, mysql, oracle, runs, server, sql, sqlstate, successfully, user

[SQLSTATE 22003] (Error 8115)

On Database » Microsoft SQL Server

2,351 words with 1 Comments; publish: Sat, 07 Jun 2008 20:24:00 GMT; (250109.38, « »)

Hi,

I have this job that runs sometimes it completes successfully, sometimes it

fails.

When it fails it gives this error message -->

Executed as user: sqlagent. Arithmetic overflow error converting expression

to data type int.

[SQLSTATE 22003] (Error 8115) The statement has been terminated. [SQLSTATE

01000] (Error 3621).

The step failed.

When I did the research on all the codes in the error looks like one of the

statements such as -->

SELECT ABS(convert(int, -2147483648))

is causing the problem. The problem I am having is that stored procedure

that runs has many 'converts' and I do not know which one is causing the

problem. Can I setup some kind of monitor that will catch exact cause or

declared 'int' that it is unable to convert to "int"?

How should I go about it?

Thanks

-D

All Comments

Leave a comment...

  • 1 Comments
    • You can run a Profiler trace, including stored procedure statement

      starting/completed and exception events. Alternatively, you can run the

      proc from Query Analyzer, using the debugger to step through the code

      Hope this helps.

      Dan Guzman

      SQL Server MVP

      "D''Animal" <DAnimal.sqlserver.todaysummary.com.discussions.microsoft.com> wrote in message

      news:E1F085A7-C312-4989-96D4-EF2DFA1FD835.sqlserver.todaysummary.com.microsoft.com...

      > Hi,

      > I have this job that runs sometimes it completes successfully, sometimes

      > it

      > fails.

      > When it fails it gives this error message -->

      > --

      > Executed as user: sqlagent. Arithmetic overflow error converting

      > expression

      > to data type int.

      > [SQLSTATE 22003] (Error 8115) The statement has been terminated.

      > [SQLSTATE

      > 01000] (Error 3621).

      > The step failed.

      > --

      > When I did the research on all the codes in the error looks like one of

      > the

      > statements such as -->

      > SELECT ABS(convert(int, -2147483648))

      > is causing the problem. The problem I am having is that stored procedure

      > that runs has many 'converts' and I do not know which one is causing the

      > problem. Can I setup some kind of monitor that will catch exact cause or

      > declared 'int' that it is unable to convert to "int"?

      > How should I go about it?

      > Thanks

      > -D

      >

      #1; Sat, 07 Jun 2008 20:25:00 GMT