Subject | Re: [firebird-support] Disable / Enable Triggers |
---|---|
Author | Helen Borrie |
Post date | 2006-08-20T01:52:17Z |
At 07:18 AM 20/08/2006, you wrote:
alter trigger blah active;
pretty good.
I much, much much prefer scripts (I keep several, all run from a
master script) because that's my system documentation. Scripting
also has the benefit that you can create the triggers inactive and
keep a quick one to run after the data import just to run through and
set them all active.
./heLen
>Dear all,alter trigger blah inactive;
>
>The following list contains the steps necessary when upgrading a
>production database:
>1. backup old database.
>2. export old generator values.
>3. export old data (as INSERT statements).
>4. create new empty database (with triggers, views, sp, etc).
> (or provide a fresh, empty copy of the new FDB)
>5. import old generator values.
>6. import old data.
>7. finished.
>
>In a database with larger data and complex trigger processing, step#6 is
>taking a lot of time since the triggers are already active at that point.
>
>Is there a way to disable all triggers before doing step#6 ?
>(and of course, re-enabling them afterwards).
alter trigger blah active;
>Thanks in advance,Provided you're doing step 4 with a script or an empty DB, this looks
>t.s.
>
>PS: Or, if anyone has a simpler/better/faster idea on how to 'upgrade a
>production database', i'm all ears. Thanks.
pretty good.
I much, much much prefer scripts (I keep several, all run from a
master script) because that's my system documentation. Scripting
also has the benefit that you can create the triggers inactive and
keep a quick one to run after the data import just to run through and
set them all active.
./heLen