SEM006 : Count of SQL modules

The topic describes the SEM006 analysis rule.

Message

Count of SQL modules

Description

Metrics rule – counts CREATE statements of stored procedure, trigger, function and views.

How to fix

The rule is only informational.

Scope

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

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Effort To Fix
Not configured.
Categories

Metrics

Additional Information

There is no additional info for this rule.

Example Test SQL
SQL
 1CREATE PROCEDURE testsp_CyclomaticComplexityTest
 2AS
 3BEGIN TRY
 4
 5    IF (12 <1 ) 
 6        SELECT 1
 7    ELSE
 8        SELECT 2
 9
10END TRY
11BEGIN CATCH
12
13    IF (12 <1 ) 
14        SELECT 1
15    ELSE
16        SELECT 2
17
18END CATCH
19
20IF (12 <1 ) 
21    SELECT 1
22ELSE
23    IF (12 <1 ) 
24        SELECT 1
25    ELSE
26        SELECT 2
27
28RETURN;
29
30IF (12>1) 
31    SELECT 4
32ELSE
33    SELECT 5

Analysis Results
  Message Line Column
1 SEM006 : SqlModulesCount=1 1 0
See Also

Other Resources