473,473 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Database transaction log switch history

The database is currently in the circular logging mode (no log
archiving). I want to track the database transaction log switch history
in form of (switch-timestamp, active-log-sequence-number) to eventualy
assess on the database logging volume during the database operations
(OLTP). I wasn't able to find a relevant event monitor elemen for that.
Any other method?

Thanks
-Eugene

Dec 6 '06 #1
9 3461
Eugene F wrote:
The database is currently in the circular logging mode (no log
archiving). I want to track the database transaction log switch history
in form of (switch-timestamp, active-log-sequence-number) to eventualy
assess on the database logging volume during the database operations
(OLTP). I wasn't able to find a relevant event monitor elemen for that.
Any other method?
Stupid question: What is a "database transaction log switch history"?

Do you want to track whenever the logging behavior is changed from circular
to archiving or vice versa?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Dec 7 '06 #2
No, I want to track the event when DB2 closes the current log file as
it gets full and start writing (switches) into the next log file that
becomes the active one, and so forth.

-Eugene
Knut Stolze wrote:
Eugene F wrote:
The database is currently in the circular logging mode (no log
archiving). I want to track the database transaction log switch history
in form of (switch-timestamp, active-log-sequence-number) to eventualy
assess on the database logging volume during the database operations
(OLTP). I wasn't able to find a relevant event monitor elemen for that.
Any other method?

Stupid question: What is a "database transaction log switch history"?

Do you want to track whenever the logging behavior is changed from circular
to archiving or vice versa?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Dec 7 '06 #3
When you enable user exit for log archiving, the database manager calls
the db2uext2 program. You can use this program(db2uext2) to capture the
timestamp into a file.

Hope this helps,
Prasad.

Dec 7 '06 #4
As I mentioned, the database is not in log archiving mode so that's not
a solution.

Prasad wrote:
When you enable user exit for log archiving, the database manager calls
the db2uext2 program. You can use this program(db2uext2) to capture the
timestamp into a file.

Hope this helps,
Prasad.
Dec 7 '06 #5
Eugene F wrote:
As I mentioned, the database is not in log archiving mode so that's not
a solution.
Now I'm utterly confused. I would say this is just a development or toy
system. Otherwise, you would use log archiving in the first place. So
what would you need the information about closing one log file and starting
with another one?

Besides, DB2 does not have to close a log file in circular logging. If all
transactions (UOWs) are completed, it could happily start at the first log
file again. Likewise, it could very well happen that all primary +
secondary log files are currently open because the first log file still has
entries for a not-yet-committed transaction. Therefore, you are probably
only interested in the timestamp when a new log file becomes active - not
when another one is closed.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 7 '06 #6
Not getting into details whether log files are getting closed or not
after they are full in circular mode, I still want to track the
timestamp when the database starts writing into the next log file in
the circular logging mode.


Knut Stolze wrote:
Eugene F wrote:
As I mentioned, the database is not in log archiving mode so that's not
a solution.

Now I'm utterly confused. I would say this is just a development or toy
system. Otherwise, you would use log archiving in the first place. So
what would you need the information about closing one log file and starting
with another one?

Besides, DB2 does not have to close a log file in circular logging. If all
transactions (UOWs) are completed, it could happily start at the first log
file again. Likewise, it could very well happen that all primary +
secondary log files are currently open because the first log file still has
entries for a not-yet-committed transaction. Therefore, you are probably
only interested in the timestamp when a new log file becomes active - not
when another one is closed.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 7 '06 #7
Eugene F wrote:
Not getting into details whether log files are getting closed or not
after they are full in circular mode, I still want to track the
timestamp when the database starts writing into the next log file in
the circular logging mode.
I don't know if that is possible - besides monitoring activity on the log
files/directory with some external tool.

But still I'm curious: what do you need that for?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 8 '06 #8
To make an estimate on the volume of transaction logs generated and the
database activity pattern (distribution) in time. Do you know any
better way? I am thinking to turn on the archival logging to, at
least, be able to use database history for logs for that.
Knut Stolze wrote:
Eugene F wrote:
Not getting into details whether log files are getting closed or not
after they are full in circular mode, I still want to track the
timestamp when the database starts writing into the next log file in
the circular logging mode.

I don't know if that is possible - besides monitoring activity on the log
files/directory with some external tool.

But still I'm curious: what do you need that for?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 9 '06 #9
The following comwes from a normal db snapshot. Taking snapshots at
interval, can you make use of this?

Log space available to the database (Bytes)= 20397527
Log space used by the database (Bytes) = 2473
Maximum secondary log space used (Bytes) = 0
Maximum total log space used (Bytes) = 3082
Secondary logs allocated currently = 0
Log pages read = 0
Log read time (sec.ns) = 0.000000004
Log pages written = 1
Log write time (sec.ns) = 0.000000004
Number write log IOs = 1
Number read log IOs = 0
Number partial page log IOs = 1
Number log buffer full = 0
Log data found in buffer = 0
Appl id holding the oldest transaction = 7
Log to be redone for recovery (Bytes) = 2473
Log accounted for by dirty pages (Bytes) = 2473

File number of first active log = 18
File number of last active log = 20
File number of current active log = 18
File number of log being archived = Not applicable

The last entry means the db is in circular logging.

Regars, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Eugene F" <ro********@yahoo.coma écrit dans le message de news:
11*********************@j72g2000cwa.googlegroups.c om...
To make an estimate on the volume of transaction logs generated and the
database activity pattern (distribution) in time. Do you know any
better way? I am thinking to turn on the archival logging to, at
least, be able to use database history for logs for that.
Knut Stolze wrote:
>Eugene F wrote:
Not getting into details whether log files are getting closed or not
after they are full in circular mode, I still want to track the
timestamp when the database starts writing into the next log file in
the circular logging mode.

I don't know if that is possible - besides monitoring activity on the log
files/directory with some external tool.

But still I'm curious: what do you need that for?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 9 '06 #10

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

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
1
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? ...
3
by: Robin Tucker | last post by:
Is it possible to wrap a transaction across 2 database? For example: BEGIN TRANSACTION .... alter something in Database_1 .... alter something in Database_2 COMMIT TRANSACTION or if...
3
by: Lada 'Ray' Lostak | last post by:
Hi ! We are moving to PgSql application, with 'typical' style of work. Thin client, huge database. From database is (also) generated whole website. I will use it for explain my current todo....
5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
0
by: Vivek | last post by:
Has any one see the following error message. System.Runtime.InteropServices.COMException (0x8004D025): The partner transaction manager has disabled its support for remote/network transactions. ...
2
by: francois1 | last post by:
I am running a website with a SQL Server database attached. My transaction logs are full and my hosting co. won't allocate more disk space for me. I need to delete my database transaction logs...
1
by: Ariful Ambia Noman | last post by:
Hi Can anyone tell me which one is better maintaining transaction in front (Say C#, VB) end Vs maintaining transaction in Stored Procedure. Please give me some explanation behind your answer. ...
10
by: giraffeboy | last post by:
Hi there, I'm having a problem with the Python db api, using MySQL. I've written a program with a GUI using wxPython, the GUI is contained in main.py which imports another module - reports.py....
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...
0
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,...
0
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...
1
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...
0
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,...
1
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...
0
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...
0
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...

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.