Unix Technical Forum

Database Out Of Sync

This is a discussion on Database Out Of Sync within the Informix forums, part of the Database Server Software category; --> Hi, I'm facing a database out of sync problem in our application and would like the communities help. We ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 10:13 AM
ndmathur@gmail.com
 
Posts: n/a
Default Database Out Of Sync

Hi,

I'm facing a database out of sync problem in our application and would
like the communities help.

We have 30 tables in Oracle database and 30 replica tables in Informix
(similar schema). We have a process that unloads daily
inserts/updates/deletes in Oracle and loads it into the Informix
tables. These tables have gone out of sync over the years and requires
to be resync'ed asap.

On Informix tables, there are insert/update/delete triggers which
populate the changes in a corresponding temporary table, hence any
activity in the Informix tables fires these triggers and updates the
same in temporary tables.

A few tables have records in the order of 100,000,000 and other tables
also have large number of rows. Our problem is to re-sync the Informix
tables with Oracle tables in such a way so that triggers on the
Informix tables are fired for the actual records
Inserted/Updated/Deleted in the Informix tables (i.e. the actual data
which was out of sync). This is required to be done in this fashion so
that the temporary tables have only the missed out data over the years
and not the full load after the re-sync has been done.

This activity would require an outage on our system hence needs to be
done in the most efficient manner.

I would appreciate your help in guiding me towards a effective
solution.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 10:13 AM
Roger
 
Posts: n/a
Default Re: Database Out Of Sync

ndmathur@gmail.com napisał(a):
> Hi,
>
> I'm facing a database out of sync problem in our application and would
> like the communities help.
>
> We have 30 tables in Oracle database and 30 replica tables in Informix
> (similar schema). We have a process that unloads daily
> inserts/updates/deletes in Oracle and loads it into the Informix
> tables. These tables have gone out of sync over the years and requires
> to be resync'ed asap.
>
> On Informix tables, there are insert/update/delete triggers which
> populate the changes in a corresponding temporary table, hence any
> activity in the Informix tables fires these triggers and updates the
> same in temporary tables.
>
> A few tables have records in the order of 100,000,000 and other tables
> also have large number of rows. Our problem is to re-sync the Informix
> tables with Oracle tables in such a way so that triggers on the
> Informix tables are fired for the actual records
> Inserted/Updated/Deleted in the Informix tables (i.e. the actual data
> which was out of sync). This is required to be done in this fashion so
> that the temporary tables have only the missed out data over the years
> and not the full load after the re-sync has been done.
>
> This activity would require an outage on our system hence needs to be
> done in the most efficient manner.
>
> I would appreciate your help in guiding me towards a effective
> solution.
>

I've wrote utility for syncronising Informix databases. It is available
in IIUG downloads as load2 archive, utility named dbdiff (see
description in dbdiff.txt file).
Possible you can use it. The only condition is that you have to get full
unload of Oracle tables in Informix unl format.
Then dbdiff can compare these unloads with Informix database. As a
result you will obtain file with missing deletes/inserts/updates.
I do not have information if this works for other people. I know that
this utility works ok for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 10:24 AM
sualeh.fatehi@gmail.com
 
Posts: n/a
Default Re: Database Out Of Sync

There is a free, open-source, cross-platform (operating system and
database) tool called SchemaCrawler on SourceForge that will compare
schemas between two or more different systems. SchemaCrawler outputs
details of your schema (and data) in a diff-able plain-text format
(text, CSV, or XHTML). You can use a standard diff program to diff the
current output with a reference version of the output. SchemaCrawler
can be run either from the command line, or as an ant task. A lot of
examples are available with the download to help you get started.

http://schemacrawler.sourceforge.net/

Sualeh Fatehi.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 10:25 AM
Superboer
 
Posts: n/a
Default Re: Database Out Of Sync

dono how your setup exactly looks; however
if you have constraints on them to
garantee uniquenes or??
you may want to look at a thing called violations tables and have your
constraints
set to filterring without error.
check the manual for it do not have the syntax at hand sorry.

it boils down to

tab1( col1int, col2 char) has pk on col1
and has say 2 records in it

say

1,"one"
2,"two"

when you reinsert 1,"one" it does not end
up in tab1 but in it's violation table.

so if you want to get rid of the unwanted you can get rid of the
violation table
stop violations and set your constraints to be 'normal' again.

you also can use dbload and set the
# of errors big i guess.


Superboer.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:30 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com