473,661 Members | 2,484 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A question about setting logsecond to -1

Today my friend ask me a question about setting logsecond to -1. The
following sentences were copied from DB2 InforCenter:
"By setting logsecond to -1, you will have no limit on the size of the
unit of work or the number of concurrent units of work. However,
rollback (both at the savepoint level and at the unit of work level)
could be very slow due to the need to retrieve log files from the
archive. Crash recovery could also be very slow for the same reason. "
The question is how to understand "the same reason" in sentence "Crash
recovery could also be very slow for the same reason." Does "the same
reason" means "the need to retrieve log files from the archive"? I
think it it should be "the need to retrieve log files from active log
files" because crash recovery just need read information from active
log files, not archive log files. Is it right?

James
Jan 31 '08 #1
7 3932
On Jan 31, 7:16 am, James <huyu...@gmail. comwrote:
Today my friend ask me a question about setting logsecond to -1. The
following sentences were copied from DB2 InforCenter:
"By setting logsecond to -1, you will have no limit on the size of the
unit of work or the number of concurrent units of work. However,
rollback (both at the savepoint level and at the unit of work level)
could be very slow due to the need to retrieve log files from the
archive. Crash recovery could also be very slow for the same reason. "
The question is how to understand "the same reason" in sentence "Crash
recovery could also be very slow for the same reason." Does "the same
reason" means "the need to retrieve log files from the archive"? I
think it it should be "the need to retrieve log files from active log
files" because crash recovery just need read information from active
log files, not archive log files. Is it right?

James
Hi James,

"the same reason" does mean "the need to retrieve log files from the
archive". logsecond = -1 implies infinite logging and to be able to
support that, some active log files may need to be archived (keeping
space free in the log path). Therefore, depending on the amount of
work done, how large the active log window is, etc. log files may need
to be retrieved during crash recovery.

Regards,
Kelly
Jan 31 '08 #2
I am a bit puzzled here as to log file behavior.
Why would the log files have to be retrieved from the archive under
these (or nay conditions). I thought that if log files were active,
they get copied to the archived, but they do not get replaced,
removed, deleted from the the log path until they are fully
archivable.
By this I mean all transactions in the file have been either rolled
back, committed and externalized, and also applied in DPROP if
applicable. Until then, the log file is deemed to be active and must
stay in the log path.
Therefore, I don,t see how it would have to be retrieved from the
archive, even if logsecond=1.

Am I off in left field, lost in log path or what ?????
Thanls, Pierre.

On 31 jan, 14:39, kschl...@ca.ibm .com wrote:
On Jan 31, 7:16 am, James <huyu...@gmail. comwrote:
Today my friend ask me a question about settinglogsecon dto -1. The
following sentences were copied from DB2 InforCenter:
"By settinglogsecon dto -1, you will have no limit on the size of the
unit of work or the number of concurrent units of work. However,
rollback (both at the savepoint level and at the unit of work level)
could be very slow due to the need to retrieve log files from the
archive. Crash recovery could also be very slow for the same reason. "
The question is how to understand "the same reason" in sentence "Crash
recovery could also be very slow for the same reason." Does "the same
reason" means "the need to retrieve log files from the archive"? I
think it it should be "the need to retrieve log files from active log
files" because crash recovery just need read information from active
log files, not archive log files. Is it right?
James

Hi James,

"the same reason" does mean "the need to retrieve log files from the
archive". *logsecond= -1 implies infinite logging and to be able to
support that, some active log files may need to be archived (keeping
space free in the log path). *Therefore, depending on the amount of
work done, how large the active log window is, etc. log files may need
to be retrieved during crash recovery.

Regards,
Kelly
Feb 24 '08 #3
>"Pierre StJ" <p.*********@vi deotron.cawrote in message
>I am a bit puzzled here as to log file behavior.
Why would the log files have to be retrieved from the archive under
these (or nay conditions). I thought that if log files were active,
they get copied to the archived, but they do not get replaced,
removed, deleted from the the log path until they are fully
archivable.
By this I mean all transactions in the file have been either rolled
back, committed and externalized, and also applied in DPROP if
applicable. Until then, the log file is deemed to be active and must
stay in the log path.
Therefore, I don,t see how it would have to be retrieved from the
archive, even if logsecond=1.

Am I off in left field, lost in log path or what ?????
Thanls, Pierre.
If the number of log files (primary + secondary) is specified, then there
cannot be an active transaction in the archive log. If the number is set
to -1, that means there is no limit and active transactions may spill over
to the archive log.
Feb 24 '08 #4
Pierre StJ wrote:
On 31 jan, 14:39, kschl...@ca.ibm .com wrote:
>On Jan 31, 7:16 am, James <huyu...@gmail. comwrote:
>>Today my friend ask me a question about settinglogsecon dto -1. The
following sentences were copied from DB2 InforCenter:
"By settinglogsecon dto -1, you will have no limit on the size of the
unit of work or the number of concurrent units of work. However,
rollback (both at the savepoint level and at the unit of work level)
could be very slow due to the need to retrieve log files from the
archive. Crash recovery could also be very slow for the same
reason. " The question is how to understand "the same reason" in
sentence "Crash recovery could also be very slow for the same
reason." Does "the same reason" means "the need to retrieve log
files from the archive"? I think it it should be "the need to
retrieve log files from active log files" because crash recovery
just need read information from active log files, not archive log
files. Is it right?
>>James

Hi James,

"the same reason" does mean "the need to retrieve log files from the
archive". logsecond= -1 implies infinite logging and to be able to
support that, some active log files may need to be archived (keeping
space free in the log path). Therefore, depending on the amount of
work done, how large the active log window is, etc. log files may
need to be retrieved during crash recovery.

Regards,
Kelly

I am a bit puzzled here as to log file behavior.
Why would the log files have to be retrieved from the archive under
these (or nay conditions). I thought that if log files were active,
they get copied to the archived, but they do not get replaced,
removed, deleted from the the log path until they are fully
archivable.
By this I mean all transactions in the file have been either rolled
back, committed and externalized, and also applied in DPROP if
applicable. Until then, the log file is deemed to be active and must
stay in the log path.
Therefore, I don,t see how it would have to be retrieved from the
archive, even if logsecond=1.

Am I off in left field, lost in log path or what ?????
Thanls, Pierre.
By setting LOGSECOND = -1 (and enabling log archiving via LOGARCHMETH1), you
enable "infinite active logging".
This allows an active unit of work to span primary logs AND archive logs,
allowing a transaction to use an infinite number of log files (hence:
"infinitive active logging"). It is useful to accommodate large jobs that
require more log space than normally would be allocated to the primary logs.

--
Jeroen
Feb 24 '08 #5
ctive logs have to stay in the active log path. They cannot be moved,
erased, deleted, replaced Only copied to the archive.
So, why should one worry about logsecond=-1 and having to retrieve
active logs from the archive ??? That was my question.
Regards, Pierre.
Feb 25 '08 #6
Pierre StJ wrote:
Active logs have to stay in the active log path. They cannot be moved,
erased, deleted, replaced Only copied to the archive.
So, why should one worry about logsecond=-1 and having to retrieve
active logs from the archive ??? That was my question.
Regards, Pierre.
"Active logs have to stay in the active log path"

While his is true for "Archive logging", it isn't for "Infinite Active
logging".
A quote from "Understand ing DB2 - Learning Visually with Examples":

"When archival logging is enabled, a log is archived as soon as it becomes
full. DB2 leaves the log in the log directory until it becomes inactive and
then renames the file for reuse. With infinite logging, DB2 still archives
the log as soon as it is full, but it does not wait for it to become
inactive before it renames the file for reuse. This guarantees that the
active log directory will never fill up, because any logs can be reused once
they are filled. Note that the use of infinite active logging can prolong
crash recovery times as active logs may need to be retrieved from the
archive site."

HTH.

--
Jeroen
Feb 25 '08 #7
Jeroen, thanks very much for clarifying that.
I knew what I was reading had to work but my misunderstandin g didn't
make it make sense.
Now I know better.
Thanks, Pierre.

On Feb 25, 6:34*pm, "The Boss" <use...@No.Spam .Please.invalid wrote:
Pierre StJ wrote:
Active logs have to stay in the active log path. *They cannot be moved,
erased, deleted, replaced Only copied to the archive.
So, why should one worry about logsecond=-1 and having to retrieve
active logs from the archive ??? That was my question.
Regards, Pierre.

"Active logs have to stay in the active log path"

While his is true for "Archive logging", it isn't for "Infinite Active
logging".
A quote from "Understand ing DB2 - Learning Visually with Examples":

"When archival logging is enabled, a log is archived as soon as it becomes
full. DB2 leaves the log in the log directory until it becomes inactive and
then renames the file for reuse. With infinite logging, DB2 still archives
the log as soon as it is full, but it does not wait for it to become
inactive before it renames the file for reuse. This guarantees that the
active log directory will never fill up, because any logs can be reused once
they are filled. Note that the use of infinite active logging can prolong
crash recovery times as active logs may need to be retrieved from the
archive site."

HTH.

--
Jeroen
Feb 26 '08 #8

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

Similar topics

11
4942
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come in with the same "session".
3
4225
by: Weiping | last post by:
Hi, while upgrade to 8.0 (beta3) we got some problem: we have a database which encoding is UNICODE, when we do queries like: select upper('ÖÐÎÄ'); --select some multibyte character, then postgresql response: ERROR: invalid multibyte character for locale
0
2052
by: Joseph S. | last post by:
hi all, debugging PHP applications interactively is possible, easy and free. I am talking about PHPEclipse and using it for debugging over several scripts or debugging through a session. Since I have wasted a lot of time writing echo statements all over the code in order to confirm program flow and watch variables, I feel I must share this with others who will be facing similar problems. PHPEclispe users can go to Step 5 directly....
10
1676
by: MLH | last post by:
I was wondering if setting object vars to Nothing near the end of a sub procedure was beneficial at all - since they (the OV's) are about to go out-a-scope anyway? For example, Sub MySub() .... blah blah blah... .... Set MyDB = Nothing Set rstType17CorrespRecs = Nothing
1
1121
by: Faheem Mitha | last post by:
Hi, Consider the following small script. My understanding of how this works is that, conceptually, class B holds a separate copy of variable x from class A. Nearly everything behaves the way I would expect, except that setting x to 12 in A using class_setx at the beginning also sets the value for x in B. However, the converse (setting x in B using class_setx), does
7
5973
by: gmclee | last post by:
Hi there, I am writing a program to load HTML from file and send it to IE directly. I've met some problem in charset setting. Most of HTML have charset "us-ascii", for some reason, some UNICODE TEXT will be inserted into the HTML before sending to IE. The problem is 1) Can I specify special charset for some component, e.g. <span charset="UTF-8"SOME UNICODE HERE</spand> 2) If "NO" for 1), so any way to change the charset of the...
2
3222
by: Troels Arvin | last post by:
Hello, If I increase LOGSECOND on a database, will the change become active immediately, or does the DB2 instance need to be restarted before the change is in effect? -- Regards, Troels Arvin <troels@arvin.dk> http://troels.arvin.dk/
2
9991
by: Mohammad Omer | last post by:
Hi, i am developing an application which uses WAB API's, for doing all this i am using vs2k5. I have wab.h header file included in my project to use WAB api's but after compilation one error comes like Error 1 error C2371: 'WCHAR' : redefinition; different basic types c: \program files\microsoft visual studio 8\vc\platformsdk\include \wabdefs.h 78
4
3089
by: sid | last post by:
"about:blank" oepns new browser window I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. What I have found is that if the page in Frame2 fails to load and I get an error page. when I detect an error page I want to set frame2.location.href = "about:blank" and then write a temp error page until the server becomes available again. The...
0
8432
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
8343
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
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
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...
0
8633
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
7365
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...
1
6185
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
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1747
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.