oracle - Providing a complex default value on table involved in Parallel DML -


I have several tables in the merge statement that are running parallel. Merge outputs to an error table that is generated by the DBMS_ARLLG.ACREERRROLOG function. The statement works fine, and merge works.

Then I added an extra column to the error table, and it is working without any problems.

Now I have a default value in that extra column in the system based on value elsewhere (briefly the date of batch processing, which is not the same as the current datetime) - and at every turn I I am growing on restrictions.

  • I tried to popularize the value using a trigger - but after that there is a trigger placed on parallel DML table, which is not allowed, and error during and merge Is inserted.
  • I tried to add a default value based on an SLL function - this is not allowed.
  • I tried to add a default value based on a SQL statement - it is not allowed again

    I posted an additional update to populate the column I can apply processing, but it should be done for each table, which I merge and is actually a bit of a hack - spreads as a system, it should be remembered for every error table. Calculating the basic value is the most preferred approach.

    How can I work around the ORKC PDML restriction on triggers, to effectively populate this value based on a selection statement.

    As the value looks quite stable, look at SYS_CONTEXT. For example, I have a logging table where I currently store the running module (set with DBMS_APPLICATION_INFO).

    column_name VARCHAR2 (256) DEFAULT SYS_CONTEXT ('USERENV', 'MODULE'),

    Not sure whether a traditional reference value is stored for session or process. If this does not work for parallel processing, see which user name you can apply to all sessions

Comments