Problem with Merge in database adapter

Hi Everyone,
For my Bpel process I have the following:
1) File adapter
2) Receive activity
3) Transforms activity
4) Invoke activity
5) Database adapter
My Bpel process is working fine, no errors. It pick up the file ---> sends it to receive --> then transform the records --> then Invoke sends it to DB adapter to presist the records.
For the setting of my DB adapter, to preform an operation on my table I chose Insert or update option.
when running the same process multipul times my records in the table get duplicated. I dont understand why that is happening since I chose insert or update option in the DB adapter ??
How can I make my DB adapter overwrites the same records in the database if my file adapter picked up the same file that contains the same records ??
Thanks in Advanced,
AJ

Are you talking of a one off exercise, or is this something you want to happen every time a file is received.
Yes, what I mean if you want this as an on going step in your process then you would need to modify your existing process to add a new DB partnerlink that deletes the records. You could create a stored procedure that does both insert and delete if you only want one DB call though. This would replace your existing Db partner link that does the inserts.
cheers
James

Similar Messages

  • There is a problem with the Outlook database.  Your database could not be rebuilt. [-18000]

    For home use, I recently changed from Windows PC to MacBook Air.  I have an iPhone 4 which I synched without problem to the PC.  Since I have used Outlook for years on Windows and trusted advisors assured me Microsoft Office on the Mac is the same as Microsoft Office on Windows, I decided to continue using Microsoft Office.  Because I cannot get my Outlook calendar to sync reliably to iCal / iPhone and because I have found a small but meaningful number of features I use daily in Outlook Windows do not work on Outlook Mac, I have never been in so much pain!
    The latest problem is Outlook does not complete startup.  I get this error:
    There is a problem with the Outlook database.  To use the database, you must rebuild it using the Database Utility.
    I run the utility but it never completes successfully. 
    Step 1 of 5: Scannning...
    Step 2 of 5: Verifying...
    Step 3 of 5: Copying records to new database...
    Step 4 of 5: Recovering data...
    Your database could not be rebuilt. [-18000]
    I have found many articles about this problem but they all seem to assume that you can successfully start Outlook then you rebuild the database to fix data corruption in Outlook.
    What if I Outlook never completes startup?

    Here are the steps that solved the Outlook data corruption problem.
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macoutlook/your-datab ase-could-not-be-rebuilt/5caff467-3ab2-464a-9fe6-00ad913b5f2e
    The question was:  Your database could not be rebuilt
    The key is to create a new Outlook Identity, remove the database file, then copy your data records into the new identity and use the Outlook database utility to rebuild the database.
    It's a wonderful feeling to see Outlook start up successfully after a few days of downtime!

  • There is a problem with the Office database - Office 2011

    Good day!
    I recently installed Office 2011 for Mac and i'm getting the following error message: There is a problem with the Office database. Excel comes up with the error message but i am able to get past the error and open the application, but it freezes when I try on Word. I have to force quit the application to close it completely.
    I've searched online and tried all the suggestions - even those from the discussion board: Problem with Office Mac 2011 database. I've completely removed traces of the software : http://support2.microsoft.com/kb/2398768 and reinstalled using the disc,  as well as followed suggestions to rebuild the database. I also installed the latest Office update: http://www.microsoft.com/en-us/download/details.aspx?id=44026 from Excel (As it was the only one I know of that's functioning after the error message) but to no avail.
    Here are the tech specs:
    OS X
    version 10.9.5
    Office 2011 for Mac
    Version 14.4.4 (140807)
    Update: 14.4.4
    Hope you guys can point me to the right direction. Any suggestions are greatly appreciated.

    Best ask question on one of the Microsoft boards.
    Could try NeoOffice.
    https://www.neooffice.org/neojava/en/index.php

  • Performance problem with MERGE statement

    Version : 11.1.0.7.0
    I have an insert statement like following which is taking less than 2 secs to complete and inserts around 4000 rows:
    INSERT INTO sch.tab1
              (c1,c2,c3)
    SELECT c1,c2,c3
       FROM sch1.tab1@dblink
      WHERE c1 IN (SELECT c1 FROM sch1.tab2@dblink);I wanted to change it to a MERGE statement just to avoid duplicate data. I changed it to following :
    MERGE INTO sch.tab1 t1
    USING (SELECT c1,c2,c3
       FROM sch1.tab1@dblink
      WHERE c1 IN (SELECT c1 FROM sch1.tab2@dblink) t2
    ON (t1.c1 = t2.c1)
    WHEN NOT MATCHED THEN
    INSERT (t1.c1,t1.c2,t1.c3)
    VALUES (t2.c1,t2.c2,t2.c3);The MERGE statement is taking more than 2 mins (and I stopped the execution after that). I removed the WHERE clause subquery inside the subquery of the USING section and it executed in 1 sec.
    If I execute the same select statement with the WHERE clause outside the MERGE statement, it takes just 1 sec to return the data.
    Is there any known issue with MERGE statement while implementing using above scenario?

    riedelme wrote:
    Are your join columns indexed?
    Yes, the join columns are indexed.
    You are doing a remote query inside the merge; remote queries can slow things down. Do you have to select all thr rows from the remote table? What if you copied them locally using a materialized view?Yes, I agree that remote queries will slow things down. But the same is not happening while select, insert and pl/sql. It happens only when we are using MERGE. I have to test what happens if we use a subquery refering to a local table or materialized view. Even if it works, I think there is still a problem with MERGE in case of remote subqueries (atleast till I test local queries). I wish some one can test similar scenarios so that we can know whether it is a genuine problem or some specific problem from my side.
    >
    BTW, I haven't had great luck with MERGE either :(. Last time I tried to use it I found it faster to use a loop with insert/update logic.
    Edited by: riedelme on Jul 28, 2009 12:12 PM:) I used the same to overcome this situation. I think MERGE needs to be still improved functionally from Oracle side. I personally feel that it is one of the robust features to grace SQL or PL/SQL.

  • Problems with Merging Account

    Hi Experts,
    I have 2 problems with merging accounts:
    1) Opportunity is not moved from source data to master data. I do not know why. Central BP is changable.
    2) Contact Person is only copied, not moved. This causes problems later on when we want to delete the source data.
    Any idea how to solve this?
    Best regards,
    Cristina

    Hi Arno:
    First of all: Thanks for answering my thread!
    The problem with opportunities in my system is, that they are not merged at all, not even with the batch job. I checked trx. BUSWU02. Node CRM370 is assigned to variant CLEAR_REP.
    Also the central Business Partner in opportunity remains changable, once the opportunity was saved.
    Anything else I have to check??
    Best regards,
    Cristina

  • Problem with making a database link.

    Hello All
    I got a problem with making a database link.
    When I execute this query
    CREATE PUBLIC DATABASE LINK DBNAME
    CONNECT TO database IDENTIFIED BY name
    USING 'DBNAME.europe.company.com';
    I am using other names because its private information
    But when I look at the table dba_db_links I see this
    OWNER | DB_LINK | USERNAME |HOST
    PUBLIC| DBNAME.europe.company.com| name| DBNAME.europe.company.com
    So the DB_Link name is changed. And this causes a problem with my asp website. I get the fault message
    ORA-02085: database link DBNAME.europe.company.com connects to DBNAME
    Cause: a database link connected to a database with a different name. The connection is rejected.
    The global_names = true and I prefer to keep it that way.
    So does anyone knows what is wrong about my Query or how I can change the DB_Link name.
    Thanks for the support,
    Remco

    Thanks for the help Mohit
    But thats whats I was doing.
    The query in the first post is the same as what you are posting.
    But by an (for me) unknown reason the database converts DBNAME to DBNAME.europe.company.com

  • Problem with XML SQL  JDBC adapter

    Hello All.
    I have quite strange problem with my PI.
    Whole scenario is SOAP -> JDBC, asynchronous. Everything works fine on DEV server. After transporting objects (using CTS) to QA env I'm getting this error:
    JDBC Message processing failed, due to Error processing request in sax parser:
    No 'action' attribute found in XML document
    (attribute "action" missing or wrong XML structure)
    But document seems to be correct. I've compared it to DEV server documents - they are identical. What could be wrong??
    Document looks like this:
    <ns2:BIPMessage xmlns:ns2="http://mynamespace.com/xi/sn"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <synchSlLok>
       <STATEMENTNAME>
         <SYNCH_SL_LOK ACTION="INSERT">
            <TABLE>SYNCH_SL_LOK</TABLE>
             <ACCESS>
                <ID_TRANS>22050</ID_TRANS>
                <ID_LOK>1234</ID_LOK>
                <ID_CBK>1000050911</ID_CBK>
                <NR_LOK>1234</NR_LOK>
                <OPIS_LOK>12312312312312</OPIS_LOK>
                <TYP>D</TYP>
                <OPERACJA>U</OPERACJA>
              </ACCESS>
          </SYNCH_SL_LOK>
        </STATEMENTNAME>
      </synchSlLok>
      </ns2:BIPMessage>
    TIA
    Best Regads
    Maciej

    Hi,
    i was also facing the same error few days back in a JDBC -RFC-JDBC Synchronous scenario. In that scenario, i was using 2 modules in JDBC sender module tab. It was working fine. later i change polling interval and then i started getting same error. it happened coz of sequence of Module got changed somehow.
    So please check in Receiver JDBC adapter and SOAP sender adapter CC  if anything is changed. If this scenario is working in DEV as it is then it should work after transport.
    Else have a look here
    Re: attribute "action" missing or wrong XML structure
    JDBC - No 'action' attribute found in XML document - error
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Mar 15, 2011 10:42 AM

  • Problem with SP 15 (File-Adapter etc.)

    Hallo,
    has anybody face to problems with sp 15? It may be a problem with the file-adapter. Whats yours experiences with sp 15?
    Thanks in advance,
    Frank

    Hi Frank,
    I am not sure about the issues with SP15, but Michal's Frequently Asked Questions blog talks about what to do if your adapters are not shown after an upgrade to some SP. Just check it out,
    /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    Question 3 under Adapters,
    I can't see my adapters in the adater monitoring after the import of a new SP
    a) try reimporting "SAP Basis software component"
    b) take a look at the XI installation guide on how to do it: "Importing the XI Content for Software Component Version SAP Basis 6.40"
    Regards,
    Bhavesh

  • Problem with MERGE statement

    Hi All,
    We are encountering a strange problem with the merge command.
    The following statement works :-
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.group_id,
              a1.NAME,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    However when we change the order of the columns in the select query as follows the an error occurs : -
    merge into ATTRIBUTE_GROUP@US_PRODUCT_UAT a
    using
         select
              a1.NAME,
              a1.group_id,
              a1.CREATE_DATE,
              a1.MODIFY_DATE
         from
              ATTRIBUTE_GROUP_LOG a1,
              product_push_wrk a2
         where
              a2.column_id = a1.group_id and
              a2.modify_date = a1.modify_date ) b
    on ( a.group_id = b.group_id)
    when matched then
         update set
              a.NAME = b.NAME,
              a.CREATE_DATE = b.CREATE_DATE,
              a.MODIFY_DATE = b.MODIFY_DATE
    when not matched then
         insert
              a.group_id,
              a.NAME,
              a.CREATE_DATE,
              a.MODIFY_DATE
         values
              b.group_id,
              b.NAME,
              b.CREATE_DATE,
              b.MODIFY_DATE
    ERROR at line 15:
    ORA-00904: "B"."GROUP_ID": invalid identifier
    SQL> l 15
    15* on ( a.group_id = b.group_id)
    The structure of the attribute_log table is as follows :-
    SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE NOT NULL DATE
    MODIFY_DATE NOT NULL DATE
    Any pointers to the cause of this error will be highly appreciated.
    Thanks and Regards,
    Suman

    The table structures are as follows :-
    04:17:17 SQL> desc product_push_wrk
    Name Null? Type
    COLUMN_ID NOT NULL NUMBER
    TYPE NOT NULL VARCHAR2(10)
    PARENT_COLUMN_ID NUMBER
    LEVEL_NO NUMBER
    MODIFY_DATE NOT NULL DATE
    04:17:25 SQL> desc ATTRIBUTE_GROUP_LOG
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE
    04:18:02 SQL> desc ATTRIBUTE_GROUP
    Name Null? Type
    GROUP_ID NOT NULL NUMBER
    NAME NOT NULL VARCHAR2(96)
    CREATE_DATE DATE
    MODIFY_DATE DATE

  • ICloud not syncing and Contact problems with merging duplicates

    I was having problems with the syncing of my notes app. When I got the iphone 5 I had since using Mountain Lion I had started to make use of the fact that the notes sync across iCloud. Great. Although not for long. Everything was going fine notes were syncing across devices but then spontaneously they stopped syncing for no apparent reason. I then went to look in settings, looked online and all through discussion forums. Switching notes on and off on icloud both on the macbook and on my iphone. Restarting devices etc etc. iCloud itself online was not able to access the notes app. I kept getting error messages that I would submit to apple. Then I finally relqinquished and unhooked the iCloud accounts from the computer and phone. And at the sacrifice of losing albums in my photostream they sprung back to syncing.
    Then the real problem happened. I had selected to keep a copy of my address book in contacts when I unhooked my computer just in case. When everything linked back up again, I then had duplicates in my address book. Not 1 (this can happen just having icloud active) but 5 sets of duplicates, granted I had kept a version from when I unhooked. So I looked around again for how I could quickly and easily get rid of duplicates. Following suggestions online I go into contacts>cards>look for duplicates. I had 1200 or somthing duplicates, so naturally when given the option "would you like to merge the info in these duplicates I click yes. The MacBook starts to chugg away. Its gonna take a while. So I come back later. And before returning to CONTACTS, go to send a message from MESSAGES and I notice that 80% of the threads have no name. I go back to CONTACTS and WHAM 100s of contacts disappeared in the merge never to be retrieived again. You cant restore CONTACTS from Time Machine as it is just mirrors the contacts that you have in present time. Restoring phone doesn't work becasue it just downloads from iCloud after it has restored. TOTALLY RIDICULOUS. I am livid.

    what I mean is - create a complete new contact on your contacts and select a picture for it from your Mac. Then set it as "make this my card"
    Once you have done that - presumably it will sync with iCloud - have a look and the contact should appear on your iPhone too.
    On your iPhone go on Settings>Mail,Contacts,Calendar> Under "Contacts: in "My Info" select That new contact you created on your Mac.
    Let me know if that works.
    -On another note, so what you are saying is, if I take my 15' Macbook Pro in and they have none of the old ones in stock, they just give you a Retina display one! Did you take it to them for the contact issue you were having or something else?

  • Problems with query via Database-Link (Oracle 7.3.4)

    I made the following simple query via database-link.
    select count (*) from [email protected]
    I got the result in about 200 miliseconds.
    Then I4ve tried the following query.
    select * from [email protected]
    It took about 2 hours end ended with an error message "ORA-03113: end-of-file on communication channel"
    So I made another choice
    select * from [email protected] where rownum <=1
    Took about 200 miliseconds.
    So I made the query again an changed only the number of rownums,until I was at rownum <=8
    then it went sleeping again(I've canceled the statement because I didn't want to wait 2 hours again).
    We made the same things from another server with the same database-link on the same remote server
    and we had no problems.
    Any Idea???

    No, network is OK!
    Other links are running, I have also no problems when I connect directly to the remote server.

  • Space problems with the SAP Database MS SQL 2000

    Hi,
    Actually, I have a size problem with the database, I have MS SQL Server 2000 with Service Pack4 on a Windows 2003 Server environment that is my DataBase Server of my ERP ECC 6.0. On the other hand I have a storage where I have 229 Gb of free space used only for the database files of the SAP data and the SAP log file.
    But when I check the DB space allocation on trx. DB02 I saw this:
    3 Database files and 1 transaction log:
    The 3 database files are: PRDDATA1 (size 15,313 MB used 15016 MB) , PRDDATA2 (size 14106 MB used 13984 MB), PRDDATA3 (size 14472 MB used 14352 MB) and the log file is PRDLOG1 ( size 1000 MB) all of them with no limit option and growth by 10%.
    So I went to the SQL Enterprise Manager and I saw that my Database PRD properties and I got this information:
    My database size is 44892.48 Mb size with only 1330.36 Mb of free space and that is alarming.
    So the question here is how ,if I have a storage where the sap data is storing with 229 Gb of free space, can I make the database files grow up in order to use all the available space of my storage.
    Can you help me please because it is critical being my productive system?
    Best Regards
    Erik Espinosa

    I resolved this issue myself. Thanks for all your help.
    Best Regards,
    Erik Espinosa

  • Table cells - Problem with merged cells

    Hi
    I was experiencing very weird behavior with my tables until I realized that it was caused by merged cells
    My script gives a dialog which allows the user to choose from which column to start and from which row.
    As the script iterates through the cells in the selection I was getting weird results
    Through using .select() function I was able to see that depending on the column, some times row 5 could be which seems to be row 3!
    The reason was because of merged cells in that row
    I.e., when some cells are merged together, only the first column of those merged cells is recognized - the others are not
    so it comes out that when merging cells from column 3 to 5, column 3 has a cell in that row, columns 4 and 5 do not, and column 6 does!
    Is there a way to get around this behavior?
    Thanks
    Davey

    I don't understand the point of your post.
    If you're trying to report a problem or "bug" with Pages, that is not the purpose of this user-to-user forum. You should leave feedback for the Pages team on this page.
    I've not had a problem opening Word files with tables in Pages. If you're saying Word can't handle tables with merged cells, then don't use merged cells in files you are going to export as Word. Word & Pages must handle merged table cells differently, as I know both can do that. As far as RTF, Pages can open & export as RTF. Again, if you are going to export as RTF, don't use tables. Neither of these is a fault of Pages, just limitations of the formats/programs.

  • Problems with Wireless Router and Adapter

    I tried posting this in the wireless adapter forum but nobody responded :-(
    I'm using a WRT54G Router btw, and the firmware is v2.02.7, Feb. 27, 2004.
    Hi everyone,
    I have a Linksys Wireless G Router and several computers that I try to connect with. One of them is a computer running Windows XP and using a Linksys Wireless USB B Adapter (WUSB11). Another is a laptop running Mandriva Linux using a Linksys Instant Wireless Network PC Card (WPC11). Another one is running Windows Vista and using a Linksys Wireless N card. I also have a laptop running Windows XP using a Linksys Wireless-G Notebook Adapter (WPC54G).  I also have another PC running Windows XP and uses a Linksys Wireless USB Adapter WUSB54G. Finally, I have two macintosh laptops running OSX and with airport devices installed.
    Anyway, I have problems with my internet connection frequently being interrupted and even sometimes I won't have a connection at all for hours. This occurs with my Linux laptop, the PC with the Wireless B Adapter, and the laptop using the Wireless G Notebook Adapter. In addition to this, the macintosh laptops have internet even more infrequently. However, I seem to never have a problem with the Windows Vista desktop or the Windows XP desktop that has the Wireless G adapter. I try repairing the connection and often it does not work. I have also tried resetting the router and the cable modem. I'm not sure what else I can do. I even bought a Wireless N router and had little success with that. We even went as far as moving the wireless router upstairs into our living room, thinking that the signal was somehow suffering from interference or that distance was a factor. Anyway, sorry for the long post but I could really use some help!
    Thanks.

    Hi… logon to wireless N router’s setup page, open I.E. an in the address bar type 192.168.1.1 it would ask for username and password, put "admin" as a paassword (default password) without any username...linksys setup pops up, click on on wireless tab and and try changing radio band to wide 40MHz, wide channel to 9 and wireless standard channel to 1 or 11, go to advanced wireless settings reduce beacon interval to 50, fragmentation and RTS threshold to 2304, change N Transmission rate to 270 MBps…also try upgrading latest firmware on router, check whether it makes any difference or not and let me know.

  • Problem with a Standby Database

    Hello,
    if have some problems with a special standby database. why special? because i try it whit another, which was newly build with oracle tools and everything works. I mean the redo log transfer and the log apply and everything.
    At first I try to use the DGM, to guide me through the process, but this manager didn't start to copy anything of the database files. So I make an offline backup from the database as you can see in the oracle data guard doc. later on I used the DGM again to build a data guard configuration. Everything seems to be fine. But then I get ORA-16778: log transport service for some site has an error AND ORA-16766: physical apply service unexpectedly offline.
    I don't know what to do now. I really try to help myself but it always stop at this point.
    By the way ... merry Xmas!!!

    Hi,
    ORA-16766: physical apply service unexpectedly offline.You must check in the alert log why the MRP is going down, the info is in this file.
    In order to get more comments, give us a "snapshot" of your install:
    . Release
    . Configuration
    . Folders structures
    . init file (pfile/spfile) contents
    And paste the MRP error stack from the alert log.
    Regards,
    Yoann.

Maybe you are looking for