473,396 Members | 2,139 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,396 software developers and data experts.

Modification time

Hi!

I'm using DB2 v8.2.2 on Windows.
Is there a way to know when a table was last modified (ALTER TABLE). There
is create time for the table in SYSCAT.TABLES, but I have not seen
modification time.

Any pointers, please ?

Best regards,
Kovi
Nov 12 '05 #1
6 1797
creation is one time event and create-time recorded once in syscat. But
mod time could change from msec to msec on every table. I don't think
it is just impractical for db2 to maintain mod time for each table
object.

JL

Nov 12 '05 #2

<jl*******@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
creation is one time event and create-time recorded once in syscat. But
mod time could change from msec to msec on every table. I don't think
it is just impractical for db2 to maintain mod time for each table
object.


It is when you consider that you'd be doubling the number of updates you'd
have to do for every SQL -- you'd have the update on the table as per the
SQL statement (insert/update/delete), and then a corresponding update to the
proper data element in the catalogs.

Do you think that people who don't care about the last mod time to a table
should suffer the performance penalty?

The DB2 event monitor feature is a great way to track this information, so
if you want/need the last mod time for each table, configure and enable the
appropriate event monitor.

--
Matt Emmerton
Nov 12 '05 #3
If you take a look at your db2 admin guide and do a search on AUDIT you'll
find DB2 gives you an abilitiy to audit only OBJMAINT (amongst other things)
which will track for you in a log all commands maintaining (including ALTER)
db objects.
You may have to pay a performance (slight I think) hit for it but it gives
you exactly what you want:
Who, what, when, where, how. What more do you need!!
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Gregor Kovac" <gr**********@mikropis.si> a écrit dans le message de news:
25*****************@news.siol.net...
Hi!

I'm using DB2 v8.2.2 on Windows.
Is there a way to know when a table was last modified (ALTER TABLE). There
is create time for the table in SYSCAT.TABLES, but I have not seen
modification time.

Any pointers, please ?

Best regards,
Kovi


Nov 12 '05 #4
Matt Emmerton wrote:
It is when you consider that you'd be doubling the number of updates you'd
have to do for every SQL -- you'd have the update on the table as per the
SQL statement (insert/update/delete), and then a corresponding update to
the proper data element in the catalogs.


I thought the OP was interested in the timestamp when the table definition
was changed last.

Tracking the changes of the data in the table is in the catalog, of course,
not very smart because the catalog would instantly become a bottle-neck.

--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena
Nov 12 '05 #5
Hi!

Yes, this is OK, but I need to do a SELECT stmt from my Java program or my
SQL procedure.
How do I do that if logs are stored in some external file ?

Best regards,
Kovi

Pierre Saint-Jacques wrote:
If you take a look at your db2 admin guide and do a search on AUDIT you'll
find DB2 gives you an abilitiy to audit only OBJMAINT (amongst other
things) which will track for you in a log all commands maintaining
(including ALTER) db objects.
You may have to pay a performance (slight I think) hit for it but it gives
you exactly what you want:
Who, what, when, where, how. What more do you need!!
HTH, Pierre.


Nov 12 '05 #6
There's an audit command (See your Admin. Guide) that you can put in a
script to extract the data in an asc del file. You can then use a load
command to load the data in a table you build and extract what you need and
query against the table.
Your proc can probably do all that work.
Hey, it's just a suggestion if you don't think it fits.....!
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Gregor Kovac" <gr**********@mikropis.si> a écrit dans le message de news:
Na*****************@news.siol.net...
Hi!

Yes, this is OK, but I need to do a SELECT stmt from my Java program or my
SQL procedure.
How do I do that if logs are stored in some external file ?

Best regards,
Kovi

Pierre Saint-Jacques wrote:
If you take a look at your db2 admin guide and do a search on AUDIT
you'll
find DB2 gives you an abilitiy to audit only OBJMAINT (amongst other
things) which will track for you in a log all commands maintaining
(including ALTER) db objects.
You may have to pay a performance (slight I think) hit for it but it
gives
you exactly what you want:
Who, what, when, where, how. What more do you need!!
HTH, Pierre.


Nov 12 '05 #7

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

Similar topics

3
by: nathan_kent_bullock | last post by:
Assume I am using a class Foo. I want to find out the modification time of the file that that class was defined in. How would I go about this? If I could find out the name of the file that Foo...
3
by: beliavsky | last post by:
Using Python 2.4 on Windows, for me the command print os.stat("temp.txt") gives 1115478343 , which is "seconds since the epoch". How can I get the modification time in a format such as
2
by: janek | last post by:
My question How can I do something like this... in Builder: In ListBox I've got a list of the files (load by the FindDir) and what should I do to pull out from these files the size and the time...
3
by: stan | last post by:
I am working on some documentation in html format and I would really like to display the date the html file, itself was modified. I am writing my documentation in vi and the html server involved is...
1
by: Henry Law | last post by:
(I posted this to comp.infosystems.www.browsers.misc but there seems to be very little traffic there. I can't see another suitable group; is it on topic here? If not, any suggestions as to...
3
by: MarcJoseph | last post by:
I have a database that is shared my multiple users who enter and update records on a weekly basis. Is there a way I can add a field to my main data table that will automatically generate the...
13
by: ts-dev | last post by:
Is it possible to prevent modification of a python file once its been deployed? File permissions of the OS could be used..but that doesn't seem very secure. The root of my question is verifying...
2
by: Unpopular | last post by:
void directory::modification()//??????????? { clrscr(); cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @ @@@@@@ "; cout<< "\n\t=====@ @ @ @ @ @ @@...
3
by: usenet.tolomea | last post by:
I'm working on a remote object system, something kinda like Pyro. For the purposes of caching I need to be able to tell if a given dict / list / set has been modified. Ideally what I'd like is for...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.