Unknown token received from SQL Server [SQLSTATE HY000] (Error 0)

Anonymous
2025-02-10T13:52:24+00:00

After installing SQL Server patch 13.0.6455.2 for SQL Server 2016, one of our agent jobs is failing with Unknown token received from SQL Server [SQLSTATE HY000] (Error 0).

The job has one step that executes a stored procedure. The stored procedure runs without issue when invoked from SSMS manually. It only fails when called by the agent job.

I'm able to bypass the error by commenting out the line beginning with:

CREATE INDEX IX_TEMP_STRUCT ON tempdb.dbo.

Note that the failure is not on the CREATE INDEX statement itself, but on the subsequent MERGE statement that references the temp table. The MERGE statement is dynamic SQL that is executed with sp_executesql().

This worked fine on the previous SQL Server 2016 patch level.

Windows for business | Windows Server | Storage high availability | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2025-02-10T15:00:33+00:00

    Hello ,

    Thank you for posting in Microsoft Community forum.

    From the description above, I understand your question is related to SQL Server. 

    Since there are no engineers dedicated to this topic in this forum. To be able to get a quick and effective handling of your issue, I recommend that you repost your question in the Q&A forum, where there will be a dedicated engineer to give you a professional and effective reply.

    Here is the link for Q&A forum.

    Questions - Microsoft Q&A

    Click the "Ask a Question" button in the upper right corner to post your question and select tags related to your products.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Regards,

    Zunhui

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2025-02-10T15:50:25+00:00

    Will do, thank you Zunhui.

    0 comments No comments