Search notes:

SQL Server: trace flags

There are three kinds of trace flags:
Trace flags can be manipulated with the dbcc traceon and dbcc traceoff.
One or more flags can be set like so:
dbcc traceon(trace_flag) ;
dbcc traceon(trace_flag_1, trace_flag_2, …, trace_flag_n);
dbcc traceon(trace_flag, -1); -- Enable trace flag globally
The current state of trace flags can be displayed like so:
dbcc tracestatus(-1);      -- show all trace flags
dbcc tracestatus(flag_id); -- only one trace flag
Set flags can be disabled:
dbcc traceoff …;
Trace flags can also be specified with the -T command line option. (A lowercase -t sets internal trace flags which is only supported for SQL Server support engineers).

460

Trace Flag 460 can be set in SQL Server 2019. If set this changes the error message ID 8152 String or binary data would be truncated to the more meaningful message ID 2628 String or binary data would be truncated in table '…', column '…'. Truncated value: '…'
Thus, this trace flag is especially useful in ETL scenarios.

Index