GOLDENGATE WITH TRIGGER

Hi,
Can you please help me on this
How to avoid firing source triggers on target system ?
also how to avoid target system triggers on source system?(like vice versa?)
Is it possible in golden gate?
Thanks in Advance

Hi,
Look at http://download.oracle.com/docs/cd/E18101_01/doc.1111/e17791.pdf
for the Oracle trace table commands
Also look at
DBOPTIONS
[ALLOWLOBDATATRUNCATE | NOALLOWLOBDATATRUNCATE]
[ALLOWUNUSEDCOLUMN]
[CATALOGCONNECT | NOCATALOGCONNECT]
[CONNECTIONPORT <port>]
[DEFERREFCONST]
[DISABLELOBCACHING]
[EMPTYLOBSTRING ‘<string>’]
[FETCHBATCHSIZE <num_recs>]
[FETCHLOBS | NOFETCHLOBS]
[HOST <host ID>]
[LIMITROWS | NOLIMITROWS]
[LOBBUFSIZE]
[LOBWRITESIZE <size>]
[SHOWINFOMESSAGES]
[SHOWWARNINGS]
[SPTHREAD | NOSPTHREAD]
[SUPPRESSTRIGGERS | NOSUPPRESSTRIGGERS]
[TDSPACKETSIZE <bytes>]
[TRUSTEDCONNECTION]
[USEODBC]
[USEREPLICATIONUSER]
[XMLBUFSIZE <buffer size>]
SUPPRESSTRIGGERS |
NOSUPPRESSTRIGGERS
Valid for Replicat for Oracle. Prevents triggers from firing
on target objects that are configured for replication with
Oracle GoldenGate. You can use this parameter for Oracle
10.2.0.5 and later patches, and for Oracle 11.2.0.2 and
later, instead of manually disabling the triggers. To use
this option, the Replicat user must be an Oracle Streams
administrator, which can be granted by invoking
dbms_goldengate_auth.grant_admin_privilege.
The default is NOSUPPRESSTRIGGERS.
Regards,
Edited by: gjilevski1 on Sep 8, 2010 10:26 AM

Similar Messages

  • Problem with trigger and entity in JHeadsart, JBO-25019

    Hi to all,
    I am using JDeveloper 10.1.2 and developing an application using ADF Business Components and JheadStart 10.1.2.27
    I have a problem with trigger and entity in JHeadsart
    I have 3 entity and 3 views
    DsitTelephoneView based on DsitTelephone entity based on DSIT_TELEPHONE database table.
    TelUoView based on TelUo entity based on TEL_UO database table.
    NewAnnuaireView based on NewAnnuaire entity based on NEW_ANNUAIRE database view.
    I am using JHS to create :
    A JHS table-form based on DsitTelephoneView
    A JHS table based on TelUoView
    A JHS table based on NewAnnuaireView
    LIB_POSTE is a :
    DSIT_TELEPHONE column
    TEL_UO column
    NEW_ANNUAIRE column
    NEW_ANNUAIRE database view is built from DSIT_TELEPHONE database table.
    Lib_poste is an updatable attribut in TelUo entity, DsitTelephone entity, NewAnnuaire entity.
    Lib_poste is upadated in JHS table based on TelUoView
    I added a trigger on my database shema « IAN » to upadate LIB_POSTE in DSIT_TELEPHONE database table :
    CREATE OR REPLACES TRIGGER “IAN”.TEL_UO_UPDATE_LIB_POSTE
    AFTER INSERT OR UPDATE OFF lib_poste ONE IAN.TEL_UO
    FOR EACH ROW
    BEGIN
    UPDATE DSIT_TELEPHONE T
    SET t.lib_poste = :new.lib_poste
    WHERE t.id_tel = :new.id_tel;
    END;
    When I change the lib_poste with the application :
    - the lib_poste in DSIT_TELEPHONE database table is correctly updated by trigger.
    - but in JHS table-form based on DsitTelephoneView the lib_poste is not updated. If I do a quicksearch it is updated.
    - in JHS table based on NewAnnuaireView the lib_poste is not updated. if I do a quicksearch, I have an error:
    oracle.jbo.RowAlreadyDeletedException: JBO-25019: The row of entity of the key oracle.jbo. Key [null 25588] is not found in NewAnnuaire.
    25588 is the primary key off row in NEW_ANNUAIRE whose lib_poste was updated by the trigger.
    It is as if it had lost the bond with the row in the entity.
    Could you help me please ?
    Regards
    Laurent

    The following example should help.
    SQL> create sequence workorders_seq
      2  start with 1
      3  increment by 1
      4  nocycle
      5  nocache;
    Sequence created.
    SQL> create table workorders(workorder_id number,
      2  description varchar2(30),
      3   created_date date default sysdate);
    Table created.
    SQL> CREATE OR REPLACE TRIGGER TIMESTAMP_CREATED
      2  BEFORE INSERT ON workorders
      3  FOR EACH ROW
      4  BEGIN
      5  SELECT workorders_seq.nextval
      6    INTO :new.workorder_id
      7    FROM dual;
      8  END;
      9  /
    Trigger created.
    SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
    Session altered.
    SQL> insert into workorders(description) values('test1');
    1 row created.
    SQL> insert into workorders(description) values('test2');
    1 row created.
    SQL> select * from workorders;
    WORKORDER_ID DESCRIPTION                    CREATED_DATE
               1 test1                          30-NOV-2004 15:30:34
               2 test2                          30-NOV-2004 15:30:42
    2 rows selected.

  • Reference partition with Trigger

    This post is an extended version if my previous post -Dynamic Reference partition by Trigger on Feb 24
    I need to create a Dynamic Reference partition with Trigger.
    Requirement:-
    1. It should be a list partition
    2. It should be a referencing Partition (There are 2 tables with Parent Child relation)
    3. It should be dynamic(trigger) (Whenever new value enter to the List, It should be create a New partition by trigger, As per my understanding interval partitioning is dynamic but it will work only for range partition. )
    In other way, I can manually create both the tables with List partition initially itself, but when the new value is added to the List the table supposed to add the new partition. List value is unknown at the time of creation. Since the List value may increase and in future it will be more than five, if it is five we need five partition so partition with a default clause also not possible here.
    Almost I have completed this task, but facing some issues. Please find the example i have done. (Please note that it is just an example and not my actual requirement)
    ==============================================================================================================
    --TABLE 1
    create table customers
    cust_id number primary key,
    cust_name varchar2(200),
    rating varchar2(1) not null
    partition by list (rating)
    partition pA values ('A'),
    partition pB values ('B')
    --TABLE 2
    create table sales
    sales_id number primary key,
    cust_id number not null,
    sales_amt number,
    constraint fk_sales_01
    foreign key (cust_id)
    references customers
    partition by reference (fk_sales_01);
    --TRIGGER
    CREATE OR REPLACE TRIGGER CUST_INSERT
    BEFORE INSERT ON CUSTOMERS FOR EACH ROW
    DECLARE
    V_PARTITION_COUNT NUMBER;
    V_PART_NAME VARCHAR2 (100) := :NEW.RATING;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    SELECT COUNT (PARTITION_NAME)
    INTO V_PARTITION_COUNT
    FROM USER_TAB_PARTITIONS
    WHERE TABLE_NAME = 'CUSTOMERS' AND PARTITION_NAME = V_PART_NAME;
    IF V_PARTITION_COUNT = 0 THEN
    EXECUTE IMMEDIATE 'ALTER TABLE CUSTOMERS ADD PARTITION '||V_PART_NAME||' VALUES ('''||V_PART_NAME||''')' ;
    END IF;
    END;
    --INSERT TO CUSTOMER
    insert into customers values (111, 'OOO', 'C');-- A and B are already in the Customer table List along with the create script, so I am inserting new row with 'C'
    ==============================================================================================================
    When i am inserting the new value 'C' to the customer table it supposed to create a new partition along with new row to the table.
    But I am getting an error like "ORA-14400: inserted partition key does not map to any partition", like partition is not exist.
    But If I execute the same insert statement again it is inserting the row.
    That means Even though it is a before insert trigger, insert is trying to happen before the partition creation.
    Since it is before insert trigger My expectation is
    a) Create a Partition first
    b) Insert the record second
    But actual behavior is
    a) Try to insert first and failing
    b) Creating the partition second
    That is the reason when I am trying second time the record is getting inserted.
    Can anyone help me on this, Thanks in advance.
    Shijo

    You can't do this with a trigger. And you really, really don't want to.
    As you've discovered, Oracle performs a number of checks to determine whether an insert is valid before any triggers are executed. It is going to discover that there is no appropriate partition before your trigger runs. Even if you somehow worked around that problem, it's likely that you'd end up in a rather problematic position from a lock standpoint since you'd be trying to do DDL on the object in the autonomous transaction while doing an insert likely from a stored procedure that would itself be made invalid because of the DDL in another-- that's quite likely to cause an error anyway. And that's before we get into the effects of doing DDL on other sessions running at the same time.
    Why do you believe that you need to add partitions dynamically? If you are doing ETL into a data warehouse, it makes sense to add any partitions you need at the beginning of the load before you start inserting the data, not in a trigger. If this is some sort of OLTP application, it doesn't make sense to do DDL while the application is running. I could see potentially having a default partition and then having a nightly job that does a split partition to add whatever list partitions you need but that would strike me as a corner case at best. If you really don't know what the possible values are and users are constantly creating new ones, list partitioning seems like a poor choice to me-- wouldn't a hash partition make more sense?
    Justin

  • How to update two tables with trigger

    Hi:
    how to update two tables with trigger ?
    I have two tables :
    (1)ASIA
    MI number;
    (2)ASIA_P
    ID number;
    When I insert a new value into the asia.MI ,I also can
    insert the same value into the asia_p.id field.
    I have write a trigger as follows but it does't work.
    create or replace trigger MI_TRG
    before insert on asia
    for each row
    declare
    seq number;
    begin
    select MI_SEQ.Nextval into seq from dual;
    :new.MI:=seq;
    insert into ASIA_PRO(MI_ID)
    values
    (seq);
    end MI_TRG;
    How to realize it ?
    thanks
    zzm

    Why do you say it does not work?

  • Gige vision camera fails with trigger on

    i have gige vision camera sca640-70gc and when i set the trigger mode on it gives fail with line1 and line2 while with trigger mode off it works ok 

    Hi,
    Do you provide a trigger signal on the dedicated input line of your camera such as a TTL signal?
    Regards

  • Keithley 2000 and 7002 with trigger link

    Hello!
    I am writing an application for the 2000 DMM and a 7002 switch system. The instruments are set up with trigger link. What I want to do is simply to load a scan list to the 7002, scan and read back the results from the 2000. Here is what I have so far in terms of SCPI (I have looked at the Keithley LV drivers but I think they complicate stuff + there are no high level functions for trigger link setup included):
    DMM *RST
    SW *RST
    SW Open
    SW Scan (@2!1:2!40)
    SW :TRIGgerOURce TLINk
    SW :TRIGger:TCONfigureROTocol ASYNchronous
    SW :TRIGger:COUNt 40
    SW :ARM:LAYer2:COUNt 1
    DMM :TRIGger:COUNt 40
    DMM :TRIGgerOURce EXTernal
    DMM :INIT:CONT ON
    SW :ARM:LAY1OUR IMM;COUN 1
    SW :ARM:LAY2OUR IMM
    SW :INIT
    DMM :TRACEATA?
    Please advise,
    Stefan

    hi morgue!
    I am doing a program like your, but with Keitlehy 2001.
    To make the syncronization you wrote just these lines? I am doig this in labview, with the programs found in the drivers given by keithley but is not working properly. When I put the triger link, it scans and show just the first measure.
    Do you still have this programm?
    thank you 

  • Problem with trigger and mutating table

    Hello,
    I have a problem with the following trigger. Everytime it starts I got an error message:
    ORA-04091: table ccq_test.QW_QUALIFIER is mutating, trigger/function may not see it
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 3
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 10
    ORA-04088: error during execution of trigger 'QW_AFTER_UPDATE_ALL'
    Here is the trigger:
    CREATE OR REPLACE TRIGGER qw_after_update_all
    AFTER UPDATE ON ccq_test.QW_QUALIFIER FOR EACH ROW
    DECLARE
         CURSOR c1 IS SELECT id AS mx FROM QW_QUALIFIER_LOG WHERE msgid = :NEW.msgid AND messagedate BETWEEN SYSDATE - (1 / (24 * 60 * 6)) AND SYSDATE AND transfer = 1;
         CURSOR c_qwprod IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'product';
         CURSOR c_qwgesch IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'geschaeftsfall';
         qw_rec c1%ROWTYPE;
         qw_prod c_qwprod%ROWTYPE;
         qw_gesch c_qwgesch%ROWTYPE;
    BEGIN
    OPEN c1;
    OPEN c_qwprod;
    OPEN c_qwgesch;
         FETCH c1 INTO qw_rec;
         FETCH c_qwprod INTO qw_prod;
         FETCH c_qwgesch INTO qw_gesch;
         IF c1%NOTFOUND THEN
              IF (:NEW.name = 'product') THEN
                   INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, :NEW.value, qw_gesch.value, SYSDATE, 1);
              ELSE
              INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, qw_prod.value, :NEW.value, SYSDATE, 1);
         END IF;
         ELSE
              IF (:NEW.name = 'product') THEN
                   UPDATE QW_QUALIFIER_LOG SET product=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
              ELSE
                   UPDATE QW_QUALIFIER_LOG SET geschaeftsfall=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
         END IF;
         END IF;
    CLOSE c1;     
    END;
    Can anyone help me?

    You are trying to lookup data from qw_qualifier you are currently modifying. You could see the data in a inconsistent way and Oracle is protecting you from it.
    You could read here about how to program around this problem.
    But: your table design seems questionable. You have two records for qw_qualifier and you are trying to log it into one qw_qualifier_log record. Maybe you could fix that, and the need for querying the same table as you are updating is removed.
    Regards,
    Rob.

  • Help with trigger

    Dear All,
    I have a trigger that works fine when the value is updated by a user but when the value is updated by another trigger it does not seem to work.
    When i log in and update the value in sqlplus it works fine but when I update a value in another table which then calls a trigger which then updates that value in the main table the trigger does not fire.
    This is the scenario. We have a table called payments. When we run a process it sets some values in this payment table.
    When this value is set in the payments table it fires a trigger which then updates the invoice table (paid_date) based on some value in the payments table.
    Now when this value in the invoices table is set by the trigger it is meant to call another trigger which should recognise this new value but this does not hapen.
    however if i go in manually and update the invoice table, the trigger fires.
    Any help will be appreciated.
    Below is the trigger that does not seem to fire.
    I have also included the trigger which sets this value
    create or replace
    TRIGGER INVOICE_PAID before
    UPDATE OF "PAID_DATE" ON "INVOICES" FOR EACH ROW
    DECLARE
    -- check if the invoice.mco_transfer_status has been updated to R
    -- if it has then insert records into the relevant tables
    -- Start the Insert based on the update of invoices.mco_transfer_status
    fa_cnt PLS_INTEGER;
    ecode VARCHAR2(100);
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- do updates based on update of invoices.transfer_status column
    IF :NEW.PAID_DATE IS NOT NULL AND :OLD.PAID_DATE IS NULL
    THEN
    :NEW.MCO_TRANSFER_STATUS := 'R';
    :NEW.TRANSFER_STATUS:='R';
    :NEW.RECONCILED_STATUS:='R';
    INSERT INTO EMCO_INVOICE_STAGE (emco_document_number,invoice_id,raised_date,paid_date,pnr_reference,booking_date,
    gross,currency,forename,surname)
    SELECT :NEW.EMCO_DOCUMENT_NUMBER,:NEW.INVOICE_ID,:NEW.RAISED_DATE,:NEW.PAID_DATE,BK.PNR_REFERENCE,BK.BOOKING_DATE,:NEW.GROSS,
    :NEW.CURRENCY,PX.FORENAME,PX.SURNAME
    FROM BOOKINGS BK, PAX PX
    WHERE BK.BOOKING_ID=:NEW.BOOKING_ID
    AND PX.BOOKING_ID=:NEW.BOOKING_ID AND
    PX.PAX_SEQ=(SELECT MIN(px2.pax_seq) FROM PAX px2 WHERE booking_id=:NEW.BOOKING_ID AND px2.status <>'X' AND px2.pax_type='A' );
    -- Insert into PAYMENTS_STAGE table
    INSERT INTO PAYMENTS_STAGE (EMCO_DOCUMENT_NUMBER, PAYMENT_ID, INVOICE_ID, PAYMENT_DATE,PAYMENT_TYPE,AMOUNT,
    CURRENCY,CARD_NUMBER,TRANSACTIONID)
    SELECT :NEW.EMCO_DOCUMENT_NUMBER,PAYMENT_ID,INVOICE_ID,PAYMENT_DATE,PAYMENT_TYPE,AMOUNT,CURRENCY,CC.CARD_NUMBER,TRANSACTIONID
    FROM PAYMENTS PA, CREDIT_CARDS CC
    WHERE PA.INVOICE_ID=:NEW.INVOICE_ID
    AND CC.CARD_ID = PA.CARD_ID;
    :NEW.MCO_TRANSFER_STATUS:='C';
    SELECT COUNT(*) INTO fa_cnt FROM INVOICE_DETAILS WHERE
    invoice_id=:NEW.INVOICE_ID AND CHARGE_TYPE='FA';
    IF fa_cnt > 0
    THEN :NEW.TICKETING_STATUS:='R';
    ELSE
    :NEW.TICKETING_STATUS:='N';
    :NEW.EXCHANGED_DATE := :NEW.PAID_DATE;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    ecode := SQLCODE|| ' '||SQLERRM ;
    dbms_output.put_line(thisproc || ' - ' || ecode);
    v_value := thisproc || ' - ' || ecode;
    INSERT INTO DOCUMENT_STATUS_STAGE (EMCO_DOCUMENT_NUMBER, STATUS,STATUS_DATE)
    VALUES (:NEW.EMCO_DOCUMENT_NUMBER,v_value,SYSDATE);
    :NEW.MCO_TRANSFER_STATUS := 'F';
    END INVOICE_PAID;
    TRIGGER "CAM_OWNER"."CHECK_INVOICE_PAID_IN_FULL" AFTER
    UPDATE OF "PAYMENT_STATUS" ON "CAM_OWNER"."PAYMENTS"
    DECLARE
    -- check if all the payments for that invoice have been received (completed)
    -- if they are complete then sum all the payments for that invoice and compare to gross value on invoices
    v_invoice_amount NUMBER;
    v_gross_amount NUMBER;
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- Changed as requested by nicola on 12/09/05 IF :NEW.PAYMENT_COMPLETE is not null
    --IF :NEW.PAYMENT_STATUS='C' AND :NEW.PAYMENT_STATUS <> :OLD.PAYMENT_STATUS
    --THEN
    CHECK_INVOICE_PAID_IN_FULL_PRO;
    --END IF;
    END CHECK_INVOICE_PAID_IN_FULL;
    and this is the procedure that is called
    PROCEDURE "CHECK_INVOICE_PAID_IN_FULL_PRO" IS
    -- check if all the payments for that invoice have been received (completed)
    -- if they are complete then sum all the payments for that invoice and compare to gross value on invoices
    v_invoice_amount NUMBER(20);
    v_gross_amount NUMBER(20);
    thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
    v_value VARCHAR2(150);
    BEGIN
    -- We will sum all the payments for that invoice that have a value in payment_complete
    --select sum(amount) into v_invoice_amount from payments where payment_complete is not null and invoice_id=:NEW.INVOICE_ID;
    FOR x IN (SELECT invoice_id FROM PAYMENTS_TEMP) LOOP
    SELECT NVL(SUM(amount),0) INTO v_invoice_amount FROM PAYMENTS
    WHERE payment_status ='C' AND invoice_id=X.INVOICE_ID;
    SELECT NVL(gross,0) INTO v_gross_amount FROM INVOICES WHERE
    invoice_id =X.INVOICE_ID;
    -- We will also get the gross amount for the invoice to compare to the sum of the payments
    IF v_invoice_amount = v_gross_amount
    THEN
    UPDATE INVOICES SET paid_date=SYSDATE
    WHERE invoice_id=X.INVOICE_ID;
    END IF;
    END LOOP;
    END CHECK_INVOICE_PAID_IN_FULL_PRO;

    The following demonstration is a direct response to your original question, in case you want to stick with that method of scheduling your index rebuilds through a trigger. In order to do ddl like alter index you will need to use dynamic sql like execute immediate. Since you can't rebuild the index before the insert or update has been committed, you will need to use dbms_job.submit to schedule the rebuild. In the following example, the index rebuild will be done as soon as the insert or update has been committed.
    scott@ORA92> CREATE TABLE cc_contenidos (cvalor CLOB)
      2  /
    Table created.
    scott@ORA92> CREATE INDEX cont ON cc_contenidos (cvalor) INDEXTYPE IS ctxsys.context
      2  /
    Index created.
    scott@ORA92> SELECT last_ddl_time FROM user_objects WHERE object_name = 'CONT'
      2  /
    LAST_DDL_TIME
    24-JAN-2005 21:10:13
    scott@ORA92> CREATE OR REPLACE PROCEDURE alter_index_cont
      2  AS
      3  BEGIN
      4    EXECUTE IMMEDIATE 'ALTER INDEX cont REBUILD ONLINE PARAMETERS (''sync memory 45M'')';
      5  END;
      6  /
    Procedure created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> CREATE OR REPLACE TRIGGER actualiza
      2    AFTER DELETE OR INSERT OR UPDATE on cc_contenidos
      3  DECLARE
      4    v_job NUMBER;
      5  BEGIN
      6    DBMS_JOB.SUBMIT (v_job, 'alter_index_cont;', SYSDATE);
      7  END actualiza;
      8  /
    Trigger created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> INSERT INTO cc_contenidos (cvalor) VALUES ('test 1')
      2  /
    1 row created.
    scott@ORA92> INSERT INTO cc_contenidos (cvalor) VALUES ('test 2')
      2  /
    1 row created.
    scott@ORA92> COMMIT
      2  /
    Commit complete.
    scott@ORA92> EXECUTE DBMS_LOCK.SLEEP (15)
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT last_ddl_time FROM user_objects WHERE object_name = 'CONT'
      2  /
    LAST_DDL_TIME
    24-JAN-2005 21:10:17
    scott@ORA92> SELECT * FROM cc_contenidos WHERE CONTAINS (cvalor, 'test') > 0
      2  /
    CVALOR
    test 2
    test 1
    scott@ORA92>

  • JDeveloper 10g Creating a new record with trigger sequence primary key

    Hi there, I'm sorry to post this incredibly simple question and I'm sure that someone must have answered this on this forum before but the searching of this site is incredible slow and painful and after 30 mins I can't find help.
    I am using a struts Data Action to create a new record in the database and then being forwarded to an edit page where I can enter the new details. Then when the details are entered I am clicking an update button and returning to a browse screen where I can either commit the change to the database or rollback. Sounds pretty simple but I am really struggling with trying to get the trigger of the number sequence to work properly.
    Ideally I would like to click the create new record button and then the primary key/triggered sequence number is already displayed on the empty form...
    ... but if this is too tricky or not possible then I would like the user to either not enter any value in the key field (which currently causes error - JBO-27014: Attribute PoNo in PO_SYS_MODULE.PoSystemView1 is required) OR the user enters a number and the trigger overwrites this number with the next in the sequence.
    I can enter a new record if I look in the manager console and see the next number in the sequence and then create the record using this number and then click commit twice, as the first time I get the error: JBO-25019: Entity row of key oracle.jbo.Key[154 ] not found in PoSystem. Or if I enter a value 5 times greater than the next in the sequence I have to click the commit button 5 extra times to get the sequence to match the input.
    I hope that this lengthy explanation fills you in on my problem, there must be a simple solution to this and I will be VERY grateful to anyone who can help me.
    Many thanks
    Ben Sayers (clearly a newbie)

    Hi,
    ADF Business Components handles this for you - unless yo prefer doing this manually. In the Entity Object, set the PK attribute's type to DBSequence. Then create a database sequence and use a database trigger to add the sequence value on insert
    Frank

  • Problem with "/:trigger"

    I got some troubles with AS1.0 (player 6) which I want to
    convert to AS2.0 with flash player 8.0.
    The errors i get is right here, who can help me convert it to
    AS2.0?
    **Error** Symbol=script, layer=script, frame=2:Line 2:
    Unexpected '/' encountered
    /:trigger = Number(/:trigger)+Number(/:trigger);
    **Error** Symbol=script, layer=script, frame=2:Line 3:
    Unexpected '/' encountered
    if (Number(/:trigger)>100) {
    **Error** Symbol=script, layer=script, frame=2:Line 4:
    Unexpected '/' encountered
    /:trigger = "100";
    **Error** Symbol=script, layer=script, frame=2:Line 5:
    Unexpected '}' encountered
    } else if (Number(/:trigger)<Number(-100)) {
    **Error** Symbol=script, layer=script, frame=2:Line 6:
    Operator '/' must be followed by an operand
    /:trigger = "-100";
    **Error** Symbol=script, layer=script, frame=2:Line 7:
    Unexpected '}' encountered
    Attach Code

    N.H.L.,
    > The errors i get is right here, who can help me convert
    it
    > to AS2.0?
    >
    > **Error** Symbol=script, layer=script, frame=2:Line 2:
    > Unexpected '/' encountered
    > /:trigger = Number(/:trigger)+Number(/:trigger);
    As the error shows, you're using a character that doesn't
    make sense to
    the compiler in this context. That character is a slash (/).
    What you've
    got here is a case of old school slash syntax, which is the
    way objects and
    movie clips were referenced in Flash 3 and 4. See details
    here:
    http://livedocs.macromedia.com/flash/8/main/00001691.html
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Issue with trigger, multi-table insert and error logging

    I find that if I try to perform a multi-table insert with error logging on a table that has a trigger, then some constraint violations result in an exception being raised as well as logged:
    <pre>
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create table t1 (id integer primary key);
    Table created.
    SQL> create table t2 (id integer primary key, t1_id integer,
    2           constraint t2_t1_fk foreign key (t1_id) references t1);
    Table created.
    SQL> exec dbms_errlog.create_error_log ('T2');
    PL/SQL procedure successfully completed.
    SQL> insert all
    2 into t2 (id, t1_id)
    3 values (x, y)
    4 log errors into err$_t2 reject limit unlimited
    5 select 1 x, 2 y from dual;
    0 rows created.
    SQL> create or replace trigger t2_trg
    2 before insert or update on t2
    3 for each row
    4 begin
    5 null;
    6 end;
    7 /
    Trigger created.
    SQL> insert all
    2 into t2 (id, t1_id)
    3 values (x, y)
    4 log errors into err$_t2 reject limit unlimited
    5 select 1 x, 2 y from dual;
    insert all
    ERROR at line 1:
    ORA-02291: integrity constraint (EOR.T2_T1_FK) violated - parent key not found
    </code>
    This doesn't appear to be a documented restriction. Does anyone know if it is a bug?

    Tony Andrews wrote:
    This doesn't appear to be a documented restriction. Does anyone know if it is a bug?Check The Execution Model for Triggers and Integrity Constraint Checking.
    SY.

  • Issue with Trigger on table

    Hi,
    I have table TEMP AS (SNO NUMBER,
    STATE VARCHAR2(50),
    UPDATE_DATE DATE)
    I want to create trigger on this table like whenever there is update in STATE of temp table UPDATE_DATE columns get updated.
    I am trying to create trigger using PRAGMA Autonomous transaction but it is not working with this and withouht PRAGMA.
    With PRAGMA I am getting error "ORA-00060: deadlock detected while waiting for resource".
    Is it possible to create trigger on this table for updating columns of same table.
    Edited by: user6040008 on Dec 11, 2012 1:08 AM

    Hi,
    This is not valid forum for questions like that. Please use {forum:id=75} forum. However you can use following code:
    create or replace trigger xx
    before update of state
    on cabasys.temp
    for each row
    begin
    :new.update_date := sysdate;
    end; Edited by: kikolus on 2012-12-11 10:40

  • Auditing with trigger. Whats the best way?

    Hello,
    I would like to record any change in my data using triggers.
    For Example, I have the following tables:
    create table members
    ( member_id number,
    name varchar2(100),
    password varchar2(100),
    address varchar2(100),
    some other attributes ...
    and
    create table members_audit
    ( counter_seq number
    stamp date,
    action varchar2(1),
    member_id number,
    name varchar2(100),
    password varchar2(100),
    address varchar2(100),
    some other attributes ...
    Now, I would like to create a trigger that records and saves every change.
    But only if there has really something changed.
    Therefore, I got to compare every single OLD variable with the NEW variable. Is there a possibility to simply pass every single colum of the OLD variable and the NEW variable in a loop?
    Do I have to create an extra trigger for each table or can I do something like this:
    Create the following trigger for each table:
    CREATE OR REPLACE TRIGGER my_trigger AFTER INSERT OR DELETE OR UPDATE ON [every_table] FOR EACH ROW
    The whole auditing-table name is put together using the table name plus "_audit":
    So, for example if I have the table "members" the trigger auditing table should be "memebers_audit". My auditing table for the table "customers" is "customers_audit". I do not want to create a trigger for every table manually.
    Can I create a trigger on the whole schema?
    How can I solve this problem?
    Thank you in advance,
    Christian

    Thank you Justin and zsirotic for your answer.
    Justin, with your statement:
    You may be able to create a script that generates the CREATE
    TRIGGER code for you, though.What did you mean? Is it possible to use such scripts with oracle? Whats the name for that? For what keywords I have to look after?
    Or did you mean to write just a simple shell script that produces the needed code?
    I thought to use the Workspace manager, but this is a feature only oracle has. And we don't know at this time clear that we will stay by oracle all the time.
    So I will write on Trigger for every of the nearly 200 Tables in 7 user schemas ... Thats a much of work. Okay, but it will be the fastest solution because the triggers are compiled only once I think.
    Is it possible to write such code in the trigger:
    insert into members_audit values (DEFAULT, SYSDATE, 'U', old.*)
    Is there somethin like the old.* or will I have to write:
    insert into members_audit values (DEFAULT, SYSDATE, 'U', old.member_id, old.name, old.password, old.address, old.some other attributes ...)
    Thank you,
    Christian

  • Need help with trigger comp err

    i'm new to forms and triggers. I am trying to do a simple "select into" from the "previous" record so I can see what was the value of a column was and bump it up by one. The code for a post_text_item trigger is:
    select
    anum
    from
    x
    where
    x.pageid = :pageid;
    the gist of the error is that the compile acts like it never heard of table "x", even though the form is built on table "x"! the err is - PDE-PSD001 - Could not resolve ref to unk program unit while loading block ...
    any thoughts??
    thanks in advance,
    Burt
    null

    Sudha -
    actually -
    if the table I mention in the trigger contains an Ordsys.Ordimage column, the trigger blows. I guess the little procedure builder guy cant deal with the intermedia stuff too well/at all. I created a view from the table with the image, but didn't include the image in the view. I referenced the view in the trigger and everything went just fine.
    thanks for your input
    burt
    null

  • How to synchroniz​e several compiled LabVIEW VIs with trigger?

    - We have a timer (LabVIEW-VI).
    - We also have several different other files who should listen to the timer.
    Triggering with notifications wont work because copilation gives an own thread for each app. Notifications work only in the same thread...
    Triggering with a global doesnt work also!
    Seems to be the same problem...
    Someone have an idea how to send a trigger from one compiled VI to another?
    (We dont want to communicate over a file by the way.. )

    I'm assuming that you're talking about built applications (.exe files) since all VIs are compiled. To communicate between applications, you can use ActiveX, TCP/IP, or datasocket. Datasocket might be the easiest. Set the time program to be a datasocket writer and have a datasocket read in the other programs.

Maybe you are looking for

  • To-dos in ICal on the IPhone?

    Is there any way to have the to-dos in ICal show up on the IPhone? If not, will this be possible in 2.0?

  • Cash Flow and recurring postings

    Hi Experts, I have a client who needs to have Recurring postings show on the Cash Flow report. I have tested this by entering a few recurring postings and found that only the recurring postings made to the check clearing accounts shows. The other rec

  • Dynamic Storage Bin

    I receive materials in storage type 902 with movement type 101 with dynamic storage bin = purchase order number. Now I have to transfer this material to storage type 002 again with dynamic storage bin to be entered manually. This dynamic bin can have

  • Credit Card Payment - Configuration steps

    Hi All, Requested to share the configuration steps for the credit card payment process/card payment. Regards,

  • My ipod touch 4 music quality is much poorer with IOS 6 upgrade. How can I get IOS 5 music quality back?

    My ipod touch 4 music quality is much poorer with IOS 6 upgrade. How can I get IOS 5 music quality back? No available eq setting is acceptable. Right now, I feel like driving a nail through it.