Click or drag to resize

SA0064B : Check stored procedure names used in CREATE PROCEDURE statements for following specified naming convention. (Batch)

The topic describes the SA0064B analysis rule.

Message

Check stored procedure names used in CREATE PROCEDURE statements for following specified naming convention. (Batch)

Description

The rule checks stored procedure names used in CREATE PROCEDURE statements.

The NamePattern variable can be used to select or define the desired pattern which will be used to check the object name.

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.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters
NameDescriptionDefault Value
NamePattern

Stored procedure name pattern.

regexp:usp[A-Z][A-Za-z]+

SchemaQualifiedNamePattern

Schema qualified name pattern.

-

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

Naming Rules

Additional Information

There is no additional info for this rule.

Example Test Script
1CREATE PROCEDURE HumanResources.usp_GetAllEmployees
2AS
3    SELECT LastName, FirstName, JobTitle, Department
4    FROM HumanResources.vEmployeeDepartment;

Analysis Results

 MessageLineColumn
1SA0064B : The procedure [HumanResources].[usp_GetAllEmployees] does not match the naming convention. The expected key name is [usp[A-Z][A-Za-z]+].132
See Also

Other Resources