Hi all!
Is there a way to check using transact SQL or any other option that
backup on a database has been performed? Is there any table on the
server that could be queried for successful/unsuccessful backup made?
Or is there a way to get the last date of successful backup made on
the database?
Thanks in advance,
IlyaHi
Use RESTORE VERIFYONLY ... (See BOL for more details)
Nice feature in SQL Server 2005 (You can track backup' percent_complete
,estimated_completion_time )
select top 2 start_time,
percent_complete ,estimated_completion_time
from sys.dm_exec_requests
order by start_time desc
"Ilya" <lentyai@.gmail.com> wrote in message
news:1189513740.265730.67260@.k79g2000hse.googlegroups.com...
> Hi all!
> Is there a way to check using transact SQL or any other option that
> backup on a database has been performed? Is there any table on the
> server that could be queried for successful/unsuccessful backup made?
> Or is there a way to get the last date of successful backup made on
> the database?
> Thanks in advance,
> Ilya
>|||Hi,
The database server mentioned is SQL Server 2000 (SP4).
Thanks,
Ilya|||On Sep 11, 2:31 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Hi
> Use RESTORE VERIFYONLY ... (See BOL for more details)
> Nice feature in SQL Server 2005 (You can track backup' percent_complete
> ,estimated_completion_time )
> select top 2 start_time,
> percent_complete ,estimated_completion_time
> from sys.dm_exec_requests
> order by start_time desc
> "Ilya" <lent...@.gmail.com> wrote in message
> news:1189513740.265730.67260@.k79g2000hse.googlegroups.com...
> > Hi all!
> > Is there a way to check using transact SQL or any other option that
> > backup on a database has been performed? Is there any table on the
> > server that could be queried for successful/unsuccessful backup made?
> > Or is there a way to get the last date of successful backup made on
> > the database?
> > Thanks in advance,
> > Ilya
Hi, Uri!
Thanks for your quick reply.
Found smth myself with the BOL and VERIFYONLY you mentioned.
There is a table called backupset in msdb database. There are a plenty
of fields and backup_finish_date & database_name as well. These two
give me what I need (the date of the last backup made on the
database).
Then the following SQL gives me what I need:
SELECT TOP 1 backup_finish_date
FROM msdb..backupset
WHERE database_name = '<The name of the database>'
ORDER BY backup_finish_date DESC
Thanks again,
Ilya
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment