If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 UDB 7 Backup

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-03, 12:03
caroor caroor is offline
Registered User
 
Join Date: Mar 2003
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 03-06-03, 12:54
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,006
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



Quote:
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
Reply With Quote
  #3 (permalink)  
Old 03-08-03, 16:15
caroor caroor is offline
Registered User
 
Join Date: Mar 2003
Posts: 3
Re: DB2 UDB 7 Backup

Thanks, that helped.

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 03-10-03, 10:51
cchattoraj cchattoraj is offline
Registered User
 
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,

Quote:
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On