Database | Proc | Application | Created | Links |
sybsystemprocs | sp_showtext_sproc_tagline | 31 Aug 14 | Defects Dependencies |
1 2 /* 3 ** ************************************************************************** 4 ** sp_showtext_sproc_tagline 5 ** 6 ** Wrapper routine to show the create 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 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: 35% | 16 |
MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 1 = 1dec - 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 read_writes table tempdb..#helpproc (1) reads table sybsystemprocs..sysxtypes reads table sybsystemprocs..syscolumns calls proc sybsystemprocs..sp_autoformat reads table tempdb..syscolumns (1) calls proc sybsystemprocs..sp_autoformat reads table master..syscolumns (1) reads table tempdb..systypes (1) read_writes table tempdb..#colinfo_af (1) reads table master..systypes (1) calls proc sybsystemprocs..sp_namecrack reads table master..sysmessages (1) 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 |