DatabaseProcApplicationCreatedLinks
sybsystemprocssp_monitor_enable_usage  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** sp_monitor_enable_usage
4     **
5     **	Generate help/usage information in terse/verbose mode.
6     {
7     */
8     create or replace procedure sp_monitor_enable_usage(
9         @output_type varchar(10)
10        , @valid_type_names varchar(256)
11    ) as
12        begin
13            declare @sqlmsg varchar(256)
14    
15            print " "
16            -- First generate terse messages.
17            exec sp_getmessage 19270, @sqlmsg output
18            print @sqlmsg
19            exec sp_getmessage 19271, @sqlmsg output
20            print @sqlmsg
21    
22            if (@output_type = 'terse')
23            begin
24                return 0
25            end
26    
27            print " "
28            print "  -- Enable monitoring for a specific type, to monitor statements."
29            print "	sp_monitor enable, statement"
30            print "	sp_monitor enable, 'statement monitoring'"
31    
32            print " "
33            print "  -- Enable monitoring for connection monitoring"
34            print "	sp_monitor enable, connection"
35            print "	sp_monitor enable, 'connection monitoring'"
36    
37            print " "
38            print "  -- Enable monitoring for all types"
39            print "	sp_monitor enable"
40            print "	sp_monitor enable, 'all'"
41            print "	sp_monitor enable, 'all monitoring'"
42    
43            return 0
44    
45        end -- }
46    

DEFECTS
 MNER 3 No Error Check should check return value of exec 17
 MNER 3 No Error Check should check return value of exec 19
 MUCO 3 Useless Code Useless Brackets in create proc 8
 MUCO 3 Useless Code Useless Begin-End Pair 12
 MUCO 3 Useless Code Useless Brackets 22
 MTR1 2 Metrics: Comments Ratio Comments: 12% 8
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 2dec - 2exi + 2 8
 MTR3 2 Metrics: Query Complexity Complexity: 24 8

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_getmessage  
   reads table master..syslanguages (1)  
   reads table sybsystemprocs..sysusermessages  
   calls proc sybsystemprocs..sp_validlang  
      reads table master..syslanguages (1)  
   reads table master..sysmessages (1)