Creating Storage Checkpoints using db2ed_ckptcreate
You can use the command to create a Storage Checkpoint from the command line.
Storage Checkpoints can be either online or offline. If online is specified, the database is put into write suspend mode when the Storage Checkpoint is created. If offline is specified, the database is expected to be down.
Before creating a Storage Checkpoint, the following conditions must be met:
Prerequisites
|
You must be logged on as the instance owner (typically, the
user ID db2inst1).
For best recoverability, always keep the LOGRETAIN and/or USEREXIT database
configuration parameters enabled when you create Storage Checkpoints.
|
Usage notes
|
-
db2ed_ckptcreate stores Storage Checkpoint information under
the following directory:
/etc/vx/vxdbed/DB2.$DB2INSTANCE.$DB2DATABASE/NODEnum/checkpoint_dir
For multiple partitions, use the db2ed_ckptcreate_all command. db2ed_ckptcreate_all creates
a Version Checkpoint for a partitioned DB2 database by calling db2ed_ckptcreate on
every database partition.
See the db2ed_ckptcreate(1M) manual page for more information.
|
To create Storage Checkpoints while the database is online
-
Use the db2ed_ckptcreate command as follows:
$ /opt/VRTS/bin/db2ed_ckptcreate -D PROD -o online
An online Storage Checkpoint Checkpoint_971672042
is created at GMT 2004-05-01-18.22.34.0000.
To create Storage Checkpoints without updating the repository while the database is online
-
Use the db2ed_ckptcreate command as follows:
$ /opt/VRTS/bin/db2ed_ckptcreate -D PROD -o online -n
An online Storage Checkpoint Checkpoint_971672043
is created at GMT 2004-05-01-18.22.34.0000.
To create Storage Checkpoints while the database is offline
-
Terminate the database before creating the offline Storage Checkpoint:
# db2 terminate
-
Use the db2ed_ckptcreate command as follows:
$ /opt/VRTS/bin/db2ed_ckptcreate -D PROD -o offline
An offline Storage Checkpoint Checkpoint_971672044
is created at GMT 2004-05-01-18.22.34.0000.
The default option is online.
To assign a Storage Checkpoint allocation policy to a Storage checkpoint
-
Use the db2ed_ckptcreate command as follows:
$ /opt/VRTS/bin/db2ed_ckptcreate -D PROD -o online -p \
ckpt_data,ckpt_metadata
Creating online Storage Checkpoint of database PROD.
Storage Checkpoint Checkpoint_971672044 created.
To create Storage Checkpoints on multiple partitions
-
As the DB2 instance owner, use the db2ed_ckptcreate_all command as follows:
$ /opt/VRTS/bin/db2ed_ckptcreate_all -I db2inst -D PROD
where db2inst is the instance name.
Creating Version Checkpoint Version_ckpt_1088639094 on all partitions.
rah: omitting logical node 0
Creating checkpoint on partition 1.
An online Storage Checkpoint Checkpoint_1088639125 is created
at GMT 2004-06-30-23.45.29.0000
db2ed_ckptcreate -I ... completed ok
Creating checkpoint on partition 0.
An online Storage Checkpoint Checkpoint_1088639159 is created
at GMT 2004-06-30-23.46.03.0000
db2ed_ckptcreate -I ... completed ok
The command output will contain "rah: omitting logical node 0". This is the normal behavior.