| Computers Forum Index » Computer - Databases - IBM DB2 » Delete Backup History... |
|
Page 1 of 1 |
|
| 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 |
|
|
| Back to top |
|
|
|
| The Boss... |
Posted: Thu Oct 22, 2009 12:42 am |
|
|
|
Guest
|
|
| Back to top |
|
|
|
| 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:
|
|
|
| Back to top |
|
|
|
| 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:
|
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
|