469,277 Members | 2,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,277 developers. It's quick & easy.

SQL Job Failure


I have a SP,when the stored procedure (which includes a cursor) is executed through query analyzer, it runs fine, and reports an error everytime it sees. It moves all the values from the source to the destination tables.

However, if the same stored procedure is run as a task/job in SQL
Server Agent, the behaviour is different. The job fails when it see's
the error and ends up skipping records or terminating the procedure
all together. Eg. if there are 100 records in the source table with 10
duplicates, the stored procedure when run through Query Analyzer will
copy the 90 unique records to the destination tables but when run from
SQL-Agent, it copies just 10-15 records.

Any idea why this happens, please let me know
Mar 1 '08 #1
0 733

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by x2164 | last post: by
3 posts views Thread by Damaji Jambhale | last post: by
2 posts views Thread by JustaCowboy | last post: by
4 posts views Thread by J. Marshall Latham | last post: by
5 posts views Thread by Ron Louzon | last post: by
8 posts views Thread by Antony | last post: by
reply views Thread by Marty Cruise | last post: by
66 posts views Thread by Johan Tibell | last post: by
8 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.