473,387 Members | 1,745 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,387 software developers and data experts.

DB2 Logging and Archiving

I am trying to understand the logging and archiving features of DB2
V8.2 And I have a couple of questions:

1. When I issue update db cfg using newlogpath /path, the logpath in
db cfg is /path/NODE0000 and the db2 logs go there. But when I use
restore db...logpath /path, the logpath in db cfg of the target
database is /path. The NODE0000 is no more appended. What is the
resoning behind this peculiar behaviour?

2. When I restore db A to db B, the db cfg of A is copied to that of
B. Why is this? An undesirable effect of this is the archive log
destination (logarchmeth1) of A is in the db cfg of B. I would have
thoght that it is better to leave the db cfg of B alone.

3. When you restore db A to db B using an online backup that also
contains the logs, where do you restore the logs to? B's normal
logpath or some other directory?

TIA

Naru Mangalath

Feb 15 '07 #1
2 2202
sa*******@gmail.com wrote:
2. When I restore db A to db B, the db cfg of A is copied to that of
B. Why is this? An undesirable effect of this is the archive log
destination (logarchmeth1) of A is in the db cfg of B. I would have
thoght that it is better to leave the db cfg of B alone.
You are replacing DB B completely. Why would you want to keep the old,
possibly non-matching DB CFG instead of using the one for DB A?
3. When you restore db A to db B using an online backup that also
contains the logs, where do you restore the logs to? B's normal
logpath or some other directory?
I haven't tried this myself yet, but I would expect that the log path is set
to the one in DB A's DB CFG upon restore into DB B.

Online vs. offline is irrelevant to restore. It just tells you the mode of
access allowed to the DB while taking the backup itself.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Feb 15 '07 #2
When a db is created it gets a unique number known as the seed. It will be
unique for any db created.
When you restore a db, DB2 will check the name (alias) you use and then find
out if this alias already exists in the instance. If it does then it checks
if the alias points to a db with a real name that is defferent or equal.
If equal, then you have to use the REPLACE EXISTING parm. Files and logs
will be kept in place in their logpath as defined in the inplace db cfg.
If not equal then DB2 sees that you are creating a new db on that instance.
Then it will replace the db cfg, the db2rhist and will wipe out the logs in
the logpath mentionned in the db cfg.
If restoring to create new (as in restore db A) on a new system. Then
everything will be copied from the backup image.
If restoring db A on to db B, db2 will check the alias names to see if they
point to the same or different real names and behave as stated above.

See below ######
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Knut Stolze" <st****@de.ibm.coma écrit dans le message de news:
er**********@lc03.rz.uni-jena.de...
sa*******@gmail.com wrote:
>2. When I restore db A to db B, the db cfg of A is copied to that of
B. Why is this? An undesirable effect of this is the archive log
destination (logarchmeth1) of A is in the db cfg of B. I would have
thoght that it is better to leave the db cfg of B alone.

You are replacing DB B completely. Why would you want to keep the old,
possibly non-matching DB CFG instead of using the one for DB A?
##### As stated by Knut, to DB2 this is a brand new db that overwrites the
existing one so it uses what is in the image. If it kept the logs, it would
not know what to applu to what or where.
>
>3. When you restore db A to db B using an online backup that also
contains the logs, where do you restore the logs to? B's normal
logpath or some other directory?
###### The logs will go to the path specified in the db cfg of A in the
image and will ignore the path of esixting B. You are replacing B by A. You
have the option in the restore command to specify where the log path will
be:
RESTORE DATABASE source-database-alias { restore-options | CONTINUE |
ABORT }
restore-options:
[......[LOGTARGET directory] .......
>
I haven't tried this myself yet, but I would expect that the log path is
set
to the one in DB A's DB CFG upon restore into DB B.

Online vs. offline is irrelevant to restore. It just tells you the mode
of
access allowed to the DB while taking the backup itself.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Feb 16 '07 #3

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

Similar topics

4
by: Paul Woods | last post by:
I'm developing an application that uses a custom 404 page to deliver all of my site's content. However, doing things this way renders IIS's regular log files pretty much useless. Are there any...
2
by: chuck | last post by:
I want to create two different loggers so that users see one output (e.g. no exception/stack traces) and others (e.g support staff) that does see stack traces via email. The code below is close...
6
by: Matt | last post by:
I have a production database that I need to change the logging type from circular to archived so that I can do online backups. The database is not particularly large, but is used by many people. ...
4
by: Paul H | last post by:
Could some one give me some pointers on basic archiving techniques? I have developed several databases but never been faced with this issue. Here is the basic scenario.. Suppose I have the...
1
by: daiesy.ember | last post by:
I'm working on implementing online reorgs(V8 FP11 on AIX), and am seeing a lot of transaction logging during the reorgs. My problem is that the archive logs are filling up the active log path...
3
bvdet
by: bvdet | last post by:
Following is an example that may provide a solution to you: """ Function makeArchive is a wrapper for the Python class zipfile.ZipFile 'fileList' is a list of file names - full path each name...
2
by: natG | last post by:
On a 64 bit linux, db2 9.1 system, I am trying to change logging to "circular" via: ----- UPDATE DB CFG FOR MYDB7 USING logarchmeth1 OFF logarchmeth2 OFF logprimary 16 logsecond -1 logfilsiz...
0
by: db2green | last post by:
All, I am a newbie to HADR and Admin of DB2 (I am websphere guy). My question relates to DB2 logging. I've read that HADR does not allow Infinite logging (-1). I am expecting my Database to grow...
4
by: lfhenry | last post by:
I am a newbie to HADR and Admin of DB2 (I am websphere guy). My question relates to DB2 logging. I've read that HADR does not allow Infinite logging (-1). I am expecting my Database to grow...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.