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

JetEnableMultiInstance Function

· 52CE 我爱测

Learn more about: JetEnableMultiInstance Function

Applies to: Windows | Windows Server

JetEnableMultiInstance Function

The JetEnableMultiInstance function configures the database engine for use with multiple instances in the same process. An optional array of global system parameters is available to the first caller allowing for the change to multi-instance mode.

Windows XP:  JetEnableMultiInstance is introduced in Windows XP.

    JET_ERR JET_API JetEnableMultiInstance(
      __in_opt      JET_SETSYSPARAM* psetsysparam,
      __in_opt      unsigned long csetsysparam,
      __out_opt     unsigned long* pcsetsucceed
    );

Parameters

psetsysparam

An array of global system parameters to set if and only if the engine enters multi-instance mode as a result of this call. If csetsysparam is zero then psetsysparam is ignored.

csetsysparam

The count of elements for the array of global parameters to set if and only if the engine enters multi-instance mode as a result of this call. If csetsysparam is zero then psetsysparam is ignored.

pcsetsucceed

A pointer to the count of global system parameters that were successfully configured as a result of this call.

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_errIndexTuplesInvalidLimits The specified tuple index parameters were not allowed. This error can be returned by JetEnableMultiInstance only when setting <a href="gg294119(v=exchg.10).md">JET_paramIndexTuplesLengthMin</a>, <a href="gg294119(v=exchg.10).md">JET_paramIndexTuplesLengthMax</a>, or <a href="gg294119(v=exchg.10).md">JET_paramIndexTuplesToIndexMax</a> to an illegal value.Windows XP:  This return value is introduced in Windows XP.
JET_errInvalidPath The specified file system path was invalid. This error can be returned by JetEnableMultiInstance only when setting system parameters that represent file system paths. For example, <a href="gg269235(v=exchg.10).md">JET_paramSystemPath</a> can return this error.
JET_errRunningInOneInstanceMode The operation failed because it is illegal when the database engine is operating in single instance mode (Windows 2000 compatibility mode).
JET_errSystemParamsAlreadySet JetEnableMultiInstance failed because the engine is already in multi-instance mode.Note  This will happen even if no system parameters are specified.

If this function succeeds, the database engine will be configured to run in multi-instance mode. The engine was also successfully configured with the optional list of global system parameters.

If this function fails, the database engine will remain in the current mode. If pcsetsucceed is non-zero, that number of system parameters will remain set.

Remarks

This function should only be used if the application must configure a given set of system parameters atomically when setting up the database engine for use in a multi-user scenario in the same process. If another method of synchronization is available, it is preferable to call JetCreateInstance and JetSetSystemParameter separately.

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 JetEnableMultiInstanceW (Unicode) and JetEnableMultiInstanceA (ANSI).
See Also

JET_ERR
JET_SETSYSPARAM
JetCreateInstance
JetInit
JetSetSystemParameter

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)

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

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