Results 1 to 4 of 4

Thread: Physical Backup

  1. #1
    Join Date
    Dec 2009
    Posts
    43

    Unanswered: Physical Backup

    I would like to take a physical backup of a DB2 database, but I am struggling to find all the files I would need to make a copy of.

    I need to write a script to do this that will be able to find all the files rather than hardcode anything.

    So far I have...
    select container_name from sysibmadm.container_utilization for the tablespaces and I know I need the SQLSPCS.1 and SQLSPCS.2 files, although I'm not sure yet how I would script finding those.

    I searched the web and searched this forum, but I can't find many references to taking physical backups of DB2 databases, I guess everyone must be happy with the backup functionality that is already available.

    Where I work, we take physical backups of the Oracle databases and want to do the same for the DB2 databases.

    Any thoughts / directions please?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    There is no reason to do that. While this is a standard way of backing up an Oracle database, the only supported method to back up a DB2 database is to use the BACKUP command.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    If you also want to take a backup of your DB2 instance directory, stop the instance and backup the "sqllib" directory in the instance's HOME directory. Backing up the databases is only to be done with the BACKUP command as Nick explained.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    Dec 2009
    Posts
    43
    Thank you both for your answers.

    I will continue with the BACKUP command as you have advised.

Posting Permissions

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