다음을 통해 공유


TruncateLog Property (Backup)

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The TruncateLog property controls log file processing for Backup and BulkCopy objects.

구문

object
.TruncateLog [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    A long integer that specifies a database log file operation as described in Settings.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetTruncateLog(SQLDMO_BACKUP_LOG_TYPE* pRetVal)
HRESULT SetTruncateLog(SQLDMO_BACKUP_LOG_TYPE NewValue)

Settings

Constant Value Description

SQLDMOBackup_Log_NoLog

2

Records referencing committed transactions are removed. The transaction log is not backed up.

SQLDMOBackup_Log_NoOption

4

SQLDMOBackup_Log_Truncate.

SQLDMOBackup_Log_NoTruncate

1

The transaction log is backed up. Records referencing committed transactions are not removed, providing a point-in-time image of the log.

SQLDMOBackup_Log_Truncate

0

The transaction log is backed up. Records referencing committed transactions are removed.

SQLDMOBackup_Log_/Truncateonly

3

SQLDMOBackup_Log_NoLog.

주의

For Microsoft SQL Server, transaction log backup can perform two distinct database administration tasks:

  • Log backup can be part of a backup strategy allowing incremental recovery to a failure point.
  • Log backup can remove log records referencing committed transactions, freeing space in a log of fixed size or allowing an autoresizing log to shrink.

When using the Backup object to perform administrative maintenance of a database log, set the TruncateLog property to SQLDMOBackup_Log_Truncate or SQLDMOBackup_Log_NoLog.

Applies To:

Backup Object