From: Sivaswami Jeganathan on
Hi How to delete the backup history of the database without any
recycle of instance or db.

Thx
From: The Boss on
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=/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


From: Sivaswami Jeganathan on
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...(a)No.Spam.Please.invalid> wrote:
> 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

From: Sivaswami Jeganathan on



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...(a)No.Spam.Please.invalid> wrote:
> 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

From: The Boss on
Sivaswami Jeganathan wrote:
> 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