473,509 Members | 2,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

copying logs then roll forward problems

Hi,
I am testing out some restores to a stand-by server, by roll-forwading
the logs.
I have this setup.
There is no user-exit, but logretain is on, for archive logging.

I have 2 DB's on different servers ( a & b), but named the same.
I have done a 'restore into' to create the db on server b, then taken
a on-line dump of that DB, then done a restore, to bring it into a
roll-forward pendind mode.

I fill up the transaction logs on server a. I then use :
db2 "get db cfg for t_DB"|grep First
First active log file = S0000009.LOG
to get the current active log.

I then copy the log(s) that are less than this number to server b,
I then do :
db2 rollforward db t_DB to end of logs stop
SQL1265N The archive log file "S0000009.LOG" is not associated with
the
current log sequence for database "S_DB" on node "0"
OK.. so I do a status:

Rollforward Status

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

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000009.LOG
Log files processed = -
Last committed transaction = 2003-12-10-12.00.17.000000
Can some one tell me why this is not working. I think it should be. I
should be able to roll the logs forward.

thanks
Pete.
db2 v8
Nov 12 '05 #1
2 10032
pe*********@techemail.com (Peter Sands) wrote in message news:<6b*************************@posting.google.c om>...
Hi,
I am testing out some restores to a stand-by server, by roll-forwading
the logs.
I have this setup.
There is no user-exit, but logretain is on, for archive logging.

I have 2 DB's on different servers ( a & b), but named the same.
I have done a 'restore into' to create the db on server b, then taken
a on-line dump of that DB, then done a restore, to bring it into a
roll-forward pendind mode.

I fill up the transaction logs on server a. I then use :
db2 "get db cfg for t_DB"|grep First
First active log file = S0000009.LOG
to get the current active log.

I then copy the log(s) that are less than this number to server b,
I then do :

I'm not an expert on the subject, but I think you should copy S...09
and all newer files to server b. I would also recomend using userexit
for the purpose, and then copy from the logarchive. If you copy the
"live" logfiles, you might end up copying a file currently written to.
Another benefit of using a userexit program is that you can ship the
logfile as soon as it is archived, I.e. no need for a service regurly
polling the archive for new files. There is (at least for V7), a
sample userexit program written in C. Matt Devlin (www.mattdevlin.net)
has a userexit program written in Perl.
HTH
/Lennart


db2 rollforward db t_DB to end of logs stop SQL1265N The archive log file "S0000009.LOG" is not associated with
the
current log sequence for database "S_DB" on node "0"
OK.. so I do a status:

Rollforward Status

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

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000009.LOG
Log files processed = -
Last committed transaction = 2003-12-10-12.00.17.000000
Can some one tell me why this is not working. I think it should be. I
should be able to roll the logs forward.

thanks
Pete.
db2 v8

Nov 12 '05 #2
Hello,
If you want to be able to continue the rollforward with new logs from
the main site, the rollforward command on the recovery site is just:
rollforward xxx to end of logs. This keeps the recovery site in
rollfoward pending (rollforward ... query status can be applied on
it). By doing rollforward xxx to end of logs stop, the recovery site
is going out of rollfoward pending state and can not apply new logs
from the main site. By adding stop on the first rollforward
desscribed,S0000009.LOG became a true autonomous log from the recovery
site. When not adding the stop (or complete), S0000009.LOG will be
able to be transfered from the main site ounce it is free on the main
site (see archive logs for xxx that can be executed on the main site
to free the lowest logs where no active transaction are present).

When using exit routines, if the event handling is not correctly done
end to end, how to recover from the "lost" processing? I prefer the
way described here (get first active log and process lower logs) as it
can be recoverd easily (just run the check again and transfer
-again-/apply on the recovery); as additional consistency measure, a
fuser (Unix) can be issued on the logs that are said to be released by
db2 on the production site to be sure it is so. This method is indeed
simple and (by my experience) very solid.

There still is a usage problem on the shadow database: this recovery
database in rollforward pending state can not be used in read-only
mode.

Bernard Dhooghe


pe*********@techemail.com (Peter Sands) wrote in message
news:<6b*************************@posting.google.c om>...
Hi,
I am testing out some restores to a stand-by server, by roll-forwading
the logs.
I have this setup.
There is no user-exit, but logretain is on, for archive logging.

I have 2 DB's on different servers ( a & b), but named the same.
I have done a 'restore into' to create the db on server b, then taken
a on-line dump of that DB, then done a restore, to bring it into a
roll-forward pendind mode.

I fill up the transaction logs on server a. I then use :
db2 "get db cfg for t_DB"|grep First
First active log file = S0000009.LOG
to get the current active log.

I then copy the log(s) that are less than this number to server b,
I then do :
db2 rollforward db t_DB to end of logs stop
SQL1265N The archive log file "S0000009.LOG" is not associated with
the
current log sequence for database "S_DB" on node "0"
OK.. so I do a status:

Rollforward Status

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

Node number = 0
Rollforward status = DB working
Next log file to be read = S0000009.LOG
Log files processed = -
Last committed transaction = 2003-12-10-12.00.17.000000
Can some one tell me why this is not working. I think it should be. I
should be able to roll the logs forward.

thanks
Pete.
db2 v8

Nov 12 '05 #3

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

Similar topics

0
1308
by: Peter Sands | last post by:
Hi, I have setup a stand-by db2 DB server, I want to test the log shipping method. Do I just issue a 'list history..' on the source server to get the logs I need to ship. Then copy those logs...
3
3347
by: Almund Sebi | last post by:
(Using UDB 7.2 FP11). Given this output from LIST BACKUP HISTORY FOR MYDB: (It's an online backup image) > Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID > -- ---...
1
1790
by: Peter Sands | last post by:
Hi, I am right in assuming to recover a database where logretain is on. That I only need the logs that are reported in the list history.. for instance; db2 list history backup since...
6
11533
by: paul | last post by:
Hi, i made an attempt to restore a online backup made with include logs option. But when i rollforward the db, i can't pout it online because it always ned log file. I tried the option to...
5
17572
by: Roy Hills | last post by:
When I'm reading from or writing to a network socket, I want to use a struct to represent the structured data, but must use an unsigned char buffer for the call to sendto() or recvfrom(). I have...
4
20436
by: aj | last post by:
DB2 LUW v8.2 FP 14 RHAS 2.1 I have a DB2 online DB backup that was done w/ the INCLUDE LOGS option. I am interested in restoring that backup, and rolling forward ONLY the logs contained in the...
0
1621
by: prashanthdb2 | last post by:
Hi, Im new to db2. Im using db2 ese 9.1 (fix pack 1) on SLES 9.0 32 bit. I have single instance on three logical nodes 0,1,2. i have cofigured userexit - on, logretain - on, trackmod - on. ...
3
3742
by: Kofa | last post by:
Hi, we have an application which uses online backups, so archive logging is a requirement. We have a small/moderate size database (a few hundred megabytes isn't much by today's standards) with...
0
65299
by: shorti | last post by:
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. ...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
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...
0
7412
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...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
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...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.