SA0042A : Avoid using special characters in object names

The topic describes the SA0042A analysis rule.


Avoid using special characters in object names


The rule checks the current context for database objects with special characters in the name.

Naming a database object by using any special character (space, tab, newline, left square bracket, right square bracket, single quotation mark and double quotation mark) will make it more difficult not only to reference that object, but also to read code that contains the name of that object.

How to fix

Rename the reported database object and remove the special characters from its name.


The rule has a ContextOnly scope and is applied only on current server and database schema.


Rule has no parameters.


The rule requires Analysis Context. If context is missing, the rule will be skipped during analysis.

Effort To Fix
20 minutes per issue.

Naming Rules, Code Smells

Additional Information

There is no additional info for this rule.

See Also

Other Resources