SA0062A : Check all Functions in the current database for following specified naming convention |
![]() |
The topic describes the SA0062A analysis rule.

Check all Functions in the current database for following specified naming convention

The rule checks the naming of all functions in the current database.
Separate name patterns are available for each function types:
– Scalar Function
– Aggregate Function
– Table-Valued Function
– Partition Function
Regular expression patterns can be used, but the pattern must be prefixed with ‘regexp:’ string in order to be used as a matching regular expression.

Review the function name and rename it according to the naming convention.

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

Name | Description | Default Value |
---|---|---|
ScalarFunctionNamePattern |
Scalar function name pattern. |
regexp:ufn[A-Z][A-Za-z1-9_]+ |
ScalarFunctionSchemaQualifiedNamePattern |
Scalar function schema qualified name pattern. |
– |
TableValuedFunctionNamePattern |
Table-valued function name pattern. |
regexp:ufn[A-Z][A-Za-z1-9_]+ |
TableValuedFunctionSchemaQualifiedNamePattern |
Table-valued function schema qualified name pattern. |
– |
AggregateFunctionNamePattern |
Aggregate function name pattern. |
regexp:ufn[A-Z][A-Za-z1-9_]+ |
AggregateFunctionSchemaQualifiedNamePattern |
Aggregate function schema qualified name pattern. |
– |
PartitionFunctionNamePattern |
Partition function name pattern. |
regexp:[A-Z][A-Za-z1-9_]+PFN |

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


Naming Rules, Code Smells

There is no additional info for this rule.
