Click to Rate and Give Feedback

  Switch on low bandwidth view
Common Log File System Functions

The following functions are used to manage logs.

FunctionDescription
AlignReservedLogCalculates the sector-aligned reservation size for a set of records.
AllocReservedLogAllocates sector-aligned space for a set of reserved records.
CloseAndResetLogFileResets the log file and then shuts the log.
CreateLogFileCreates or opens a log.
DeleteLogByHandleMarks the specified log for deletion.
DeleteLogFileMarks a log for deletion.
DumpLogRecordsScans a specified log, filters log records based on record type, and places the records in an output file stream that the caller opens.
FlushLogBuffersForces all records that are appended to this marshalling area to be flushed to disk.
FlushLogToLsnForces all records that are appended to this marshalling area up to the record with the specified log sequence number (LSN) to be flushed to the disk.
FreeReservedLogReduces the number of reserved log records in a marshalling area made by calling ReserveAndAppendLog, ReserveAndAppendLogAligned, or AllocReservedLog.
GetLogFileInformationReturns a buffer that contains metadata about a specified log and its current state, as defined by the CLFS_INFORMATION structure.
GetLogIoStatisticsRetrieves log I/O statistics for a dedicated or multiplexed log that is associated with the specified handle.
ReadLogRecordInitiates a sequence of reads from a specified log sequence number (LSN) in one of three modes, and returns the first of the specified log records and a read context.
ReadNextLogRecordReads the next record in a sequence that is initiated by a call to ReadLogRecord or ReadLogRestartArea.
ReserveAndAppendLogReserves space for log buffers, appends a log record to the log, or does both.
ReserveAndAppendLogAlignedReserves space for log buffers, appends a log record to the log, or both. This function is like ReserveAndAppendLog, but ReserveAndAppendLogAligned aligns the write entries of the record to the specified byte alignment.
SetEndOfLogThis function has been deprecated. Use TruncateLog instead.
TerminateReadLogTerminates a read context. This function frees system-allocated resources that are associated with the specified read context.
TruncateLogTruncates the log.

 

The following functions are used to manage containers.

FunctionDescription
AddLogContainerAdds a container to the physical log that is associated with the log handle, if the calling process has write access to the .blf file and the ability to create files in the target directory of the container.
AddLogContainerSetAdds multiple log containers to the physical log that is associated with the log handle, if the calling process has access to the log handle.
CreateLogContainerScanContextCreates a scan context to use with ScanLogContainers to enumerate all log containers that are associated with a log, and performs the first scan.
GetLogContainerNameRetrieves the full path name of a container when given its container identifier.
RemoveLogContainerRemoves a single container from a log that is associated with a dedicated or multiplexed log handle.
RemoveLogContainerSetRemoves multiple containers from a log that is associated with a dedicated or multiplexed log handle.
ScanLogContainersEnumerates log containers. Call this function repeatedly to iterate over all log containers.

 

The following functions are used for crash restart.

FunctionDescription
AdvanceLogBaseAdvances the base log sequence number (LSN) of a log stream to the specified LSN.
ReadLogRestartAreaReturns the last restart area that was written successfully to the log associated with the marshalling area of WriteLogRestartArea. The function also returns a read context that allows the caller to cursor backward or forward through the log from the restart record.
ReadPreviousLogRestartAreaReads the previous log restart area that is relative to the current restart record specified in the read context.
WriteLogRestartAreaAppends a new client restart area to a log and optionally advances the base log sequence number (LSN) of the log.

 

The following functions are used for archiving.

FunctionDescription
GetNextLogArchiveExtentRetrieves the next set of archive extents in a log archive context.
PrepareLogArchivePrepares a physical log for archiving.
ReadLogArchiveMetaDataCopies a range of the archive view of the metadata to the specified buffer.
SetLogArchiveModeEnables or disables log archive support for a specified log.
SetLogArchiveTailSets the last archived log sequence number (LSN) or archive tail of an archivable log.
TerminateLogArchiveDeallocates system resources that are allocated originally for a log archive context by PrepareLogArchive.
ValidateLogValidates the consistency of the log metadata and data before log archive and after log restore.

 

The following functions are used for marshalling.

FunctionDescription
CreateLogMarshallingAreaCreates a marshalling area for a log, and when successful it returns a marshalling context.
DeleteLogMarshallingAreaDeletes a marshalling area that is created by a successful call to CreateLogMarshallingArea.

 

The following functions are used to work with LSNs.

FunctionDescription
LsnBlockOffsetReturns the sector-aligned block offset that is contained in the specified LSN.
LsnContainerRetrieves the logical container ID that is contained in a specified LSN.
LsnCreateCreates a log sequence number (LSN), given a container ID, a block offset, and a record sequence number.
LsnEqual Determines whether two LSNs from the same stream are equal.
LsnGreater Determines whether one LSN is greater than another LSN. The two LSNs must be from the same stream.
LsnLess Determines whether one LSN is less than another LSN. The two LSNs must be from the same stream.
LsnNull Determines whether a specified LSN is equal to the smallest possible LSN, which is CLFS_LSN_NULL.
LsnRecordSequence Retrieves the record sequence number that is contained in a specified LSN.

 

Send comments about this topic to Microsoft

Build date: 5/7/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker