You can call the
The role change event is caused on the system instance when a database role change has completed. The eventType for this event is defined by the SDS_RoleChangeEvent global constant in the
The role change progress event is caused to notify applications about significant state changes that occur during a takeover operation.
The eventType of the role change progress event is defined by the SDS_RoleChangeProgress global constant in the
The userInfo parameter in a role change progress event contains a value representing the internal state, which can be one of the following
SDS_RoleUndefined (0)
SDS_PrimaryRoleActive (1)
SDS_SecondaryRoleActive (2)
SDS_TakeoverInitiated (3)
SDS_HostileTakeoverInitiated (4)
SDS_RelinquishPrimaryRole (5)
SDS_RelinquishSecondaryRole (6)
SDS_TakeoverFailure (7)
SDS_TakeoverAbandoned (8)
SDS_WaitForQuietPoint (9)
SDS_WaitForTakeoverDisposition (10)
SDS_PrimaryRoleRelinquished (11)
SDS_SecondaryRoleRelinquished (12)
When a hostile takeover occurs, the userInfo parameter on an SDS secondary contains SDS_HostileTakeoverInitiated (4). When a negotiated takeover occurs, the userInfo parameter contains SDS_TakeoverInitiated (3) for all servers involved in the takeover.