DatabaseProcApplicationCreatedLinks
sybsystemprocssp_monitor_disable_usage  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** sp_monitor_disable_usage
4     **
5     **	Generate help/usage information in terse/verbose mode.
6     {
7     */
8     create or replace procedure sp_monitor_disable_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 19272, @sqlmsg output
18            print @sqlmsg
19            exec sp_getmessage 19273, @sqlmsg output
20            print @sqlmsg
21    
22            if (@output_type = 'terse')
23            begin
24                return 0
25            end
26    
27            print " "
28            print "  -- Disable monitoring for a specific type, here for statements."
29            print "	sp_monitor disable, statement"
30    
31            print " "
32            print "  -- Disable monitoring for deadlock events"
33            print "	sp_monitor disable, deadlock"
34            print "	sp_monitor disable, 'deadlock monitoring'"
35    
36            print " "
37            print "  -- Disable monitoring for all types"
38            print "	sp_monitor disable"
39            print "	sp_monitor disable, 'all'"
40            print "	sp_monitor disable, 'all monitoring'"
41    
42            return 0
43    
44        end -- }
45    

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: 23 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)