DatabaseProcApplicationCreatedLinks
sybsystemprocssp_showtext_sproc_tagline  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** **************************************************************************
4     ** sp_showtext_sproc_tagline
5     **
6     **	Wrapper routine to show the create or replace procedure tagline for the
7     **	object that is being decoded.
8     **
9     ** Parameters:
10    **	@objname	- Name of compiled object.
11    **
12    ** Returns:
13    **	Nothing.
14    {
15    */
16    create or replace procedure sp_showtext_sproc_tagline(
17        @objname varchar(317)
18        , @objtype varchar(2)
19    ) as
20        begin
21            declare @command varchar(300)
22    
23            if (object_id(@objname) IS NULL)
24            begin
25                raiserror 17461
26                return 1
27            end
28    
29            select @command = "CREATE "
30                + case @objtype
31                    when "P" then "PROCEDURE"
32                    when "TR" then "TRIGGER"
33                    when "V" then "VIEW"
34                    when "R" then "RULE"
35                    when "D" then "DEFAULT"
36                    when "F" then "FUNCTION"
37                    else "<Unknown object type>"
38                end
39                + " "
40                + @objname
41            print " "
42            print " %1!", @command
43    
44            -- Call the work-horse function to extract args from syscolumns.
45            set nocount on
46    
47            exec sp_help_params @objname, @@langid
48    
49            print " "
50    
51        end -- }
52    


exec sp_procxmode 'sp_showtext_sproc_tagline', 'AnyMode'
go

Grant Execute on sp_showtext_sproc_tagline to public
go
DEFECTS
 MBPA 6 Not a parameter of this proc sybsystemprocs..sp_help_params: parameter # 2 47
 MTYP 4 Assignment type mismatch null = int 47
 MGTP 3 Grant to public sybsystemprocs..sp_showtext_sproc_tagline  
 MNER 3 No Error Check should check return value of exec 47
 MUCO 3 Useless Code Useless Brackets in create proc 16
 MUCO 3 Useless Code Useless Begin-End Pair 20
 MUCO 3 Useless Code Useless Brackets 23
 MTR1 2 Metrics: Comments Ratio Comments: 36% 16
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 2dec - 2exi + 2 16
 MTR3 2 Metrics: Query Complexity Complexity: 12 16

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_help_params  
   reads table sybsystemprocs..systypes  
   calls proc sybsystemprocs..sp_autoformat  
      writes table sybsystemprocs..sp_autoformat_rset_002 
      reads table tempdb..systypes (1)  
      writes table sybsystemprocs..sp_autoformat_rset_001 
      reads table master..systypes (1)  
      calls proc sybsystemprocs..sp_autoformat  
      writes table sybsystemprocs..sp_autoformat_rset_003 
      writes table sybsystemprocs..sp_autoformat_rset_005 
      reads table tempdb..syscolumns (1)  
      reads table master..syscolumns (1)  
      writes table sybsystemprocs..sp_autoformat_rset_004 
      calls proc sybsystemprocs..sp_namecrack  
      read_writes table tempdb..#colinfo_af (1) 
   reads table master..sysmessages (1)  
   reads table sybsystemprocs..sysxtypes  
   read_writes table tempdb..#helpproc (1) 
   reads table sybsystemprocs..syscolumns  
   reads table master..spt_values (1)  

CALLERS
called by proc sybsystemprocs..sp_showtext_output  
   called by proc sybsystemprocs..sp_showtext  
      called by proc sybsystemprocs..sp_helptext_usage  
         called by proc sybsystemprocs..sp_helptext  
      called by proc sybsystemprocs..sp_helptext