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 |
Send this thread to your friend |
|
|
|
|
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 Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 387 |
| Vinoth Kumar | 379 |
| Gopu Gopi | 350 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|