大网数据广告活动
磁盘与文件系统

JetGetTruncateLogInfoInstance Function

· 52CE 我爱测

Learn more about: JetGetTruncateLogInfoInstance Function

Applies to: Windows | Windows Server

JetGetTruncateLogInfoInstance Function

The JetGetTruncateLogInfoInstance function is used during a backup that is initiated by JetBeginExternalBackup to query an instance for the names of the transaction log files that can be safely deleted after the backup has successfully completed.

Windows XP:  JetGetTruncateLogInfoInstance is introduced in Windows XP.

    JET_ERR JET_API JetGetTruncateLogInfoInstance(
      __in          JET_INSTANCE instance,
      __out_opt     tchar* szz,
      __in          unsigned long cbMax,
      __out_opt     unsigned long* pcbActual
    );

Parameters

instance

The instance to use for this call.

szz

The output buffer that receives the list of null-terminated strings describing the set of transaction log files that can be safely deleted after the backup has been completed successfully.

The list of strings that are returned in this buffer is in the same format as a multi-string that is used by the registry. Each null-terminated string is returned in sequence and followed by a final null terminator.

cbMax

The maximum size in bytes of the output buffer.

pcbActual

Pointer to the output buffer that receives the actual amount of string data.

Return Value

This function returns the JET_ERR datatype with one of the following return codes. For more information about the possible ESE errors, see Extensible Storage Engine Errors and Error Handling Parameters.

Return code Description
JET_errSuccess The operation completed successfully.
JET_errInvalidParameter One of the provided parameters contained an unexpected value or the combination of several parameter values resulted in an unexpected result.Windows XP and later:  This can happen for JetGetTruncateLogInfoInstance when the specified instance handle is invalid.
JET_errNotInitialized The operation cannot complete because the instance that is associated with the session has not been initialized yet.
JET_errClientRequestToStopJetService The operation cannot complete because all activity on the instance that is associated with the session has ceased as a result of a call to <a href="gg269240(v=exchg.10).md">JetStopService</a>.
JET_errInstanceUnavailable The operation cannot complete because the instance that is associated with the session encountered a fatal error that requires that access to all data be revoked to protect the integrity of that data.Windows XP:  This return value was introduced in Windows XP.
JET_errBackupAbortByServer The operation failed because the current external backup has been aborted by a call to <a href="gg294067(v=exchg.10).md">JetStopBackup</a>.Windows XP:  This return value was introduced in Windows XP.
JET_errInvalidBackupSequence The backup operation failed because it was called out of sequence.
JET_errNoBackup The operation failed because no external backup is in progress.
JET_errRestoreInProgress The operation cannot complete because a restore operation is in progress on the instance that is associated with the session.
JET_errTermInProgress The operation cannot complete because the instance that is associated with the session is being shut down.
JetGetTruncateLogInfoInstance There are outstanding file handles that were created using <a href="gg269249(v=exchg.10).md">JetOpenFile</a> for the instance.

If this function succeeds, the requested information about the set of transaction log files that can be safely deleted after the backup has been completed successfully will be placed in the output buffers where they are provided. The backup state machine will be advanced such that the backup of database files is no longer allowed. Only database patch files and transaction log files can be opened for backup beyond this point.

If this function fails, the state of the output buffers is undefined. The failure will result in the cancellation of the entire backup process for the instance.

Remarks

This API does not return an error or warning if the output buffer is too small to accept the full list of files that should be part of the backup file set. The application should always provide a buffer to receive the actual size of this list and use that information to determine if the list was truncated.

Requirements
Requirement Value
Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008 or Windows Server 2003.
Header Declared in Esent.h.
Library Use ESENT.lib.
DLL Requires ESENT.dll.
Unicode Implemented as JetGetTruncateLogInfoInstanceW (Unicode) and JetGetTruncateLogInfoInstanceA (ANSI).
See Also

JET_ERR
JET_INSTANCE
JetBeginExternalBackup
JetCloseDatabase
JetCloseTable
JetEndSession
JetOpenFile
JetResetSessionContext
JetRollback
JetStopBackup
JetStopService
JetTerm
JetTerm2

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 04/11/2016
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。