Solved

Query to return SQL Server Backup Job Details

Posted on 2010-11-09
7
347 Views
Last Modified: 2012-05-10
Hi,

Can you guys recommend a SQL query in MS SQL Server 2008 to return SQL Server backup job details such as...

Server, Client, FileName, Size, Start Time, End Time etc.

Many thanks,

Iain
0
Comment
Question by:mullykid
7 Comments
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 34091603
Hi,

check out this link.

http://www.yaldex.com/sql_server_tutorial_3/ch08lev1sec6.html

It may helps....
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 250 total points
ID: 34091614
select b.server_name, '?' as client, m.physical_device_name, b.backup_size,
      backup_start_date, backup_finish_date,
      b.database_name, b.type, b.database_creation_date
from msdb..backupset b
inner join msdb..backupmediafamily m on b.media_set_id = m.media_set_id
0
 
LVL 16

Assisted Solution

by:EvilPostIt
EvilPostIt earned 250 total points
ID: 34091626
Try this.

select bs.Server_name,bs.machine_name,bmf.physical_device_name,bs.backup_size,bs.backup_start_date,bs.backup_finish_date from msdb..backupset bs
join msdb..backupmediafamily bmf on bmf.media_set_id=bs.media_set_id
0
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 

Author Comment

by:mullykid
ID: 34091738
Thanks guys. I'll check those out.
0
 

Author Comment

by:mullykid
ID: 34092159
Guys,

That's great. In addition, how do I obtain job status (failed, succes), schedules etc.

Do I need to look in the SysjobXXX tables?

Iain
0
 
LVL 16

Assisted Solution

by:EvilPostIt
EvilPostIt earned 250 total points
ID: 34092183
The queries that we have posted are with regards to the in built backup tables. If you query sysjobhistory table yuo will be able to get this information.
0
 

Author Comment

by:mullykid
ID: 34092297
Ok. Thanks lads
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now