DatabaseProcApplicationCreatedLinks
sybsystemprocssp_setpglockpromote_ptn  14 déc. 14Defects Propagation Dependencies

1     
2     /* Stored procedure for adding or modifying partition lock promotion attribute. 
3     ** Database attributes can only be modified when using Master.
4     */
5     
6     /*
7     ** Messages for "sp_setpglockpromote_ptn"
8     **
9     ** 17260, "Can't run %1! from within a transaction."
10    ** 17421, "No such database -- run sp_helpdb to list databases."
11    ** 17460, "Object must be in the current database."
12    ** 18090, "The target object does not exist."
13    ** 18158, "At least one of the parameters 'new_lwm', 'new_hwm' or 'new_pct' must be non-NULL to execute this procedure."
14    ** 18159, "You must be in the 'master' database to add, change or drop lock promotion attribute for a user database."
15    ** 18160, "Please specify a non-NULL value for %1, since it has not been set previously with a non-NULL value."
16    ** 18161, "Object name parameter must be NULL for Server-wide lock promotion attributes. Using NULL instead of - %1."
17    ** 18162, "'%1!' is a not a user table.  '%1' can be used only on user tables."
18    ** 18163, "The lock promotion LWM value %1 cannot be greater than the lock promotion HWM value %2."
19    ** 18164, "Invalid value specified for 'scope' parameter. Valid values are 'SERVER','DATABASE' or 'TABLE'."
20    ** 18165, "The 'lock promotion!' attributes of %1 '%2' have been changed. The new values are %3."
21    ** 18338, "Invalid obj_type parameter: '%1!'. Please specify 'PAGE' or 'ROW'."
22    */
23    
24    create or replace procedure sp_setpglockpromote_ptn
25        @scope varchar(10), /* table, database or server */
26        @objname varchar(767) = NULL, /* table or database name */
27        @new_lwm int = NULL, /* Lock promotion lwm value */
28        @new_hwm int = NULL, /* Lock promotion hwm value */
29        @new_pct int = NULL /* Lock promotion pct value */
30    as
31    
32        declare @status int
33    
34        exec @status = sp_setlockpromote_ptn "PAGE", @scope, @objname,
35            @new_lwm, @new_hwm, @new_pct
36        return (@status)
37    


exec sp_procxmode 'sp_setpglockpromote_ptn', 'AnyMode'
go

Grant Execute on sp_setpglockpromote_ptn to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_setpglockpromote_ptn  
 MNER 3 No Error Check should check return value of exec 34
 MUCO 3 Useless Code Useless Brackets 36
 MTR1 2 Metrics: Comments Ratio Comments: 72% 24
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 24
 MTR3 2 Metrics: Query Complexity Complexity: 4 24

DATA PROPAGATION detailed
ColumnWritten To
@new_hwmsysattributes.object_info2   °.char_value   sysattributes.object_info2   °.int_value   °.char_value   sp_dropdevice_rset_001.device sp_dropdevice_rset_001.device sp_forceonline_object_rset_001.Index °.status sp_forceonline_object_rset_002.Index
°.status sp_forceonline_page_rset_001.status sp_forceonline_page_rset_002.status sp_listsuspect_object_rset_001.Index °.Access sp_listsuspect_page_rset_001.Index °.Access sp_makesuspect_obj_rset_001.Indid °.LogType °.PageType
°.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_002.Indid °.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_003.Indid
°.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_passwordpolicy_rset_001.message sp_passwordpolicy_rset_002.value sp_passwordpolicy_rset_003.value sp_passwordpolicy_rset_004.Policy_option sp_rjs_retrieve_rset_001.host_name
sp_setsuspect_granularity_rset_001.Online mode sp_setsuspect_threshold_rset_001.Cfg. Suspect threshold sp_setsuspect_threshold_rset_002.Cfg. Suspect Threshold sp_ssladmin_rset_001.certificate_path sp_ssladmin_rset_002.Cipher Suite Name °.Preference
@new_lwmsysattributes.object_info1   °.char_value   sysattributes.object_info1   °.int_value   °.char_value   sp_dropdevice_rset_001.device sp_displayroles_rset_001.Role Name sp_displayroles_rset_002.Role Name sp_displayroles_rset_003.Role Name sp_displayroles_rset_004.Role Name
sp_dropdevice_rset_001.device sp_forceonline_object_rset_001.Object °.status sp_forceonline_object_rset_002.Object °.status sp_forceonline_page_rset_001.status sp_forceonline_page_rset_002.status sp_listsuspect_object_rset_001.Object °.Access sp_listsuspect_page_rset_001.Object
°.Access sp_makesuspect_obj_rset_001.Obj °.Indid °.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_002.Obj °.Indid
°.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_003.Obj °.Indid °.LogType °.PageType °.ErrType
°.Delay °.TotalNum sp_memlog_rset_001.dumps_per_file sp_passwordpolicy_rset_001.message sp_passwordpolicy_rset_002.value sp_passwordpolicy_rset_003.value sp_passwordpolicy_rset_004.Policy_option sp_rjs_retrieve_rset_001.host_name sp_setsuspect_granularity_rset_001.Online mode sp_ssladmin_rset_001.certificate_path
sp_ssladmin_rset_002.Cipher Suite Name °.Preference
@new_pctsysattributes.object_info3   °.char_value   sysattributes.object_info3   °.int_value   °.char_value   sp_dropdevice_rset_001.device sp_dropdevice_rset_001.device sp_forceonline_object_rset_001.status sp_forceonline_object_rset_002.status sp_forceonline_page_rset_001.status
sp_forceonline_page_rset_002.status sp_listsuspect_object_rset_001.Access sp_listsuspect_page_rset_001.Access sp_makesuspect_obj_rset_001.Indid °.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_002.Indid
°.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_003.Indid °.LogType °.PageType °.ErrType °.Delay
°.TotalNum sp_passwordpolicy_rset_001.message sp_passwordpolicy_rset_002.value sp_passwordpolicy_rset_003.value sp_passwordpolicy_rset_004.Policy_option sp_rjs_retrieve_rset_001.host_name sp_setsuspect_granularity_rset_001.Online mode sp_ssladmin_rset_001.certificate_path sp_ssladmin_rset_002.Cipher Suite Name °.Preference

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_setlockpromote_ptn  
   reads table sybsystemprocs..sysobjects  
   read_writes table master..sysattributes (1)  
   reads table master..sysdatabases (1)  
   read_writes table sybsystemprocs..sysattributes  
   calls proc sybsystemprocs..sp_getmessage  
      reads table master..syslanguages (1)  
      calls proc sybsystemprocs..sp_validlang  
         reads table master..syslanguages (1)  
      reads table master..sysmessages (1)  
      reads table sybsystemprocs..sysusermessages  
   calls proc sybsystemprocs..sp_aux_checkroleperm  
      reads table master..sysconfigures (1)  
      reads table master..syscurconfigs (1)