Error code:8152

  • Dear DBA's,

    If anybody knows the solution for this problem please share with us.

    :doze:

    :discuss:[font="Comic Sans MS"]Vinu....
    I’ll always be the first casualty of your database failure.[/font]

  • Please post errors in the body of the post. The title and description both get cut off.

    Now, what's the problem?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Why do we get this error "string or binary data would be truncated(Code:8152)" very often when view the job history

    Tell me the solution if you know

    and how to get those log sources of that job

    :discuss:[font="Comic Sans MS"]Vinu....
    I’ll always be the first casualty of your database failure.[/font]

  • Are you seeing this in the job history as an error from a specific job? If so, check what that job is doing.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I get this on certain SQL Server Agent Jobs. When I try to view the Job history of certain SQL Server Agent jobs, I get that error.

    As a work around I saved a SQL Script so that I can view the job history. I still would like to resolve this issue.

    USE msdb

    SELECT

    sj.name,

    sj.description,

    sjh.step_id,

    sjh.step_name,

    sjh.message,

    sjh.run_status,

    sjh.run_date,

    sjh.run_time,

    sjh.run_duration,

    sjh.server,

    so.name AS Expr1,

    so.email_address

    FROM

    sysjobhistory AS sjh

    LEFT OUTER JOIN

    sysjobs AS sj

    ON

    sjh.job_id = sj.job_id

    LEFT OUTER JOIN

    sysoperators AS so

    ON

    sjh.operator_id_emailed = so.id

    WHERE

    sj.name LIKE 'Name of Job'

    ORDER BY

    sjh.run_date desc,

    sjh.run_time desc

    Addendum:

    This is what I found for those job histories that result in the Error code:8152 String or binary data would be truncated. The message field for those histories contain text that is longer than 1024.

    I use the following script to show the max length of the message field for each job.

    USE msdb

    SELECT

    max(len(sjh.message)), sj.name

    FROM

    sysjobhistory AS sjh

    LEFT OUTER JOIN

    sysjobs AS sj

    ON

    sjh.job_id = sj.job_id

    group by sj.name

    (58.30115757480578, -134.4143772125244)

  • We are getting the same error after a long running SP finishes inserting rows into XML data type col.

    What confuses us - is the line at which error was thrown:

    -- Get the next dummy row to be processed.

    SELECT @PrevRowNum = @CurrentRowNum, @CurrentRowNum = NULL

    SELECT TOP 1 @CurrentRowNum = RowNum, @PartnerID = PartnerID, @DataExtensionCustomerKey = DataExtensionCustomerKey

    FROM @JobExtensionData WHERE RowNum > @PrevRowNum ORDER BY RowNum

    END

    -- If we made it this far, it should be safe to delete the dummy rows.

    DELETE FROM dbo.JobExtensionData WHERE JobID = @JobID AND BatchID < 0 --completed fine

    -- If we were using the DE for all processing and we made it this far, we need to

    -- let the calling code know that we successfully completed all processing.

    IF @UseDEForAllProcessing = 1

    BEGIN

    SELECT @ProcessingComplete = 1

    END

    --SP ENDS --And Error was thrown sometime before this condition or after this condition.

    how can it throw this error at this statement??!!

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply