Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

When you try to store string or binary data that exceeds the target column size in Microsoft SQL Server, you receive the following error message:

Msg 8152, Level 16, State 6, Procedure ProcedureName, Line Linenumber
String or binary data would be truncated.


This SQL Server update introduces an optional message that contains the following additional context information.

Msg 2628, Level 16, State 6, Procedure ProcedureName, Line Linenumber
String or binary data would be truncated in table '%.*ls', column '%.*ls'.
Truncated value: '%.*ls'.


The new message ID is 2628. This message replaces message 8152 in any error output if trace flag 460 is enabled.

Resolution

This improvement is included in the following cumulative updates for SQL Server:

      Cumulative Update 12 for SQL Server 2017

      Cumulative Update 6 for SQL Server 2016 SP2

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Latest cumulative update for SQL Server 2017

Latest cumulative update for SQL Server 2016

References

Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×