Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients


Free Oracle Tips


Free Oracle App Server Tips


Oracle support

Oracle training

Oracle tuning


Remote Oracle

Custom Oracle Training


  Oracle Tips by Burleson

Oracle 10g Pre-Commit Handlers

With Oracle Database 10g, you can use a new type of apply handler called pre-commit handler to record information about commits processed by an apply process. This is an optional handler that can help to record information about commits processed by an APPLY process.

The APPLY process applies the captured or user-enqueued events. For a captured row LCR, a commit directive contains the commit SCN of the transaction from the source database, but for a user-enqueued event, the commit SCN is generated by the apply process.

This handler is triggered when a commit LCR is encountered by the apply process. The commit SCN within the commit LCR is passed to the precommit handler. This allows you to perform actions before the events associated with that LCR are committed or to perform actions when all the user-enqueued messages in transaction have been equeued.

For example, you may be using Streams within an application that caches some information in memory, such as cursors, temporary LOBs, or session information. By using a pre-commit handler, you can create a procedure that releases the objects cached during the length of the transaction.

You can associate a pre-commit handler with an apply process, for this use the precommit_handler parameter in the alter_apply or create_apply  procedure of dbms_apply_adm. Here is an example showing how to set the pre-commit handler for an apply process named sales_apply to the audit_commit procedure in the strmadmin schema.

audit_commit(commit_number IN NUMBER) IS
-- Insert info in the audit table
INSERT INTO strmadmin.commit_lcr_times
(timestamp, commit_scn)
VALUES (SYSDATE, commit_number);


apply_name => 'sales_apply',

Get the complete story:

The above text is an excerpt from "Oracle Database 10g New Features: Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

Need an Oracle Mentor?

BEI is now offering personal mentors for Oracle DBAs where you can have an Oracle expert right at your fingertips, anytime day or night. We work with hundreds of Oracle databases every year, so we know exactly how to quickly assist you with any Oracle question.

Why risk an unplanned outage? You can now get telephone access to Don Burleson or any of his Oracle Certified DBAs with more than 20 years of full-time IT experience. Click here for details:


Oracle performance tuning book



Oracle performance tuning software

Oracle performance tuning software
Oracle performance Tuning 10g reference poster
Oracle training in Linux commands
Oracle training Excel


email BC:

Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.