Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

can We have the current and the archive data in a single database

$
0
0

Data Purging and replication.

There is a Online database which is our pubisher and the source of data.
There is a Secondary database on a separate instance which is our subscriber of data.

We need to develop a reporting solution where, even if the data is purged out of Online database, we need to retain full data in the Secondary or any other database so that we can have full data for reporting.

To explain more we need to keep a lean production size with only two months data. However data requirement for reporting is 2 years.

Since production has to be lead we keep on archiving data from Online database to Online_Archive database on production.
Since we have the replication enabled and data is replicated to the Secondary database on a separate instance, when we purge out the data from Online, it gets purged out from the secondary too.

Now the requirement is that we want to maintain the full data for reporting, which means the current production data PLUS the purged data for 22 months from the Online_Archive database.

 

One solution is that we can have the archival on the reporting side only so that we will have the online_Archive database on the reporting instance.
This would mean that the current data will be in the Secondary (Subscriber) database and the old data will be in the online_Archive database. However the limitation here is that the query will always have to have a UNION of what we get from the Secondary (Subscriber) database and the data in the online_Archive database.

Other way is to make an indexed veiw which will have the data from both the online and archive data but I dont want to get in to index views as I feel they make the architecture very rigid and there can be unforseen issues in future with indexed view.  

I am looking for a way so that we can have the current and the archive data in a single database.
It can be any wild imagination.

Thanks in advance.


Viewing all articles
Browse latest Browse all 4054

Trending Articles



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