Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Oracle Trigger Problem - ORA-06519

Posted on 2012-03-26
2
Medium Priority
?
932 Views
Last Modified: 2012-03-27
I write this trigger and I compile it without errors

DECLARE
tmpVar NUMBER;
pragma AUTONOMOUS_TRANSACTION;
/******************************************************************************
   NAME:       
   PURPOSE:    

   REVISIONS:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        17/03/2012             1. Created this trigger.

   NOTES:

   Automatically available Auto Replace Keywords:
      Object Name:     
      Sysdate:         17/03/2012
      Date and Time:   17/03/2012, 11:24:45 Õ, and 17/03/2012 11:24:45 Õ
      Username:         (set in TOAD Options, Proc Templates)
      Table Name:       (set in the "New PL/SQL Object" dialog)
      Trigger Options:  (set in the "New PL/SQL Object" dialog)
******************************************************************************/
BEGIN
   tmpVar := 0;
   
   execute immediate 'insert into tbl_testxx select * from tbl_EmpMONTHSALARY';
	/*IF :NEW.emp_id = 30 THEN*/
		/*update TBL_EmpTest
		set fld_EmpId = :NEW.emp_id
		where fld_EmpId not in (:NEW.emp_id);*/
		
		/*INSERT INTO tbl_EmpTest
		FLD_EMPID
		VALUES
		(:NEW.emp_id);*/
	/*END IF;*/			    
END ;

Open in new window


I get this error
ORA-06519
ORA-06512
ORA-04088

Open in new window

0
Comment
Question by:egovernment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Expert Comment

by:johnsone
ID: 37768408
You are going to need to post the entire trigger definition.

My guess is that the trigger is causing itself to fire again?  Not sure without the full trigger definition.
0
 
LVL 20

Accepted Solution

by:
flow01 earned 2000 total points
ID: 37768580
beside answering johnsone's post

try coding an  


exception when others then
    rollback;  -- before leaving an AUTONOMOUS_TRANSACTION
                   --  a COMMIT or ROLLBACK should occur
    raise;  -- there was a failure  so reraise
end;

-- to loose the ORA-06519
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Simple Linear Regression
Progress
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question