MERGE Statement - unable to get a stable set of rows in the source tables

OWB Client: 10.1.0.2.0
OWB Repository: 10.1.0.1.0
I am trying to create a MERGE in OWB.
I get the following error:
ORA-12801: error signaled in parallel query server P004 ORA-30926: unable to get a stable set of rows in the source tables
I have read the other posts regarding this and can't seem to get a fix.
The target table has a unique index on the field that I am matching on.
The "incoming" data doesn't have a unique index, but I have checked and confirmed that it is unique on the appropriate key.
The "incoming" data is created by a join and filter in the mapping and I'd rather avoid having to load this data into a new table and add a unique index on this.
Any help would be great.
Thanks
Laura

Hello Laura,
The MERGE statement does not require any constraints on its target table or source table. The only requirement is that two input rows cannot update the same target row, meaning that all existing target rows can be matched by at most one input row (otherwise the MERGE would be undeterministic since you don't know which of the input rows you would end up with in the target).
If a table takes ages to load (and is not really big) I suspect that your mapping is not running in set mode and that it performs a full table scan on source data for each target row it produces.
If you ARE running in set mode you should run explain plan to get a hint on what is wrong.
Regarding your original mapping, try to set the target operator property:
Match by constraint=no constraints
and then check the Loading properties on each target column.
Regards, Hans Henrik

Similar Messages

  • MERGE error : unable to get a stable set of rows in the source tables

    Hi,
    For an update, the following MERGE statement throws the error-unable to get a stable set of rows in the source tables:
    MERGE INTO table2t INT
    USING (SELECT DISTINCT NULL bdl_inst_id,.......
    FROM table1 ftp
    WHERE ftp.gld_business_date = g_business_date
    AND ftp.underlying_instrument_id IS NOT NULL) ui
    ON ( ( INT.inst_id = ui.inst_id
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.ric = ui.ric
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.isin = ui.isin
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.sedol = ui.sedol
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.cusip = ui.cusip
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    WHEN MATCHED THEN
    UPDATE
    SET INT.inst_id = ui.inst_id, INT.ric = ui.ric
    WHEN NOT MATCHED THEN
    INSERT (inst_key, ......)
    VALUES (inst_key, ......);
    To determine the existence of a record, first check if any match is found on the first key, if not then search for the second key and so on.
    Now two records with differenct first key, i.e. inst_id, can have the same ric(second key). On a rerun, with the target table already populated, the code fails. The reason is it finds duplicate entries for the second key.
    Any suggestions on how to make this work?
    Thanks in advance.
    Annie

    Annie
    You've spotted the problem (that two records have the same RIC). MERGE doesn't allow that; each record in the data being updated is only allowed to be updated once.
    Is there a PK column (or columns) that we can rely on?
    What you can try is to outer join FTP to INT. Something like:
    MERGE INTO INT int1
    USING (
        select columns_you_need
        from (
            select ftp.columns -- whatever they are
                   , int2.columns
                   , row_number() over (partition by int2.pk_columns order by int2.somecolumns) as rn
            from   ftp
            left join int int2
            on (the condition you used in your query)
        where rn=1
    ) s
    WHEN MATCHED THEN UPDATE ...
    WHEN NOT MATCHED THEN INSERT ...So if you can restrict the driving query so that only the first one of the possible updates actually gets presented to the MERGE operation, you might be in with a chance :-)
    And of course this error is nothing to do with any triggers.
    HTH
    Regards Nigel

  • ORA-30926: unable to get a stable set of rows in the source tables

    hi,
    I am loading data from source table to target table in a interface.
    Using LKM incremental update .
    In the merge rows step , getting the below error.
    30926 : 99999 : java.sql.SQLException: ORA-30926: unable to get a stable set of rows in the source tables
    please help as what should be done to resolve this.

    Below is the query in the merge step...
    when i run from SQL also, same error
    SQL Error: ORA-30926: unable to get a stable set of rows in the source tables
    30926. 00000 - "unable to get a stable set of rows in the source tables"
    *Cause:    A stable set of rows could not be got because of large dml
    activity or a non-deterministic where clause.
    *Action:   Remove any non-deterministic where clauses and reissue the dml.
    merge into     TFR.INVENTORIES T
    using     TFR.I$_INVENTORIES S
    on     (
              T.ORGANIZATION_ID=S.ORGANIZATION_ID
         and          T.ITEM_ID=S.ITEM_ID
    when matched
    then update set
         T.ITEM_TYPE     = S.ITEM_TYPE,
         T.SEGMENT1     = S.SEGMENT1,
         T.DESCRIPTION     = S.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT     = S.LIST_PRICE_PER_UNIT,
         T.CREATED_BY     = S.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE     = S.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG     = S.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY     = S.LAST_UPDATED_BY
         ,T.ID     = TFR.INVENTORIES_SEQ.NEXTVAL,
         T.CREATION_DATE     = CURRENT_DATE,
         T.LAST_UPDATE_DATE     = CURRENT_DATE
    when not matched
    then insert
         T.ORGANIZATION_ID,
         T.ITEM_ID,
         T.ITEM_TYPE,
         T.SEGMENT1,
         T.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT,
         T.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY
         ,T.ID,
         T.CREATION_DATE,
         T.LAST_UPDATE_DATE
    values
         S.ORGANIZATION_ID,
         S.ITEM_ID,
         S.ITEM_TYPE,
         S.SEGMENT1,
         S.DESCRIPTION,
         S.LIST_PRICE_PER_UNIT,
         S.CREATED_BY,
         S.DEFAULT_SO_SOURCE_TYPE,
         S.MATERIAL_BILLABLE_FLAG,
         S.LAST_UPDATED_BY
         ,TFR.INVENTORIES_SEQ.NEXTVAL,
         CURRENT_DATE,
         CURRENT_DATE
         )

  • ORA-30926: unable to get a stable set of rows in the source  table

    When user are trying to open a form getting below error.
    com.retek.platform.exception.RetekUnknownSystemException:ORA-30926: unable to get a stable set of rows in the source tables
    Please advice
    Edited by: user13382934 on Jul 9, 2011 1:32 PM

    Please try this
    create table UPDTE_DEFERRED_MAILING_RECORDS nologging as
    SELECT distinct a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    a.drank,
    c.CONTACT_CD,
    c.NEW_CUST_CD,
    a.DM_ROW_ID
    FROM (SELECT a.ROWID AS DM_ROW_ID,
    a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    dense_rank() over(PARTITION BY a.CUST_ID, a.EMP_ID ORDER
    BY a.PURCHASE_DATE DESC, a.ROWID) DRANK
    FROM deferred_mailing a) a,
    customer c
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    and a.drank=1;
    The query you've posted is behaving according to the expectations. The inner select is returning one row and the outer is returning two as the
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    conditions are seeing two rows in the table customer.
    I've added the a.drank=1 clause to skip the duplicates from the inner table and distinct in the final result to remove duplicates from the overall query result.
    For eg, if you have one more row in the deferred_mailing like this
    SQL> select * from DEFERRED_MAILING;
    CUST_ID EMP_ID PURCHASE_
    444 10 11-JAN-11
    444 10 11-JAN-11
    then the query without "a.drank=1" will return 4 rows like this by the outer query.
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    It'll return the below even if we use distinct on the same query(i.e. without a.drank=1)
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    which contains duplicates again.
    So, we need a combination of distinct and dense here.
    btw, Please mark the thread as 'answered', if you feel you got your question answered. This will save the time of others who search for open questions to answer.
    Regards,
    CSM

  • What exactly is: ORA-30926 unable to get a stable set of rows in the source tables

    Oracle 8.0.3
    I was wondering, if any one could tell me more about this error ?
    (ORA-30926)
    The only description in the oracle documentation was that this is caused due to a large amount of DML activity. I thought that Oracle is build to handle that ?
    Any way, any suggestions and explication (even in theory only) are wellcome.

    This is a sample of MERGE:
    MERGE INTO PJ.COMBINED E
    USING (SELECT RES, NET, TYPE, NP_NAME, ADJ_NP_NAME,
    RESOURCE_NAME, PU_NAME, PHY_PU_NAME,
    ADJ_LINK, STAT_NAME FROM PJ.EXT_COMBINED) U
    ON ((E.RES = U.RES) AND (E.NET = E.NET)) WHEN MATCHED THEN UPDATE SET E.TYPE = U.TYPE, E.NP_NAME = U.NP_NAME, E.ADJ_NP_NAME = U.ADJ_NP_NAME, E.RESOURCE_NAME = U.RESOURCE_NAME, E.PU_NAME = U.PU_NAME,
    E.PHY_PU_NAME = U.PHY_PU_NAME, E.ADJ_LINK = U.ADJ_LINK, E.STAT_NAME = U.STAT_NAME
    WHEN NOT MATCHED THEN INSERT (E.RES, E.NET, E.TYPE, E.NP_NAME, E.ADJ_NP_NAME, E.RESOURCE_NAME, E.PU_NAME, E.PHY_PU_NAME, E.ADJ_LINK, E.STAT_NAME) VALUES (U.RES, U.NET, U.TYPE, U.NP_NAME, U.ADJ_NP_NAME, U.RESOURCE_NAME, U.PU_NAME, U.PHY_PU_NAME, U.ADJ_LINK, U.STAT_NAME);
    I use this MERGE process for about 6 tables.
    GD

  • Ora-30926 : unable to get a stable set of rows in source table

    Dear All
    When I try to load my cube I get the error "ora-30926 : unable to get a stable set of rows in source table".
    Any idea? Googling for this error did not return any solutions.
    My env:
    source: Oracle 10g (10.2.x)
    Target: Oracle 11g (11.1.0.7)
    I am using warehouse builder 11.1.0.7 on Linux
    thank you

    Carsten / neashton
    Thanks for your help. Duplicate rows were the issue.
    I finally debugged the problem to my time dimension.
    The OWB wizard generated time dimension contains only date, but no time.
    Unfortunately, for me to uniquely identify my data, I need to include time also (detailed in how do I include 'Time' in a time dimension? .
    Since Carsten was the first one to answer this, I am awarding the points to him.
    thanks a lot both of you
    Edited by: T2 on Jun 2, 2009 4:01 AM

  • I am unable to get into my Mahjong Solitare game at the code entry page

    I am unable to get into my Mahjong Solitaire game at the point of the code page. It used to but now is stopping at a support page.

    what game?  where?  what's the relationship between your game and adobe?

  • Re: getting the source tables into models in designer

    Hi all
    i need help while extracting the source table's to ODI designer
    my source: Oracle
    Question:
    i have given the source schema information. with that information i created logical and physical schema in topology manager.
    And trying to create a model to extract source tables to ODI.
    As i don't have all tables in the same schema (some tables were coming from different users and i don't have the information of those users) am unable to see the those tables when in selective reverse tab.
    i requested them to give select privileges for those tables in the schema which am using.
    after getting the select privileges for those tables.
    will i would be able to see those tables in selective reverse tab?
    Could some one guide me steps in this.
    Thanks

    917704 wrote:
    Hi Alastair
    firstly thank you for your reply.
    my soure is oracle erp.
    i cannot create physical/logical schemas for that user bez as it is head user in oracle erp, i dont have the access for that user.Hi, I've done change data capture from ebusiness suite using ODI, what we did was this :
    get a 'read only' database account set up in the ebiz suite database, this is your connecting user and your work schema (for CDC objects).
    grant select any table, or be more specific if you wish on the objects you need to read data from to ODI, then connect as your read only user but map the physical schemas as you wish.
    Back to your original question, a model can only have one logical schema, which in turn maps to one phyiscal schema - so I think your stuck needing to read across more than one schema on the source system.

  • How to get Materialized View to ignore unused columns in source table

    When updating a column in a source table, records are generated in the corresponding materialized view log table. This happens even if the column being updated is not used in any MV that references the source table. That could be OK, so long as those updates are ignored. However they are not ignored, so when the MV is fast refreshed, I find it can take over a minute, even though no changes are required or made. Is there some way of configuring the materialized view log such that the materialized view refresh ignores these updates ?
    So for examle if I have table TEST:
    CREATE table test (
    d_id NUMBER(10) PRIMARY KEY,
    d_name VARCHAR2(100),
    d_desc VARCHAR2(256)
    This has an MV log MLOG$_TEST:
    CREATE MATERIALIZED VIEW LOG ON TEST with rowid, sequence, primary key;
    CREATE MATERIALIZED VIEW test_mv
    refresh fast on demand
    as
    select d_id, d_name
    from test;
    INSERT 200,000 records
    exec dbms_mview.refresh('TEST_MV','f');
    update test set d_desc = upper(d_desc) ;
    exec dbms_mview.refresh('TEST_MV','f'); -- This takes 37 seconds, yet no changes are required.
    Oracle 10g/11g

    I would love to hear a positive answer to this question - I have the exact same issue :-)
    In the "old" days (version 8 I think it was) populating the materialized view logs was done by Oracle auto-creating triggers on the base table. A "trick" could then make that trigger become "FOR UPDATE OF <used_column_list>". Now-a-days it has been internalized so such "triggers" are not visible and modifiable by us mere mortals.
    I have not found a way to explicitly tell Oracle "only populate MV log for updates of these columns." I think the underlying reason is that the MV log potentially could be used for several different materialized views at possibly several different target databases. So to be safe that the MV log can be used for any MV created in the future - Oracle always populates MV log at any update (I think.)
    One way around the problem is to migrate to STREAMS replication rather than materialized views - but it seems to me like swatting a fly with a bowling ball...
    One thing to be aware of: Once the MV log has been "bloated" with a lot of unneccessary logging, you may perhaps see that all your FAST REFRESHes afterwards becomes slow - even after the one that checked all the 200000 unneccessary updates. We have seen that it can happen that Oracle decides on full table scanning the MV log when it does a fast refresh - which usually makes sense. But after a "bloat" has happened, the high water mark of the MV log is now unnaturally high, which can make the full table scan slow by scanning a lot of empty blocks.
    We have a nightly job that checks each MV log if it is empty. If it is empty, it locks the MV log and locks the base table, checks for emptiness again, and truncates the MV log if it is still empty, before finally unlocking the tables. That way if an update during the day has happened to bloat the MV log, all the empty space in the MV log will be reclaimed at night.
    But I hope someone can answer both you and me with a better solution ;-)

  • Best approach to get the source tables into Target

    Hi
    I am new to Goldengate and I would like to know what is the best approach to get the Source tables to be replicated into the target (oracle to oracle) before performing the initial load without using exp/expdp . Is there any native Goldengate utility which i can use during the initial load or before that will create the tables on the target before loading the data ?
    Thanks

    i dont think so, for the initial load replication your struncture should be available at target machine. once your machines are in sync then you can use goldengate ddl setup for automatically replicate the table with data. 
    Batter approach for you to create a structure on target machine using export improt.  In export use conect=metadata_only for copy the structure only.....
    like
    EXPDP <<user>>/<<password>>@connection_string schemas=abc directory=TEST_DIR dumpfile= gg.dmp Content = metadata_only logfile= gg.log

  • Row should get added in the target as soon as the data in the source table

    I have done the following:
    * The source table is part of the CDC process.
    * I have started the journal on the source table.
    Whenever I change the data in the source, I expect the target to get a new row added with a new sequence number as the surrogate key. I find that even though the source data changes, the new row does not get added.
    Could someone point out to me why is the new row not getting added?

    Step 1 - Sequence Number
    create a sequence in your rdbms namely
    CREATE SEQUENCE SEQUENCE_NAME
    MINVALUE 1
    MAXVALUE 99999
    START WITH 1
    INCREMENT BY 1
    YOU can use the above sequence in your mapping in this way
    schema_name.sequence_name.nextval executed on Target option .
    Next select only Insert option for sequence column .
    Click on the Source datastore and in the Properties panel you will find an option called " Journalized Data Only " . Now whenever this interface runs , only the journalized data gets transferred.
    The other way to see the journalized data from the source side is right click on the source datastore under the model which is journalized and now go to " changed data capture " and then to " journal data .. "
    Now you can see only the journzalied data.
    As CDC creates as trigger at the source , so whenever there is change in the source it gets captured at the target whenver you run the interface above interface with Journalized data only option.
    I hope iam clear and elaborate now.
    Thanks

  • Unable to get Windows 7 partition to connect to the internet.

    Hey all, I have come here in my last ditch effort of desperation.
    I purchased a new 21.5' iMac yesterday and have been trying all day to get Win7 installed via bootcamp. The drive is partitioned, I can early boot in and out of Windows. However, I am unable to connect to the internet.
    I used my Snow Leopard CD while in windows and got the "Unsupported 64" error message. But was able to go open/drivers/apple/BootCamp64 then Troubleshoot, and launched it that way. Which it then installed. I then have done the same and manually installed any driver that it would allow me to (broadcom, intel..etc)
    Since then I can't find any way to connect to the internet either via ethernet or wireless. I downloaded both BootCamp 3.1 and 3.2 onto a USB Drive and installed both on the Windows side, still no progress. I have gone through the control panel and tried to manually install the "Intel Ethernet Drivers" and "Broadcom" drivers from the Snow Leopard disc. Still no luck there, says nothing can be found. The Bluetooth drivers are installed fine, but it is the Ethernet drivers that for some reason will not allow me to connect to the internet in any way.
    Where do I go from here? I called Apple Care and they pretty much said "We dont do Windows, good luck!" Any help would be greatly appreciated.
    (Running on new 2011 21.5' iMac. OS X Snow Leopard and the partition is Windows 7 64...if you are curious about more specs, I can get them for you.)

    Try this, even if you have to uninstall Boot Camp, what can it hurt seeing you are sort of dry docked now anyway:
    Troubleshoot compatibility mode works best when the entire installer directory is copied to windows folder or flash memory and then run. Maybe it modifies or writes some changes to the .msi installer's properties so that they ALL run and install properly. Which did not happen when you installed the 3.0 set to begin with.
    Your OEM DVD that came with new iMac is the best source of drivers. Not from an older or retail DVD Mac OS X.
    Windows on Mac is not 100% seemless, and as you found, not 100% supported - getting devices insalled and enabled which is what those Apple drivers should do, isn't and not having internet access does get asked and posted. Fine if the drivers did their work. "Not found" means you didn't get a good install to begin with which enables devices and chipsets.
    If your Windows install lacks internet, you can't find and update.
    Some have used their first install more as a trial run through test and had better success 2nd time.
    Unfortunate that not all or latest changes to Boot Camp Support aren't showing or listed in its support page.
    http://www.apple.com/support/bootcamp/
    And the KB "recent changes" is hard to wade through and lost in all the consumer device articles.
    http://support.apple.com/kb/index?page=articles

  • HT5019 unable to get turn on display after turning on the power button ,no caps lock is turning on too,even a light at unlock button to open display is not going down , mine was a late 2008 mac book pro ( 17 inch ).please help me to solve my problem

    unable to get my screen on even after turning on power button .
    light at display unlock was not going down ,
    no caps lock button turning on .
    please help me to rectify my problem apple community

    unable to get my screen on even after turning on power button .
    light at display unlock was not going down ,
    no caps lock button turning on .
    please help me to rectify my problem apple community

  • Getting error like Information was stored in the source system

    hai friends...
    In Process chain, selecting particular info package delta and then selcting display messages am getting like...
    "Information was stored in the source system"
    data is not loading in to data targets....
    Edited by: ganandkumar on Sep 15, 2010 10:24 AM

    i am planning to load data in to PSA ...so i started and then it is showing like "
    The last delta update was incorrect !
    Therefore, no new delta update is possible.
    You can cancel the request or:
    Attempt to load the data of the last delta update again
    so now i need to run this and i have to load data in PSA ...
    suggest me friends...

  • Hello i am unable to get into mail set up (it closes instantly) other set up functions y, hello i am unable to get into mail set up (it closes instantly) other set up functions y

    whenever i try to get into mail ,contacts set up , the window closes automatically and instantly. the same applies for contacts, whenever i would click on it it does not open the appication bu get back to general menu
    thanks for your help and tip to get out of this mess;
    by the way i managed at first to set up an email pop in so receive email into "MAIL" but not able to send out and therefore would really need to access mail setting up 

    I personally suggest the new Drobo FS. Since it has an iTunes server built in and you can use any size sata hard drive in it it is better and a NAS that has to use the same size drives.

Maybe you are looking for

  • Lyrics-What's Up?  They don't stay in itunes Can't view on iPod?

    So what gives? I've put lyrics in for several whole albums and they don't stay. Then The ipod says it knows there are lyrics but can't display them. I read the IPOD PDF and it doesn't supply any help. Any suggestions? I put lyrics in a file and selec

  • Users moved out of POWL but still it is running and consume memory.

    We are on SRM6.0 and we have issues with POWL session close. Some users runs POWL w/o any selection which inturns run the POWL forever. While users logoff from the system but still the POWL is running in system and consume lots of memory in system. I

  • Contract - Sales Order - Production Order

    Hi all, i met an error regarding account assignment in sales order. i create sales order refer to contract, then my PP consultant wanna create Production order that refer to sales order, but an error appears. Error: Account assignment cannot be carri

  • Director and external devices

    Hello: I would like to get an online course about Multimedia applications with Lingo/Director and devices like LED's, switches, displays, etc. Controlled by Serial/USB/parallel ports. Do you know where I can get this online course? thank you

  • Remove crashed app that will not update?

    I tried to install an update to iOS Chrome app on my iPad 3. the download crashed and would not restart, and the original app would not launch. So I deleted it. Now it's gone, but I can't reinstall Chrome because the AppStore seems to think its alrea