Subject RE: [IBO] Trigger and Indexs
Author Svein Erling Tysvær

There are alternatives to setting the trigger inactive and active:

 

Alternative 1)

Create a special user or role for the update process and exit the trigger if it is the update user/role

 

Alternative 2)

 

CREATE GENERATOR TRIGGERS_ACTIVE;

To set triggers active

GEN_ID(TRIGGERS_ACTIVE, -TRIGGERS_ACTIVE +1);

To set triggers inactive

GEN_ID(TRIGGERS_ACTIVE, -TRIGGERS_ACTIVE);

Add this line to the start of all of your triggers:

IF (GEN_ID(TRIGGERS_INACTIVE, 0) = 0) THEN EXIT;

 

There are no such alternatives for indexes.

 

I do not understand your description of your problem, are you trying to say that you do not have complete control of the update and that normal users will be working at the database at the same time as you fill the tables?

 

There is no Spanish IBO list, but there is a Portuguese Firebird list, look at: http://firebase.com.br/mailman/listinfo/lista_firebase.com.br

 

Hope this helps,

Set

 

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: 29. mai 2014 12:47
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Trigger and Indexs

 




I have the system local with many master table, these with relations (indexes and triggers). The system receives the updated information from a server. Eventually the local system must receive full updates of master tables, this need first to disable indexes and triggers, then delete all, load the data from the server and reactivate indexes and triggers.

I tested with IB_RPL component and it worked, but I have encountered some problems, one of them is that I have total control of the update of the information, especially in the time.

I do not speak English, I hope you have understood. 

thanks

 

Fabian

 

El día miércoles, 28 de mayo de 2014 19:09, "'IBO Support List' supportlist@... [IBObjects]" <IBObjects@yahoogroups.com> escribió:

 

 

I recommend doing a query of the system tables for exactly what you are after.

 

You could also get some index information by looking at your connection's SchemaCache property.

 

Perhaps you could tell us more details about what information you are after.

 

Jason Wharton

 

 

 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Wednesday, May 28, 2014 3:07 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Trigger and Indexs

Hello:

I need know triggers and indexes of tables for later deactivate or activate, what components I can solve this problem?

Thank you

 

Fabian Kruszelnicki