Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Unanswered: DB2 UDB 7 Backup

    I am trying set up a scheduled online back of a database, but have not been successful. I either get a "The database is currently in use" or "Online backup is not allowed because either logretain or userexit for roll-forward is not activated, or a backup pending condition is in effect for the database" error.

    All I need to accomplish is to get a scheduled backup once a day. Transactions/database changes in between are not important.

    How can I accomplish this? I have searched IBM's web site and googled, but have got no where. I am about to tear my hair out. Can someone pleas help?

    Thanks

    Chandru

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2 UDB 7 Backup

    You can have either an online or offline backup ....

    Well, for offline backup, obviously, no users should be connected to the database ... If you know that no one is supposed to be connected do 'force application' ...

    For online backup, you need to have logretain or userexit enabled ...

    db2 update db cfg for <dbname> using logretain on

    This will switch the database from circular to linear logging ...

    For more details go to www.ibm.com/db2/library and look out for a manual on backup/recovery(I don't remember it's name)

    HTH

    Cheers

    Sathyaram



    Originally posted by caroor
    I am trying set up a scheduled online back of a database, but have not been successful. I either get a "The database is currently in use" or "Online backup is not allowed because either logretain or userexit for roll-forward is not activated, or a backup pending condition is in effect for the database" error.

    All I need to accomplish is to get a scheduled backup once a day. Transactions/database changes in between are not important.

    How can I accomplish this? I have searched IBM's web site and googled, but have got no where. I am about to tear my hair out. Can someone pleas help?

    Thanks

    Chandru

  3. #3
    Join Date
    Mar 2003
    Posts
    3

    Re: DB2 UDB 7 Backup

    Thanks, that helped.

    Originally posted by sathyaram_s
    You can have either an online or offline backup ....

    Well, for offline backup, obviously, no users should be connected to the database ... If you know that no one is supposed to be connected do 'force application' ...

    For online backup, you need to have logretain or userexit enabled ...

    db2 update db cfg for <dbname> using logretain on

    This will switch the database from circular to linear logging ...

    For more details go to www.ibm.com/db2/library and look out for a manual on backup/recovery(I don't remember it's name)

    HTH

    Cheers

    Sathyaram

  4. #4
    Join Date
    Mar 2003
    Posts
    343

    Re: DB2 UDB 7 Backup

    Couple of things :
    a] If you switch the database to archivelog mode from circular logging - your database will be place in backup pending. You can ascertain this by the following command :
    db2 get db cfg for <dbname> | grep -i backup
    Backup pending = NO/YES

    At this point you will have to take an offline backup of the database and if you are using EEE, it means doing the catalog node first.

    After you are done, you can activate the database.

    There is a registry variable called DB2_DISABLE_FLUSH_LOG. Depending on your requirements, you can set this value to OFF or ON.
    You can see it's current value using the command :
    db2set -all

    When an online backup is run, UDB truncates the currently active log on each node. You can disable this feature by setting DB2_DISABLE_FLUSH_LOG =ON and it will not truncate the log before the backup starts - however the log/s will have to be available during recovery.

    Thanks,

    Originally posted by caroor
    I am trying set up a scheduled online back of a database, but have not been successful. I either get a "The database is currently in use" or "Online backup is not allowed because either logretain or userexit for roll-forward is not activated, or a backup pending condition is in effect for the database" error.

    All I need to accomplish is to get a scheduled backup once a day. Transactions/database changes in between are not important.

    How can I accomplish this? I have searched IBM's web site and googled, but have got no where. I am about to tear my hair out. Can someone pleas help?

    Thanks

    Chandru

Posting Permissions

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