-1

Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID


B D 20200518123514001 N D S0000026.LOG S0000026.LOG


Contains 4 tablespace(s):

00001 SYSCATSPACE 00002 USERSPACE1 00003 GOSALES_TS 00004 SYSTOOLSPACE


Comment: DB2 BACKUP GSDB ONLINE

Start Time: 20200518123514

End Time: 20200518123515

 Status: A

EID: 365 Location: C:\Users\db2admin\Desktop\sales_backup

Shadain
  • 11
  • 4

1 Answers1

0

Instead of trying to parse "list history" output, you should perform a query against SYSIBMADM.DB_HISTORY view.

This way you can easily get only the interest columns and apply filters to capture only the desired types of records you want:

SELECT * from SYSIBMADM.DB_HISTORY WHERE OPERATION IN ('B', 'R')

https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.rtn.doc/doc/r0022351.html

Regards, Samuel

Samuel Pizarro
  • 267
  • 1
  • 8