The RetainDays property specifies the number of days that must elapse before a backup set can be overwritten.
object.RetainDays [= value]
| Part | Description |
|---|---|
| object | Expression that evaluates to an object in the Applies To list |
| value | Long integer specifying a number of days |
For Microsoft® SQL Server™, backup set retention period is set when media is initialized. When using SQL-DMO to automate SQL Server backup, the RetainDays property is only evaluated when the Initialize property is True.
Long
Read/write
HRESULT GetRetainDays(LPLONG pRetVal);
HRESULT SetRetainDays(long NewValue);
| BACKUP | Initialize Property |