The monitor command continuously tracks changes to Oracle talbes and anchors changes to the blockchain.
The monitor command wakes at a specified interval and discovers - using flashback queries - whether any changes have been applied to nominated tables since the last execution. Any changes will be hashed and anchored to the nominated blockchain.
The monitor command relies heavily on Oracle Flashback technology. The table must either be managed by a Flashback archive, or the undo_retention setting must be sufficient to allow the anchor command to retrieve changes since it's last execution
% provendb-oracle monitor --help Monitor the database for changes. USAGE $ provendb-oracle monitor OPTIONS -i, --interval=interval [default: 120] polling interval -v, --verbose increased logging verbosity --config=config config file location --tables=tables (required) tables to anchor DESCRIPTION Monitor checks tables listed in the configuration file for changes. Any changes to rows found will be anchored to the blockchain defined in the configuration file.
|--interval||Interval between sampling intervals. When all rows are anchored, monitor will pause this long before looking for new changes. THe polling interval may be interrupted by a DBMS_ALERT with the topic |
|--config||Configuration file which contains Oracle and provenDB configuration see Configuration file Reference|
|--tables||Table(s) that are to be anchored. This argument can be specified multiple times to anchor multiple tables.|
% provendb-oracle monitor --config=myConfigFile.yaml --tables=MYPROVENDBDEMO.CONTRACTSTABLEFBDA 16:56:20.984 INFO Checking all tables... 16:56:21.037 INFO Flashback Archive last Purge Time 2021-02-01T10:29:25.000Z 16:56:21.052 INFO Monitoring with 120ms interval. 16:56:21.053 INFO Processing all table changes 16:56:21.053 INFO Processing MYPROVENDBDEMO.CONTRACTSTABLEFBDA 16:56:21.053 INFO Where: 16:56:21.081 INFO Start SCN=3803479 current SCN=3803479 16:56:21.166 INFO --> Anchoring data to HEDERA 16:56:21.166 INFO 100 keys Anchoring proof: BATCHING Anchoring proof: QUEUING Anchoring proof: PROCESSING Anchoring proof: PENDING Anchoring proof: CONFIRMED 16:56:45.367 INFO Sleeping for 120 seconds 16:56:45.367 INFO Will awake on dbms_alert 16:58:47.516 INFO Processing all table changes 16:58:47.517 INFO Processing MYPROVENDBDEMO.CONTRACTSTABLEFBDA 16:58:47.517 INFO Where: 16:58:47.530 INFO Start SCN=3803479 current SCN=3803570 16:58:47.562 INFO No new data to anchor 16:58:47.562 INFO Sleeping for 120 seconds```
Updated almost 3 years ago