media retention Option

Use the media retention option to provide a system-wide default for the length of time to retain each backup set. The media retention option helps protect backups from being overwritten until the specified number of days has elapsed. When you set media retention, you do not have to specify the length of time to retain system backups each time you perform a backup. The default is 0 days. If you use the backup medium before the set number of days has passed, Microsoft SQL Server issues a warning message. SQL Server does not issue a warning unless you change the default. This option can be overridden by using the RETAINDAYS clause of the BACKUP statement.

The media retention option is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change media retention only when show advanced options is set to 1. You do not need to restart the server to change the media retention value.

See Also


Setting Server Configuration Options

Other Resources

Backing Up and Restoring Databases in SQL Server
BACKUP (Transact-SQL)
sp_configure (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance