473,326 Members | 2,126 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,326 software developers and data experts.

Question on NORETRIEVE option in ROLLFOWARD

Running DB2 9.1 on AIX 5.3

I would like to do a restore of a database from an online backup image
to December 21st with a backup that was taken using INLCUDE LOGS

Same box, not a redirected restore.

If I use the logtarget parameter on the restore db command

can I then simply do a rollfoward database to end of logs and stop
overflow logpath /fullpath ?

Since there are more recent logs present in the active log directory do
I have to specify NORETRIEVE to ensure that db2 only uses the logs from
the backup image in the log retreieve path to do the rollforward and
not use any other logs?

Thanks in advance.

Scott

Dec 27 '07 #1
3 7083
I should state that the overflow log path would be the path specified
in the logtarget of the restore comand
So is NORETRIEVE required in that case?
On 2007-12-26 19:30:14 -0500, Scott <he**********@nospamgmail.comsaid:
Running DB2 9.1 on AIX 5.3

I would like to do a restore of a database from an online backup image
to December 21st with a backup that was taken using INLCUDE LOGS

Same box, not a redirected restore.

If I use the logtarget parameter on the restore db command

can I then simply do a rollfoward database to end of logs and stop
overflow logpath /fullpath ?

Since there are more recent logs present in the active log directory do
I have to specify NORETRIEVE to ensure that db2 only uses the logs from
the backup image in the log retreieve path to do the rollforward and
not use any other logs?

Thanks in advance.

Scott

Dec 27 '07 #2
aj
Scott:
Yes, it took me a while to get my brain wrapped around this...

Assuming you want to roll-forward only the logs stored w/ the online DB
backup:

Do the backup like so:
-backup database $db online to <whereverinclude logs

Then:
-restore db $db taken at $pit logtarget /tmp
-db2 rollforward db $db to end of logs and stop overflow log path /tmp
noretrieve

$pit is the point in time referenced in the online backup file, ie:
<DB>.0.<instance>.NODE0000.CATN0000.20071228021205 .001 would be
0071228021205

I happen to be using /tmp to store the logs that are extracted from
the backup, choose whatever dir you fancy.

I'm not familar w/ AIX, but on Linux this script will automate it. Feed
it the name of the database you want to restore+roll forward as the arg.

db=`echo $1 | tr '[a-z]' '[A-Z]'`
pit=`ls $<backup location>/$db.0.*.001 | awk -F. '{print $6}'`
cd $<backup location>
echo -e "Restoring database $db...\n"
db2 restore db $db taken at $pit logtarget /tmp
db2 rollforward db $db to end of logs and stop overflow log path
\(/tmp\) noretrieve

Careful w/ the left and right parens - they will trip up the shell
interpreter. Notice how I escaped them..

Good luck. HTH

cheers
aj
Scott wrote:
Running DB2 9.1 on AIX 5.3

I would like to do a restore of a database from an online backup image
to December 21st with a backup that was taken using INLCUDE LOGS

Same box, not a redirected restore.

If I use the logtarget parameter on the restore db command

can I then simply do a rollfoward database to end of logs and stop
overflow logpath /fullpath ?

Since there are more recent logs present in the active log directory do
I have to specify NORETRIEVE to ensure that db2 only uses the logs from
the backup image in the log retreieve path to do the rollforward and not
use any other logs?

Thanks in advance.

Scott


Jan 2 '08 #3
aj wrote:
db2 rollforward db $db to end of logs and stop overflow log path
\(/tmp\) noretrieve

Careful w/ the left and right parens - they will trip up the shell
interpreter. Notice how I escaped them..
I would put double-quotes around the DB2 command to avoid escaping:

db2 "rollforward db $db to end of logs and stop overflow log path (/tmp)
noretrieve"
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jan 3 '08 #4

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

Similar topics

2
by: Mark Watkins | last post by:
Of course, this is not an html board, but some of you may be able to answer this question. Copy and past the html below into a text file so you can open it in IE and see what I mean: ...
6
by: Bonge Boo! | last post by:
This has got to be obvious, but I can't make it work. I have a form called with 3 pull down menus. They are linked to a database which generates the values for the <SELECT? Pull-downs. Lets...
4
by: Quatney | last post by:
Okay, I'm going nuts here. I know this is VERY easy and I shouldn't have problems with this, but I can't seem to figure out what I want to do. I have a form, with two drop down boxes. I want...
2
by: PM | last post by:
I have a question about option buttons and their values. I have many option buttons on my forms, each set contained in their own group boxes. I simply want to be able to give them a value,...
0
by: Syed Shahabuddin | last post by:
Hi all, please let me know the procedure for doing mininum rollfoward recovery using long talbespaces. We have db2 udb-8.1 system. on unix platforms. how do i do can do DDL on long...
4
by: Lauren Quantrell | last post by:
In my old MDB databases, I constructed a lot of "subQueries" to filter out records, then based a new query on the subQuery. This results in huge speed increases on large datasets. However... In...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
7
by: Brave | last post by:
I have two questions about pulldown menus on forms. 1: Can I have the options of one pulldown menu be dictated by the choice from another pulldown menu (example beow)? 2: Can I have a form be...
8
by: Rory Becker | last post by:
A wise man once said: "Never put off until runtime what you can fix at compile time." Actually I think he said it about 10 minutes before I started this post. I am a firm believer, like the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.