The TruncateLog property controls log file processing for Backup and BulkCopy objects.
object.TruncateLog [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | Long integer specifying a database log file operation as described in Settings |
Constant | Value | Description |
---|---|---|
SQLDMOBackup_Log_Truncate | 0 | Default. Transaction log is backed up. Records referencing committed transactions are removed. |
SQLDMOBackup_Log_NoTruncate | 1 | Transaction log is backed up. Records referencing committed transactions are not removed, providing a point-in-time image of the log. |
SQLDMOBackup_Log_NoLog | 2 | Records referencing committed transactions are removed. Transaction log is not backed up. |
SQLDMOBackup_Log_TruncateOnly | 3 | SQLDMOBackup_Log_ NoLog. |
SQLDMOBackup_Log_NoOption | 4 | SQLDMOBackup_Log_ Truncate. |
For Microsoft® SQL Server™, transaction log backup can perform two distinct database administrative tasks:
When using the Backup object to perform administrative maintenance of a database log, set the TruncateLog property to SQLDMOBackup_Log_Truncate or SQLDMOBackup_Log_TruncateNoLog.
Long, enumerated
Read/write
HRESULT GetTruncateLog(SQLDMO_BACKUP_LOG_TYPE* pRetVal)
HRESULT SetTruncateLog(SQLDMO_BACKUP_LOG_TYPE NewValue)