Q
Problem solve Get help with specific problems with your technologies, process and projects.

Finding inserted/deleted records

I want to know which records have been modified (i.e. inserts/updates, etc.) by my session.

I have set the AUDIT_TRAIL parameter to TRUE. So I get the tables that have been modified by my session in the sys.aud$ table. But I cannot find the information to which records have been inserted/deleted from those tables. Is there anyway that I can get this information like the rowid's of the rows inserted, etc. This information will be very useful to me.
Probably the best way to get this information is to mine your redo logs. With Oracle's Log Miner utility, you can get exactly the information that was modified. Please have a look at it in the Oracle documentation.

Oracle's auditing is also good, but it can leave you short of some information that you seek. Another alternative that people employ is to implement triggers on the tables in question. Have a BEFORE INSERT or BEFORE DELETE trigger log all of the relevant information into a database table. You can review this information at any time.

This was last published in May 2004

Dig Deeper on Oracle database design and architecture

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close