Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Archiving database in SQL Server Expand / Collapse
Author
Message
Posted Friday, April 13, 2012 10:22 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, September 8, 2014 3:09 PM
Points: 31, Visits: 258
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.
Post #1283259
Posted Wednesday, April 18, 2012 5:55 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 8:15 AM
Points: 3,065, Visits: 4,639
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.
Post #1285567
Posted Thursday, April 19, 2012 9:35 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, September 8, 2014 3:09 PM
Points: 31, Visits: 258
@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?
Post #1286507
Posted Friday, April 20, 2012 10:54 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 8:15 AM
Points: 3,065, Visits: 4,639
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.
Post #1287342
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse