DatabaseProcApplicationCreatedLinks
sybsystemprocssp_droprowlockpromote_ptn  14 déc. 14Defects Propagation Dependencies

1     
2     /* Stored procedure for dropping lock promotion attributes. 
3     ** Database attributes can only be modified when using Master.
4     */
5     
6     /*
7     ** Messages for "sp_droprowlockpromote_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    ** 18159, "You must be in the 'master' database to add, change or drop lock promotion attribute for a user database."
14    ** 18162, "'%1!' is a not a user table. '%2' can be used only on user tables."
15    ** 18166, "Lock promotion attribute does not exist for %1, '%2'. Cannot delete it."
16    ** 18167, "Lock promotion attribute of object '%1!' has been dropped!."
17    ** RESOLVE: Add SERVER and PARTITION
18    ** 18168, "Invalid value '%1', specified for 'scope' parameter. Valid values are 'DATABASE' or 'TABLE'."
19    ** 18338, "Invalid obj_type parameter: '%1!'. Please specify 'PAGE' or 'ROW'."
20    */
21    
22    create or replace procedure sp_droprowlockpromote_ptn
23        @scope varchar(10), /* partition, table, database or server */
24        @objname varchar(767) = NULL /* "table.partition", table or database name */
25    as
26    
27    
28        declare @status int
29    
30        exec @status = sp_droplockpromote_ptn "ROW", @scope, @objname
31        return (@status)
32    


exec sp_procxmode 'sp_droprowlockpromote_ptn', 'AnyMode'
go

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

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_droplockpromote_ptn  
   calls proc sybsystemprocs..sp_aux_checkroleperm  
      reads table master..sysconfigures (1)  
      reads table master..syscurconfigs (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  
   reads table master..sysdatabases (1)  
   reads table sybsystemprocs..sysobjects