473,746 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2221
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**********@lc 03.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
1946
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 established "best practices" for creating your own logging system? I know that others use this technique and I'm hoping someone has some ideas they can pass along. For example, do you log every single page request or do you just log totals per...
2
2217
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 but I still get console output on the email logger from the "root" logger. How do I get rid of it? import logging import logging.handlers
6
1520
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. What impact from the users perspective can I expect? Is the only impact behind the scenes in the db manager? Thanks in advance for any help. Matt
4
2518
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 following two tables tblCustomers and tblOrders. I want to archive all orders over two years old. Is this how it is done?:
1
2904
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 before they can all be archived off to TSM. I don't have unlimited disk space. Is there any way I can estimate the total log space that will be used by an online reorg so I can allocate the right amount of space? I'm also looking into speeding up...
3
4888
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 'archive' is the file name for the archive with a full path """ import zipfile, os def makeArchive(fileList, archive):
2
5836
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 10240; ----- I get back an error: ------ SQL5153N The update cannot be completed because the following relationship would be violated:
0
1432
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 8-10GB's a month without compression (about 260 Megs day). What logging options should i specify before i start my database. If i set archiving using LOGARCHMETH1 to a separate disk, what should the logprimary and logsecondary values be. I would...
4
3428
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 8-10GB's a month without compression (about 260 Megs day). What logging options should i specify before i start my database. If i set archiving using LOGARCHMETH1 to a separate disk, what should the logprimary and logsecondary values be. I would like...
0
8974
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8800
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,...
1
9285
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9218
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8229
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6060
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
4586
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...
2
2765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2199
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.