Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2013

    Unanswered: What is the best db2 utility for this task?

    I need to set up a nightly job that will copy off all tables and indexes in a database except for 3 tables. That data will be saved off onto the same server on which the database is located on. It will also be needed to be restored back into the database on demand.

    DB2 version in 9.7 fp7. OS is ReDHat.
    Indexes are located in separate tablespaces.
    Total amount of data that would be moved is 40-50 Gigs.

    Would appreciate your suggestions re the best db2utility with which to accomplish this.

    Many Thanks
    Last edited by sarge2013; 03-27-13 at 08:35.

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    if it is to save the data : the only utility is export
    this will export the data (no additional command for indexes)
    always take a db2look together with export - so you have the data model for this data
    EXPORT - IBM DB2 9.7 for Linux, UNIX, and Windows
    import/load are utilities for loading the data back..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Aug 2001
    How big are the three tables you want to exclude ?

    If they are, say, <100 GB , then you can take a BACKUP of the database every day.
    When you want the data restored, at that point of time, you can EXPORT the data in the three tables , RESTORE the database from previous night backup and IMPORT the data into the three tables.
    Using BACKUP serves two purposes - for this data restore and also can be used if you have other failures that may require database restore

    If the three tables are large, but you can easily identify the changed rows since last backup (eg. you have a UPDATE_TIMESTAMP column), you can follow the same technique as above. When exporting you can EXPORT only the rows that have changed since your last backup.

    If neither of these is suitable for you, then consider EXPORTing the data on a nightly basis and IMPORTing/LOADing them when you need the data restored.

    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Mar 2013


    Many thanks for the info. I need to get more info from the requestor as to why an online backup, and a restore then truncate those 3 tables is not an option.
    Again many thanks.

  5. #5
    Join Date
    Jan 2010

    put these 3 Tables in a separate Tablespaces.
    Take complete Backup of the Database or Backup of the Tablespaces except the TBS with the 3 Tables (backup database DB tablespace(tbs1, tbs2, ...) online ...).
    BACKUP DATABASE command - IBM DB2 9.7 for Linux, UNIX, and Windows

    On Restore you can rebuild the DB with the Tablespaces for the 3 Tables:
    restore db DB ... rebuild with ..
    RESTORE DATABASE - IBM DB2 9.7 for Linux, UNIX, and Windows


  6. #6
    Join Date
    Apr 2013

    redirect restore

    hi guys

    pls help me for doing redirect restore

  7. #7
    Join Date
    Jul 2011
    Quote Originally Posted by naveen kotla View Post
    hi guys

    pls help me for doing redirect restore
    Hi Naveen,

    Please start a new thread for your query.
    Please post error details what you are getting in redirect restore.

    For basic of redirect restore you can follow :
    IBM DB2 9.7 for Linux, UNIX and Windows Information Center


Posting Permissions

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