Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Can I enable and disable a trigger in a stored procedure?

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Can I enable and disable a trigger in a stored procedure?
 Dusmanta  Posted: Jul 22, 2008 02:07:23 AM

 Total Post: 4
 Joined: May, 2008






 Hi,

I need to disable a trigger in a store procedure. But it is showing the following error:

My Code:

CREATE OR REPLACE PROCEDURE ChangeTrigger
IS
BEGIN
ALTER TRIGGER MY_TRIGGER DISABLE;


ALTER TRIGGER MY_TRIGGER ENABLE;

END ChangeTrigger ;

ERROR:

PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:

begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>

Thanks,
Dusmanta

 max
Posted: Jul 22, 2008 05:05:36 AM  

 Total Post: 14
 Joined: Feb, 2008






 
dude, it cannot be done, coz alter is a ddl command, u must have dese privilege to do dat.

 Vish
Posted: Jul 27, 2008 02:04:42 AM  

 Total Post: 162
 Joined: Jan, 2007






 
Alter is DDL command
U must have privi. on it.
U can try with DBMS.SQL package to do that

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik387
  Vinoth Kumar379
  Gopu Gopi350
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software