Export (0) Print
Expand All

Truncate Method

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The Truncate method archive-marks transaction log records.


object
.Truncate(
)

object

Expression that evaluates to an object in the Applies To list.

HRESULT Truncate();

In general, transaction log records are archived by making a backup of records of committed transactions. Space used for archived transaction log records is reclaimed by reuse or by shrinking the operating system file(s) maintaining the transaction log.

Important noteImportant

The Truncate method allows reuse of the space allocated to the operating system file(s) maintaining a transaction log. Log truncation is part of normal transaction log backup. If log backup is part of a database backup strategy, the Truncatemethod should never be called.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft