Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - IBM DB2  »  Delete Backup History...
Page 1 of 1    

Delete Backup History...

Author Message
Sivaswami Jeganathan...
Posted: Wed Oct 21, 2009 2:46 pm
Guest
Hi How to delete the backup history of the database without any
recycle of instance or db.

Thx
 
The Boss...
Posted: Thu Oct 22, 2009 12:42 am
Guest
Sivaswami Jeganathan wrote:
Quote:
Hi How to delete the backup history of the database without any
recycle of instance or db.

Thx

Did you check the documentation for your release of DB2?
Search for "prune history".

As you don't mention your release, I assume 9.5 for which you can find more
info here:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.ha.doc/doc/c0006138.html
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.cmd.doc/doc/r0001992.html
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.sql.rtn.doc/doc/r0023578.html

And here's a nice blog on the subject:
http://www.db2ude.com/?q=node/55
(it has quite some 'whitespace', so you have to scroll down)

HTH

--
Jeroen
 
Sivaswami Jeganathan...
Posted: Sun Oct 25, 2009 12:31 am
Guest
Good to hear the command. But I suppose, this also deletes the active
logs ???
how to delete only the history but not the logs

On Oct 21, 5:42 pm, "The Boss" <use... at (no spam) No.Spam.Please.invalid> wrote:
Quote:
Sivaswami Jeganathan wrote:
Hi How to delete the backup history of the database without any
recycle of instance or db.

Thx

Did you check the documentation for your release of DB2?
Search for "prune history".

As you don't mention your release, I assume 9.5 for which you can find more
info here:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=....http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...

And here's a nice blog on the subject:http://www.db2ude.com/?q=node/55
(it has quite some 'whitespace', so you have to scroll down)

HTH

--
Jeroen
 
Sivaswami Jeganathan...
Posted: Sun Oct 25, 2009 12:37 am
Guest
C:\Documents and Settings\Administrator>db2 prune history 20091024
DB20000I The PRUNE command completed successfully.

C:\Documents and Settings\Administrator>db2 list history backup all
for mydb

List History File for mydb

Number of matching file entries = 1


Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup
ID
-- --- ------------------ ---- --- ------------ ------------
--------------
B D 20091024212753001 F D S0000000.LOG S0000000.LOG

----------------------------------------------------------------------------
Contains 4 tablespace(s):

00001 SYSCATSPACE
00002 USERSPACE1
00003 TS1
00004 SYSTOOLSPACE

----------------------------------------------------------------------------
Comment: DB2 BACKUP MYDB OFFLINE
Start Time: 20091024212753
End Time: 20091024212758
Status: A

----------------------------------------------------------------------------
EID: 4 Location: c:


C:\Documents and Settings\Administrator>db2 prune history 20091025
DB20000I The PRUNE command completed successfully.

C:\Documents and Settings\Administrator>db2 list history backup all
for mydb

List History File for mydb

Number of matching file entries = 1


Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup
ID
-- --- ------------------ ---- --- ------------ ------------
--------------
B D 20091024212753001 F D S0000000.LOG S0000000.LOG

----------------------------------------------------------------------------
Contains 4 tablespace(s):

00001 SYSCATSPACE
00002 USERSPACE1
00003 TS1
00004 SYSTOOLSPACE

----------------------------------------------------------------------------
Comment: DB2 BACKUP MYDB OFFLINE
Start Time: 20091024212753
End Time: 20091024212758
Status: A

----------------------------------------------------------------------------
EID: 4 Location: c:

On Oct 21, 5:42 pm, "The Boss" <use... at (no spam) No.Spam.Please.invalid> wrote:
Quote:
Sivaswami Jeganathan wrote:
Hi How to delete the backup history of the database without any
recycle of instance or db.

Thx

Did you check the documentation for your release of DB2?
Search for "prune history".

As you don't mention your release, I assume 9.5 for which you can find more
info here:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=....http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=...

And here's a nice blog on the subject:http://www.db2ude.com/?q=node/55
(it has quite some 'whitespace', so you have to scroll down)

HTH

--
Jeroen
 
The Boss...
Posted: Wed Oct 28, 2009 1:45 am
Guest
Sivaswami Jeganathan wrote:
Quote:
Good to hear the command. But I suppose, this also deletes the active
logs ???
how to delete only the history but not the logs


Please don't toppost.

Did you actualy read the (second) link I provided?
Please re-read, and notice the "AND DELTE" parameter of the PRUNE HISTORY
command.

Cheers!

--
Jeroen
 
The Boss...
Posted: Wed Oct 28, 2009 1:54 am
Guest
Sivaswami Jeganathan wrote:
Quote:
C:\Documents and Settings\Administrator>db2 prune history 20091024
DB20000I The PRUNE command completed successfully.

C:\Documents and Settings\Administrator>db2 list history backup all
for mydb

List History File for mydb

Number of matching file entries = 1


Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup
ID
-- --- ------------------ ---- --- ------------ ------------
--------------
B D 20091024212753001 F D S0000000.LOG S0000000.LOG

----------------------------------------------------------------------------
Contains 4 tablespace(s):

00001 SYSCATSPACE
00002 USERSPACE1
00003 TS1
00004 SYSTOOLSPACE

----------------------------------------------------------------------------
Comment: DB2 BACKUP MYDB OFFLINE
Start Time: 20091024212753
End Time: 20091024212758
Status: A

----------------------------------------------------------------------------
EID: 4 Location: c:


C:\Documents and Settings\Administrator>db2 prune history 20091025
DB20000I The PRUNE command completed successfully.

C:\Documents and Settings\Administrator>db2 list history backup all
for mydb

List History File for mydb

Number of matching file entries = 1


Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup
ID
-- --- ------------------ ---- --- ------------ ------------
--------------
B D 20091024212753001 F D S0000000.LOG S0000000.LOG

----------------------------------------------------------------------------
Contains 4 tablespace(s):

00001 SYSCATSPACE
00002 USERSPACE1
00003 TS1
00004 SYSTOOLSPACE

----------------------------------------------------------------------------
Comment: DB2 BACKUP MYDB OFFLINE
Start Time: 20091024212753
End Time: 20091024212758
Status: A

----------------------------------------------------------------------------
EID: 4 Location: c:


Again, re-read the link pointing to the Infocenter-page that covers the
PRUNE HISTORY command.
In this case notice the "WITH FORCE OPTION" parameter, and what is said
about that option in the "Usage Notes" section:

<q>
If the WITH FORCE OPTION is used, you might delete entries that are required
for automatic restoration of databases. Manual restores will still work
correctly. Use of this command can also prevent the db2ckrst utility from
being able to correctly analyze the complete chain of required backup
images. Using the PRUNE HISTORY command without the WITH FORCE OPTION
prevents required entries from being deleted.
</q>

Cheers!

--
Jeroen
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Nov 30, 2009 8:39 am