Backup.RetainDays Property

Gets or sets the number of days that must elapse before a backup set can be overwritten.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

public int RetainDays { get; set; }

Property Value

Type: System.Int32
An Int32 value that specifies the retention period in days. By default, the value is set to zero.

Backup set retention period is set when media is initialized. When using SQL Server Management Objects (SMO) to automate Microsoft SQL Server backup, the RetainDays property is only evaluated when the Initialize property is True.

Community Additions

ADD
Show: