TransactionLog Object

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

The TransactionLog object exposes the attributes of the transaction log of a Microsoft SQL Server database.

현재 개체를 보여 주는 SQL-DMO 개체 모델

Properties

CreateDate Property

SpaceAllocatedOnFiles Property

LastBackup Property

SpaceAvailable Property

Size Property

SpaceAvailableInMB Property

Methods

Truncate Method

주의

A SQL Server transaction log maintains a record of modifications to the operating system files containing the data of a SQL Server database. The transaction log provides data-recovery assistance in the event of system failure, and a SQL Server database has at least one operating system file that stores transaction log records. A transaction log can be written to more than one operating system file. Each SQL Server database maintains its own transaction log, and the operating system file or files that store log records cannot be shared with another database.

With the TransactionLog object, you can:

  • Define the properties of a database transaction log when creating a SQL Server database.
  • Add operating system files to those used by an existing SQL Server database transaction log.
  • Back up or restore the transaction log of a SQL Server database.
  • Truncate a transaction log after database backup, removing all log records for a SQL Server database and reinitializing the transaction log.
  • Generate a Transact-SQL script to use in other tools to back up a SQL Server database transaction log.