469,344 Members | 6,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Finding Last Backup Timestamp

Ray
Is there a simple way of selecting the last backup timestamp of a
database from a table? Something like

select last_backup_timestamp from tablename where
database_name='WHATEVER'

Or am I forced to check the backup history with

list history backup all for WHATEVER

Thanks.
Nov 12 '05 #1
6 13070
br****@lsmp.com (Ray) wrote in message news:<f3**************************@posting.google. com>...
Is there a simple way of selecting the last backup timestamp of a
database from a table? Something like

select last_backup_timestamp from tablename where
database_name='WHATEVER'

Or am I forced to check the backup history with

list history backup all for WHATEVER

Thanks.


The only way as far I can tell is by doing a list history. It is not
like the mainframe where you can select from SYSIBM.SYSCOPY.
Nov 12 '05 #2
Closest to your requirement would be solution no.3

1-
Prompt>db2 list history backup all for xxxx
....

2-
Prompt>db2 get snapshot for all on xxxx | findstr /i /C:"backup"
/C:"snapshot"
Database Snapshot
Last backup timestamp =

3- SNAPSHOT_DATABASE
db2 select SQLM_ELM_LAST_BACKUP from table(SNAPSHOT_DATABASE( cast( null as
VARCHAR(255)), cast(null as int))) as ref

PM
Nov 12 '05 #3
Ray
I was afraid the answer would be just that.

Thanks.
Ray
Nov 12 '05 #4
Make it a view then...

PM

"Ray" <br****@lsmp.com> a écrit dans le message de
news:f3**************************@posting.google.c om...
I was afraid the answer would be just that.

Thanks.
Ray

Nov 12 '05 #5
br****@lsmp.com (Ray) wrote in message news:<f3**************************@posting.google. com>...
I was afraid the answer would be just that.

Thanks.
Ray


You have your answer in PM's option 3... assuming you're DB2 V8.

/T

Tomas Hallin
Database Administration
Robert Half International
Pleasanton, CA
Nov 12 '05 #6
Ray
I am using V7

ja*****@hotmail.com (Tomas Hallin) wrote in message news:<2c*************************@posting.google.c om>...
br****@lsmp.com (Ray) wrote in message news:<f3**************************@posting.google. com>...
I was afraid the answer would be just that.

Thanks.
Ray


You have your answer in PM's option 3... assuming you're DB2 V8.

/T

Tomas Hallin
Database Administration
Robert Half International
Pleasanton, CA

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Devesh Aggarwal | last post: by
1 post views Thread by Luc Le Blanc | last post: by
10 posts views Thread by Konstantin Andreev | last post: by
reply views Thread by Massimiliano Campagnoli | last post: by
5 posts views Thread by abelbfilho | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.