Hi All
In the Circular Logging when the Primary Log file fill up, the
database manager will creat a secondary log files for the transaction;
when this transaction finished, the secondary log files still
allocated in log directory; when all application disconnect from
database or database reactive or database restart the secondary log
files will be deleted from log directory. For each transaction log
request, database manager always first look primary log, if it is no
reuseable in primary log, then move to secondary log.
My question is
how database manager use the already allocated secondary log file?
if one transaction log is using 10% of one secondary log file, and
same time will another transaction log use the rest of 90% of same
secondary log file?
if one transaction log need to move to secondary log, does it use
existed one or to allocate new one?
Any help will be very useful
Hank 7 2833
"hank" <ga****@hotmail .com> wrote in message
news:8d******** *************** ***@posting.goo gle.com... Hi All
In the Circular Logging when the Primary Log file fill up, the database manager will creat a secondary log files for the transaction; when this transaction finished, the secondary log files still allocated in log directory; when all application disconnect from database or database reactive or database restart the secondary log files will be deleted from log directory. For each transaction log request, database manager always first look primary log, if it is no reuseable in primary log, then move to secondary log.
My question is how database manager use the already allocated secondary log file?
Just like db2 server use the primary log files if one transaction log is using 10% of one secondary log file, and same time will another transaction log use the rest of 90% of same secondary log file?
Either the log file is primary or secondary, they should be used by the all
the transactions/agents. Let's say you have three primary log files log01,
log02, log03. If db2 server find out when the log03 is full, but the log01
still hold the active transactions, then db2 will allocate the secondary
files and switch the current log file to the first secondary log file. if one transaction log need to move to secondary log, does it use existed one or to allocate new one?
the existed one. Any help will be very useful
Hank
"Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message news:<%4******* *******@newssvr 26.news.prodigy .com>... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... Hi All
In the Circular Logging when the Primary Log file fill up, the database manager will creat a secondary log files for the transaction; when this transaction finished, the secondary log files still allocated in log directory; when all application disconnect from database or database reactive or database restart the secondary log files will be deleted from log directory. For each transaction log request, database manager always first look primary log, if it is no reuseable in primary log, then move to secondary log.
My question is how database manager use the already allocated secondary log file? Just like db2 server use the primary log files if one transaction log is using 10% of one secondary log file, and same time will another transaction log use the rest of 90% of same secondary log file? Either the log file is primary or secondary, they should be used by the all the transactions/agents. Let's say you have three primary log files log01, log02, log03. If db2 server find out when the log03 is full, but the log01 still hold the active transactions, then db2 will allocate the secondary files and switch the current log file to the first secondary log file.
So, does it mean in the high cocurrent and long running transaction
processes, the database manage only can handle 126 tansaction in DB2
UDB v7.2 and 256 in DB2 UDB v8.1? if one transaction log need to move to secondary log, does it use existed one or to allocate new one? the existed one. Any help will be very useful
Hank
"hank" <ga****@hotmail .com> wrote in message
news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message
news:<%4******* *******@newssvr 26.news.prodigy .com>... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... Hi All
In the Circular Logging when the Primary Log file fill up, the database manager will creat a secondary log files for the transaction; when this transaction finished, the secondary log files still allocated in log directory; when all application disconnect from database or database reactive or database restart the secondary log files will be deleted from log directory. For each transaction log request, database manager always first look primary log, if it is no reuseable in primary log, then move to secondary log.
My question is how database manager use the already allocated secondary log file? Just like db2 server use the primary log files if one transaction log is using 10% of one secondary log file, and same time will another transaction log use the rest of 90% of same secondary log file? Either the log file is primary or secondary, they should be used by the
all the transactions/agents. Let's say you have three primary log files
log01, log02, log03. If db2 server find out when the log03 is full, but the
log01 still hold the active transactions, then db2 will allocate the secondary files and switch the current log file to the first secondary log file.
So, does it mean in the high cocurrent and long running transaction processes, the database manage only can handle 126 tansaction in DB2 UDB v7.2 and 256 in DB2 UDB v8.1?
=========
No. First, the active log file doesn't mean it is current log file. There
may be a couple of active log files, when all the primary + secondary files
is used, then you will get "log full". But there is only one current log
file (it might be primary log file, or seconday log file). All the active
transactions will write to the current log file. And db2 server will know
which transaction corresponse which session.
How many concurrent transactions can db2 server handle? This is not
determined by the number of log files. This will be determined by the number
of concurrent db2 agents, which will be the min(max_agents,
max_application s), of course there is also os limits ....
========= if one transaction log need to move to secondary log, does it use existed one or to allocate new one? the existed one. Any help will be very useful
Hank
"Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message news:<aj******* ***@newssvr26.n ews.prodigy.com >... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message news:<%4******* *******@newssvr 26.news.prodigy .com>... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... > Hi All > > In the Circular Logging when the Primary Log file fill up, the > database manager will creat a secondary log files for the transaction; > when this transaction finished, the secondary log files still > allocated in log directory; when all application disconnect from > database or database reactive or database restart the secondary log > files will be deleted from log directory. For each transaction log > request, database manager always first look primary log, if it is no > reuseable in primary log, then move to secondary log. > > My question is > how database manager use the already allocated secondary log file? Just like db2 server use the primary log files > if one transaction log is using 10% of one secondary log file, and > same time will another transaction log use the rest of 90% of same > secondary log file? Either the log file is primary or secondary, they should be used by the all the transactions/agents. Let's say you have three primary log files log01, log02, log03. If db2 server find out when the log03 is full, but the log01 still hold the active transactions, then db2 will allocate the secondary files and switch the current log file to the first secondary log file.
So, does it mean in the high cocurrent and long running transaction processes, the database manage only can handle 126 tansaction in DB2 UDB v7.2 and 256 in DB2 UDB v8.1?
========= No. First, the active log file doesn't mean it is current log file. There may be a couple of active log files, when all the primary + secondary files is used, then you will get "log full". But there is only one current log file (it might be primary log file, or seconday log file). All the active transactions will write to the current log file. And db2 server will know which transaction corresponse which session. How many concurrent transactions can db2 server handle? This is not determined by the number of log files. This will be determined by the number of concurrent db2 agents, which will be the min(max_agents, max_application s), of course there is also os limits .... =========
Thank you for you response, but one log file become reuseable when it
is not a current log file and not a active log file, if all log file
is used now but not all fill up, which log file is reuseable? if not,
where to allocate the log space for this transaction? > if one transaction log need to move to secondary log, does it use > existed one or to allocate new one? the existed one. > > Any help will be very useful > > > Hank
"hank" <ga****@hotmail .com> wrote in message
news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message
news:<aj******* ***@newssvr26.n ews.prodigy.com >... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message news:<%4******* *******@newssvr 26.news.prodigy .com>... > "hank" <ga****@hotmail .com> wrote in message > news:8d******** *************** ***@posting.goo gle.com... > > Hi All > > > > In the Circular Logging when the Primary Log file fill up, the > > database manager will creat a secondary log files for the
transaction; > > when this transaction finished, the secondary log files still > > allocated in log directory; when all application disconnect from > > database or database reactive or database restart the secondary
log > > files will be deleted from log directory. For each transaction log > > request, database manager always first look primary log, if it is
no > > reuseable in primary log, then move to secondary log. > > > > My question is > > how database manager use the already allocated secondary log file? Just like db2 server use the primary log files > > if one transaction log is using 10% of one secondary log file, and > > same time will another transaction log use the rest of 90% of same > > secondary log file? > Either the log file is primary or secondary, they should be used by
the all > the transactions/agents. Let's say you have three primary log files log01, > log02, log03. If db2 server find out when the log03 is full, but the log01 > still hold the active transactions, then db2 will allocate the
secondary > files and switch the current log file to the first secondary log
file. So, does it mean in the high cocurrent and long running transaction processes, the database manage only can handle 126 tansaction in DB2 UDB v7.2 and 256 in DB2 UDB v8.1? ========= No. First, the active log file doesn't mean it is current log file.
There may be a couple of active log files, when all the primary + secondary
files is used, then you will get "log full". But there is only one current log file (it might be primary log file, or seconday log file). All the
active transactions will write to the current log file. And db2 server will
know which transaction corresponse which session. How many concurrent transactions can db2 server handle? This is not determined by the number of log files. This will be determined by the
number of concurrent db2 agents, which will be the min(max_agents, max_application s), of course there is also os limits .... =========
Thank you for you response, but one log file become reuseable when it is not a current log file and not a active log file,
====
a log file become reuseable is when
- no active transactions in this log file
and
- this log file is externalized (the corresponding data pages are written
to disk)
if all log file is used now but not all fill up, which log file is
reuseable?
===========
For the non-recoverable database, DB2 server will switch the current log
file to the next one only when the current log file full, i.e. when the
current log file is filled up. (db2 internally will keep some space, which
will be used for ROLLBACK the transactions, or backward phase during the
CRASH RECOVERY.)
if not, where to allocate the log space for this transaction?
========
If all the log files (primary + secondary) are filled up, and none of them
can be reused, you will get "log full" error. db2 will rollback the
transaction which caused the log full, this transact may not the longest
one. > > if one transaction log need to move to secondary log, does it use > > existed one or to allocate new one?
the existed one. > > > > Any help will be very useful > > > > > > Hank
> ==== a log file become reuseable is when - no active transactions in this log file and - this log file is externalized (the corresponding data pages are written to disk)
if all log file is used now but not all fill up, which log file is reuseable? =========== For the non-recoverable database, DB2 server will switch the current log file to the next one only when the current log file full, i.e. when the current log file is filled up. (db2 internally will keep some space, which will be used for ROLLBACK the transactions, or backward phase during the CRASH RECOVERY.)
if not, where to allocate the log space for this transaction? ======== If all the log files (primary + secondary) are filled up, and none of them can be reused, you will get "log full" error. db2 will rollback the transaction which caused the log full, this transact may not the longest one.
Thanks so much
Hank
ARCHIVE LOG --- All transactions either rolled back or
committed/externalized to table.
ACTIVE LOG --- At least one transaction either in flight or
committed/not-externalized.
NEXT ACTIVE LOG --- File id of next log to be used and currently empty.
Say:
S0000001.log and S0000002.log are ARCHIVE, S0000003.log is FULL and ACTIVE
and S0000004.log is NOT FULL and ACTIVE and Current; and S0000005.log is
NEXT ACTIVE.
If S000004 fills up and S0000003 is still ACTIVE then logging will happen in
S0000005. If the situation does not change and S0000005 fills then S0000006
will get allocated and so on.
If you are in LOG RETAIN=RECOVERY and USEREXIT=ON then DB2 will have
archived logs 1,2,3. In that case, DB2 will rename log 1 to log 5 instead
of allocating a new one and reuse its space. It will do the same for log 2.
You would now have log 3 and 4 and 5 (Old No. 1)ACTIVE and 6 (Old No.2) NEXT
ACTIVE.
If DB2 cannot rename and reuse, then it will allocate new files on demand.
Your limit therefore for the log space in total becomes the file systems
capacity.
Now, if LOGSECOND is NOT set to -1 but to a positive integer, then the limit
is: from the the first acitve (Log3), the space used cannot be more than the
total number of files=Lofprimar y+logsecond. Assume they are set to 10 and
15 respectively. Then if if Log3 is active and you have a very long running
transaction and 3 stays active, you would get a log full condition when DB2
attempts to open S0000028. The db will go automatically in crash restart
mode.
If LOGSECOND=-1, then DB2 will keep opening logs on demand until it runs out
of file system space (This V8 only).
HTH, Pierre.
"hank" <ga****@hotmail .com> a écrit dans le message de
news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message
news:<aj******* ***@newssvr26.n ews.prodigy.com >... "hank" <ga****@hotmail .com> wrote in message news:8d******** *************** ***@posting.goo gle.com... "Fan Ruo Xin" <fa*****@sbcglo bal.net> wrote in message news:<%4******* *******@newssvr 26.news.prodigy .com>... > "hank" <ga****@hotmail .com> wrote in message > news:8d******** *************** ***@posting.goo gle.com... > > Hi All > > > > In the Circular Logging when the Primary Log file fill up, the > > database manager will creat a secondary log files for the
transaction; > > when this transaction finished, the secondary log files still > > allocated in log directory; when all application disconnect from > > database or database reactive or database restart the secondary
log > > files will be deleted from log directory. For each transaction log > > request, database manager always first look primary log, if it is
no > > reuseable in primary log, then move to secondary log. > > > > My question is > > how database manager use the already allocated secondary log file? Just like db2 server use the primary log files > > if one transaction log is using 10% of one secondary log file, and > > same time will another transaction log use the rest of 90% of same > > secondary log file? > Either the log file is primary or secondary, they should be used by
the all > the transactions/agents. Let's say you have three primary log files log01, > log02, log03. If db2 server find out when the log03 is full, but the log01 > still hold the active transactions, then db2 will allocate the
secondary > files and switch the current log file to the first secondary log
file. So, does it mean in the high cocurrent and long running transaction processes, the database manage only can handle 126 tansaction in DB2 UDB v7.2 and 256 in DB2 UDB v8.1? ========= No. First, the active log file doesn't mean it is current log file.
There may be a couple of active log files, when all the primary + secondary
files is used, then you will get "log full". But there is only one current log file (it might be primary log file, or seconday log file). All the
active transactions will write to the current log file. And db2 server will
know which transaction corresponse which session. How many concurrent transactions can db2 server handle? This is not determined by the number of log files. This will be determined by the
number of concurrent db2 agents, which will be the min(max_agents, max_application s), of course there is also os limits .... =========
Thank you for you response, but one log file become reuseable when it is not a current log file and not a active log file, if all log file is used now but not all fill up, which log file is reuseable? if not, where to allocate the log space for this transaction?
> > if one transaction log need to move to secondary log, does it use > > existed one or to allocate new one? the existed one. > > > > Any help will be very useful > > > > > > Hank This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Frank Oquendo |
last post by:
I'm looking for advice from people who are using C# in a production
environment with multiple developers. How do you reuse your code between
projects? Do you organize your class files into namespaces and reuse
them at the source level? Or do you maintain versioned assemblies?
Any asistance you can offer would be greatly appreciated.
--
There are 10 kinds of people. Those who understand binary and those who
don't.
|
by: Daniel Granatshtein |
last post by:
I am writing for both Windows XP and Pocket PC an application that implements the same behavior. In the architecture design I am using several foundation libraries for better code reuse. The libraries are intended to work within the limits of the Compact framework so I can write a single source for both applications
My problem is that I can't find a way to make 2 compilation libraries for the Smart Device and the windows XP. I tried using 2...
|
by: developmental2 |
last post by:
Hi all..!
If I want to split an SQL DB into several physical files (as its 500GB
disk ran out of space, won't even run shrinks any more, and we bought
another 500GB disk to add to the PC)
then what is the difference between:
Adding another File to the primary group which will reside on the new
group;
Adding another file in another group.
|
by: Bob Weiner |
last post by:
Hi,
I am an IT person who uses .Net to support our infrastructure. Since I have
been doing this for a while it would be a misnomer for classify myself as a
newbie; perpetual amatuer seems more appropriate.
Notwithstanding, I am tired of cutting and pasting code and moving classes
from one project to the next and would like to know the "proper" way to
store code for reuse. I have used .dll's with some success but am still not...
|
by: WebSnozz |
last post by:
I have an application written in C that does a lot of low level stuff.
It does a lot of things like casting from void*'s. I want to create a
new GUI for it in either C# or MC++, but reuse the existing code.
The options I've considered so far:
1. Create a new MC++ GUI project and add the *.c files to them and mark
them with pragma unamanged. However, the /clr option does not compile
*.c files, so I rename them to *.cpp, and now they...
| |
by: Axlin |
last post by:
Hi.
Could someone tell me what did i miss out in my steps when i configured our production database to our development database?
I tried on 2 separate servers and also between 2 separate instances on our development server, but it didn't work.No error after configuring Log shipping though.
Between the 2 servers - the transaction logs was backup every 1min on the pri server but log files just didnt transfer to secondary database.
...
|
by: santhoshv |
last post by:
My log files became full and I killed the application which used up the log space and finally i was able to free up the log space.
Now the issue is that I have freed up the Primary log space but the Secondary log space shows that it is using up the total number of pages allocated to it (In my case 20 pages)
So my question is how do i clear up the secondary log space and why wasen't it freed when i killed the application using up the log...
|
by: Kvara prasad |
last post by:
For creating a user database three important files named primary, secondary & transaction log files. so my question is 'what is the difference between primary & secondary files?' and is 'what is the necessity of secondary files?'
|
by: smileprince00 |
last post by:
hi friends, i am new learner of this sql server 2008.my question is if my primary data file i.e .mdf is restricted to certain amount of memory like 100mb..i have some more secondary data files.i.e .ndf..
wen ever the memory of .mdf is filled in restricted memory, the control storage will automatically switch on to .ndf files and there the data storage can takes place..
now my question is ...if that shifting of data storage to .ndf from .mdf...
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |