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

February 5th, 2009, 10:26 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 6th, 2009, 09:02 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
|
|
I'm pretty sure that it's not possible.
__________________
--Jeff Moden
|
|

February 12th, 2009, 05:30 AM
|
|
Friend of Wrox
|
|
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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..
|
|

February 12th, 2009, 08:57 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
|
|
It's good to be wrong the right way!
Haven't tried it, but very cool, Peter!
__________________
--Jeff Moden
|
|

February 12th, 2009, 09:02 AM
|
|
Friend of Wrox
|
|
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

February 12th, 2009, 11:21 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
|
|
Thanks Guys.
I'll give it a whiz later.
__________________
Neal
A Northern Soul
|
|

February 12th, 2009, 11:27 AM
|
|
Friend of Wrox
|
|
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Don't get blown away!
|
|

February 13th, 2009, 05:13 AM
|
|
Friend of Wrox
|
|
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|
 |