Find exact point where SQL Server 2000 job fails
20 pts.
0
Q:
Find exact point where SQL Server 2000 job fails
I am running an SQL Server Job, that executes a stored procedure with about 900 commands (mostly insert commands).
The job was working OK, but suddenly fails, due to erroneous data (error message : overflow in converting numeric data to dadatype numeric !!).
How can I find the exact point (command) where the job fails ? (SQl Server error description is not very useful).
ASKED: May 27 2009  8:21 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
46795 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
You could add some logging to the procedure, for example, inserting into a log table, or using the xp_logevent procedure.

If you are using explicit transactions, you might want to log to a table variable, and insert to an actual database table from it after rolling back your transaction.

------------------------------------

Odds are you are adding numbers up, and that the value is larger than your numeric datatype allows for.
Last Answered: May 30 2009  3:14 AM GMT by Mrdenny   46795 pts.
Latest Contributors: Carlosdl   29855 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0