cancel
Showing results for 
Search instead for 
Did you mean: 

replicating updates over mobilink/dbremote

Baron
Participant
1,529

we are using several tens of DBs which replicate/synchronize using DBREMOTE/Mobilink. What is the best approach to centralize distributing update scripts (creating/altering procedures and triggers, and also normal insert/update statements). Currently we are using a non centralized method so we write the updates in .sql files, and then READ these files in each DB over dbisql.

The only available way for centralizing (so far known for me), is to start those .sql files with PASSTHROUGH FOR ... and end it with PASSTHROUGH STOP, which has some restrictions/drawbacks.

FYI, in some installations we have several levels in the DB-hierarchy (main Consolidate -> several Consolidates -> End clients), so the update should be installed once on main cons. and then to the below conses and later to the end clients.

Any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

For SQL Remote, we have used passthrough mode to apply schema changes and rare "data cleanup". However, that was always within a two-tier setup, i.e. without intermediate remote/cons databases. Testing is crucial here.

Baron
Participant
0 Kudos

actually we use the PASSTHROUGH sometimes for some small schema changes (and for two-tier setups).

I think with hook procedures can we however extend it for multi level setups too.

Does PASSTHROUGH work also for mobilink? One more problem with PASSTHROUGH is that it does not accept 'if' blocks! I tried once to encapsulate the 'if' blocks inside EXECUTE IMMEDIATE, but the EXECUTE IMMEDIATE itself was also not accepted within PASSTHROUGH!

VolkerBarth
Contributor
0 Kudos

Passthrough works with SQL Remote only, AFAIK. For statements that do not work in passthrough mode, one common way is to put that logic within a procedure and create and call that within passthrough mode. I guess this forum has some samples of that...

VolkerBarth
Contributor
Breck_Carter
Participant
0 Kudos

I don't know if this helps with passthrough, but...

One general-purpose work-around is to add a BEGIN END block around a block of SQL that is otherwise not accepted in some context.

VolkerBarth
Contributor
0 Kudos

No, AFAIK that does not help with passthrough mode...

Breck_Carter
Participant
0 Kudos

...and if I had read Reg's general advice here, I might have guessed that!

Answers (1)

Answers (1)

Breck_Carter
Participant

12 years later, the company (Simbex) still exists, the application (HITS) still exists, and the database described in this article still operates: Synchronizing Schema Changes and Managing Referential Integrity Violations.