locked
How to archive data from my production databases RRS feed

  • Question

  • User2033107836 posted

    Hello

    I'm very new to this concept..

    Let us assume i have two table Order and Orderdetails table and i have lot of records, how do i archive my old data and if required how to restore them..

    Need idea with complete code.. 

    For example if i pass 01-Mar-2017

    before data will archive to archive_order and archive_orderdetails data to table automtically and delete data in current table.

    Thanking You

    Tuesday, September 26, 2017 8:30 AM

All replies

  • User-271186128 posted

    Hi asp.ambur,

    As far as I know, there's no general script for archiving since the rules for archival process vary depending on the business rules of the database. To overcome this types of issues, the SQL Server partition feature will be helpful to perform data archiving in an effective manner. The main of objective of partitioning is to aid in the maintenance of large tables and to reduce the overall time to read and load data for particular user operations.

    Archiving SQL Server data using partitioning

    https://www.mssqltips.com/sqlservertip/2780/archiving-sql-server-data-using-partitioning/

    Best regards,
    Dillion

    Wednesday, September 27, 2017 8:06 AM