Home Forums SQL Server 2008 T-SQL (SS2K8) SQL Agent Job Error - String or binary data would be truncated. [SQLSTATE 22001] (Error 8152) RE: SQL Agent Job Error - String or binary data would be truncated. [SQLSTATE 22001] (Error 8152)

  • Unfortunately, it's none of those issues. However, I did notice something new.

    I removed the stored procedure from my original large procedure as it's not necessarily needed, but it does fix some potential issues that could arise. I just wanted to see what happened if I did that. When I execute the job now, it says it completed, however, even though no errors are displayed the script didn't work. When I run the same exact procedure and script manually, it works fine. I've been looking around on some forums and it seems like there are quite a few people who have similar issues running large scripts and procedures via sql agent jobs. I'm going to try to run the script via a bat file to see how it works. If it works fine, then I'm going to write sql agent jobs off as just being finicky.

    Perhaps one of you may know if there's a good writeup behind sql jobs somewhere that explains exactly how it works. That could help me understand why this job keeps failing.

    Thanks,

    Josh