Quantcast
Viewing all articles
Browse latest Browse all 1519

How best to archive old partitions?

SQL Server 2008R2...

I am designing/testing to demonstrate techniques to archive partitions for a very large table.  The table will be partitioned by date and each year will be in excess of a TB, so I am worried about efficiency.  Each partition is it's own filegroup and file, and all indexes are aligned, so each partition is self contained.  The partition to be archived will be swapped with an empty table, and the new empty partition will be merged with an empty low-value partition, so the file group will no longer be used by the partitioned table, but will have a non-partitioned table with the data from the swapped partition.  So far, so good, and everything has been done without physically moving or re-writing the data.

The removed data is no longer needed for the application, but can't be forever discarded because... the lawyers say so.  So what I want to do is take the file/filegroup offline and move it to tape or cheap storage, but be able to reverse the process if needed.  The problem is that you can't put a file back "online".  Am I missing something?

It would be great if I could make the file "offline", move it, but could later "tell" the DB that the file is back online...  or if I could declaratively transform the filegroup into it's own DB... then I could detach it and copy the files and reattach them later if ever needed.  The best I can come up with is to backup the file group and later restore the backup if needed, but that requires an extra copy step each way... is that avoidable?  


Viewing all articles
Browse latest Browse all 1519

Trending Articles