How to run ‘proutil -C cmpdb’?

Can anyone remind me how to run ‘proutil -C cmpdb’?
proutil -C cmpdb -help
proutil <db-name> -C cmpdb <db-name1> <db-name2> [ -t | -l | -l2 ] [ -Passphrase ]


But I’m getting:
Invalid cmpdb option: <db-name1>

And with anything as <db-name>:
You must supply a database name. (940)
 
That's what I get too. This must be an undocumented feature added for tech support? I can't find any reference to it in the docs or the KB. It also isn't listed in proutil -help.
 
cmpdb exists at least since Progress V5. It was a separate executable at the beginning but later in V9 the option became a part of the _dbutil. Most recent changes were done in V11.3 (if we can trust $DLC/prohelp/msgdata).

After asking the question I remembered the correct syntax:
proutil (or dbutil) cmpdb <db-name1> <db-name2> [ -t | -l | -l2 | -l3 ] [ -Passphrase ]

No needs of the -C.

-t | -l parameters extends the report:

-l:
mb-lstmod
bk-updctr

-t:
mb-biopen
mb-rltime
mb-bistate
mb-cprdate
mb-oppdate
mb-time-stamp
mb-fbdate
mb-hiwater

If no -l3 option on the command line of cmpdb the _Db and _Db-Detail table records will be skipped because we know they will be different. (see msg # 16732)

I do not remember what the -l2 did but it existed according my old notes since V9.
 
Last edited:
Interesting! Apparently it has some expectations for similarity between the databases.

Compare 2 db has fewer user areas than the Compare 1 db. (17101)
There are other cmpdb-related messages at 17102 and beyond.
 
I ran this on two slightly different copies of sports2020 and got a lot of output. I can only imagine how much I/O it would do and output it would produce on DBs of a meaningful size. It is very interesting, but definitely not very user-friendly.

I can see why this is undocumented. ;)
 
I can see why this is undocumented. ;)

It turned out, the utility was documented in Database Administration V10.0A (2003 year)

DBUTIL CMPDB qualifier
Allows you to compare two databases.

dbutil cmpdb db-name1 db-name2 [-t|-l|-l2]

db-name1 Name of the first database to be compared.
db-name2 Name of the second database to be compared.

-t Tight compare. Checks all fields including backup counters and master block fields.

-l Loose compare. Does not report differences in the master block last modification date or the back up update counter.

-l2 Second loose compare. Does not report differences in the incremental backup field of the database block headers.

and got a lot of output.

Progress adds more and more loose compare parameters not to report differences. Someday they will be able to silence the utility. :)
 
There is also a -l3 parameter (in 12.8). The output is almost the same. With l3, it reports on mb_lstmod difference. There is no -l4.

Also:
Code:
Database area 60 has 15 blocks. (7001)
block 1536 bk_updctr differ 1 0 (17151)
block 1536 Object List number of objects mismatch for entry 2
       db1 1, db2 -303314080 (11845)

The parsing of object list blocks leaves a little to be desired. Db1 has one storage object in area 60, db2 has none (just the area object).
 
Back
Top