Home | Previous Page | Next Page   Function Descriptions >

mi_hdr_status( )

The mi_hdr_status( ) function returns the High-Availability Data Replication (HDR) status of the current server.

Syntax

    mi_integer mi_hdr_status(void)
Valid in Client LIBMI Application? Valid in User-Defined Routine?
No Yes

Usage

The mi_hdr_status( ) function checks if the current server is executing in an HDR environment and whether the current server is configured as a primary server or as a secondary server.

When Dynamic Server is executing in an HDR environment, applications can issue the complete set of SQL queries on the primary server, but can issue only SELECT, execute function, and execute procedure statements on the secondary server. When C UDRs are executing as a part of SELECT, execute function, or execute procedure statements, they can call mi_hdr_status( ) to determine the mode of the current server.

The return value can contain three-bit flags, which are defined in the milib.h file.

Return Values

MI_HDR_ON
indicates that the HDR is environment is configured and is working.
MI_HDR_PRIMARY
indicates that the current server is a primary server.
MI_HDR_SECONDARY
indicates that the current server is a secondary server.

Related Topics

For more information about High-Availability Data Replication, see the IBM Informix: Dynamic Server Administrator's Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]