Database or Table-level Journaling
Journaling can be selected for an entire database or on a table-by-table basis.
Database Journaling
The recommended approach is to journal the entire database rather than specific tables. Tables in journaled databases are created “with journaling” if that is the default_journaling setting of the server class used by the Ingres DBMS Server you are connected to.
Disable journaling on specific tables only if a rollforward recovery of those tables is not important. You must exercise caution when creating non-journaled tables in journaled databases. Non-journaled tables cannot be audited when the database is audited, nor can they be recovered through rollforward. Following a rollforward recovery, the relationship between journaled and non-journaled tables can be confusing.
Table-level Journaling
If you choose to journal selected tables, you are responsible for ensuring that all related objects are also journaled (for example, that all tables associated with a view are journaled).
Enable Journaling on an Entire Database
To journal an entire database
Issue the following command at the operating system prompt:
ckpdb +j dbname
or
Use the SET JOURNALING (or ING_SET "set journaling" equivalent) statement to enable journaling of all activities associated with the database.
Note: The only tables that are enabled are those whose journaling status is “enabled after next checkpoint.” Tables whose journaling status is “disabled” cannot be enabled.
New Tables and Journaling
The journaling of new tables begins, as follows:
• If you have enabled journaling on the database and the table is created with journaling enabled, the new tables begin journaling immediately.
• If you have not enabled journaling on the database, the new tables begin journaling after you take a checkpoint with the enable journaling option (although tables created with journaling disabled are never enabled even after journaling is enabled for the database as a whole).
Start Journaling on a Database Not Checkpointed
To start journaling on a database that has not yet been checkpointed
Issue this command:
ckpdb +j dbname
Journaling and Online/Offline Checkpoints
An explicit journaling option on the ckpdb command causes the checkpoint to be taken offline and with an exclusive lock on the database.
The first time journaling is turned on in a particular database, you must checkpoint the database with journaling enabled (ckpdb +j dbname). Doing so ensures that the checkpoint is taken offline.
Once you have enabled journaling by checkpointing offline with the +j option, you can maintain the “journaling on” status and take online checkpoints by not subsequently setting the +j option when you take a checkpoint. Online checkpoints permit users to continue using the database while the checkpoint is being taken.
After you have enabled journaling for the database by checkpointing offline with the +j option, you can take an offline checkpoint to start journaling of tables for which journaling is enabled after the next checkpoint.
Note: A table-level checkpoint is not allowed.
Last modified date: 08/29/2024