Need to raise Business Event after insert or updates on a table

Hi All,
Requirement : I have a Custom table in Oracle E-biz (R12 using 11g database), Whenever any row is inserted or updated on this Custom table, I need to log this changes in an audit table and then raise a Business event.
Please suggest which are the best possible options.
I could sense few options like
1. Using Oracle Alerts (Event)
2. Using Triggers
Thanks,
Santhosh

Thanks for the response.
Let me look into the links which you have sent.
Meanwhile i have few clarifications as given below:
1. If i use triggers, the trigger fires before the transaction is committed.
2. If i use event alerts, i see some delay in the alert firing. I tried creating a separate concurrent program for "Check event alert". But still i dont see any improvement.
Any suggestions on this ..?
Thanks,
Santhosh

Similar Messages

  • Raise business events from BPEL

    How to raise business events from BPEL process?
    Related questions -
    1. Is it possible or good to address this by embedding Java code in BPEL process that raises the business event? If so, what additional jar files should be included?
    2. Any links on API to raise the business events from Java code?
    3. Any links that describe how to raise the business events from BPEL process?

    Hi Guillaume,
    Thanks for your reply.
    Please find below environment details.
    EBS 11.5.10,
    Stand alone SOA Suite v10.1.3.1
    Oracle Apps Adapter
    I am trying to capture PO approval event ('oracle.apps.po.event.xmlpo') raised by BES in BPEL PM.
    I see in the BPEL PM logs that there is a handshake happening between EBS-BES and BPEL PM. But after the handshake, some XML DOM parser errors are thrown.
    I have pasted the error seen in BPEL PM log below
    <2007-08-01 11:33:18,000> <INFO> <default.collaxa.cube.engine> <CubeEngine::loadAllProcesses>
    26 processes have been loaded for BPEL domain "default".
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound>
    ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139)
         at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179)
         at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533)
         at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134)
         ... 6 more
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound>
    ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139)
         at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179)
         at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533)
         at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134)
         ... 6 more
    From the initial assessment, it looks like the event schema defined in BPEL PM and BES event schema mismatch. But I do not know, how to correct it.
    Please let me know, if you have any suggestions in overcoming this issue.

  • SQL merge and after insert or update on ... for each row fires too often?

    Hello,
    there is a base table, which has a companion history table
    - lets say USER_DATA & USER_DATA_HIST.
    For each update on USER_DATA there has to be recorded the old condition of the USER_DATA record into the USER_DATA_HIST (insert new record)
    - to have the history of changes to USER_DATA.
    The first approach was to do the insert for the row trigger:
    trigger user_data_tr_aiu after insert or update on user_data for each rowBut the performance was bad, because for a bulk update to USER_DATA, there have been individual inserts per records.
    So i tried a trick:
    Instead of doing the real insert into USER_DATA_HIST, i collect the USER_DATA_HIST data into a pl/sql collection first.
    And later i do a bulk insert for the collection in the USER_DATA_HIST table with stmt trigger:
    trigger user_data_tr_ra after insert or update on user_dataBut sometimes i recognize, that the list of entries saved in the pl/sql collection are more than my USER_DATA records being updated.
    (BTW, for the update i use SQL merge, because it's driven by another table.)
    As there is a uniq tracking_id in USER_DATA record, i could identify, that there are duplicates.
    If i sort for the tracking_id and remove duplicate i get exactly the #no of records updated by the SQL merge.
    So how comes, that there are duplicates?
    I can try to make a sample 'sqlplus' program, but it will take some time.
    But maybe somebody knows already about some issues here(?!)
    - many thanks!
    best regards,
    Frank

    Hello
    Not sure really. Although it shouldn't take long to do a test case - it only took me 10 mins....
    SQL>
    SQL> create table USER_DATA
      2  (   id      number,
      3      col1    varchar2(100)
      4  )
      5  /
    Table created.
    SQL>
    SQL> CREATE TABLE USER_DATA_HIST
      2  (   id      number,
      3      col1    varchar2(100),
      4      tmsp    timestamp
      5  )
      6  /
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE pkg_audit_user_data
      2  IS
      3
      4      PROCEDURE p_Init;
      5
      6      PROCEDURE p_Log
      7      (   air_UserData        IN user_data%ROWTYPE
      8      );
      9
    10      PROCEDURE p_Write;
    11  END;
    12  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY pkg_audit_user_data
      2  IS
      3
      4      TYPE tt_UserData        IS TABLE OF user_data_hist%ROWTYPE INDEX BY BINARY_INTEGER;
      5
      6      pt_UserData             tt_UserData;
      7
      8      PROCEDURE p_Init
      9      IS
    10
    11      BEGIN
    12
    13
    14          IF pt_UserData.COUNT > 0 THEN
    15
    16              pt_UserData.DELETE;
    17
    18          END IF;
    19
    20      END;
    21
    22      PROCEDURE p_Log
    23      (   air_UserData        IN user_data%ROWTYPE
    24      )
    25      IS
    26          ln_Idx              BINARY_INTEGER;
    27
    28      BEGIN
    29
    30          ln_Idx := pt_UserData.COUNT + 1;
    31
    32          pt_UserData(ln_Idx).id     := air_UserData.id;
    33          pt_UserData(ln_Idx).col1   := air_UserData.col1;
    34          pt_UserData(ln_Idx).tmsp   := SYSTIMESTAMP;
    35
    36      END;
    37
    38      PROCEDURE p_Write
    39      IS
    40
    41      BEGIN
    42
    43          FORALL li_Idx IN INDICES OF pt_UserData
    44              INSERT
    45              INTO
    46                  user_data_hist
    47              VALUES
    48                  pt_UserData(li_Idx);
    49
    50      END;
    51  END;
    52  /
    Package body created.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER preu_s_user_data BEFORE UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Init;
      7
      8  END;
      9  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER preu_r_user_data BEFORE UPDATE ON user_data
      2  FOR EACH ROW
      3  DECLARE
      4
      5      lc_Row      user_data%ROWTYPE;
      6
      7  BEGIN
      8
      9      lc_Row.id   := :NEW.id;
    10      lc_Row.col1 := :NEW.col1;
    11
    12      pkg_audit_user_data.p_Log
    13      (   lc_Row
    14      );
    15
    16  END;
    17  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER postu_s_user_data AFTER UPDATE ON user_data
      2  DECLARE
      3
      4  BEGIN
      5
      6      pkg_audit_user_data.p_Write;
      7
      8  END;
      9  /
    Trigger created.
    SQL>
    SQL>
    SQL> insert
      2  into
      3      user_data
      4  select
      5      rownum,
      6      dbms_random.string('u',20)
      7  from
      8      dual
      9  connect by
    10      level <=10
    11  /
    10 rows created.
    SQL> select * from user_data
      2  /
            ID COL1
             1 GVZHKXSSJZHUSLLIDQTO
             2 QVNXLTGJXFUDUHGYKANI
             3 GTVHDCJAXLJFVTFSPFQI
             4 CNVEGOTDLZQJJPVUXWYJ
             5 FPOTZAWKMWHNOJMMIOKP
             6 BZKHAFATQDBUVFBCOSPT
             7 LAQAIDVREFJZWIQFUPMP
             8 DXFICIPCBCFTPAPKDGZF
             9 KKSMMRAQUORRPUBNJFCK
            10 GBLTFZJAOPKFZFCQPGYW
    10 rows selected.
    SQL> select * from user_data_hist
      2  /
    no rows selected
    SQL>
    SQL> MERGE
      2  INTO
      3      user_data a
      4  USING
      5  (   SELECT
      6          rownum + 8 id,
      7          dbms_random.string('u',20) col1
      8      FROM
      9          dual
    10      CONNECT BY
    11          level <= 10
    12  ) b
    13  ON (a.id = b.id)
    14  WHEN MATCHED THEN
    15      UPDATE SET a.col1 = b.col1
    16  WHEN NOT MATCHED THEN
    17      INSERT(a.id,a.col1)
    18      VALUES (b.id,b.col1)
    19  /
    10 rows merged.
    SQL> select * from user_data_hist
      2  /
            ID COL1                 TMSP
             9 XGURXHHZGSUKILYQKBNB 05-AUG-11 10.04.15.577989
            10 HLVUTUIFBAKGMXBDJTSL 05-AUG-11 10.04.15.578090
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionHTH
    David

  • AFTER INSERT OR UPDATE TRIGGER the insert not working

    The update works but the insert is not working. I have two version that I have tried. I amd executing the inserts/update from Oracle Applications and the table row is either being inserted or updated correctly.
    DROP TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU;
    CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
    /* --Created By: SKELLEHER
    --Creation Date: 07/15/09
    --Last Updated By:
    --Last Update Date:  
    AFTER INSERT OR UPDATE OF department, job_title
    ON apps.hz_org_contacts
    FOR EACH ROW
    WHEN (
    NEW.department <> OLD.department OR
    NEW.job_title <> OLD.job_title
    DECLARE
    v_ChangeType VARCHAR2(10);
    BEGIN
    /* Use 'I' for Insert, 'U'' for Update, and'D' for delete(not part of app at this time). */
    IF INSERTING THEN
    v_ChangeType := 'INSERT';
    ELSIF UPDATING THEN
    v_ChangeType := 'UPDATE';
    ELSE
    v_ChangeType := 'DELETE';
    END IF;
    INSERT INTO cust.ccc_tca_po_tf_event_tbl
    VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
    , 'hz_org_contacts'
    , v_ChangeType
    , 'org_contact_id'
    , :NEW.org_contact_id
    , 'PENDING'
    , NULL
    , 0
    , 'N'
    , 'Y'
    , :NEW.LAST_UPDATED_BY
    , :NEW.LAST_UPDATE_DATE
    , -1
    , SYSDATE
    , 'DEPARTMENT_JOBTITLE_UPDATE'
    ,'LDAP'
    END;
    AND I TRIED ANOTHER VERSION:

    I have simplified it so it's just checking for insert but it's not picking up. Is the syntax IF INSERTING correct?
    CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
    AFTER INSERT OR UPDATE
    ON ar.hz_org_contacts
    FOR EACH ROW
    DECLARE
    BEGIN
    IF INSERTING THEN
    INSERT INTO cust.ccc_tca_po_tf_event_tbl
    VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
    , 'hz_org_contacts'
    , 'UPDATE'
    , 'org_contact_id'
    , :NEW.org_contact_id
    , 'PENDING'
    , NULL
    , 0
    , 'N'
    , 'Y'
    , :NEW.LAST_UPDATED_BY
    , :NEW.LAST_UPDATE_DATE
    , -1
    , SYSDATE
    , 'DEPARTMENT_JOBTITLE_UPDATE'
    ,'LDAP'
    END IF;
    END;
    /

  • Autocreate task raise business event oracle.apps.jtf.cac.task.createTask?

    Hi All!
    How can I check if event oracle.apps.jtf.cac.task.createTask was raised when a task was created?
    This event will raise every time a task is created independent of which process created the task? I mean if the task was automatically created when SR is created or if the task is manually created?
    How can I test this business event manually?
    In our environment (EBS 11.5.10.2) there are following subscriptions to this business event:
    CS_SR_SECURITY_UTIL.SECURE_SR_TASK_OWNER
    jtf_task_wf_subscribe_pvt.create_task_notif_subs
    CS_SR_CHILD_AUDIT_PKG.CS_SR_Audit_ChildEntities
    I have added subscription xxcsf_002_wf_subscribe_pkg.create_task, which calls to function (create_task) in a DB package (xxcsf_002_wf_subscribe_pkg). The first thing I do, before anything else, is logg to a custom table the event of entering the package function but then when task is created in "Enter Request Service" form nothing is logged in the custom table.
    What am I doing worng? Thanks in advance for the help!
    Patricia

    Hello again and thanks Nagamohan,
    The sql returned 0 so that means the event is not fired. How do I make it fire. Isn't it standard? Is there some setup I have to do or enabled somewhere? I have this requierement to create automatically an assignment for tasks automatically created when SR is created in Field Service Technician Portal. I thought I could create the assignment when this business event is raised, which means a task is being created and validating where it is originated from (WEB). I need to set scheduled dates for the task as well. I appreciate the help in this. I would like to use the business event to call on a package function but it is not being fired.
    Thanks in advance and regards,
    Patricia
    Edited by: Patricia Paredes on Feb 2, 2009 9:50 AM
    Edited by: Patricia Paredes on Feb 2, 2009 9:51 AM

  • Raise Business Events based on condition.

    Hi,
    Is there a way to raise a Seeded Business event(oracle.apps.jtf.cac.task.updateTask) based on a condition. I want to raise the business event only if there is a update on a certain type of records( if attribute1 is not null or something like that).
    Is that posiible?? I DO NOT want to use triggers because that will defeat the purpose of using Business Events.
    Also what are the various parameters used for some of the seeded Business Events.
    Thanks
    SB

    It works like this:
    Raising an event is nothing but sending a message to "some one". A message should have content. Parameters are like content of the message. Also the parameters contain who and when they sent it.
    "someone" in this phrase is event subscription (subscriber). This someone, while consuming this message, perform the duty you asked them to do (like executing pl/sql code or start workflow so on). To perform this duty they also need to some information which is in the 'content' of your message.
    Hence the parameters are very specific to the person who raised the event and who is consuming it.
    Every task update will raise an event (like sending a letter) provided the event and subscriptions are enabled. Everyone of these letters will contain task number you just updated.
    task1 updated ---event raised --parameter will have task1
    task2 update -- event raised--parameter will have task2 and so on.
    If you want specific logic raising conditionally, you need to create your own event and raise that event either using trigger or user hooks.
    Thanks
    Nagamohan

  • Enqueue JMS message to JMS advanced queue and raise business event.

    Hi,
    I am needing guidance on how to raise a business event with a JMS message type and enqueue it to an outbound queue WF_JMS_OUT from a PL/SQL stored procedure. I'm on version 11.5.10.2.
    I found an Oracle tutorial "Oracle Workflow and Java Messaging Service (JMS) Tutorial" which describes some of this but it mentions scripts to create the queues, listen for events, etc. and I can not find these (they are not included in the document).
    Any guidance, links or sample code, greatly appreciated!
    Cheers
    Graham

    I tried in the same way. But i got error in OSB.
    The error message is "Failed to lookup connection factory CustomConnectionFactory"
    CustomConnectionFactory -- This is my connection factory name.
    Do i need to make any jndi configurations in weblogic?
    Thank you.

  • Error while raising business event

    Hi all,
    While trying to raise my business event throw "Raise in JAVA" button i get the following error.*Exception occured in Java Raise - Exception when Invoking Web Service -> oracle.apps.fnd.wf.bes.InvokerException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: For input string: ""*
    What could be the reason for this error?
    Thanks and regards,
    Pradeep

    Hi,
    Please see
    Unable To Call Web Service From A Deployed OA Framework Page [ID 848795.1]     
    javax.xml.soap.SOAPException Error While Invoking SOA Webservice From R12 Server [ID 1467361.1]     
    Thanks

  • Capturing value in after insert or update row level trigger

    Hi Experts,
    I'm working on EBS 11.5.10 and database 11g. I have trigger-A on wip_discrete_jobs table and trigger-B on wip_requirement_operations table.When ever i create discrete job, it inserts record in both wip_discrete_jobs and wip_requirement_operations.
    Note:2 tables are like master-child relation.
    Trigger-A: After Insert.Row Level trigger on wip_discrete_jobs
    Trigger-B:After Insert,Row Level trigger on wip_requirement_operations
    In Trigger A:
    I'm capturing wip_entity_id and holding in global variable.
    package.variable:=:new.wip_entity_id
    In Trigger B:
    I'm using the above global variable.
    Issue: Let's say i have create discrete job,it's wip_entity_id is 27, but the global variable is holding the previous wip_entity_id(26),not current value.It looks like before trigger A event is complete, trigger B is also in process, i think this could be the reason it's not storing the current wip_entity_id in the global variable.
    I need your help how to have the current value in the global variable so that i can use that in the trigger B.
    Awaiting response at the earliest.
    Thanks

    798616 wrote:
    Hi Experts,
    I'm working on EBS 11.5.10 and database 11g. I have trigger-A on wip_discrete_jobs table and trigger-B on wip_requirement_operations table.When ever i create discrete job, it inserts record in both wip_discrete_jobs and wip_requirement_operations.
    Note:2 tables are like master-child relation.
    Trigger-A: After Insert.Row Level trigger on wip_discrete_jobs
    Trigger-B:After Insert,Row Level trigger on wip_requirement_operations
    In Trigger A:
    I'm capturing wip_entity_id and holding in global variable.
    package.variable:=:new.wip_entity_id
    In Trigger B:
    I'm using the above global variable.
    Issue: Let's say i have create discrete job,it's wip_entity_id is 27, but the global variable is holding the previous wip_entity_id(26),not current value.It looks like before trigger A event is complete, trigger B is also in process, i think this could be the reason it's not storing the current wip_entity_id in the global variable.
    I need your help how to have the current value in the global variable so that i can use that in the trigger B.
    Awaiting response at the earliest.
    ThanksMy head hurts just thinking about how this is being implemented.
    What's stopping you from creating a nice and simple procedure to perform all this magic?
    Continue with the global/trigger magic at your own peril, as you can hopefully already see ... nothing good will come from it.
    Cheers,

  • After insert or update calculate column

    question about a table.
    I have a table called table1
    AFTER data is inserted or updated into the table1
    I want to run an update on the same table (table1) with a case statement
    update table1
    set column2 = case
    WHEN column1 = 'abc' THEN 'testl'
    WHEN column1 = 'def' THEN 'test2'
    ELSE 'test3'
    END;
    commit;
    END;
    i cant use a trigger because i get error since the insert would be on same table.
    What else can i use for this update ? I cant use a stored procedure that runs daily or something like that because the column2 in the table needs to be populated immediately after an insert or update
    thanks for any ideas

    SQL>  CREATE TABLE TABLE1
      2  (
      3    COLUMN1 VARCHAR2(10),
      4    COLUMN2 VARCHAR2(10)
      5  );
    Table created.
    SQL> CREATE OR REPLACE TRIGGER TRG_TABLE1
      2  BEFORE INSERT OR UPDATE OF COLUMN1 ON TABLE1
      3  FOR EACH ROW
      4  BEGIN
      5
      6  IF :NEW.COLUMN1 = 'abc' THEN
      7     :NEW.COLUMN2 := 'test1';
      8  ELSIF :NEW.COLUMN1 = 'def' THEN
      9     :NEW.COLUMN2 := 'test2';
    10  ELSE
    11     :NEW.COLUMN2 := 'test3';
    12  END IF;
    13
    14  END;
    15  /
    Trigger created.
    SQL> INSERT INTO TABLE1(COLUMN1) VALUES('abc');
    1 row created.
    SQL> SELECT * FROM TABLE1;
    COLUMN1    COLUMN2
    abc        test1
    SQL> UPDATE TABLE1 SET COLUMN1 = 'def';
    1 row updated.
    SQL> SELECT * FROM TABLE1;
    COLUMN1    COLUMN2
    def        test2
    SQL>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Before and After insert or update rowcount

    Hi
    I have several extract objects procs which are calling various build objects procs which in turn are inserting or updating the tables...now when i run these objects sometimes i get no errors and everything seems to be running perfectly but the tables do not get updated ? now what i am trying to achieve here is get some kind of summary where i can see the before and after rowcount..for that i have created a table of every extract object proc and another table with the coressponding tables being updated by tht proc...can anyone pls tell me how should i look into these procs and how do i get the rowcount for a particular table before and after the procedure was run ?
    Thanks a lot in advance

    Hi,
    On which version of RDBMS are you working , because if you're on 10g then just enable auditing or even FGA on the tables were you want to see the changes,
    Then query the DBA-AUDIT (not sure of the name anymore) view.
    If not then create a audit package yourself.
    something like
    create or replace package pck$audit as
    procedure prc$check_tablecount(p_tablename IN VARCHAR2, p_status IN VARCHAR2);
    end;
    create or replace package body pck$audit as
    procedure prc$check_tablecount(p_tablename IN VARCHAR2,p_status IN VARCHAR2) IS
    sqlstr VARCHAR2(100);
    v_count NUMBER;
    begin
    sqlstr := 'SELECT COUNT(*) FROM '||p_tablename;
    EXECUTE IMMEDIATE sqlstr into v_count; --could by 'using v_count' check syntax for this
    INSERT INTO audit_table(table_name,total_count,status,time_stamp)
    VALUES(p_tablename,v_count,p_status,SYSTIMESTAMP);
    COMMIT;
    end;
    end;
    you can elaborate on this creating additional procedure checking differences in total_count on same table at same time.
    Now call this procedure before starting your insert-delete- on your table make sure you put the parameters correct eg p_status => 'begin procedure'
    and call it again after your commit in your procedure.
    Hope this helps you out
    Erwin

  • AFTER INSERT OR UPDATE TRIGGER

    All of my tables have a dateTime field which is used to track when a record was inserted/updated. I would like a trigger on each table that updates the dateTime field with the current date and time after each insert or update. I keep getting a mutating error and I can't quit wrap my brain around how to fix it. Could anyone provide a example.
    I know I am getting the error because I am trying to update the row that is currently being inserted or updated - what is the best way to handle this?
    Thanks

    Hi,
    A trigger before insert or update is better for your case :
    For example :
    SQL> desc tab_param
    DELAI_RETENTION_FLUX NOT NULL NUMBER(5)
    DATE_DEBUT_ALARME NOT NULL DATE
    DATE_DEBUT_HITSTORIQUE NOT NULL DATE
    NB_FLUX_TOTAL NOT NULL NUMBER(5)
    NB_FLUX_PAGE NOT NULL NUMBER(5)
    DATE_COL DATE
    CREATE OR REPLACE TRIGGER TEST_TRG BEFORE INSERT OR
    UPDATE OF DATE_DEBUT_ALARME, DATE_DEBUT_HITSTORIQUE,
    DELAI_RETENTION_FLUX, NB_FLUX_PAGE, NB_FLUX_TOTAL
    ON TAB_PARAM REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    begin
    :new.date_col:=sysdate;
    end;
    Nicolas.

  • Value calcuted using BR need to pulled in VB or to be updated in ora table

    Hi all,
    I just wanna know on how to update a value calculated using BR, in database(oracle,which is the main data src)
    For eg:
    1) My cost is calculated in BR based on the input values given in data form.
    And the calculated value,say some 100,gets stored in member "cost"
    2) In my oracle table,say in table PLN_REVENUE,i've a column as "Cost" or any other name.
    I want the cost calculated in BR to get updated in my oracle table"PLN_REVENUE"
    Is there a way to do it..??
    Or is there a way to directly pull the calculated cost in VB application.As I actually want to use the cost calculated in data form to be used in my VB.
    Any help is appreciable!!
    Thanks !!
    Rev

    Why not use the DATAEXPORT command in HBR nicely FIXed to just the information you want, write it to an export table (or file if you prefer), have a SQL trigger (or if you go the file route, a file watcher routine) waiting for that table/file to get updated, then run an insert to your true target table?
    Just remember that you'll need to have a truncate on the DATAEXPORT target as Essbase appends.
    Alternatively, you could use JExport to do the above -- you have more flexibility in the export and I think that it doesn't append to tables, but DATAEXPORT is likely easier.
    Regards,
    Cameron Lackpour
    P.S. DATAEXPORT can be quite finicky when it comes to output format, hence the intermediate step in the process stream.

  • Events after latest iPhoto update divided themselves on iPad, Apple TV and iPhone

    After the latest iPhoto Update I noticed a strange behaviour: In iPhoto i have about 10 events of photos. When I connect an iPhone or iPad and click on the photos rider in iTunes, there are at least 25 events. For example the Berlin event exists in iPhoto only once. On the i-device the event divided itself in three events! How comes? Bevore the Update everything was fine. iTunes transferred the only existing Berlin event in iPhoto. Now i have 3 events to chose from. And only when I chose all 3 of them I get the full photo set.
    I did not change any settings. Bevore the iPhoto Update everything was fine, now chaos. Any ideas?

    Obviously, I'm not alone with this:
    https://discussions.apple.com/thread/3025390
    https://discussions.apple.com/thread/3023160?start=0&tstart=0

  • Needing help with crashing PhotoShop after Yosemite OS Update

    I updated to the new Yosemite OS and was using PhotoShop CS5.1, and now the program crashes after trying to open more than one photo at a time.  I have cleared all settings and updated everything I can update.  I can't revert back to my old OS because it wasn't backed up before doing so.  Is there a solution to this? 

    Chris, I was not able to help with this Yosemite CS3 problem, but I did ask for a crash report. If you have time can you go over it?
    Another yosemite issue
    Gene

Maybe you are looking for

  • Macbook Pro 2011 running slow - mountain lion

    Hi, Since updating to mountain lion my mbp is running very slow, Have repaired disk permissions and ran clean my mac but no improvements. The hard disk is less than half full and no login items up on start up. What more can I do?

  • Can I use multiple sa-ns500 on the same network?

    Is it possible to use multiple sa-ns500 speakers on the same network?  they seem to want to have the same name on the network and therefore only 1 will connect at a time?  Can I rename one somehow?  Thanks!

  • STO - Delivery - Incorrect PO history update

    Hi Experts, I have created an STO. STO quantity is 100 TO. A Delivery is created using the BAPI BAPI_DELIVERYPROCESSING_EXE. Delivery quantity is 9000 KG. PO history should show the delivery quantity as 9 TO. However, it shows as 9000 TO. What could

  • "ultrasearch.properties"

    Does anyone know where ultrasearch.properties can appear and how it is used by the server? Ultra Search Sample Query Application uses a QueryTool class that needs a properties file. The one that uses is "ultrasearch". Any info about that? Thanx Lambr

  • Help with HTML5 elements rendering in IE 8 and earlier

    I'm having a bit of trouble getting HTHL5 elements to show in Internet Explorer 8 and earlier.  I've attached a couple of java scripts that are supposed to do the trick but not getting success.  I've attached both html5shiv.js and modernizr-1.5.js to