April 13, 2012 at 10:22 am
Hello,
We are currently running SQL Server 2005, and i need to archive data from databases in Production server to another server. From the information that i gathered, Which one of the following is the ideal way to do so
1) Using SQL Server Import/Export (At database level, i think this is easiest way)
2) Write some stored procedure using linked servers to move data from one server to other
3) Horizontal partitioning (I think this has to be done for each table in the database, i'm not familer with this)
Also we need only data that is three months older in our production database.
Pls advice.
April 18, 2012 at 5:55 am
Dj463 (4/13/2012)
Hello,We are currently running SQL Server 2005, and i need to archive data from databases in Production server to another server. From the information that i gathered, Which one of the following is the ideal way to do so
1) Using SQL Server Import/Export (At database level, i think this is easiest way)
2) Write some stored procedure using linked servers to move data from one server to other
3) Horizontal partitioning (I think this has to be done for each table in the database, i'm not familer with this)
Also we need only data that is three months older in our production database.
This appears to be a recurrent process to archive-and-purge data older than three month... if this is the case I would consider table partitioning by date range on the date that determines which data has to go to the archiving database then to be purged.
Once core tables are partitioned this way you just have to switch out the targetted partition then move the resulting table to the archiving database and switch the partition in. Fast, clean, reliable.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.April 19, 2012 at 9:35 am
@paul-2, Thanks for the reply
Yes, it is a recurrent process ocuuring every three months to move data older than 3 months to archive database on another server and delete that data from the production database.
Since the production and archive databases are to be on two diferent servers, is the table partitioning possible for this scenario?
April 20, 2012 at 10:54 am
Dj463 (4/19/2012)
@paul, Thanks for the replyYes, it is a recurrent process ocuuring every three months to move data older than 3 months to archive database on another server and delete that data from the production database.
Since the production and archive databases are to be on two diferent servers, is the table partitioning possible for this scenario?
Yes, it is.
Worst case scenario you move the switched-out partition from production server to the archve server then switch-it-in there.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply