DatabaseProcApplicationCreatedLinks
sybsystemprocssp_helpconfig_gen_estimates_cpi  14 déc. 14Defects Propagation Dependencies

1     create or replace procedure sp_helpconfig_gen_estimates_cpi(
2         @memreqd_peruser_K unsigned bigint
3         , @numconcusers unsigned int
4         , @memreqd_cpinfo_K unsigned bigint
5         , @numcompobjs unsigned int
6         , @numcolumns unsigned int
7         , @numcompidxs unsigned int
8         , @numidxkeys unsigned int
9         , @configname varchar(80)
10        , @debug tinyint = 0
11    ) as
12        begin
13            declare @totalmemreqd_K unsigned bigint -- for all users
14                , @memreqd_K_str varchar(30)
15                , @sprocname varchar(20)
16    
17            if (@debug = 1)
18            begin
19                print "gen_estimates_cpi: memreqd_peruser_K: %1! KB numconcusers: %2! memreqd_cpinfo_K: %3! KB"
20                    , @memreqd_peruser_K, @numconcusers, @memreqd_cpinfo_K
21            end
22    
23            -- Estimate total memory reqd in KB by avg # of concurrent users
24            --
25            set @totalmemreqd_K = (@memreqd_peruser_K * @numconcusers)
26                + @memreqd_cpinfo_K
27    
28            print " "
29            print "For %1! concurrent users requesting memory from this pool,"
30                , @numconcusers
31            print "accessing %1! compressed objects with average %2! columns and %3! compressed indexes with average %4! index keys,"
32                , @numcompobjs
33                , @numcolumns
34                , @numcompidxs
35                , @numidxkeys
36            print "Estimated memory required is %1! KB!"
37                , @totalmemreqd_K
38    
39            print " "
40            set @memreqd_K_str = convert(varchar, @totalmemreqd_K) + 'K'
41    
42            -- Re-run the helpconfig sproc, converting the estimated total
43            -- memory required (in KB) back to config-param units.
44            --
45            set @sprocname = 'sp_helpconfig'
46            exec @sprocname @configname, @memreqd_K_str
47    
48            return 0
49        end
50    


exec sp_procxmode 'sp_helpconfig_gen_estimates_cpi', 'AnyMode'
go

Grant Execute on sp_helpconfig_gen_estimates_cpi to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_helpconfig_gen_estimates_cpi  
 MUCO 3 Useless Code Useless Brackets in create proc 1
 MUCO 3 Useless Code Useless Begin-End Pair 12
 MUCO 3 Useless Code Useless Brackets 17
 MUCO 3 Useless Code Useless Brackets 25
 MDYE 2 Dynamic Exec Marker exec @sprocname 46
 MTR1 2 Metrics: Comments Ratio Comments: 13% 1
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 3 = 2dec - 1exi + 2 1
 MTR3 2 Metrics: Query Complexity Complexity: 15 1

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_helpconfig  
   calls proc sybsystemprocs..sp_helpconfig_usage  
      calls proc sybsystemprocs..sp_getmessage  
         calls proc sybsystemprocs..sp_validlang  
            reads table master..syslanguages (1)  
         reads table master..sysmessages (1)  
         reads table master..syslanguages (1)  
         reads table sybsystemprocs..sysusermessages  
   reads table master..sysconfigures (1)  
   calls proc sybsystemprocs..sp_autoformat  
      writes table sybsystemprocs..sp_autoformat_rset_002 
      writes table sybsystemprocs..sp_autoformat_rset_005 
      calls proc sybsystemprocs..sp_namecrack  
      read_writes table tempdb..#colinfo_af (1) 
      reads table master..syscolumns (1)  
      writes table sybsystemprocs..sp_autoformat_rset_004 
      reads table tempdb..systypes (1)  
      writes table sybsystemprocs..sp_autoformat_rset_001 
      calls proc sybsystemprocs..sp_autoformat  
      reads table master..systypes (1)  
      reads table tempdb..syscolumns (1)  
      writes table sybsystemprocs..sp_autoformat_rset_003 
   writes table tempdb..#sphelpconfig2rs (1) 
   calls proc sybsystemprocs..sp_helpconfig_estimate  
   calls proc sybsystemprocs..sp_validateconfigname  
      writes table sybsystemprocs..sp_validateconfigname_rset_001 
      reads table master..sysconfigures (1)  
      reads table master..syscurconfigs (1)  
      calls proc sybsystemprocs..sp_getmessage  
   reads table master..syscurconfigs (1)  
   writes table tempdb..#sphelpconfig1rs (1) 
   reads table master..sysmessages (1)  
   calls proc sybsystemprocs..sp_getmessage  
   writes table tempdb..#sphelpconfig3rs (1) 
   calls proc sybsystemprocs..sp_aux_getsize  

CALLERS
called by proc sybsystemprocs..sp_helpconfig_est_compinfo_poolsize