473,695 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 65306

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

Similar topics

2
2615
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 during a rollforward recovery in a recoverable database: 1. OVERFLOWLOGPATH configuration parameter can specify a location for DB2 to find log files that are needed for rollforward operations. 2. The database configuration file parameter...
3
1700
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 directory during a ROLLBACK (for example in a crash recovery), but was wondering if it is the same during a ROLLFORWARD recovery too. TIA Raquel.
1
9667
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 redirect. I copied over all the log files from production box to a temp directory. restore was complete with redirect and staging went into roll forward pending.
0
2398
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 backup site: restore the main backup, rollforward the logs, ship new logs,rollforward the logs, ... (all this works) - I would like to be able to test from time to time the state of the database, so I stop the rollforward pending state, I do some...
2
3102
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 = sample Number of nodes have returned status = 1
3
5697
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 logs),restore process last 1 1/2 hr. Sometimes we need to restore till 10-11 am (80-90 log files). Restore at this case could last up to 5 hrs.
18
5745
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 recovery stopped due to error "1" while retrieving log.... I have all of the logs, including the one mentioned in the SQL1268N message. And they are in the log directory I have tried changing userexit to no, and logretain to recovery.
3
2516
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 restore db to ... logtarget...' on the second server, and then rollforward ONLY those logs that were included in the backup image. Both databases may have the same DB id because of previous restores. However, the second server might have additional...
0
1381
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 Backup ID -- --- ------------------ ---- --- ------------ ------------ --------------
0
8586
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9004
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4351
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4592
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2289
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1986
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.