January 5, 2010 at 8:21 am
Hi,
I have a problem, i need to analise databases...
People send me backup files of their databases , is there any way to know when this backup was made?
Can i query the database after restore the backup and know when the backup was made?
Thank you
January 5, 2010 at 8:28 am
Look up RESTORE HEADERONLY in BOL (Books Online, the SQL Server Help System).
January 5, 2010 at 8:29 am
select * from sys.databases would give you the DB creation date.
and you can query msdb..backupset DB to know when backups ran. It will show you the backup start date time and backup end date time..
Rgds,
Pankaj
January 5, 2010 at 8:31 am
Nop, that's not possible.
The backups i receive came from the NET.
Users send me their backups, so i can analise, but i need to know when the backup was made...
Is there any information about that on the backup, that i can query?
Thank you
January 5, 2010 at 8:32 am
Take a look at "Restore HeaderOnly" in Books Online. It will give you the information you are looking for (as well as a lot of other useful information about the backup file).
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 5, 2010 at 8:34 am
In my case i think i can not Lin, because what i receive is a simple backup file.
e.g
databasename.bak with only one backup inside
January 5, 2010 at 8:35 am
river1 (1/5/2010)
In my case i think i can not Lin, because what i receive is a simple backup file.e.g
databasename.bak with only one backup inside
RESTORE HEADERONLY
FROM disk = 'databasename.bak';
January 5, 2010 at 8:38 am
You might want to take the time to read RESTORE HEADERONLY in BOL.
January 5, 2010 at 8:43 am
Can i do this with backups of databases that are in SQL Server 2000? or this is only for 2005 and 2008 databases?
Thank you
January 5, 2010 at 8:48 am
river1 (1/5/2010)
Can i do this with backups of databases that are in SQL Server 2000? or this is only for 2005 and 2008 databases?Thank you
Try it. As long as you are using the most current version of SQL (ie, SQL Server 2000 won't read a SQL Server 2005 or SQL Server 2008 database files), it will work.
January 5, 2010 at 8:52 am
didn't undestand your answer.
I was asking if i can restore a dabase in SQL Server 2000 with a backup of a database in compatibility level (80) and try to make the restore as you told me (restore of the header).
I don't know if this (backup option) only functions if the SQL Server is the 2008..
January 5, 2010 at 8:57 am
Open up Books Online (from within SSMS, press the {f1} function key). Read about RESTORE HEADERONLY.
January 5, 2010 at 9:00 am
river1 (1/5/2010)
didn't undestand your answer.I was asking if i can restore a dabase in SQL Server 2000 with a backup of a database in compatibility level (80) and try to make the restore as you told me (restore of the header).
I don't know if this (backup option) only functions if the SQL Server is the 2008..
I've used Restore HeaderOnly in SQL 2000. If the database is compatible, it will work.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply