Re: When does Triggers get dropped ?
Date: Wed, 25 May 2016 08:28:27 +0200
Message-ID: <CAA9w=EuO_Grv7zYA4Cg=NfK_QBxH0HYoUBuRx3=zZiZc+kDbew_at_mail.gmail.com>
If I remember correctly, a 'create or replace view' will silently drop 'instead of' triggers if they were present on that view.
On Wed, May 25, 2016 at 7:05 AM, Hans Forbrich <fuzzy.graybeard_at_gmail.com> wrote:
> Drop table A and the trigger will also be dropped.
>
> The fact that the trigger inserts into table B makes the code invalid when
> table B is dropped, but it does not eliminate the firing condition. Only
> dropping table A would eliminate the firing condition and leave the trigger
> as an orphan if it was not automatically dropped..
>
> But the trigger does not 'belong to' table B. Simply recreating table B
> with referenced columns will allow the trigger to be validated. This is
> just like any other PL/SQL object dependency.
>
> /Hans
>
>
>
> On 24/05/2016 5:58 PM, Bala wrote:
>
>> Gurus,
>>
>> When does Oracle Triggers get dropped ?
>>
>> 1) Trigger on Table A inserts to Table B on a trigger condition
>> 2) Table B is Dropped, Trigger still exists with status "Invalid"
>>
>> Oracle 12c , Solaris.
>>
>> Question : Is there any scenario of automatic Drop of Triggers ? ( Would
>> Dropping Table A make it possible ?)
>>
>> Thank you in advance for any insight.
>>
>> --
>> Bala Rao
>>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- Toon Koppelaars RuleGen BV Toon.Koppelaars_at_RuleGen.com www.RuleGen.com TheHelsinkiDeclaration.blogspot.com (co)Author: "Applied Mathematics for Database Professionals" www.rulegen.com/am4dp-backcover-text -- http://www.freelists.org/webpage/oracle-lReceived on Wed May 25 2016 - 08:28:27 CEST