Database | Proc | Application | Created | Links |
sybsystemprocs | sp_tran_dumpable_status | 31 Aug 14 | Defects Dependencies |
1 2 3 /* 4 ** This stored procedure translates to text the bitmap 5 ** returned by the built-in tran_dumpable_status(). 6 ** 7 ** Parameters: 8 ** @dbname - DB name to query or NULL for current 9 ** 10 */ 11 create procedure sp_tran_dumpable_status @dbname sysname = NULL 12 as 13 begin 14 declare @status int 15 16 if (@dbname is null) 17 select @dbname = db_name() 18 19 select @status = tran_dumpable_status(@dbname) 20 21 select bit = power(2, a.number), description = a.name 22 from master.dbo.spt_values a, master.dbo.spt_values c 23 where c.type = 'P' 24 and a.type = 'DX' 25 and c.low <= datalength(@status) 26 and a.number = c.number 27 and convert(tinyint, substring(@status, c.low, 1)) & c.high != 0 28 29 return (0) 30 end 31 32
exec sp_procxmode 'sp_tran_dumpable_status', 'AnyMode' go Grant Execute on sp_tran_dumpable_status to public go
RESULT SETS | |
sp_tran_dumpable_status_rset_001 |
DEFECTS | |
TNOU 4 Table with no unique index master..spt_values | master..spt_values |
MGTP 3 Grant to public master..spt_values | |
MGTP 3 Grant to public sybsystemprocs..sp_tran_dumpable_status | |
MUCO 3 Useless Code Useless Begin-End Pair | 13 |
MUCO 3 Useless Code Useless Brackets | 16 |
MUCO 3 Useless Code Useless Brackets | 29 |
QNAJ 3 Not using ANSI Inner Join | 22 |
QSWV 3 Sarg with variable @status, Candidate Index: spt_values.spt_valuesclust clustered(number, type) U | 25 |
MRST 2 Result Set Marker | 21 |
MTR1 2 Metrics: Comments Ratio Comments: 19% | 11 |
MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 | 11 |
MTR3 2 Metrics: Query Complexity Complexity: 15 | 11 |
PRED_QUERY_COLLECTION 2 {sv=master..spt_values, sv2=master..spt_values} 0 | 21 |
DEPENDENCIES |
PROCS AND TABLES USED reads table master..spt_values (1) |