Last modified: January 09, 2012
Applies to: Windows | Windows Server
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 );
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.
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.
A pointer to the count of global system parameters that were successfully configured as a result of this call.
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.
The operation completed successfully.
The specified tuple index parameters were not allowed. This error can be returned by JetEnableMultiInstance only when setting JET_paramIndexTuplesLengthMin, JET_paramIndexTuplesLengthMax, or JET_paramIndexTuplesToIndexMax to an illegal value.
Windows XP: This return value is introduced in Windows XP.
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, JET_paramSystemPath can return this error.
The operation failed because it is illegal when the database engine is operating in single instance mode (Windows 2000 compatibility mode).
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.
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.
Requires Windows Vista or Windows XP.
Requires Windows Server 2008 or Windows Server 2003.
Declared in Esent.h.
Implemented as JetEnableMultiInstanceW (Unicode) and JetEnableMultiInstanceA (ANSI).