Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Austin
    Posts
    62

    Unanswered: General DB2 8.2 backup questions

    I'm a newbie to DBA scripting. I've been tasked to build a set of maintenance scripts on a SuSe box for DB2 8.2. I'd like to know where I could go for good
    information on backup and recovery scripts.

    I've thus far been able to do a simple backup and recovery, but I'm not sure
    of the commands I'll need for a standalone script. For instance I need to know
    how to take the datbase "offline".

    I've been using a command

    db2 force applications all

    To kick all pending applications off the database, but I'm not sure how to make sure the database is offline so that no new processes won't try to connect during or right before the backup process.

    The other key item I'm trying to determine is how to hide a password.
    The script will have to login in order to perform the backup, and the
    simple way to do this is to add the login and password in the command in
    plain text. Is there another way to have the proper login access to perform
    the required backup and restore commands without having the password
    in plain text, "sight".

    Any help is much appreciated.

    Regards,

    Michael

  2. #2
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Go to the Control Center and do a backup with the GUI. Right before you submit the backup, do a show SQL, which will give you the recommended script to use.

    You can create a cron job using the instance owner id, so you will already be logged on (no password required).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Jan 2004
    Location
    Austin
    Posts
    62

    Thanks for the info!

    Great tip Marcus_A, thanks for the help.
    I appreciate the links Wang.

    Regards,

    Mike

Posting Permissions

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