-
Error Message
After executing the following command
INSERT /*+ append */ INTO pay_test SELECT * FROM all_objects
I have given
delete from pay_test
It is showing message
ORA-12838 Can not read or modify an object after modifying it in parallel
The problem is recified after executing DCL Commands.
But What is meant by parallel modification or parallel operation?
-
Re: Error Message
Hi Krishna,
Probably you will have to commit the transaction (the Insert statement) for the table Pay_test and then try to delete from the same. This normally happens when a procedure is populating the table and at the same time u try to apply any DML on the same data of the table.
Regards
Satya Vinayan
[QUOTE=krishnaindia2007;27114]After executing the following command
INSERT /*+ append */ INTO pay_test SELECT * FROM all_objects
I have given
delete from pay_test
It is showing message
ORA-12838 Can not read or modify an object after modifying it in parallel
The problem is recified after executing DCL Commands.
But What is meant by parallel modification or parallel operation?[/QUOTE]
-
Re: Error Message
Thank you for your reply satya vinayan.
But here the case is I am using SQL commands only not procedure.
When we use the APPEND hint for INSERT, oracle always grabs fresh data blocks by raising the high-water-mark for the table. Does it has any effect or locks the records while inserting the data?
-
Re: Error Message
HI,
ORA-12838 Can not read or modify an object after modifying it in parallel
The meaning of the error is:
Within the same transaction, an attempt was made to add read or modification statements on a table after it had been modified in parallel or with direct load. This is not permitted.(from Google)
Generally whenever you are inserting or updating the data in a table, Database will automatically Locks that particular Entity or column, Until you rollback or Commit, or until the transaction completes, when you are passing the DCL commands it will permanently store it in the entity. According to Your Query you used both insert and delete commands in the same statement,
You can rectify the problem with giving the DCL command in between the both Insert and Delete commands, OR split the Statements and run them separately. (I think you had done this)
So, you only told that it was worked fine After Using the DCL commands.
That is the logic behind it.
Note: If you are not passing the DCL to complete your previous insertion into that table, it will be stored in the temporary table which was virtually created by the database, this virtual entity remains in database until you pass the DCL commands on that particular entity or until you logoff.
Even when you are selecting the data from an entity In a common Database If any other user also trying to fetch the same records, Database will not allow him to do that until your query completes it will keep him in loop after executing your statement it will allow His Query to run