Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2009, 10:26 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default Previous manual back-ups

Hi,

I need to establish which indidvidual (our IS staff) performed a manual back-up on a database. Does anyone know how I retrieve this information?

Thanks in advance,
__________________
Neal

A Northern Soul
 
Old February 6th, 2009, 09:02 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

I'm pretty sure that it's not possible.
__________________
--Jeff Moden
 
Old February 12th, 2009, 05:30 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default Jeff, hold your breath!

Code:
SELECT  bf.logical_name,
  bs.user_name,
  bs.backup_start_date,
  bs.backup_finish_date,
  CAST(bs.software_major_version AS VARCHAR(11)) + '.'
      + CAST(bs.software_minor_version AS VARCHAR(11))  + '.'
      + CAST(bs.software_build_version AS VARCHAR(11)) ,
  bs.[compatibility_level],
  bs.backup_size
FROM  msdb..backupfile AS bf
INNER JOIN msdb..backupset AS bs ON bs.backup_set_id = bf.backup_set_id
WHERE  bf.file_type = 'D'

Last edited by Peso; February 12th, 2009 at 11:28 AM..
 
Old February 12th, 2009, 08:57 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default It's good to be wrong the right way!

Haven't tried it, but very cool, Peter!
__________________
--Jeff Moden
 
Old February 12th, 2009, 09:02 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have tried it three ways.

1) Manually "BACKUP DATABASE xyz TO DISK='...'
2) With Object Explorer Context menu TASK -> Backup
3) With Maintenance plans

All seems to log and be detectible with above code.
 
Old February 12th, 2009, 11:21 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Thanks Guys.

I'll give it a whiz later.
__________________
Neal

A Northern Soul
 
Old February 12th, 2009, 11:27 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't get blown away!
 
Old February 13th, 2009, 05:13 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also see http://weblogs.sqlteam.com/peterl/ar...ckup-when.aspx





Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview manual databinding through code thas123 ASP.NET 2.0 Basics 3 December 12th, 2006 01:18 PM
Manual Submit Digon Classic ASP Basics 2 December 28th, 2005 08:24 PM
Crystal manual crosstab Eric Butterfield Crystal Reports 1 February 18th, 2005 06:42 PM
Manual Copy-Of aberglas XSLT 1 February 17th, 2005 05:40 AM
go back previous page hosefo81 PHP How-To 2 February 11th, 2004 01:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.