ince V10.1C the master block in Progress database contains at least 95 fields including three fields that are not reported by dbrpr utility. Some of the fields are obsolete. There are the fields that were removed from master block (like mb_dsrCRArea that existed only in V10.0A). Other fields match the ones in _MstrBlk and _DbStatus tables - so they are documented. But there are a lot of the fields in master blocks that are not documented. Below I have attached the masterblock.txt file with the list of the master block’s fields with their description. Any additional information is welcomed.
Also I attached the masterblock.sh script and the masterblock.p program. Both can read the fields of master block from disk. Both can be used for database versions from 10.0A to 12.0.
masterblock.sh dbname [field …]If you will not specify the list of the master block’s fields the script will report all of them. The “mb_” prefix is not mandatory in the field’s names.
Or run the masterblock.p program and choose a .db file. The program will add the dump of master block to the masterblock.dump.txt file that can be opened in Excel. So you can check how the fields in master blocks are changing over the time.
Update: masterblock.sh is replaced by new version that fixes the issue on AIX.
I didn't see anything obvious but you are more eagle-eyed than I -- is there anything in there that tells you if a replication enabled db is a source or a target vs simply being enabled?
Unfortunately the _repl-server VST vanishes at runtime if the replication server is not actually running :(
I tried this on 3 repl-enabled 11.7.2 databases on AIX and mb_replEnabled returns 1 on the src and 66 on the target. I have no idea if that is definitive or not.
0 = Replication is not enabled1 = Source2 = Target
Other differences between the master block’s fields in source and target databases:
mb_repl* fields (except mb_replEnabled) are not zeroes only in source databases.
mb_maxArgnclts is 32000 in target databases. In most cases it’s zero in source databases but for one source db it was 5001 instead of 0.
mb_dsrCRAISeq is 0 if replcation is not enabled, 1 in target databases and 2 or higher in source databases.
mb_ai.* fields are zeroes if after-image logging is not enabled. In most cases it’s true for target databases.
George Potemkin any idea why I am seeing 66?
Same source database, AIX 6.1, OE 11.7.2:
mb_dsrCRAISeq seems to change at every execution of masterblock.sh:
$ ./masterblock.sh db 2>/dev/null | grep -e Argn -e repl -e CRA
mb_replai.aibegin ERROR (seconds since Jan 01, 1970)
mb_replai.ainew ERROR (seconds since Jan 01, 1970)
mb_replai.aiopen 1555457031 (seconds since Jan 01, 1970)
mb_repllstmod ERROR (seconds since Jan 01, 1970)
mb_replai.aibegin 1555456888 (seconds since Jan 01, 1970)
mb_replai.ainew 1555457031 (seconds since Jan 01, 1970)
mb_repllstmod 1555435515 (seconds since Jan 01, 1970)
And running against the target, again AIX 6.1 OE 11.7.2:
mb_replai.aiopen ERROR (seconds since Jan 01, 1970)
mb_replai.aibegin 1555456768 (seconds since Jan 01, 1970)
mb_replai.ainew 1555457024 (seconds since Jan 01, 1970)
mb_replai.aiopen 1555457024 (seconds since Jan 01, 1970)
mb_repllstmod 1555435264 (seconds since Jan 01, 1970)
From masterblock.p No errors but still not what you expected. FYI: note the space in "mb_ replFlags" in the dump.txt file.
mb_ replFlags 0
$ ./viewdbblock.sh db 64
viewdbblock.sh: wrong area number (64).
Today is not my day. ;-(
It should be 'viewdbblock.sh db 6 64' where 6 is the area number and 64 is dbkey of master block provided db blocksize is 8K.
viewdbblock.sh db works:
mb_replEnabled: 0x01 1
mb_replRET: 0x5cb62c4e 1555442766
mb_maxArgnclts: 0x00000000 0
mb_replFlags: 0x00000000 0
mb_dsrCRAISeq: 0x0000005d 93
mb_replEnabled: 0x42 66
mb_maxArgnclts: 0x00007d00 32000
mb_dsrCRAISeq: 0x00000001 1
I still don't have an idea why the target's mb_replEnabled is 66 on AIX. Not all secrets of master blocks are revealed!
viewdbblock.sh db 6 64 returns the same result as without the "6 64" at the end.
Paul, can you send me the full results of both scripts and masterblock.p? I would like to compare the results on AIX with my collaction of master block's dumps.