Showing posts with label executed. Show all posts
Showing posts with label executed. Show all posts

Monday, March 19, 2012

[SQLSTATE 22003] (Error 8115)

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
-DYou 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@.discussions.microsoft.com> wrote in message
news:E1F085A7-C312-4989-96D4-EF2DFA1FD835@.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
>

Tuesday, March 6, 2012

[MSSQLServer] [DTS] How to avoid a DTS Package be reentrant

Hello.
I am designing a DTS package that should not to be executed more than two instances of this package.
Something like "If App.PrevInstance = True Then End" in Visual Basic, but I want to do the similar thing with my DTS Package, so that the same package will not be executed (just quit) in same time.
I'm wondering if I can add an ActiveX step to cope with this, to validate whether the following steps can be controlled to be executed or not.
Thank you in advance,
NokSearch SQLDTS (http://www.sqldts.com) website for any examples.