doyoudb2

DB2 UDB for LUW (Linux, Unix and Windows)

 
  • Increase font size
  • Default font size
  • Decrease font size

Remove Backup Pending state without taking backup

E-mail Print PDF
User Rating: / 3
PoorBest 
How to remove backup pending state of a tablespace/database without actually taking a backup?

A LOAD operation without the nonrecoverable or copy yes option puts the tablespace in backup pending state.  If you change your database logging from circular to archive, the database state will change to backup pending state.

While it is strongly recommended to take an actual backup in such cases any stay out of any possible trouble, there is a workaround to bring your database out of backup pending state using DB2DART utility.  This would save a lot of time (if you database is huge) but in the case of a corruption your database may become unrecoverable. You must backup your database/tablespace on the first available opportunity if you use DB2DART to change database/tablespace state.


To change the state of the database using DB2DART your database must be offline.

The DB2DART command is:

db2dart  <DB NAME>  /CHST /WHAT DBBP OFF

If you have time to take the backup but don't have enough space to store it, you can consider running a normal backup and redirecting it to a null device (on UNIX and Linux only)

db2  backup db <db name> to /dev/null

This will take approximately the normal time it takes to backup your db but will not store it anywhere.

Comments
Add New Search
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
Please input the anti-spam code that you can read in the image.
Daemon  - mr.   |Friday, 22 August 2008 01:50
================================================== =====
DB2 UDB attempts to
open the backup file target with the O_NSHARE flag .
This is not allowed for
the null device , /dev/null , on AIX 5.3,
but was allowed on prior versions of
AIX .
Attempting to open /dev/null with O_NSHARE will fail with the error
EBUSY
returned to the program, and backing up a DB2 database to /dev/null

will fail with the error SQL2025N An I/O error "124" occurred on media

"/dev/null".
DB2 UDB APAR IY72214 addresses this problem in DB2
Version 8.1 FixPak 10 .
The following db2dart command will remove the backup
pending state
at a database level:
db2dart /chst /what DBBP OFF
db2admin   |Tuesday, 26 August 2008 03:53
Hi Daemon - mr.

Thanks for pointing out the APAR. Apparently, the APAR was
fixed in v8.2 fixpack 10.

I tried to redirect the backup to /dev/null in DB2
v9.1 and v9.5 databases (both running on Aix 5.3) and both the backups completed
without errors.

I ran the following command:

db2 "backup db SAMPLE to
/dev/null"

Sometimes, without the double quotes the shell gets confused
parsing the command and returns errors. Its always better to submit the db2
commands in quotes.

3.25 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Search Site

Subscribe

Enter your email address to receive new posts directly in your Inbox:

Relax! We hate SPAM as much as you do.

Sign In/Register

Syndicate Feeds - Subscribe