DatabaseProcApplicationCreatedLinks
sybsystemprocssp_aux_encrkey_lookup  31 Aug 14Defects Dependencies

1     
2     create procedure sp_aux_encrkey_lookup
3     as
4         declare @dbname varchar(30)
5         begin --{ /* sp_aux_encrkey_lookup Start */
6             select @dbname = db_name()
7     
8             update #encrypted_table_info
9             set keyowner = user_name(o.uid)
10                , keyname = o.name
11            from sysobjects o
12            where o.id = keyid
13                and @dbname = keydbname
14        end --}
15    


exec sp_procxmode 'sp_aux_encrkey_lookup', 'AnyMode'
go

Grant Execute on sp_aux_encrkey_lookup to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_aux_encrkey_lookup  
 MGTP 3 Grant to public sybsystemprocs..sysobjects  
 MNER 3 No Error Check should check @@error after update 8
 MUCO 3 Useless Code Useless Begin-End Pair 5
 QJWT 3 Join or Sarg Without Index on temp table 12
 QNUA 3 Should use Alias: Column keyid should use alias #encrypted_table_info 12
 QNUA 3 Should use Alias: Column keydbname should use alias #encrypted_table_info 13
 MTR1 2 Metrics: Comments Ratio Comments: 7% 2
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 1 = 0dec - 1exi + 2 2
 MTR3 2 Metrics: Query Complexity Complexity: 8 2

DEPENDENCIES
PROCS AND TABLES USED
writes table tempdb..#encrypted_table_info (1) 
reads table sybsystemprocs..sysobjects