Is parallel DML transactionally equivalent to non parellel DML?

So I've got a whole bunch of insert into select statements where I have parallel hints on my inserts.
if I have parent object A and child object B
I fetch all the A's I want to move and use FORALL (with FETCH LIMIT ie.batches)
to insert all the A's in the parent table. I also store the pk's of batch A so that I can use those in a join to identify the B's for this batch of A's.
INSERT /*+ parallel(arch,4) */ INTO ARCHIVED_A arch
SELECT *
FROM NONARCHIVED_A non_arch
WHERE EXISTS (
SELECT 1
FROM ids i
WHERE non_arch.ot_id = i.ot_id);
something like that.
I am finding that this works fine when I don't use parallel DML
whenever I use parallel DML I end up with the A's archived but no B's.

From: http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/usingpe.htm#i1006876
A session that is enabled for parallel DML may put transactions in the session in a special mode: If any DML statement in a transaction modifies a table in parallel, no subsequent serial or parallel query or DML statement can access the same table again in that transaction. This means that the results of parallel modifications cannot be seen during the transaction.
Serial or parallel statements that attempt to access a table that has already been modified in parallel within the same transaction are rejected with an error message.So it's not quite "transactionally equivalent", in the sense that you cannot read the changes made by a parallel DML statement: you must commit them first.
Could your code be loosing the error message (that you will get if you try to read your changes) in some when-others handler?

Similar Messages

  • Oracle 11.2 - Perform parallel DML on a non partitioned table with LOB column

    Hi,
    Since I wanted to demonstrate new Oracle 12c enhancements on SecureFiles, I tried to use PDML statements on a non partitioned table with LOB column, in both Oracle 11g and Oracle 12c releases. The Oracle 11.2 SecureFiles and Large Objects Developer's Guide of January 2013 clearly says:
    Parallel execution of the following DML operations on tables with LOB columns is supported. These operations run in parallel execution mode only when performed on a partitioned table. DML statements on non-partitioned tables with LOB columns continue to execute in serial execution mode.
    INSERT AS SELECT
    CREATE TABLE AS SELECT
    DELETE
    UPDATE
    MERGE (conditional UPDATE and INSERT)
    Multi-table INSERT
    So I created and populated a simple table with a BLOB column:
    SQL> CREATE TABLE T1 (A BLOB);
    Table created.
    Then, I tried to see the execution plan of a parallel DELETE:
    SQL> EXPLAIN PLAN FOR
      2  delete /*+parallel (t1,8) */ from t1;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3718066193
    | Id  | Operation             | Name     | Rows  | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | DELETE STATEMENT      |          |  2048 |     2   (0)| 00:00:01 |        |      |            |
    |   1 |  DELETE               | T1       |       |            |          |        |      |            |
    |   2 |   PX COORDINATOR      |          |       |            |          |        |      |            |
    |   3 |    PX SEND QC (RANDOM)| :TQ10000 |  2048 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   4 |     PX BLOCK ITERATOR |          |  2048 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    |   5 |      TABLE ACCESS FULL| T1       |  2048 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    PLAN_TABLE_OUTPUT
    Note
       - dynamic sampling used for this statement (level=2)
    And I finished by executing the statement.
    SQL> commit;
    Commit complete.
    SQL> alter session enable parallel dml;
    Session altered.
    SQL> delete /*+parallel (t1,8) */ from t1;
    2048 rows deleted.
    As we can see, the statement has been run as parallel:
    SQL> select * from v$pq_sesstat;
    STATISTIC                      LAST_QUERY SESSION_TOTAL
    Queries Parallelized                    1             1
    DML Parallelized                        0             0
    DDL Parallelized                        0             0
    DFO Trees                               1             1
    Server Threads                          5             0
    Allocation Height                       5             0
    Allocation Width                        1             0
    Local Msgs Sent                        55            55
    Distr Msgs Sent                         0             0
    Local Msgs Recv'd                      55            55
    Distr Msgs Recv'd                       0             0
    11 rows selected.
    Is it normal ? It is not supposed to be supported on Oracle 11g with non-partitioned table containing LOB column....
    Thank you for your help.
    Michael

    Yes I did it. I tried with force parallel dml, and that is the results on my 12c DB, with the non partitionned and SecureFiles LOB column.
    SQL> explain plan for delete from t1;
    Explained.
    | Id  | Operation             | Name     | Rows  | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | DELETE STATEMENT      |          |     4 |     2   (0)| 00:00:01 |        |      |            |
    |   1 |  DELETE               | T1       |       |            |          |        |      |            |
    |   2 |   PX COORDINATOR      |          |       |            |          |        |      |            |
    |   3 |    PX SEND QC (RANDOM)| :TQ10000 |     4 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   4 |     PX BLOCK ITERATOR |          |     4 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    |   5 |      TABLE ACCESS FULL| T1       |     4 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    The DELETE is not performed in Parallel.
    I tried with another statement :
    SQL> explain plan for
    2        insert into t1 select * from t1;
    Here are the results:
    11g
    | Id  | Operation                | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | INSERT STATEMENT         |          |     4 |  8008 |     2   (0)| 00:00:01 |        |      |            |
    |   1 |  LOAD TABLE CONVENTIONAL | T1       |       |       |            |          |        |      |            |
    |   2 |   PX COORDINATOR         |          |       |       |            |          |        |      |            |
    |   3 |    PX SEND QC (RANDOM)   | :TQ10000 |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   4 |     PX BLOCK ITERATOR    |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    |   5 |      TABLE ACCESS FULL   | T1       |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    12c
    | Id  | Operation                          | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | INSERT STATEMENT                   |          |     4 |  8008 |     2   (0)| 00:00:01 |        |      |            |
    |   1 |  PX COORDINATOR                    |          |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)              | :TQ10000 |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   3 |    LOAD AS SELECT                  | T1       |       |       |            |          |  Q1,00 | PCWP |            |
    |   4 |     OPTIMIZER STATISTICS GATHERING |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    |   5 |      PX BLOCK ITERATOR             |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    It seems that the DELETE statement has problems but not the INSERT AS SELECT !

  • All Transactions Report to Non-System Admin

    Is it possible to broadcast a report of all transactions to a non-system admin?
    Background: Project Manager who is not a System/Travel admin,  would like monthly reports of all expense reports and expenses from system. Since reporting is based on role assignment is this possible? I have tried using Broadcast but user still only sees data for his direct reports. thnka you in advance for your help!

    Hi Juan,
    this should be handled very careful as you can get in trouble if you expose data to people that are not authorized to see it. So think twice before you do that.
    what is that project manager supposed to see? If he's allowed to see any detail, you might create a role that has no access restrictions. In this case, the report will show all expense reports. This way there is clear transparency in the system about authorizations
    Broadcasting works as well. In broadcasting you should deselect the "user specific" flag. In this case, the report runs with the authorizations of the broadcast creator (the system admin). It is probably useful to create a specific report for that and assign it to a work center view the system admin has assigned. However this way the system admin provides information to people that are not authorized by their role. So their needs to be another agreement in the organization to be on the safe side.
    Regards,
    Steffen

  • Alter session enable parallel dml

    Is it necessary to alter session in oracle 11gR2 using "alter session enable parallel dml" to execute parallell DML?Oracle will not use Degree of parallelism in DML statement without altering session even if there is DOP mention in the DML query?
    Thanks,

    Yes, http://docs.oracle.com/cd/E11882_01/server.112/e25523/parallel003.htm#CACFJJGG
    A DML statement can be parallelized only if you have explicitly enabled parallel DML in the session, as in the following statement:ALTER SESSION ENABLE PARALLEL DML;

  • Transaction Code for non-PO invoices

    Hello all,
    Is there any transaction code to generate a report of all non PO transactions posted in FY??
    We want to pull a report on a monthly/quarterly/basis to identify as to how many non PO transactions are posted for a period.
    We need a report to pull these non PO transactions.
    Thank you in advance,
    Regards,
    Manjunath

    Hi,
       Go to SE16 - enter the table BKPF. Now, in selection, enter the document type (that is document type, like KR, used for non PO invoices) and execute with date range. Here, system will show the list, with transaction code, user, date etc.
        If required, create an SQVI query with BKPF table, so that you can take the list directly.
        Another option would be FBL1N transaction. Here, go to dynamic selection and add the reconcilation account in the selection. Maintain all your vendor reconcillation accounts as "not equal to" and execute with date range.
    Regards,
    AKPT
    Message was edited by: AKPT MM

  • Parallel accounting  cost objects in non leading ledger

    Hi Gurus,
    I have implemented parallel accounting and have my leading ledger in INR and the non leading leading ledger in USD.
    also i have the FI profit center and segment activated and for segmental reporting i am using the same.
    I now need to report on segments in the non leading ledger also.
    can i transfer the account assignments (like profit center and segment) to the non leading ledgers also.
    Points will be awarded
    regards

    I've tried it.
    It works properly.
    I created a movement type for Area 30 Only.
    Anyway I had to modifyT093A: 30 IAS Depreciation Area now has '00' in filed WRTAFB."Adoption of values from depreciation area" like the Area 01.
    I have to capitalize values (also negative; correction) only in Area 30 (IAS), not also in Area 01 (APC zero value).
    There's no other way to obtain that?
    Depreciation Area       01 (master area)                      30 (IFRS)     
    APC                               0                                               1000

  • Display transaction for the non Account Holder on FPL9

    We are using a single Contract Account with Multiple Business Partners. The systems allows only one account to be an account holder which means all transactions will be allocated to the account holder. Is it possible to post an amounansact on the non Account Hoder BP and see the transactions on FPL9.

    Hi,
    This is possible. You need to configure contract account category at SAP Customizing Implementation Guide -> Financial Accounting -> Contract Accounts Receivable and Payable -> Basic Functions -> Contract Accounts -> Configure Contract Acct Categories and Assign Number Ranges.
    There is an check box, where you can decide to allow one or more than one business partner can be assigned per contract account.
    Hope this helps.
    Regards,
    Avinash

  • How to force a parallel dml?

    I have a DB 11g r2, and I use parallel queries (parallel delete) for some huge tables.
    But, sometimes queries just don't want to go parallel..
    to force parallelism, I use hint /*+ parallel(table_name, no_of_parallel_procs, no_of_instances) */ .-.. some_sql_condition..
    note that same query works fine in some enviroments, so there's no error in sql hint, and there's no background processes (AFAIK)
    db init parameters are:
    parallel_degree_limit=cpu
    parallel_degree_policy=manual
    parallel_max_servers=20
    parallel_server=false
    parallel_threads_per_cpu=2
    I could provide more database parameters if necessary.

    Slave processes, which are required for DML, could be in use at the time of the DML running;
    while the DELETE is executing, open another session and run the following:
    select slave_name
          ,status, cpu_secs_total
    from v$pq_slave;If this figure appears too low or no rows are returned then PARALLEL mode will not occur.

  • How to write Parallel DML in 2 node RAC Cluster

    Any ideas on how to write a DML that will run on a two node cluster in parallel? I would like to scale a DML statement within a RAC environment. Thanks

    Check out [this article|http://www.oracle.com/technology/pub/articles/conlon_rac.html].

  • Parallel portal implementation in a non-unicode landscape

    Hi All,
    We have existing 3 system landscape with 3 systems in it.
    DEVQASPRD.All of these systems are non-unicode.
    The java add-in cannot be installed on them because the unicode java stack cannot talk to nonunicode abap stack.The customer does not wants to get his systems conerted to unicode.
    So, how the portal implementation can be carried out in such a scenario?
    We want to have an IPC installed  too.
    Can the communication happen in the following manner.
    PRD(non-unicode)--->ipc--->EP.
    PRD writing the pricing configurations on the ipc database and EP picking up the data from ipc??
    Regards,
    Prasanna

    Hello,
    We have the ECC 6.0 abap only as the backend.
    Can the internet pricing configurator of the ECC 6.0 stack (VMC IPC) communicate with the portal to extract the pricing?
    Since SAP IPC comes as a part of kernel for abap basic 7.0 and is it necessary to install the standalone IPC for it communicate with the portal.
    Regards.
    Prasanna

  • Launching SAP WinGUI transaction in separate non-browser window

    Is there a way to launch a SAP GUI transaction in a SAP Win Gui window?  That is, without having the browser parent window around it.

    Oh I almost forgot.  When launching this way the user will be prompted to "Open or Save" the file.  Even if the user unchecks the "Always check for this file..." the prompt will still appear.  The way to remove the prompt is to go to Win Explorer, Tools, Folder Options.  On the Folder Options window choose the File Types tab.  In the Registered file types window find the SAP - SAP GUI Shortcut file and click Advanced.  On the Edit File Type window uncheck the Confirm open after download checkbox.  Click OK as needed to return to Win explorer.   The user must have admin rights to do this or a reg edit can be made using SMS.  I am not aware of the reg key needed but I can find that out if it is needed.

  • 11.2.0.3 Parallel delete on non-partitioned table

    Friends and mentors...
    I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
    Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
    Job frequency: Once every month
    Oracle: 11.2.0.3
    OS: Linux
    Questions:
    1. Any idea on best approach?
    2. Do I need to have table partitioned to use /*+parallel */ hint?
    3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
    4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
    Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
    thanks..

    khallas301 wrote:
    Friends and mentors...
    I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
    Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
    Job frequency: Once every month
    Oracle: 11.2.0.3
    OS: Linux
    Questions:
    1. Any idea on best approach?
    2. Do I need to have table partitioned to use /*+parallel */ hint?
    3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
    4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
    Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
    thanks..
    It appears that you believe that parallel is always faster than non-parallel; which is not true in every case.
    The slowest part of any DELETE is the physical I/O.
    How many parallel processes accessing the same table before the disk gets saturated?

  • Transaction & non-EJB objects (helper)

    hi i have a question about transactional behavior of non-EJB objects. i'm
              using
              weblogic 6.0 sp1 with ejb 2.0.
              say i have a session bean which starts a container managed transaction. and
              it calls
              out to helper class A(non-EJB), and that helper class A get a connection and
              update
              some tables. after A returns, session bean calls helper class B(non-EJB) in
              the
              same transaction. B is supposed to update some other tables but it throw an
              user
              exception. would the transaction in the session bean be rolled back? would
              it
              also roll back the changes made by helper class A?
              thanks for any help,
              z
              

    Thanks Rob!
              "Rob Woollen" <[email protected]> wrote in message
              news:[email protected]...
              > Ziqiang Xu wrote:
              >
              > > hi i have a question about transactional behavior of non-EJB objects.
              i'm
              > > using
              > > weblogic 6.0 sp1 with ejb 2.0.
              > >
              > > say i have a session bean which starts a container managed transaction.
              and
              > > it calls
              > > out to helper class A(non-EJB), and that helper class A get a connection
              and
              > > update
              > > some tables.
              >
              > You must get the JDBC connection from a TxDataSource.
              >
              > > after A returns, session bean calls helper class B(non-EJB) in
              > > the
              > > same transaction. B is supposed to update some other tables but it
              throw an
              > > user
              > > exception. would the transaction in the session bean be rolled back?
              >
              > Merely throwing an exception from a helper class will not rollback the
              > transaction.
              >
              > Within an EJB, the best way to rollback a tx is to use the
              > EJBContext.setRollbackOnly method.
              >
              > So you could do something like this:
              >
              > session_bean_method() {
              >
              > try {
              > B.foo();
              > } catch (MyException e) {
              > ctx.setRollbackOnly();
              > throw e;
              > }
              >
              > }
              >
              > > would
              > > it
              > > also roll back the changes made by helper class A?
              > >
              >
              > If they are all within a single transaction, then yes. As I mentioned
              before,
              > make sure that you use a TxDataSource for all of your JDBC Connections.
              >
              > -- Rob
              >
              > >
              > > thanks for any help,
              > >
              > > z
              >
              

  • Association rules Java API (non-transactional data)

    Hi
    I am looking at the demo java program (dmardemo.java) for association rules.
    This iconverts the data from transactional format to non by using a nested column.
    In my case the data are already non-transactional do I have to create a nested column or the model can be build based on the original columns?
    Thank u
    Kate

    Hi Kate,
    Here is what we provide for ODM 10.2 (thanks to Kathy from our doc team in compiling this for me).
    The following are db docs provided by Oracle, with sections noted that contain more info on transformations.
    You can go to this link to view them: http://www.oracle.com/pls/db102/homepage
    Concepts - Chapter 2 (general data prep)
    Application Developer's Guide - Chapters 2 (general data prep), 5 (text transformation), and 7 (Java data prep).
    Java API Reference (javadoc)
    PL/SQL Packages and Types Reference -- DBMS_DATA_MINING_TRANSFORM. In 10.2, the source code is still available.
    Here are a few more sources:
    Sample programs (The source code and embedded comments are quite helpful)
    View this at: http://www.oracle.com/technology/products/bi/odm/index.html
    ODMr Tutorial -- Chapter 2
    View this at: http://www.oracle.com/technology/products/bi/odm/odminer.html
    There is also a book on the java api that is out.
    You can go to Amazon and check it out:
    http://www.amazon.com/Java-Data-Mining-architecture-implementation/dp/0123704529/sr=8-1/qid=1172519948/ref=pd_bbs_sr_1/105-8560904-8042036?ie=UTF8&s=books
    In ODM 11, there have been alot of improvements related to transformations, but I can say anything about that until ODM 11 is released.
    Thanks, Mark

  • How to correct an acquisition posting in an parallel ledger

    Hello,
    I have the following situation:
    We are using New GL concept and have setup one parallel ledger (16)
    We have setup two depreciation areas, one pointing to the 0L, the other one to parallel ledger
    During vendor posting  of an asset the capitalisation is done in both ledgers posting to the capex balance sheet account (standard behavior).  For reasons the customer wants to  redraw the capitalisation but only in the parallel ledger, he wants to post it as costs ( P&L account)instead of the balance sheet account.
    Whats the best approach here?
    Many thanks

    Hi You Need to define following settings:
    Assign Depreciation Area to your Parallel Ledger i.e. Non Leading Ledger
    SPRO>IMGFinancial Accounting (New)> Asset Accounting> Valuation>Depreciation Areas>Define Depreciation Areas
    The GL Column will be 3 and Target Grp will be 16 in your case
    Now Create a new Transaction Type which will be copy of your 101 and restrict this Transaction type for your Depreciation Area whihc is specific to your non leading ledger.
    Now post ABSO and ASKBN
    Please let me know if you face any issues.
    Regards,
    Vivek

Maybe you are looking for

  • Recreating a table with child table dependencies

    Hi. I have two tables P (Parent) and C (child), with foreign key dependencies. How can I recreate the P table without losing the child dependencies? Thanks in Advance.

  • Adobe muse CC contact form not emailing correctly

    the adobe muse contact form not emailing to address in form. it's correct within form, link in Muse, and the address is correct within web hosting files. please advise. thx

  • Iphone and Outlook Help

    Ok I have looked everywhere, I have my phone synced to outlook with imap. I get email on it but once i open the email on the phone or open outlook the email is gone from the phone. I noticed outlook made a new folder for my company and put an inbox u

  • About toolbar in long text

    Hi experts: I want to delete the buttons in long text,and add a new button,how can I carry out? Thanks all!

  • Notifications to be sent so many days before a certain point.

    Hi, I have another requirement that states that a notification needs to go out "5 days" before the end of the 360 appraisal is due to close. Is there any way in the system to support this requirement? Thanks, Darcey