April 7, 2009 at 2:38 am
Hi,
I am looking for the code to get the information for the details of a database backup taken.
Currently I use following code
SELECT TOP 10backup_start_date,backup_finish_date ,backup_size ,database_name ,type ,user_name
FROM dbo.backupset
WHEREdatabase_name = 'PRDCRM'
ANDtype<>'L'
ORDER BY backup_start_date DESC
this gives me details of backup which are already completed.
I want to check also what backup is running of a database.
Please let me know if anyone have the Script.
Kind Regards
Niraj
April 7, 2009 at 3:37 am
Hi,
The query being used will not hold the data for the backup thats currently in progress. It would only mark an extry once the backup is completed.
However if you want to know the backup that is currently in progress you can use the following DMV along with the query you already use. This is as similar to sp_who2 to know all the requests that is executing within SQL Server
select * from sys.dm_exec_requests where command='%BACKUP%'
-Rajini
April 7, 2009 at 7:41 am
Thank You Rajini
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply