How do you archive and manage the logs in Commvault?
-
When an online log is full, DB2 requests Commvault VENDOR Library API to archive the logs.
-
By default, Commvault archives the logs in ARCHIVE_PATH specified during Commvault installation.
-
The logs will be moved to media when Logs backup is scheduled from CommCell console or when the number of Logs in Archive Path exceed the configured threshold.
-
ARCHIVE PATH can be configured using sDB2_ARCHIVE_PATH registry key.
Can I enable DB2 triggered pruning for Commvault's DB2 iDataAgent?
Yes. You can enable DB2 triggered pruning for Commvault's DB2 Agent using sCvDB2EnablePruning registry key.
Can I restore a load copy image directly on a database?
No. The DB2 server will not allow you to restore a load copy image directly on a database.
What does the return code 23 in db2diag.log indicate?
Return code 23 specifies the end of file or media. This return code can be ignored. Commvault sends this return code to DB2 once it completes the transfer of the entire data for the requested log or data backup.
What files are placed in the DB2 Audit Error directory and are they pruned?
The DB2 Audit Error path which is created during the DB2 Agent installation. Temporary files are written to the DB2 Audit Error path during log backups. To help improve the efficiency during a log restore, Commvault looks for these files first to use for the restore. If they are not present, Commvault could restore these files in this directory for efficient log restores. The file names have the format M_<archiveFileId>_<CommCellId> .
The "cvd" process prunes files in this directory which have not be accessed in 4 to 5 days which prevents the DB2 Audit Error path size from growing.
How do I determine the DB2 Instance Port Number?
Perform the following to find out the DB2 Instance port number that you need to perform a table level restore to a different host, instance, or database.
UNIX
On the command line, type the following command:
cat /etc/services | grep '<db2_instance_name>'
Windows
Search the WINNT/SYSTEM32/DRIVERS/ETC/Services file.
Does Commvault support backup and restore operations on DB2 databases that have the DB2 BLU Acceleration feature enabled?
Yes. There is no additional configuration required on the Commvault software to support DB2 BLU Acceleration.
Is there a problem if there are more backup images than sessions?
If you run a DB2 version that is higher than 10.5.8, the DB2 software creates more images than sessions (streams) for online data backups. For example, if you have a single session, there will be 2 backup images .
How do I view the list of available backup Images from command line?
Use the QS_QueryDB2Backup.sp query. Options are available to query against:
-
database backups,
-
log backups or
-
database or log backups within a time range
The time zone listed in the output is the client time zone.
The query for database backups is as follows:
qoperation execscript -sn QS_querydb2backup -si '<Clientname>' -si '<DB2InstanceName>' -si '<DB2DatabaseName>' -si '<DATA|LOGS>'
QScript[QS_querydb2backup] CS[CSName] DB[CommServ] SP[QS_querydb2backup]
Parameter |
Description |
---|---|
InstanceName |
The DB2 (and not the Commvault) instance name |
DatatbaseName |
The DB2 (and not the Commvault) database name |
ClientName |
The Commvault client |
DATA |
Query the data |
LOGS |
Query the logs |
Examples
Data Option
./qoperation execscript -sn QS_querydb2backup -si 'test-db2' -si 'db2inst1' -si 'NEW' -si 'DATA'
Output
1 rows affected)
JOB ID BACKUP TYPE NODE NUMBER TIMESTAMP STREAMS
------ ----------- ----------- -------------- -------
324706 Full . NODE0000 20140605173337 1
324708 Full . NODE0000 20140605175230 1
324714 Full . NODE0000 20140605185154 1
324715 Full . NODE0000 20140605185439 1
324716 Full . NODE0000 20140605185905 3
324719 Incr . NODE0000 20140605190413 3
324720 Delta . NODE0000 20140605190805 3
324727 Full . NODE0000 20140605213125 1
324728 Full . NODE0000 20140605213343 1
324729 Full . NODE0000 20140605213608 3
324731 Incr . NODE0000 20140605214035 3
324732 Delta . NODE0000 20140605214419 3
324741 Full . NODE0000 20140605230636 1
324742 Full . NODE0000 20140605230937 1
324743 Full . NODE0000 20140605231157 3
324745 Incr . NODE0000 20140605231553 3
324746 Delta . NODE0000 20140605231919 3
Qscript Execution Succeeded!
Log Option
./qoperation execscript -sn QS_querydb2backup -si 'test-db2' -si 'db2inst1' -si 'NEW' -si 'LOGS'
Output
1 rows affected) JOB ID NODE NUMBER CHAIN NUMBER FIRST LOG NUMBER LAST LOG NUMBER FIRST LOG TIME LAST LOG TIME
------ ----------- ------------ ---------------- --------------- -------------------- -------------------
326173 NODE0000 C0000040 1327 . 1366 . 2014-06-11 12:27:52 2014-06-11 12:29:38
326170 NODE0000 C0000040 1287 . 1326 . 2014-06-11 12:25:11 2014-06-11 12:27:28
326165 NODE0000 C0000040 1247 . 1286 . 2014-06-11 12:22:18 2014-06-11 12:24:42
326160 NODE0000 C0000040 1207 . 1246 . 2014-06-11 12:19:41 2014-06-11 12:21:51
326159 NODE0000 C0000040 1167 . 1206 . 2014-06-11 12:16:59 2014-06-11 12:19:12
326153 NODE0000 C0000040 1127 . 1166 . 2014-06-11 12:14:37 2014-06-11 12:16:34
326149 NODE0000 C0000040 1087 . 1126 . 2014-06-11 12:11:59 2014-06-11 12:14:10
326147 NODE0000 C0000040 1047 . 1086 . 2014-06-11 12:09:41 2014-06-11 12:11:32
326122 NODE0000 C0000038 1007 . 1045 . 2014-06-05 23:05:16 2014-06-05 23:19:58
326122 NODE0000 C0000040 1046 . 1046 . 2014-06-11 11:49:44 2014-06-11 11:49:44
324742 NODE0000 C0000038 1007 . 1020 . 2014-06-05 23:05:16 2014-06-05 23:10:46
324740 NODE0000 C0000036 967 . 1004 . 2014-06-05 21:30:09 2014-06-05 21:44:53
324740 NODE0000 C0000038 1005 . 1006 . 2014-06-05 23:04:21 2014-06-05 23:04:46
324728 NODE0000 C0000036 967 . 979 . 2014-06-05 21:30:09 2014-06-05 21:34:57
324726 NODE0000 C0000036 964 . 966 . 2014-06-05 21:29:22 2014-06-05 21:29:36
324726 NODE0000 C0000034 927 . 963 . 2014-06-05 18:50:32 2014-06-05 19:08:48
324715 NODE0000 C0000034 927 . 938 . 2014-06-05 18:50:32 2014-06-05 18:57:53
324712 NODE0000 C0000034 887 . 926 . 2014-05-27 12:31:41 2014-06-05 18:49:54
Qscript Execution Succeeded!
How are the jobs displayed when you restore from incremental or delta backups using multiple streams from the command line?
Depending on the backup images, the multi stream restore jobs will be displayed as given below:
-
If restoring from a full backup, all the streams in the restore job will use the same job ID.
-
If restoring from an incremental backup image, and if the number of streams is 1 or 2, the restore job will display 3 different job ids. This is because, when restoring from incremental backup image, the restore job will abort midway to restore the previous full backup and then return back to restore the incremental backup image; if the number of streams is 3 or more, the restore job will complete with 2 job IDs. In this case, the restore job will abort midway to restore the previous full backups and when resumed combines with the first job to display the same job ID.
-
Similarly, when restoring from a delta backup image, the restore job will abort midway to restore the previous full and incremental backups and then come back to restore the delta backup image. Restores from delta backups will complete with multiple job IDs.
Why Does a CommCell Console command line online backup job remain in the running state when the job shows as completed in the DB2 terminal?
This behavior applies to Commvault SP13 and later.
The DB2 software launches an extra stream for a log backup after an online data backup. This operation causes two separate job IDs in the CommCell Console. The Commvault software waits for 2 minutes so that the additional stream can be joined to the same data backup job ID.
How do I use NX842 compression for DB2 backups?
NX842 compression is supported by DB2 11.1 only on AIX with POWER 7+ and POWER 8 processors.
To compress the backups with NX842 compression by default, set the DB2_BCKP_COMPRESSION registry variable to NX842. After you configure the registry variable, select the Use DB2 compression option from the subclient properties to apply the NX842 compression to backups.
For more information about NX842 compression for DB2, refer to the IBM documentation: