Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

See when a table has been modified

Status
Not open for further replies.

mariocq

MIS
Apr 20, 2001
61
US
Hello:

Is there anyway to see the time of the last insert-delete-update in a table?

Regards,
Mario.
 
Yes, Mario, but only if you create a TRIGGER on the table(s) that you want to monitor. You could have a table that has columns for OWNER, TABLE_NAME, LAST_UPDATED, then whenever any INSERT, UPDATE, or DELETE occurs, the trigger would simply update the row for the table with the current value of SYSDATE. The nice efficiency about that is that there would be only one UPDATE statement occurring to the table no matter how many rows in the subject table that you are working on.

Let us know if this gives you the vision you need to resolve this issue.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
set init.ora parameter audit_trail=true. this only enables the feature, does not actually do anything. second, issue command AUDIT ALL ON COUNTRY_LIST BY ACCESS; The results are produced faster and safer than when using triggers. Third, to see the results SELECT * FROM DBA_AUDIT_TRAIL WHERE ....

To turn off auditing for a table just do NOAUDIT ALL ON <table_name>; Or, set init.ora parameter audit_trail=false. In this case all table audit settings are preserved but not used.


MarkRem
Author, Oracle Database 10g: From Nuts to Soup
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top