I have a row level trigger (details of trigger is attached) that existed on a table. This trigger wasn't created by me.
Recently, We had to revert to a backup and imported the schema of tables back into the database and checking the database after the import, for some reason, the trigger wasn't found. We manually created the trigger and compilied it however when we insert a row into the table, we get the following error.
"ORA-04091: table SUMMITTEST.APL_LOG is mutating, trigger/function may not see it"
Having looked into this error, it seems that the problem is that we are accessing the table that triggers the action i.e. we are trying to select from table APL_LOG inside the row-level trigger on APL_LOG.
Please can you confirm that the above reasoning is correct as to the reason for the error?
Also, If the error is due to the way the trigger is structured, could anyone explain how this trigger and other similar triggers were setup on the system and apparently running for many years without a problem and has only been an issue since the schema was imported back into the database? Is there some sort of setting somewhere that allows this type of trigger to work ok as I have been advised by users that his definitely used to work ok.