Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2012

    Question Unanswered: How to archive smartly in db2 ?


    We are currently using 3 tables in DB2 :

    1. Previous Year
    2. Current Year
    3. Next Year

    At the end of each year we are planning to archive the data for example previous year has 2011 data so now we want to archive the data and move the current year 2012 data to the previous year data. An ideal solution would be to create one more table for eg previous year_2011 and copy the data from previous year to new table like using _ 2011, but the previous year data is accessed by IBM COGNOS so if we change the name of the previous year table we will have to change a lot of things from cognos as well to access the 2011 data. I am trying for a solution within DB2 that will tackle this problem since i do not want to keep on changing the name of the tables in cognos. Any idea or suggestion will be a great help. Thanks

  2. #2
    Join Date
    May 2003
    What about renaming the tables?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jun 2012
    Yes just thought of creating a new table each year say table_2011 and copying the data over and then updating the view that the cognos uses. Hope this works and the performance is not affected over time

  4. #4
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Quote Originally Posted by marshell08 View Post
    copying the data over
    If you just rename the table you'll save on copying.

    Consider also table partitioning - it will let you keep all data in a single logical table while benefitting from separate physical structures.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts