James
James

Reputation: 117

Database Replication after Data Load

I'm trying to understand the ramifications of database replication (SQL Server or Golden Gate) for situations where the source database is completely repopulated every night. To clarify, all existing tables are dropped and then the database is reloaded with new tables using same name along with all the data.

Based on my understanding i.e. that replication uses a transaction log... I would assume it will also repeat the process of dropping the tables instead of identifying the differences and just adding the new data. Is that correct?

Upvotes: 1

Views: 137

Answers (1)

Adam Leszczyński
Adam Leszczyński

Reputation: 1161

You can set up the replication using OracleGoldenGate so that it will be doing what you want it to do.

  • the TRUNCATE TABLE command can be replicated or it can be ignored
  • the populating of the source table (INSERT/bulk operations) can be replicated or it can be ignored
  • if a row already exists (meaning a row with the same PK exists) on the target and you INSERT it on the source you can either UPDATE the target or DELETE the old one and INSERT the new, or ignore it

Database replication is based on the redo (transaction) log. Only particular events that appear on the source databases, which are logged can be replicated. But the whole replication engine can make some additional transformations as it is replicating the changes.

Upvotes: 1

Related Questions