473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 14772
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Astra | last post by:
Hi All I know an SQL Server timestamp seems to be as useful as rocking horse for show jumping, but I'm hoping you know a 'fudge' to get me round a problem or at least confirm that it isn't...
2
by: Devesh Aggarwal | last post by:
Hi, I have a backup and restore module in my project. The backup uses a typed dataset object (XSD) to get the data from database and creates a xml file as the backup file (using the WriteXml...
1
by: Luc Le Blanc | last post by:
I'm trying to restore a backup from a DMS DB2/2 database. The original DB has 3x 1Gb containers in the user tablespace. So the backup has 3 files, bearing the time of the backup as file name, with...
3
by: t2581 | last post by:
Hi , I run restore with rollforward In job in output, last commited transaction time less then backup image time Is it normal ? RESTORE DATABASE PRICE_V8 FROM "E:\BACKUP" TAKEN AT...
1
by: cmitchell | last post by:
Hi, I have daily backups set up for a database, however today i noticed in the Journal under task history i see under the success column that the status is expired. Normally the success column...
0
by: prerak_v_shah | last post by:
Hi All, These days I was working on IBM DB2 database for windows with my .Net Application. Now, it was required to backup database created on one machine to the other machine. I was also able...
10
by: Konstantin Andreev | last post by:
Hello. Some time ago I asked in this conference, - How to use an ONLINE BACKUP to restore database onto another system? - but got no answers. Therefore I can conclude it is not possible. But......
0
by: Massimiliano Campagnoli | last post by:
I am trying to backup sample database to network drive J:\ which maps to a SAMBA share. The first time the backup is successfull but the the next time fails. I've to delete J:\sample.0 if I want...
5
by: abelbfilho | last post by:
I have a backup image with name DADOSADV.0.DB2.NODE0000.CATN0000.20060812230006.001 and I want to restore it on Windows (in another server). In Windows Server I created this folder structure:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.