Click or drag to resize

SA0063B : Check view names used in CREATE VIEW statements for following specified naming convention. (Batch)

The topic describes the SA0063B analysis rule.

Message

Check view names used in CREATE VIEW statements for following specified naming convention. (Batch)

Description

The rule checks view names used in CREATE VIEW 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

View name pattern.

regexp:v[A-Z][A-Za-z1-9_]+

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 VIEW dbo.Customers
 2AS
 3--Select from local member table.
 4SELECT *
 5FROM CompanyData.dbo.Customers_33
 6UNION ALL
 7--Select from member table on Server2.
 8SELECT *
 9FROM Server2.CompanyData.dbo.Customers_66
10UNION ALL
11--Select from mmeber table on Server3.
12SELECT *
13FROM Server3.CompanyData.dbo.Customers_99

Analysis Results

 MessageLineColumn
1SA0063B : The view [dbo].[Customers] does not match the naming convention. The expected key name is [v[A-Z][A-Za-z1-9_]+].116
See Also

Other Resources