DatabaseProcApplicationCreatedLinks
sybsystemprocssp_hadr_status  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** INTERNAL ONLY - used by hadr split brain detection
4     **
5     ** SP_HADR_STATUS
6     ** This procedure is executed by a remote hadr server when it wants to
7     ** check our status
8     **
9     */
10    create or replace procedure sp_hadr_status(@mode int output, @state int output, @servername varchar(30) output, @group varchar(30) output) as
11    
12        select @mode = @@hadr_mode
13        select @state = @@hadr_state
14        if @@servername = null select @servername = "NULL" else select @servername = @@servername
15        select @group = srvname from master..sysservers where srvclass = 17
16    
17        return
18    


exec sp_procxmode 'sp_hadr_status', 'AnyMode'
go

Grant Execute on sp_hadr_status to public
go
DEFECTS
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 15
 MGTP 3 Grant to public master..sysservers  
 MGTP 3 Grant to public sybsystemprocs..sp_hadr_status  
 MNAC 3 Not using ANSI 'is null' 14
 MUCO 3 Useless Code Useless Brackets in create proc 10
 QAFM 3 Var Assignment from potentially many rows 15
 MTR1 2 Metrics: Comments Ratio Comments: 22% 10
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 3 = 2dec - 1exi + 2 10
 MTR3 2 Metrics: Query Complexity Complexity: 11 10

DEPENDENCIES
PROCS AND TABLES USED
reads table master..sysservers (1)