473,554 Members | 3,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trigger giving exception ORA-04091

2 New Member
The Trigger is giving following exception

java.sql.SQLExc eption: ORA-04091: table PSCONTENT.VGNAS CHANNEL is mutating, trigger/function may not see it ORA-06512: at "PSCONTENT.CHEC K_CHANNEL_UNPUB LISH", line 4 ORA-06512: at "PSCONTENT.CHEC K_CHANNEL_UNPUB LISH_TR", line 1 ORA-04088: error during execution of trigger ............... ............... ..

// Trigger
CREATE OR REPLACE TRIGGER check_channel_u npublish_tr
before delete
ON vgnaschannel
for each row
check_channel_u npublish( :old.id )

// Procedure
CREATE OR REPLACE procedure check_channel_u npublish( p_channelId in char ) as
n int;
select count(*) into n
from vgnAsChannel
where parentChannelId = p_channelId;
if ( n > 0 ) then
raise_applicati on_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 vgnAsChannelFil eAssociation
where channelId = p_channelId;
if ( n > 0 ) then
raise_applicati on_error(
num => -20053,
msg => ( 'attempt to unpublish channel that has ' || n || ' still-published objects associated with it' ) );
end if;
Jul 6 '07 #1
2 6297
8,127 Recognized Expert Expert
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
2 New Member
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.

Jul 6 '07 #3

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

Similar topics

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 certain values, I would like the row of the table which has fired the trigger not to be deleted. As far as I understood this problem could be solved...
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, 'W'); -- output report -- Get the CUSTOMER records by reading the CUSTOMER table.
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 record in the 2nd table. t1 is updated and has trigger, whenever an update happens, it inserts or updates a record in t2. If there has already been...
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 dump Wed Sep 20 12:31:12 2006 Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_pmon_643152.trc: ORA-00600: internal error code,...
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 Select statement returns correct info, but user gets error when trying to put in new record via front-end And FYI the Front-end is s C++ app called...
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 this exception. my code is as follows in when-button-pressed trigger:
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 REPLACE TRIGGER Product_Detail_TR
by: mikys67 | last post by:
Hi. I have to trace some users application to find the source of problems. Oracle8i Enterprise Edition Release connect system/manager@testdb create or replace trigger login_trigger after logon on database
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' does not exist drop table log_errors_tab;
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: error during execution of trigger 'TEST'.AUROW_GRID_CLONE' this highlights that the select for pre-existance of "today's" t2.record is
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.