Running Global Projects
Recovery from Reverse Propagation Errors
: Querying Database Properties
Querying Database Properties
The latest session number, and the NACCNT, HCCNT and CLCCNT attributes are properties of the database file, and must be queried at each location. One way to do this is to include these queries in a post-update propagation macro, which can be run from a script specified by the EXECB attribute of the Update timer (LCOMD)
The latest session for a database may be queried by using Q SESSIONS <dbname>, for example
Q SESSIONS MYTEAM/DESI
The database properties NACCNT, HCCNT and CLCCNT may be queried in the normal way by navigating to the DB element for the database, for example, /*MYTEAMDESI. Attributes. It should be emphasised that these attributes are properties of the database file, and may differ at each location.
Alternatively, a PML object <DB> may be constructed for the database:
!DD = OBJECT DB (‘/*MYTEAM/DESI’)
Then the properties may be queried:
!DD.NACCNT
!DD.HCCNT
!DD.CLCCNT
!DD.LatestSession()
Note that the last property is a member, not a method. Primary location and filename may also be queried:
!DD.FileName
!DD.Prmloc
The same properties may be queried for a database at a remote location ABC by using:
Q REMOTE ABC MYTEAM/DESI FILEDETAILS
Q REMOTE ABC MYTEAM/DESI LASTSESSION
The FILEDETAILS option returns the Compaction number (NACCNT), last session, Extract list/Header changes count (HCCNT) and Claim changes count (CLCCNT) for the database at the specified location. These may be compared with the local values.
Note:
These commands return data in CSV format when used with a variable e.g.
!REMOTE ABC MYTEAM/DESI FILEDETAILS
However, the Daemon trace log does include this information if the right Trace level is turned on. (Trace bit 3). This information is only present in the log of the location which issued the Update. The relevant lines might read:
(6) At Tue Oct 04 01:03:24 2005 Processing DB %ABC000%/abc2315_0001
(6) At Tue Oct 04 01:03:24 2005 Compaction numbers: local 0 remote 0
(6) At Tue Oct 04 01:03:24 2005 Session numbers: local 3 remote 2
(6) At Tue Oct 04 01:03:24 2005 Claim Changes counts: local 17 remote 1
(6) At Tue Oct 04 01:03:24 2005 Extract List counts: local 3 remote 10
In this case this indicates that the current location has a more recent session than the remote location. The Claim count only applies to a session, so its value will be ignored unless the session numbers are the same. In this example, the implied propagation direction is from the current location to the remote location.
However, before making the update, the Daemon checks the update direction, to make sure that the propagation direction is consistent with the direction away from the primary location of the database. If this check fails, then the ‘Prevented reverse propagation’ error causes the update to fail.
Occasionally, it is not possible for the daemon to check the Update direction (Global db may be in use). In this case, the failure will read ‘Update skipped’. This is normally a temporary problem, and the database will be propagated as normal on the next scheduled update.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.