472,145 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

SQL Job Failure

Hi,

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 775

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.