473,836 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mutating Error in Triggers

151 New Member
Can Someone help me how to avoid mutating error while using triggers.


I work on oracle apps. I created a vacation rule such that responsibility is delegated to other person. These details are captured in wf_routing_rule s.

I created a procedure that takes the values from wf_routing_rule s and sends mail using utl_smtp. I created a trigger such that for every row insert in wf_routing_rule s, this procedure is called.

I know that doing a transaction and trigger on same table wil give mutating error.

Is there a way to avoid this ( other than changing the table name).

Glad if there is a different solution for this too.

Vamsi
Mar 5 '09
16 7046
vamsioracle
151 New Member
It didn't work for me either.

Can we try in some other way. My requirement is as soon as end user creates the vacation rule in oracle apps, My procedure has to run. So can we call this procedure in the vacation rules.
Mar 14 '09 #11
amitpatel66
2,367 Recognized Expert Top Contributor
Why dont you try using FAST FORMULA?
Mar 16 '09 #12
vamsioracle
151 New Member
Instead,

I will create the procedure and register in Apps as concurrent program. And for each row insert in the table i will call this concurrent program. I hope this will not create any mutating error again

If yes: how to call the concurrent program from trigger.
Mar 16 '09 #13
amitpatel66
2,367 Recognized Expert Top Contributor
My friend you are complicating things here.

You can use FND_REQUEST.SUB MIT_REQUEST API to submit a concurrent program programatically .

Try using FAST FORMULA where you can call your procedure as well from there. R12 HRMS provides very good feature of FAST FORMULA
Mar 16 '09 #14
Saii
145 Recognized Expert New Member
What about the documented method of using 3 triggers to avoid mutating errors.
Before insert for each row to set package variable(array) .
after insert for each row to get the unique id of rows inserted and store sin package array
after insert statement level- to do whatever procesing u want for the rows in packaged array

This doesnt work???
Apr 17 '09 #15
vamsioracle
151 New Member
thanks all

it worked for me.

I created a after insert trigger and used pragma autonomous transaction, from there i had to call procedure that has the logic and one more procedure that from here, to send a mail.

for some reason, it worked only if the calling is indirect (calling one procedure from other)


vamsi
Apr 20 '09 #16
swapnilbunty123
1 New Member
@amitpatel66
My question is :
1. can we Store all records of column from table on which trigger is written ????
e.g. here in "wf_routing_rul es" this table can i get all role list which is stored in array and pass as an parameter to Procedure !!

Thanx !
Jan 10 '12 #17

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

Similar topics

2
4720
by: robert | last post by:
i've found the solution threads on changing a column on insert. works fine. question: - will one package serve for all such triggers, or does there need to be a package defined to support each table? my o'reilly book doesn't say, nor do the threads i found.
4
7476
by: M | last post by:
Hello, I have a very simple table, and want to create a trigger that updates the date column entry (with the current date), whenever a row gets modified. Is there a simple way of fixing this, or would I have to create 3 extra triggers, a package, etc., as described in most posts about mutating table errors? Could you please explain to me WHY this error happens here (I have not been able to find a clear explanation of what causes them)?
4
7061
by: M Mueller | last post by:
Hello - I'm using Oracle 8i and am running into the infamous mutating table error on an AFTER INSERT OR UPDATE FOR EACH ROW trigger. I have seen examples for getting around mutating table errors if you either need access to the :old or the :new values within a trigger. But what if you need access to both? Or is this even possible (I'm fairly new to triggers). I have to execute a select count(*) from trigger_table where
0
2161
by: hankr | last post by:
I have only a developer's level knowledge of Oracle, though I have access to DBA tools. Searches through the docs have not been fruitful, so I thought I'd try here. I am getting an error on a simple 1-row I-SQL delete statement that a different table may be "mutating" and the transaction is then rolled-back. I understand what this means, and have fixed "mutating" errors before. But I cannot for the life of me trace-thru in the...
2
14836
by: Karl | last post by:
Exception EDBEngineError in module Cserv.exe at 0013E2C8. General SQL error. SQL0727N An error occurred during implicit system action type "1". Information returned for the error includes SQLCODE "-101", SQLSTATE "54001" and message tokens "". SQLSTATE=56098. I get the above error when using an application that performs an insert into a DB2 table. I added a new Trigger to the table. There are a few triggers on the table. I do not...
2
12221
by: Reshmi Jacob | last post by:
Hello, Can any one help me in creating a trigger to update system date into a table while inserting a record into that table. I tried it like this, it is showing error !!! The following error has occurred: ORA-04091: table ACG.CENTREMST is mutating, trigger/function may not see it ORA-06512: at "ACG.CENTREMST_INSERT", line 5 ORA-04088: error during execution of trigger 'ACG.CENTREMST_INSERT'
0
1554
by: AYAN MUKHERJEE | last post by:
I have 2 tables. 1) emp_test, 2) newemp_test. I had created a trigger to insert automatic data in the table no. 2 , as soon as a row of information is inserted in table no. 1. The Trigger had been successfully done, but as I try to insert a row in the table after running the Trigger this error is getting generated. ************************************************************************************** SQL> insert into emp_test (empno, empname,...
3
3710
by: extremexpert | last post by:
Hai all, I have two tables like hdr and det. I would like to create the trigger for the situation ' 1.Delete Det table records, if any record is deleting in hdr table 2. Delte hdr table records, if any record is deleting in det table '. I have created the trigger for both the tables, but i am facing ' Mutating Error'.... Any suggestions please
1
1648
by: mask | last post by:
I am writing a trigger for delete event of employee table (PK - empno, Mrgid - Self referencing key ) in oracle .In the trigger , i wish to update the rows of the same table which have mgr id equal to the empno being deleted, and set the mgrid=null. The problem coming here is of Mutating table.Is there a simple workaround of this problem? Thx n regards
0
9813
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9661
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10831
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7778
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5645
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5815
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
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
2
4005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.