DatabaseProcApplicationCreatedLinks
sybsystemprocssp_namecrack  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */
3     /*	4.8	1.1	06/14/90	sproc/src/lock */
4     
5     create or replace procedure sp_namecrack
6         @name varchar(1023),
7         @site varchar(255) = null output,
8         @db varchar(255) = null output,
9         @owner varchar(255) = null output,
10        @object varchar(255) = null output
11    as
12    
13    
14        if @@trancount = 0
15        begin
16            set chained off
17        end
18    
19        set transaction isolation level 1
20    
21        select @site = null, @db = null, @owner = null, @object = null
22    
23        /*
24        **  Is there a site name?
25        */
26        if @name like "%.%.%.%"
27        begin
28            select @site = substring(@name, 1, charindex(".", @name) - 1)
29            select @name = substring(@name, charindex(".", @name) + 1, 1025)
30        end
31    
32        /*
33        **  Is there a database name?
34        */
35        if @name like "%.%.%"
36        begin
37            select @db = substring(@name, 1, charindex(".", @name) - 1)
38            select @name = substring(@name, charindex(".", @name) + 1, 1025)
39        end
40    
41        /*
42        **  Is there a owner?
43        */
44        if @name like "%.%"
45        begin
46            select @owner = substring(@name, 1, charindex(".", @name) - 1)
47            select @name = substring(@name, charindex(".", @name) + 1, 1025)
48        end
49    
50        select @object = @name
51    
52        return (0)
53    


exec sp_procxmode 'sp_namecrack', 'AnyMode'
go

Grant Execute on sp_namecrack to public
go
DEFECTS
 MTYP 4 Assignment type mismatch @object: varchar(255) = varchar(1023) 50
 MGTP 3 Grant to public sybsystemprocs..sp_namecrack  
 MUCO 3 Useless Code Useless Brackets 52
 QISO 3 Set isolation level 19
 MTR1 2 Metrics: Comments Ratio Comments: 13% 5
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 6 = 5dec - 1exi + 2 5
 MTR3 2 Metrics: Query Complexity Complexity: 20 5

DEPENDENCIES
CALLERS
called by proc sybsystemprocs..sp_setreplicate  
called by proc sybsystemprocs..sp_optimal_text_space  
   called by proc sybsystemprocs..sp_chgattribute  
called by proc sybsystemprocs..sp_spaceusage  
called by proc sybsystemprocs..sp_setrepproc  
called by proc sybsystemprocs..sp_help  
called by proc sybsystemprocs..sp_replication_path  
called by proc sybsystemprocs..sp_setreptable  
called by proc sybsystemprocs..sp_addobjectdef  
   called by proc sybsystemprocs..sp_addtabledef  
called by proc sybsystemprocs..sp_helpobjectdef  
called by proc sybsystemprocs..sp_spaceused  
called by proc sybsystemprocs..sp_autoformat  
   called by proc sybsystemprocs..sp_setreplicate  
   called by proc sybsystemprocs..sp_ijdbc_aux_computeprivs  
   called by proc sybsystemprocs..sp_fkeys  
   called by proc sybsystemprocs..sp_helpuser  
   called by proc sybsystemprocs..sp_dbrecovery_order  
   called by proc sybsystemprocs..sp_monitor_connection  
   called by proc sybsystemprocs..sp_options  
   called by proc sybsystemprocs..sp_helpobjectdef  
   called by proc sybsystemprocs..sp_helpthread  
   called by proc sybsystemprocs..sp_displaylogin  
   called by proc sybsystemprocs..sp_depends  
   called by proc sybsystemprocs..sp_monitor_event  
   called by proc sybsystemprocs..sp_helplanguage  
   called by proc sybsystemprocs..sp_helprotect  
   called by proc sybsystemprocs..sp_column_privileges  
   called by proc sybsystemprocs..sp_helpextendedproc  
   called by proc sybsystemprocs..sp_setreptable  
   called by proc sybsystemprocs..sp_helpdb  
   called by proc sybsystemprocs..sp_helpjava  
   called by proc sybsystemprocs..sp_helpthreshold  
   called by proc sybsystemprocs..sp_helpsegment  
   called by proc sybsystemprocs..sp_replication_path  
   called by proc sybsystemprocs..sp_helptrigger  
   called by proc sybsystemprocs..sp_helpconstraint  
   called by proc sybsystemprocs..sp_config_rep_agent  
   called by proc sybsystemprocs..sp_help  
   called by proc sybsystemprocs..sp_setrepproc  
   called by proc sybsystemprocs..sp_setrepcol  
   called by proc sybsystemprocs..sp_helpgroup  
      called by proc sybsystemprocs..sp_helpuser  
   called by proc sybsystemprocs..sp_logintrigger  
      called by proc sybsystemprocs..sp_modifylogin  
   called by proc sybsystemprocs..sp_help_qplan  
      called by proc sybsystemprocs..sp_cmp_all_qplans  
   called by proc sybsystemprocs..sp_encryption  
      called by proc sybsystemprocs..sp_downgrade  
   called by proc sybsystemprocs..sp_config_dump  
      called by proc sybsystemprocs..sp_downgrade_dump_config  
   called by proc sybsystemprocs..sp_helpkey  
      called by proc sybsystemprocs..sp_help  
   called by proc sybsystemprocs..sp_helpexternlogin  
   called by proc sybsystemprocs..sp_dropuser  
   called by proc sybsystemprocs..sp_helpindex  
      called by proc sybsystemprocs..sp_help  
   called by proc sybsystemprocs..sp_autoformat  
   called by proc sybsystemprocs..sp_help_qpgroup  
   called by proc sybsystemprocs..sp_securityprofile  
   called by proc sybsystemprocs..sp_helpjoins  
   called by proc sybsystemprocs..sp_dump_history  
   called by proc sybsystemprocs..sp_helpcache  
   called by proc sybsystemprocs..sp_remoteoption  
   called by proc sybsystemprocs..sp_estspace  
   called by proc sybsystemprocs..sp_downgrade  
   called by proc sybsystemprocs..sp_spaceused  
   called by proc sybsystemprocs..sp_helpremotelogin  
   called by proc sybsystemprocs..sp_monitor_procstack  
   called by proc sybsystemprocs..sp_monitor_deadlock_count_by  
      called by proc sybsystemprocs..sp_monitor_deadlock  
         called by proc sybsystemprocs..sp_monitor  
   called by proc sybsystemprocs..sp_who  
   called by proc sybsystemprocs..sp_help_rep_agent  
   called by proc sybsystemprocs..sp_helpdefrag  
   called by proc sybsystemprocs..sp_helpartition  
      called by proc sybsystemprocs..sp_help  
   called by proc sybsystemprocs..sp_help_params  
      called by proc sybsystemprocs..sp_help  
      called by proc sybsystemprocs..sp_showtext_sproc_tagline  
         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  
   called by proc sybsystemprocs..sp_multdb_show  
      called by proc sybsystemprocs..sp_tempdb  
   called by proc sybsystemprocs..sp_aux_computeprivs  
      called by proc sybsystemprocs..sp_column_privileges  
      called by proc sybsystemprocs..sp_table_privileges  
   called by proc sybsystemprocs..sp_monitor_list  
   called by proc sybsystemprocs..sp_lookup  
   called by proc sybsystemprocs..sp_showcontrolinfo  
   called by proc sybsystemprocs..sp_passwordpolicy  
      called by proc sybsystemprocs..sp_downgrade  
   called by proc sybsystemprocs..sp_help_resource_limit  
   called by proc sybsystemprocs..sp_dwngd_helpindex  
   called by proc sybsystemprocs..sp_helpconfig  
      called by proc sybsystemprocs..sp_helpconfig_gen_estimates_cpi  
         called by proc sybsystemprocs..sp_helpconfig_est_compinfo_poolsize  
   called by proc sybsystemprocs..sp_dboption_flmode  
      called by proc sybsystemprocs..sp_dboption  
   called by proc sybsystemprocs..sp_monitor_statement  
   called by proc sybsystemprocs..sp_hadr_admin  
      called by proc sybsystemprocs..sp_hadr_update  
   called by proc sybsystemprocs..sp_monitor_procedure  
   called by proc sybsystemprocs..sp_monitor_list_montypes  
      called by proc sybsystemprocs..sp_monitor_list  
   called by proc sybsystemprocs..sp_pkeys  
   called by proc sybsystemprocs..sp_spaceusage_object_genoutput  
      called by proc sybsystemprocs..sp_spaceusage_object  
         called by proc sybsystemprocs..sp_spaceusage  
   called by proc sybsystemprocs..sp_helpmaplogin  
   called by proc sybsystemprocs..sp_spaceusage_tranlog_genoutput  
      called by proc sybsystemprocs..sp_spaceusage_tranlog  
         called by proc sybsystemprocs..sp_spaceusage  
   called by proc sybsystemprocs..sp_downgrade_esd  
   called by proc sybsystemprocs..sp_objectsegment  
   called by proc sybsystemprocs..sp_indsuspect  
   called by proc sybsystemprocs..sp_helpcomputedcolumn  
      called by proc sybsystemprocs..sp_help  
      called by proc sybsystemprocs..sp_helpindex  
   called by proc sybsystemprocs..sp_helpdevice  
   called by proc sybsystemprocs..sp_ddlgen_database  
   called by proc sybsystemprocs..sp_version  
   called by proc sybsystemprocs..sp_cacheconfig  
      called by proc sybsystemprocs..sp_do_poolconfig  
         called by proc sybsystemprocs..sp_poolconfig  
   called by proc sybsystemprocs..sp_helpapptrace  
   called by proc sybsystemprocs..sp_configure  
      called by proc sybsystemprocs..sp_setlockpromote  
         called by proc sybsystemprocs..sp_setpglockpromote  
         called by proc sybsystemprocs..sp_setrowlockpromote  
      called by proc sybsystemprocs..sp_configure  
      called by proc sybsystemprocs..sp_downgrade_esd  
   called by proc sybsystemprocs..sp_helpserver  
   called by proc sybsystemprocs..sp_addthreshold  
called by proc sybsystemprocs..sp_showtext  
called by proc sybsystemprocs..sp_helpdefrag  
called by proc sybsystemprocs..sp_setrepdefmode  
called by proc sybsystemprocs..sp_setrepcol  
called by proc sybsystemprocs..sp_modifylogin  
called by proc sybsystemprocs..sp_defaultloc