Solved

Query to return SQL Server Backup Job Details

Posted on 2010-11-09
7
331 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:mullykid
Comment Utility
Thanks guys. I'll check those out.
0
 

Author Comment

by:mullykid
Comment Utility
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
Comment Utility
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
Comment Utility
Ok. Thanks lads
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

7 Experts available now in Live!

Get 1:1 Help Now