DatabaseProcApplicationCreatedLinks
sybsystemprocssp_helptext_usage  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** sp_helptext_usage
4     **
5     **	Print help/usage information for sp_helptext procedure, with
6     **	useful examples. Help info is generated by default when sp_helptext
7     **	is invoked with no arguments. This then calls into the extended
8     **	sproc, sp_showtext, which will generate its help/usage information.
9     {
10    */
11    create or replace procedure sp_helptext_usage
12    as
13        begin
14            declare @procname varchar(12)
15    
16            print "Usage: sp_helptext [ '@objname' [, @grouping_num] [, ... ] ]"
17    
18            print " "
19            print "  -- Generate text for a given procedure in a group, use either one of:"
20            print "	sp_helptext grouped_proc, 3"
21            print "	sp_helptext 'grouped_proc;3'"
22    
23            print " "
24            print "  -- To generate formatted SQL, use 'showsql' in @printopts, as:"
25            print "	sp_helptext sp_helptext, 5, 10, 'showsql'"
26    
27            print " "
28            select @procname = 'sp_showtext'
29            exec @procname
30    
31        end -- }
32    


exec sp_procxmode 'sp_helptext_usage', 'AnyMode'
go

Grant Execute on sp_helptext_usage to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_helptext_usage  
 MUCO 3 Useless Code Useless Begin-End Pair 13
 MDYE 2 Dynamic Exec Marker exec @procname 29
 MTR1 2 Metrics: Comments Ratio Comments: 30% 11
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 11
 MTR3 2 Metrics: Query Complexity Complexity: 13 11

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_showtext  
   reads table sybsystemprocs..syscomments  
   reads table master..syscurconfigs (1)  
   reads table sybsystemprocs..sysobjects  
   reads table master..syscomments (1)  
   calls proc sybsystemprocs..sp_showtext_usage  
      calls proc sybsystemprocs..sp_getmessage  
         reads table sybsystemprocs..sysusermessages  
         calls proc sybsystemprocs..sp_validlang  
            reads table master..syslanguages (1)  
         reads table master..syslanguages (1)  
         reads table master..sysmessages (1)  
   writes table tempdb..#syscomments (1) 
   calls proc sybsystemprocs..sp_namecrack  
   calls proc sybsystemprocs..sp_showtext_output  
      calls proc sybsystemprocs..sp_showtext_usage  
      calls proc sybsystemprocs..sp_showtext_print_line  
      calls proc sybsystemprocs..sp_getopts  
      calls proc sybsystemprocs..sp_showtext_sproc_tagline  
         calls proc sybsystemprocs..sp_help_params  
            calls proc sybsystemprocs..sp_autoformat  
               calls proc sybsystemprocs..sp_namecrack  
               writes table sybsystemprocs..sp_autoformat_rset_002 
               calls proc sybsystemprocs..sp_autoformat  
               writes table sybsystemprocs..sp_autoformat_rset_001 
               reads table tempdb..systypes (1)  
               writes table sybsystemprocs..sp_autoformat_rset_005 
               read_writes table tempdb..#colinfo_af (1) 
               writes table sybsystemprocs..sp_autoformat_rset_003 
               reads table master..systypes (1)  
               writes table sybsystemprocs..sp_autoformat_rset_004 
               reads table master..syscolumns (1)  
               reads table tempdb..syscolumns (1)  
            reads table sybsystemprocs..syscolumns  
            reads table sybsystemprocs..systypes  
            reads table master..spt_values (1)  
            reads table master..sysmessages (1)  
            reads table sybsystemprocs..sysxtypes  
            read_writes table tempdb..#helpproc (1) 
      calls proc sybsystemprocs..sp_showtext_check_print  
      reads table tempdb..#syscomments (1) 
      reads table sybsystemprocs..syscomments  
      calls proc sybsystemprocs..sp_getmessage  
   calls proc sybsystemprocs..sp_aux_checkroleperm  
      reads table master..sysconfigures (1)  
      reads table master..syscurconfigs (1)  

CALLERS
called by proc sybsystemprocs..sp_helptext