Link to home
Start Free TrialLog in
Avatar of cherlox
cherlox

asked on

Last DML Time

Hi,

Is there any way we can check when is the last DML performed in a table?
Thanks.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Yes, by analyzing the redo logs.
Check out the tool "log miner", coming with Oracle:
http://www.hcresources.co.uk/log_miner.htm

CHeers
Avatar of starous
starous


Or create trigger after statement for update, insert, delete and store timestamp in some other table. This is suitable for modification operations
Or audit operation with table. This is good for select too.

Both of above could be slow when table is accesed many times.

select  x.object_name,
        x.status,
        x.created,
        x.last_ddl_time,
        x.timestamp
from    user_objects x
where   x.object_type = 'TABLE'

Or table ALL_OBJECTS where OWNER = :another_schema.

Extending other object types:

select  count(*),
        object_type,
        status
from    user_objects
group   by object_type, status

Sorry-- didn't read question properly.

You'll need to create table triggers and log transaction types into an audit schema.  You can build one dynamically...
Avatar of cherlox

ASKER

Hi,

I never use trigger before. Could you advise how to build one?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of fpaige
fpaige

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial