Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Query to return SQL Server Backup Job Details

Posted on 2010-11-09
7
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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 1000 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

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 1000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 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