SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Archiving database in SQL Server


Archiving database in SQL Server

Author
Message
Dj463
Dj463
SSC Veteran
SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)

Group: General Forum Members
Points: 227 Visits: 411
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.
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13339 Visits: 4639
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.
Dj463
Dj463
SSC Veteran
SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)SSC Veteran (227 reputation)

Group: General Forum Members
Points: 227 Visits: 411
@paul, 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?
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13339 Visits: 4639
Dj463 (4/19/2012)
@paul, 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?


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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search