Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Replicate new data to archive database

$
0
0

My scenario sounds like something that should have been solved before, but my searches have turned up nothing. I am really, really new to replication so perhaps I just don't know exactly what to search for in order to find the solution, but here is my problem:

I need to make an old archive database a subscriber. This subscriber will not have all schema updates at the time I create replication. I need to retain the data in the old archive database and begin updating/syncing it with replication. The source database can have records deleted after a certain period of time but the archive database maintains a record of it.

Things I have tried:

1)

  • Backup archive database.
  • Run replication script which adds the publication/subscription/articles, etc. (both with @pre_creation_cmd set to 'drop' and 'none').
  • Stop synchronization on the subscription.
  • Restore subscription database from backup with keep replication.
  • Start synchronization. (this wipes out archive records and maintains only the source records)

2)

  • Run replication script with varying @pre_creation_cmd values, @sync_type values, etc. These either retain the records but do not have the new replication schema updates, or get the schema updates but blow out the data.

So, what am I missing in order to take an old archive database, retain its historical records, turn on replication between a publisher and this archive database as a subscriber and flow across any schema mismatches?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>