473,378 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Help with rollforward through most current active logs

We are running DB2 UDB 8.1 fp 14 on AIX using archival logging and
online backups. I was running some disaster tests and found my
database restore was not restoring to the latest active log. Online
backup include logs. For this test I created a disaster where we lost
the database about 30 minutes after the last backup. Current archive
and active logs were saved off and I ran a Restore of the latest
backup and rollforward to the end of logs.

Archive logs prior to database restore (after disaster):

1613824 Sep 11 17:29 S0002795.LOG
1966080 Sep 11 18:30 S0002796.LOG
65536 Sep 11 18:35 S0002797.LOG
86016 Sep 11 18:58 S0002798.LOG
2453504 Sep 11 20:00 S0002799.LOG <---before the backup time
3252224 Sep 11 21:01 S0002800.LOG
4202496 Sep 11 21:30 S0002801.LOG

Active logs prior to database restore (after disaster):

512 Jul 02 23:52 SQLLPATH.TAG
4202496 Aug 26 18:00 S0001487.LOG
3383296 Aug 26 22:55 S0001486.LOG
4202496 Sep 11 18:57 S0002806.LOG
4202496 Sep 11 18:57 S0002805.LOG
4202496 Sep 11 18:57 S0002804.LOG
4202496 Sep 11 18:57 S0002803.LOG
4202496 Sep 11 18:57 S0002807.LOG
4202496 Sep 11 18:58 S0002808.LOG
2453504 Sep 11 19:59 S0002799.LOG
4202496 Sep 11 20:00 S0002809.LOG
4202496 Sep 11 21:03 S0002810.LOG
4202496 Sep 11 21:44 S0002811.LOG
4202496 Sep 11 21:49 S0002802.LOG <---current active log. Had
completed transactions before disaster
Here is the Restore statement used:

//copies logs to the current active log path restore the
database
db2 restore db mydb user myuser using mypswrd from /usr/test/
backup/ taken at 20080911210038 to '/db2/database/syscat' logtarget /
db2/logs/test/NODE0000/ newlogpath /db2/logs/test replace history
file replace existing
This is what our log active log directory looks like after the copy/
restore

-rwxrwx--- 1 xx yy 3383296 Aug 26 22:55 /db2/logs/test/NODE0000/
S0001486.LOG
-rwxrwx--- 1 xx yy 4202496 Aug 26 18:00 /db2/logs/test/NODE0000/
S0001487.LOG
-rwxrwx--- 1 xx yy 2453504 Sep 11 19:59 /db2/logs/test/NODE0000/
S0002799.LOG
-rw------- 1 xx yy 3252224 Sep 12 16:30 /db2/logs/test/NODE0000/
S0002800.LOG <-- from backup
-rwxrwx--- 1 xx yy 4202496 Sep 11 21:49 /db2/logs/test/NODE0000/
S0002802.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:57 /db2/logs/test/NODE0000/
S0002803.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:57 /db2/logs/test/NODE0000/
S0002804.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:57 /db2/logs/test/NODE0000/
S0002805.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:57 /db2/logs/test/NODE0000/
S0002806.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:57 /db2/logs/test/NODE0000/
S0002807.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 18:58 /db2/logs/test/NODE0000/
S0002808.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 20:00 /db2/logs/test/NODE0000/
S0002809.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 21:03 /db2/logs/test/NODE0000/
S0002810.LOG
-rwxrwx--- 1 xx yy 4202496 Sep 11 21:44 /db2/logs/test/NODE0000/
S0002811.LOG
-rwxrwx--- 1 hdbuxx yy 512 Jul 2 23:52 /db2/logs/test/
NODE0000/SQLLPATH.TAG
The Restore copied archive log S0002800.LOG from the backup to our
directory. Now we perform the rollforward:
db2 rollforward db mydb user myuser using mypswd to end of logs and
stop

Rollforward Status

Input database alias = inventry
Number of nodes have returned status = 1

Node number = 0
Rollforward status = not pending
Next log file to be read =
Log files processed = S0002800.LOG - S0002801.LOG
Last committed transaction = 2008-09-11-21.30.43.000000
According to my logs it seems it should have rolled through
S0002800.LOG - S0002802.LOG. It looks like DB2 rolled through
S0002800.LOG archive log from it's backup, then rolled through
S0002801.LOG that was archived after the backup was taken (and is
located in the archive directory. However, S0002802.LOG was the
active log at the time of the "crash" (not an archive log) and was not
rolled forward.

DB2 Info Center says that the ROLLFORWARD command rolls through
archive logs. Does this mean we are missing a command that needs to
be performed after we rollforward though the archive logs so that it
picks up the active log changes?

Thanks for helping!
Sep 14 '08 #1
0 65286

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raquel | last post by:
I have asked a similar question before, but am still not very clear on this......expecting some insights on this one.... Ok, so these are the two pieces of information regarding archived logs...
3
by: Raquel | last post by:
During a ROLLFORWARD recovery, are the log datasets copied from the archive log directory to the active log directory? I know the log datasets are copied from archive log directory to active log...
1
by: Steven | last post by:
Ok W2K DB2 v8.1 fix pack 5. On production I took a an online backup of production and copied it over to my staging environment. restored the production database on top of staging database...
0
by: GB | last post by:
In a log shipping scenario I would like to be able to test my database and set it back manually in roll forward pending state, is it possible ? What I would like to do in detail: - On the...
2
by: shenanwei | last post by:
DB2 V8.1.5 on Windows. When I execute ROLLFORWARD after a Restore. C:\db2 ROLLFORWARD db sample to END OF LOGS overflow log path(C:\LOGS\) Rollforward Status Input database alias ...
3
by: t2581 | last post by:
Hi, we are daily restore db "PRICE" with rollforward from server A into PRICE on server B Usually we restore from backup with timestamp of ~ 02:00 AM and applying logs till 7 AM (30-50...
18
by: darnold | last post by:
I have restored a clients database using a redirected restore. However, it is in a roll forward pending state. When I try to to a roll forward to end of the logs, I get SQL1268N Roll-forward...
3
by: EC | last post by:
We have two DB2 servers are supposed to be a replicate of each other with a database of the same name. I want to do a 'db2 db backup online... include logs' on the first server, and do a 'db2...
0
by: smujifor | last post by:
Hello, I have a small confuction to rollforward logs after restore i found thru list history command like this Backup -1 Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.