Red Gate forums :: View topic - Adding Notes to Backups
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Backup 7
SQL Backup 7 forum

Adding Notes to Backups

Search in SQL Backup 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
calvis



Joined: 08 Jul 2012
Posts: 1

PostPosted: Sun Jul 08, 2012 3:39 am    Post subject: Adding Notes to Backups Reply with quote

How do we add notes to our backups so we can be more informative on why a particular backup was made?
_________________
Charles Alvis
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2305

PostPosted: Mon Jul 09, 2012 2:34 am    Post subject: Reply with quote

You can do this using the DESCRIPTION option e.g.

Code:
EXEC master..sqlbackup '-sql "BACKUP DATABASE AdventureWorks TO DISK = [e:\backups\AdventureWorks.sqb] WITH DESCRIPTION = [Backup prior to applying patch #001]"'

To view the description, use the RESTORE HEADERONLY command e.g.

Code:
EXEC master..sqlbackup '-sql "RESTORE HEADERONLY FROM DISK = [e:\backups\AdventureWorks.sqb]"'


DESCRIPTION accepts up to 255 characters, and the value is also stored in the SQL Server backup history tables. E.g.

Code:
SELECT a.description
FROM msdb..backupset a
INNER JOIN msdb..backupmediafamily b ON a.media_set_id = b.media_set_id
WHERE b.physical_device_name = 'e:\backups\AdventureWorks.sqb'
  AND b.device_type = 7

_________________
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group