ckpdb Command--Back Up a Database
Permission required: System administrator, DBA, or a Vector user with the operator privilege.
The ckpdb command creates a new checkpoint for the specified database. Checkpointing takes place online (while the database is in use) by default and is transparent to users. If journaling is enabled for the database, all journal entries up to this checkpoint are marked as expired.
The ckpdb command creates the checkpoint, and then copies (to the dump file) the log records of any changes to the database that occurred during the checkpoint procedure. Rollforwarddb uses the dump file when it recovers a database that was checkpointed online.
By default, the ckpdb command sequentially checkpoints data locations one at a time. A database with more than one data location can be checkpointed in parallel.
The ckpdb command has the following format:
ckpdb [-d] [+j|-j] [-l] [#m[n]] [-mdevice {, device}]
[-uusername] [-v] [+w|-w] [‑keep=nnn] [-timeout=mm:ss]
dbname
[-help]
-d
Destroys all previous checkpoint files (and journal files for Ingres tables, if present).
+j|-j
Enables or disables journaling (incremental backup) for a database. When this flag is not specified, current journaling status of the database is maintained. If you specify this flag, the checkpoint is performed offline.
-l
Takes an exclusive lock on the database. If you specify this flag, the checkpoint is performed offline (while the database is not in use), which requires the database to be locked.
In an interactive session, if you specify the -l flag to perform the checkpoint offline, then you can also specify the +w or -w flag.
#m[n]
Checkpoints n locations at a time to disk, for a multi-location database.
-mdevice {, device}
Writes the checkpoint to the specified tape device. If a list of tape devices is supplied, parallel checkpointing is used for a multi-location database.
You can write one checkpoint only per tape. It is not necessary to mount the tape device. (When you restore a checkpoint that was created using the ckpdb -m command, you must use the rollforwarddb +c command.)
The –m option is not valid on Windows.
-uusername
-v
Indicates verbose mode, which displays interim messages as checkpointing proceeds.
+w|-w
Waits or does not wait for the database to be free (not in use) before performing the checkpoint. Use this flag only if you have specified the +j, -j, or -l flag. The default is -w.
This flag cannot be used if the checkpoint is performed online. An offline checkpoint requires the database to be locked.
If you specify +w, ckpdb waits as long as necessary for the database to become free for locking and checkpointing. If you specify -w, and the database is busy, an error is returned.
-keep=nnn
Preserves the specified number of last valid checkpoints and deletes all older checkpoints, valid or invalid.
-timeout=mm:ss
Waits the specified number of minutes for active sessions to complete. If the active sessions do not complete in the specified time, the checkpoint is abandoned.
dbname
Specifies the database (one database name only) to be checkpointed.
-help
Displays command syntax online.
Last modified date: 12/06/2024