trace flag -T460 not working

  • So this is probably me being a div.

    2016 SP1

    I've enabled -T460 in my starting params via SSCM & restarted.  I can see this "applied" in the "registry start up parameters..." line in the errorLog.

    When I try an insert that results in the "string or binary data would be truncated" error I still get this generic error & not the new error that is supposed to tell me which field is the issue.

    T-SQL is basically:

    • create table a (a char(1))
    • insert a values ('aa')
  • Hello,

    Looking at Microsoft Traceflags documentations, it looks that it only works on 2017 and higher builds.

    Traceflag 460:

    Replaces data truncation message ID 8152 with message ID 2628. For more information, see this Microsoft Support article.

    Starting with SQL Server 2019 (15.x), to accomplish this at the database level, see the VERBOSE_TRUNCATION_WARNINGS option in ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).

    Note: This trace flag applies to SQL Server 2017 (14.x) CU12 and higher builds.

    Note: Starting with database compatibility level 150, message ID 2628 is the default and this trace flag has no effect.

    Scope: global or session

    DBCC TRACEON - Trace Flags (Transact-SQL)

    Regards.

  • Duh.  So it WAS me being a div.  I hadn't clocked that Alejandro.  Many thanks.

Viewing 3 posts - 1 through 2 (of 2 total)

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