473,382 Members | 1,107 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Trigger giving exception ORA-04091

The Trigger is giving following exception

java.sql.SQLException: ORA-04091: table PSCONTENT.VGNASCHANNEL is mutating, trigger/function may not see it ORA-06512: at "PSCONTENT.CHECK_CHANNEL_UNPUBLISH", line 4 ORA-06512: at "PSCONTENT.CHECK_CHANNEL_UNPUBLISH_TR", line 1 ORA-04088: error during execution of trigger ................................

// Trigger
CREATE OR REPLACE TRIGGER check_channel_unpublish_tr
before delete
ON vgnaschannel
for each row
check_channel_unpublish( :old.id )
;
/



// Procedure
CREATE OR REPLACE procedure check_channel_unpublish( p_channelId in char ) as
n int;
begin
select count(*) into n
from vgnAsChannel
where parentChannelId = p_channelId;
if ( n > 0 ) then
raise_application_error(
num => -20052,
msg => ( 'attempt to unpublish channel that is referenced by still-published subchannels; id=' || p_channelId ) );
end if;
select count(*) into n
from vgnAsChannelFileAssociation
where channelId = p_channelId;
if ( n > 0 ) then
raise_application_error(
num => -20053,
msg => ( 'attempt to unpublish channel that has ' || n || ' still-published objects associated with it' ) );
end if;
end;
/
Jul 6 '07 #1
2 6276
debasisdas
8,127 Expert 4TB
Your case is a mutating trigger error.

this happens when the trigger tries to modify the base table from which it is reading data.
Jul 6 '07 #2
Your case is a mutating trigger error.

this happens when the trigger tries to modify the base table from which it is reading data.

Thanks for the reply.

But my problem is that, I cannot modify the Trigger neither can i disable it as this trigger is written in a CMS tool which i m using.

Is there any way of achieving the same functionality by writting any DB query/ procedure etc.

Hemant
Jul 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: RobertGl | last post by:
Hi everybody! My problem is as following: I have a trigger which fires on delete of a table row. The body of the trigger checks and manipulates entries in other tables. If the entries have...
1
by: Scott J. Chlebove | last post by:
I am running a PL/SQL module in which I do the following.... BEGIN DBMS_OUTPUT.enable(1000000); -- Open file for writing. OutfileHandler1 := UTL_FILE.FOPEN(wc_file_path, wc_output_file1,...
4
by: Mike Stenzler | last post by:
This may be obvious, but I don't write many triggers so it's got me puzzled.. Row level, after update trigger is designed to perform an insert or update to a 2nd table based on existance of a...
2
by: mpatel6 | last post by:
I had this error in alert log and my instance was down, anybody can help me? Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_p004_626740.trc: ORA-07445: exception encountered: core...
2
by: BJerolimic | last post by:
Trying to build a trigger that will update fed_paid only when tax.taxrec_typ = 13 (which is equivalent of exercise.exer_type = 4). Please note that data comes from exercise, grant & tax table ...
1
by: thewickedman | last post by:
Hi, I try to open new OpenOffice document (writer), But I am getting the exception FRM 40735:WHEN-BUTTON-PRESSED Trigger Raised unhandled Exception ORA - 305500 Please help me to resolve...
1
by: umesh049 | last post by:
hello I want to update in one trigger the tables in to another schema but it doesn't work but when i select data from sql prompt it works fine. can any body help me. thanks. CREATE OR...
5
by: mikys67 | last post by:
Hi. I have to trace some users application to find the source of problems. Oracle8i Enterprise Edition Release 8.1.7.0.0 connect system/manager@testdb create or replace trigger...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
2
by: Mike Stenzler | last post by:
Sorry- left out the complete error info: when I attempt to execute from SQL+ I get the following 3 errors: ORA-01403: no data found ORA-06512: at "TEST.AUROW_GRID_CLONE", line 8 ORA-04088:...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.