cancel
Showing results for 
Search instead for 
Did you mean: 

Online DB2 backup including logs also includes "old" logs

stefan_boettcher
Explorer
0 Kudos

Hi,

I'm trying to understand the way the first log file will be selected when an online backup (including logs) is created.

My example:

The online backup started at 18.04.2012 01:00 and included the logs S0010002.log - S0010007.log. It finished at 18.04.2012 05:05.

Why is the backup considering the logs S0010002 - S0010004, as they where already inactive at the point the backup started?

******************************************************

S0010010.LOG 18.04.2012 12:42:22

S0010009.LOG 18.04.2012 10:36:59

S0010008.LOG 18.04.2012 08:31:59

S0010007.LOG 18.04.2012 05:05:14

S0010006.LOG 18.04.2012 04:28:17

S0010005.LOG 18.04.2012 02:48:49

S0010004.LOG 18.04.2012 00:17:03

S0010003.LOG 17.04.2012 22:09:41

S0010002.LOG 17.04.2012 20:01:58

S0010001.LOG 17.04.2012 17:57:00

******************************************************

From my undertsanding the logs S0010005 - S0010007 should have been sufficient for a consistent backup.

Thanks,

Stefan

Accepted Solutions (0)

Answers (2)

Answers (2)

MarcinOzdzinski
Participant
0 Kudos

Hi All

I can confirm the same issue on our DPF BI system. It is requiring also logs moved earlier into log_archive directory. This is a problem cause partitions 1-6 are updated during data load period and logs are generated only then. So if i'll tranfer those logs out of log_archive directory backup will fail.

Regards

Marcin

Former Member
0 Kudos

Stefan,

Are you sure, that there is no open transaction in the S0010002.LOG file?

Best regards,

Joachim

stefan_boettcher
Explorer
0 Kudos

Hi Joachim,

at least from the timestamp the S0010002.LOG was moved to the archive directory (17.04.2012 20:01:58) I expect that no transaction was open at that log when the backup started 5hours later.

Regards,

Stefan

Former Member
0 Kudos

Hi Stefan,

That's indeed very strange. Found no deeper information in the Information Center:

"When you specify this option, the backup utility will truncate the currently active log file and copy the necessary set of log extents into the backup image.";-)

Have you found this behavior only for one database?

Regards

Joachim

Former Member
0 Kudos

Hello Stefan,

this is my db2 list history backup output from a non-SAP database 850GB:

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

-- --- ------------------ ---- --- ------------ ------------ --------------

  B  D  20120417220000001   N    A  S0020090.LOG S0020090.LOG

----------------------------------------------------------------------------

  Contains 4 tablespace(s):

00001 SYSCATSPACE

00002 USERSPACE1

00003 SYSTOOLSPACE

00004 PMSPACE

----------------------------------------------------------------------------

Comment: DB2 BACKUP TKP ONLINE

Start Time: 20120417220000

   End Time: 20120418001415

     Status: A

----------------------------------------------------------------------------

  EID: 41602 Location: adsm/libtsm.a

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

-- --- ------------------ ---- --- ------------ ------------ --------------

  B  D  20120417220000002   N    A  S0020090.LOG S0020090.LOG

----------------------------------------------------------------------------

  Contains 4 tablespace(s):

00001 SYSCATSPACE

00002 USERSPACE1

00003 SYSTOOLSPACE

00004 PMSPACE

----------------------------------------------------------------------------

Comment: DB2 BACKUP TKP ONLINE

Start Time: 20120417220000

   End Time: 20120418001415

     Status: A

----------------------------------------------------------------------------

  EID: 41603 Location: adsm/libtsm.a

Only one log file is needed and included within the backup image.

Best regards

Joachim

Former Member
0 Kudos

Hello Stefan,

and another system:

Log file: S0633048.LOG, Chain Num: 2, DB Partition Number: 0, Taken at: 2012-04-17-17.08.06  Mgmt Class: MC_DDP

   Log file: S0633049.LOG, Chain Num: 2, DB Partition Number: 0, Taken at: 2012-04-17-17.08.13  Mgmt Class: MC_DDP

.

.

.

   Log file: S0633106.LOG, Chain Num: 2, DB Partition Number: 0, Taken at: 2012-04-17-20.16.25  Mgmt Class: MC_DDP

  Log file: S0633107.LOG, Chain Num: 2, DB Partition Number: 0, Taken at: 2012-04-17-20.20.34  Mgmt Class: MC_DDP

 

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

-- --- ------------------ ---- --- ------------ ------------ --------------

  B  D  20120417180001001   N    A  S0633048.LOG S0633106.LOG

----------------------------------------------------------------------------

  Contains 7 tablespace(s):

  00001 SYSCATSPACE

  00002 PMSPACE

  00003 EXPLAINSPACE

  00004 SYSTOOLSPACE

  00005 USRSPACE

  00006 IDXSPACE

  00007 XMLSPACE

----------------------------------------------------------------------------

    Comment: DB2 BACKUP DDP ONLINE

Start Time: 20120417180001

   End Time: 20120417202224

     Status: A

----------------------------------------------------------------------------

  EID: 1037725 Location: adsm/libtsm.a

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

-- --- ------------------ ---- --- ------------ ------------ --------------

  B  D  20120417180001002   N    A  S0633048.LOG S0633106.LOG

----------------------------------------------------------------------------

  Contains 7 tablespace(s):

  00001 SYSCATSPACE

  00002 PMSPACE

  00003 EXPLAINSPACE

  00004 SYSTOOLSPACE

  00005 USRSPACE

  00006 IDXSPACE

  00007 XMLSPACE

----------------------------------------------------------------------------

    Comment: DB2 BACKUP DDP ONLINE

Start Time: 20120417180001

   End Time: 20120417202224

     Status: A

----------------------------------------------------------------------------

  EID: 1037726 Location: adsm/libtsm.a

Best regards

Joachim

stefan_boettcher
Explorer
0 Kudos

Hi Joachim,

so in your last example DB2 is also including the log S0633048.LOG (last changed 20120417-17.08.06) evenso the backup started 17:18 and at least the log S0633049.LOG was already active..... So for me it locks as if you have the same situation: When the backup starts he is including some old lock files (I don't know why and which) and once the backup is finished he closes the active lock and includes this one as the last log (this is as described in the IBM Information Center as you already mentioned before).

But I still see no conclusion why he is including these old logs as well udn not only the range from the active lock he is starting to the active lock he finished the backup.... 😞

Regards,

Stefan

Former Member
0 Kudos

Hi Stefan,

below you find the answer from Dale McInnis (IBM);

Joachim 
After you restore this backup we will need ALL of the log files starting from S0633048 onwards until at least S0633106. There must be an uncommitted transaction in this old log file that is holding up the LOWTRAN.
Hope this helps

Dale

Best regards

Joachim

former_member189725
Active Contributor
0 Kudos

I believe your SOFTMAX parameter value is 300 , so it will have 3 previous  transaction logs which still hold uncommitted change vectors . Hence the reason it has included the previous 3 logs in the backup.

Regards

Ratnajit