sdsAuditStopTracking

sdsAuditStopTracking(scope:   Integer;
                     reason:  Integer;
                     journal: Integer output;
                     offset:  Integer output);

The sdsAuditStopTracking method of the JadeDatabaseAdmin class specifies a system event number that is returned in the userInfo parameter of your user notification method when an SDS_TrackingStopped event occurs because of a programmatic, RPS node, or SDS Administration utility action or tracking is halted because of an error, to notify subscribers that tracking has been disabled.

When this method is invoked on the primary, it causes a Stop Tracking audit record to be written to the current journal. When this record is replayed on an RPS node or on an SDS secondary, tracking halts at that point in the audit trail.

The value of the scope parameter determines the type of secondary databases that actions the stop tracking command, and is represented by the SDSStopTrackingCodes category global constants listed in the following table.

Global Constant Integer Value Description
SDS_AuditStopTrackingAll 1 Stops tracking on all JADE and RPS secondary databases
SDS_AuditStopTrackingNative 2 Stops tracking on JADE native secondary databases
SDS_AuditStopTrackingRdb 3 Stops tracking on RPS secondary databases

The reason parameter determines the reason tracking was disabled, and is represented by the SDSStopTrackingCodes category global constants listed in the following table. This value is audited and passed to subscribers to the SDS_TrackingStopped system event in the userInfo parameter of the associated userNotify callback method.

Global Constant Integer Value
SDS_ReasonAdminAudited 1
SDS_ReasonAdminDirect 2
SDS_ReasonAutoUpgradeMismatch 6
SDS_ReasonDeltaModeEntered 12
SDS_ReasonEnablingDbCrypt 13
SDS_ReasonErrorHalt 8
SDS_ReasonRestart 10
SDS_ReasonRpsAdminHalt 4
SDS_ReasonRpsReorgHalt 9
SDS_ReasonRpsRestart 11
SDS_ReasonRpsSnapshot 3
SDS_ReasonTakeover 7
SDS_ReasonTransition 5

The SDS_ReasonTakeover value indicates that tracking stopped during a takeover operation and the SDS_ReasonRpsReorgHalt value indicates that tracking stopped at transition.

The SDS_ReasonErrorHalt value indicates that tracking halted due to an error condition (the error code is saved in the SDSSecondary or SDSSecondaryProxy dynamic lastErrorCode attribute).

The journal and offset output parameters contain the journal number and byte offset within the journal of the Stop Tracking audit record. These two values together comprise a Log Sequence Number (LSN). When tracking is restarted on the secondary or RPS node, it resumes at the next audit record.

Calling this method neither forces a quiet point nor closes the current journal.

The main purpose for this in an RPS context is to establish a journal trigger that coincides with a point-in-time on the primary database, to enable establishing a snapshot of the mapped extent in the target database frozen at that time.