Showing posts with label Oracle debug. Show all posts
Showing posts with label Oracle debug. Show all posts

Wednesday, 31 October 2012

Debug Oracle Applications.

Below is the piece of code I have been using for quite a while for creating a good debug process in Oracle Applications development environment. It is good enough to be in PROD if we can convince the team too.


Steps:
1.Create a sequence
2.Create a debug table
3.Create a procedure
---
CREATE SEQUENCE APPS.XXC_SEQ
  START WITH 1
  MAXVALUE 99999999
  MINVALUE 1
  NOCYCLE
  CACHE 2
  NOORDER;
/

CREATE TABLE APPS.XXC_DEBUG_TBL(
  SEQ    NUMBER,  MESG   VARCHAR2(1000 BYTE),  DTIME  DATE)

/

CREATE OR REPLACE procedure APPS.XXC_debug(mesg1 in XXC_debug_tbl.mesg%type)
is
    PRAGMA AUTONOMOUS_TRANSACTION;
begin

    insert into XXC_debug_tbl(Seq,mesg,dtime)
    values(XXC_seq.nextval,mesg1,sysdate);
    commit;
      
end;



To call the procedure : xxc_debug('Test message')

And all debug messages are available in xxc_debug_tbl

Integrations Lead - Lessons learnt

 Integrations have been my passion for a while but like anything tech there is no credit given when things go right but always heaps of pres...