Posted on Leave a comment

Truncation error in job

Had a real winner this week, had some stored procs that would run fine in SSMS, but would return error 8152 String or binary  data would be truncated when run as a job.
Turns out the table had a field for updated by that was defaulted to suser_name() but was only 20 chars long.   The user name the job ran as was almost 40 chars.
Wont say how much time was spent tracking this one down :),