Database Maintenance fails in SQL Server Agent with the error "Unknown token received from SQL Server [SQLSTATE HY000] String data, right truncation [SQLSTATE 01004]"

Shanoof Basheer 1 Reputation point
2021-12-29T04:41:47.027+00:00

We have verified in SQL Server error log to see if there is any connection drop during the failure. But there is no log as well. SQL Server version used is 2017. DBA after failure restarted the same job and it again fails after running for few hours with the same error. Any suggestions on this?

SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-12-29T06:34:05.713+00:00

    Hi @Shanoof Basheer ,

    Please share us more related information about the maintenance plan. And which step of this agent job failed?
    Please check your agent job history and share us more related error message for us.

    Sharing a similar discussion thread to you, hope this could help you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

  2. Olaf Helper 47,436 Reputation points
    2021-12-29T07:13:52.01+00:00

    Indeed, we need more informations about the job

    String data, right truncation [SQLSTATE 01004]

    That always means the job want to insert large string data then allowed by the table column definition, e.g. the table have a column defined as varchar(10) and the job tries to insert 50 characters; that fails with this error.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.