Solved

DB2 command line backup

  • 3 August 2022
  • 4 replies
  • 1039 views

Userlevel 1
Badge +4

Hi,

My customer have DB2 backup, but when there is an issue on DB2 and normal backup fail, there is an auto job stated as (command line) that keep repeating to run. Since it is failing, report shows a lot of failed job hence raise a question from the management.

Is this standard practice that if normal backup failed, a command line backup will be kick in? Is there any way I can disable or at least prevent it to run repeatedly even though it is failed?

 

Thanks and best regards,

Fauzi

icon

Best answer by Gowri Shankar 3 August 2022, 15:57

View original

4 replies

Userlevel 4
Badge +12

Hi @Fauzi Japri 

 

Looks like you may be running into the following scenario 

 

https://documentation.commvault.com/11.24/expert/15133_db2_agent_restore_frequently_asked_questions.html

 

In DB2 9.7 and later, by default, a full online DB2 database backup includes the transaction log files to ensure that there is a consistent backup image. DB2 includes all the required logs in the backup image when the transaction spreads across many log files, even when a log file backup exists. If the backed up log files are deleted, DB2 will submit a log restore request to the DB2 Agent.

There are three parameters that you use to control the log files actions:

Note: If you set both the max_log parameter and num_log_span parameter to 0, DB2 uses unlimited log space.

  1. The LOGPRIMARY parameter sets the storage amount that the software allocates for log files. Make sure that all uncommitted transactions are logged in the LOGPRIMARY number of log files. This prevents the DB2 application from sending a log file retrieval request for the archived files.

  2. The max_log parameter limits the percentage of log space that one transaction can use. Set this to 0 to have no limit of one transaction. To limit the space, set the value to the percentage that you want the limit to be.

  3. The num_log_span parameter limits the number of log files that one transaction spans. Set this to 0 to have no limit of one transaction. To limit the number of files, set this parameter to the number of files.

Userlevel 1
Badge +4

Hi @Gowri Shankar ,

All this job basically requested DB2 agent to run restore of transaction log? This is only happen if DB2 backup failed, not during online DB2 backup.

So if I set the parameters as per the recommended, this will not happen again?

 

regards,

Fauzi

Userlevel 7
Badge +23

@Fauzi Japri hope all is well!

Can you confirm if the suggested parameters worked?

Thanks!

Userlevel 1
Badge +4

Hi Mike,

I haven’t got chance to talk with DB2 admin regarding this.

 

regards,

Fauzi

Reply