The RecoveryModel property specifies the recovery model for a database.
object.RecoveryModel [= value]
object
Expression that evaluates to an object in the Applies To list
value
Integer that indicates which recovery model to use as specified in Settings
Constant | Value | Description |
---|---|---|
SQLDMORECOVERY_BulkLogged | 1 | Use the Bulk-Logged Recovery model. |
SQLDMORECOVERY_Full | 2 | Use the Full Recovery model. |
SQLDMORECOVERY_Simple | 0 | Default. Use the Simple Recovery model. |
SQLDMORECOVERY_Unknown | 3 | Recovery model is unknown. |
Long, enumerated
Read/write
HRESULT GetRecoveryModel(SQLDMO_RECOVERY_TYPE);
HRESULT SetRecoveryModel(SQLDMO_RECOVERY_TYPE);
Microsoft® SQL Server™ 2000 provides the Simple, Bulk-Logged, and Full Recovery models to simplify recovery planning, simplify backup and recovery procedures, and to clarify tradeoffs between system operational requirements. An application can use the RecoveryModel property to specify which recovery model to use.
Note If an application calls RecoveryModel on an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000" are returned.