sp_executesql is given its statement as a string literal without the N prefix

tx0/sql:executesql-non-unicodedefaulterrorreliability/strings-and-regexdepth fastbug

What it finds

sp_executesql takes its statement as nvarchar; a string literal without the N prefix is varchar, and SQL Server rejects the call.

From the rule's source, executesql_non_unicode.rs.

Turn it on, off or suppress it

The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:executesql-non-unicode" = "off"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:executesql-non-unicode shows the same in the terminal. Found a false positive? Report it.