Tuesday, May 06, 2008

Usage of Autonomous Transactions

This is a very quick way to debug something.

Create this procedure in your package which you want to debug and call debug procedure wherever you want.

Note: biv_debug is a table in oracle applications and it is used by BIV module only in debug mode. You can delete records from this table at any time without any hesitation. How can i say this? Because it was me who created this table to debug BIV application during development and i realized it could be very helpful to fix issues reported by clients. And it did help in few cases. Not too many clients are using BIV module. By now, BIV module must be in maintenance mode.

PROCEDURE debug(p_msg VARCHAR2) IS
   PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
  INSERT INTO biv_debug (report_id,seq_no, message,creation_date)
                 VALUES ('qp_formula',skm_s.nextval, p_msg,sysdate);
  commit;
END;

No comments:

Post a Comment