Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unanswered: netbackup for DB2

    Hi everybody
    I would like to know which commands on db2
    are necesary to make an online & offline backup in order to don´t affect the applications which uses the db2 in real time.

    In netbackup terms there are a script which
    do the backup, this script is
    "db2 backup database sample $MY_SCHED load $MY_LIB open 4 sessions buffer 1024"

    where my lib= nbdb2.sl (for 32-bits db2)

    but there are not any command to put the database on backup mode, like logretain on, or user exit, so I don´t know which sequence use for each case (online and off line) in addition to the netbackup script.
    I appreciate your help and suggestion for this
    regards
    Aaron

  2. #2
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Re: netbackup for DB2

    You would need to turn log retain on and setup a userexit to do online backups.

    db2 udpate db cfg for <instance> using LOGRETAIN yes;
    db2 udpate db cfg for <instance> USEREXIT on;


    Then you'll need to run an offline backup. Nothing can be accessing or connect to the db during this time. If time is a factor, run your offline to /db2/null and then run an online to whatever device you normally back up too.

    you then could backup your db with

    db2 backup database <instance> online use adsm open 2 sessions 4 buffers parallelism 2
    or
    db2 backup database <instance> online to < your device>

    Your backup can and probably cause a litlle system slow down.


    rember, you cannot have anything connected to the DB during the offline backup.
    David Quigley

  3. #3
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Re: netbackup for DB2

    Should be run backup to /dev/null if your using UNIX or a dummy file
    David Quigley

Posting Permissions

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