Re: -- Alter trigger not working in script

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 27 Mar 2003 06:51:17 -0800
Message-ID: <2687bb95.0303270651.4add38cd_at_posting.google.com>


avanrossem_at_hotmail.com (Andre) wrote in message news:<4d32d1be.0303262257.5af0ba87_at_posting.google.com>...
> Mark.Powell_at_eds.com (Mark D Powell) wrote in message news:<2687bb95.0303261717.3a2b93f_at_posting.google.com>...
> > avanrossem_at_hotmail.com (Andre) wrote in message news:<4d32d1be.0303260447.7316a97c@posting.google.com>...
> > > Hello all,
> > >
> > > I have a sql-script in which some triggers has to be disabled first to
> > > proceed.
> > > In sqlPlus I do NOT see that the triggers are disabled.
> > > I suspect a "Trigger altered." statement.
> > > Also the sql-script doesn't work because the triggers are NOT
> > > disabled.
> > > When I try the script on another machine everything is working. (I do
> > > see the "Trigger altered." statement)
> > >
> > > Here are the first two lines of the script:
> > >
> > > alter trigger IU_a disable;
> > > alter trigger IU_B disable;
> > >
> > > What can be the problem???
> > >
> > > Thanks for all suggestions, and kind regards,
> > > Andre
> >
> > Andre, were you the owner when you ran the script that failed? How
> > about when you ran the one that worked?
> >
> > It would have been nice to see actual script output or error messages
> > rather than just hazard a guess you are not the trigger owner and have
> > to qualify the statements.
> >
> > HTH -- Mark D Powell --
>
> Well,
>
> On both systems i logged onto the databse with the same user_id and password.
> on one system the sql-script doesn't work, on the other it did!
> Thx!

The fact the script runs on one environment and does not run on the other tells you that there is a difference between the two environments. It is likely that this difference is the problem and is related to ownership and/or privileges.

When you ran the statement on the environment where it does not work what message did Oracle return?

Since you are not prefixing the trigger name with an owner I would suspect that the ID you are using has a trigger by that name in one environment:

Using DBA privileged ID:
UT1> alter trigger WAR_RETURNED_PARTS$BIR disable; alter trigger WAR_RETURNED_PARTS$BIR disable *
ERROR at line 1:
ORA-04080: trigger 'WAR_RETURNED_PARTS$BIR' does not exist

UT1> alter trigger edsjit.WAR_RETURNED_PARTS$BIR disable;

Trigger altered.

HTH -- Mark D Powell -- Received on Thu Mar 27 2003 - 15:51:17 CET

Original text of this message