User Tools

Site Tools


tsm:tsm_tdpdb2

DB2 backup with TSM

DB2 doesn't need any agent to backup to TSM.

Problem determination:

- Error SQL code 53: session rejected

delete the TSM password file on you server 
[root@db2srv] /etc/security/adsm> rm /etc/security/adsm/TSM.PWD

and Try updating the password for the particular node with the help of TSM admin , and then run the dsmapipw executable file under ~/sqllib/adsm (need root), this will update the password for the db2/client node.

alternate:

to update TSM client password: ~/sqllib/adsm

db2adutl grant user <user name> on nodename <node_name> for db <db_name> password <password>

Test with: db2adutl query full

Deleting the DB2 transaction logs associated with the database backup

Question

When using db2adutl to delete the older DB2 database backups from the IBM Spectrum Protect Server, why are the logs associated with this backup not being removed. Cause

The 'db2adutl delete full' command will only remove the full database backup.

The db2adutl does not have an aggregated command that will remove the database and logs within a single command.

The 'delete full' will delete just the full backups. The 'delete logs' command would need to be run separately.

It is possible to remove both the DB2 logs and DB2 full backups by configuring the retention within the DB2 cfg parameters:

  Number of database backups to retain (NUM_DB_BACKUPS) = 14
  Recovery history retention (days) (REC_HIS_RETENTN) = 14
  Auto deletion of recovery objects (AUTO_DEL_REC_OBJ) = ON 

As noted in the DB2 manual for the information regarding these parameters:

  If you set the auto_del_rec_obj database configuration parameter to ON, then the database manager will ... Delete the physical log files associated with the pruned entries 

Thus, it would remove not only the database backup that is older than 14 days (based on the example above) but also the other associated logs/data.

tsm/tsm_tdpdb2.txt · Last modified: 2021/01/01 21:25 (external edit)