Everything depends on the
definition that you, the DBA, give to AWBackup, and you can change that definition over
time independently of your BACKUP DATABASE commands.
Managing Backup Devices
One thing no DBA or server administrator ever likes to see is a full disk drive. Whether
backups are stored in a named backup device or kept separately as distinct files on disk,
you need a way to maintain them and remove old and invalid files. Previous to SQL
Server 2005, you needed to use either a maintenance plan or a custom script to perform
this maintenance. In SQL Server 2005, you can now specify how long until a backup
should be removed, or you can specify a date after which a backup expires (meaning it is
no longer needed and should be removed)??”for example:
CHAPTER 2 n MAKING DATABASE BACKUPS 26
BACKUP DATABASE AdventureWorks
TO AWBackup
WITH EXPIREDATE = '12/05/2007'
or
BACKUP DATABASE AdventureWorks
TO AWBackup
WITH RETAINDAYS=7
The first option causes that specific backup to be removed after December 5, 2007
(at midnight, to be precise). The second option forces that particular backup to be
removed after seven days have passed.
Pages:
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96