Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to detect the change of a table?

Re: How to detect the change of a table?

From: Ken Niedermeyer <ken.niedermeyer_at_boeing.com>
Date: Wed, 22 Jul 1998 17:48:17 GMT
Message-ID: <35B625E1.7ACF87A8@boeing.com>


Yong Huang wrote:

> I want to know how to detect a change of a table. The TIMESTAMP of it in
> USER_OBJECTS only tells me a change when the table has more or less
> columns. I also want to know whether the rows in the table are
> added/dropped, which select count(*) would work. But I also want to be
> notified when any update is done on it (say, "John" in column
> "FIRST_NAME" is changed to "Jones"). How can I do that? Thanks.
>
> This is used in my midnight cron job that queries the table to see if
> there's a change in it. If anybody likes to have the code of my script,
> I can email you.
>
> Yong Huang
> Email:yong_at_shell.com
>
>
>
>

I believe that what you may want is to install database triggers on the tables that you are interested in. With the database triggers you can populate an audit table with the information you are looking for (the updated information, the addition of a row, the removal of a row, etc.) then all your cron script would have to do is summarize the information in the audit table.

ken.

--
Ken Niedermeyer (Ken.Niedermeyer_at_boeing.com) Boeing Central Information Systems
phone: 425.865.5300
pager: 206.215.0254 Received on Wed Jul 22 1998 - 12:48:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US