| Author |
Message |
calvis
Joined: 08 Jul 2012 Posts: 1
|
Posted: Sun Jul 08, 2012 3:39 am Post subject: Adding Notes to Backups |
|
|
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 |
|
 |
petey
Joined: 24 Apr 2005 Posts: 2218
|
Posted: Mon Jul 09, 2012 2:34 am Post subject: |
|
|
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 |
|
 |
|
|
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