17. Backing Up and Restoring the Database : Journals : Methods for Stopping Journaling
 
Share this page                  
Methods for Stopping Journaling
You can stop journaling all changes in a database with either of the following commands:
Altering a database using the alterdb command.
Creating a checkpoint using the ckpdb -j command.
Note:  This takes effect immediately; therefore, it must be used only for emergencies. For information, see Disable Journaling When Checkpointing.
Note:  A table-level checkpoint is not allowed.
To re-enable journaling on a database that has had journaling disabled, use the ckpdb command, as described previously.
Disable Journaling When Checkpointing
The following command issued at the operating system prompt stops journaling of all the tables in a database:
ckpdb -j dbname
A checkpoint of the specified database is taken, and then journaling is stopped. After journaling is stopped, you can still take periodic checkpoints of the database.
Disable Journaling When Altering a Database
When you disable journaling using the alterdb command, journaling of a database is halted immediately, regardless of whether users are connected to the database.
This option is provided as a method for recovering from journaling system problems that prevent the archiver from moving transaction log file records to the database journal files, for example, if the disk partition containing the journal files is not periodically purged of obsolete journal files and the partition becomes full. If the logging system is unable to move records from the log file to the journal files, the transaction log file eventually fills up, causing a LOGFULL condition. When this occurs, no database activity can proceed until the LOGFULL state is cleared.
To use alterdb to disable journaling on a database
The following procedure must be run by the DBA of the database. It does not require a database lock and can be run even while the log file is full (LOGFULL).
1. Issue the following command at the operating system prompt:
alterdb dbname -disable_journaling
Journaling of the database is disabled.
Caution! Do not use rollforwarddb on a database that has journaling disabled. Any transactions committed after the alterdb action, or that were still in the transaction log file at the time journaling was disabled, will be lost.
2. Check the database state by using the infodb command at the operating system prompt:
infodb dbname
The infodb listing indicates whether journaling has been disabled.
3. Restart archive processing after disabling journaling by issuing the following command at the operating system prompt:
ingstart -dmfacp
4. Take a new checkpoint to re-enable journaling as soon as possible by using the following command at the operating system prompt:
ckpdb +j dbname