mi_integer mi_hdr_status(void)
Valid in Client LIBMI Application? | Valid in User-Defined Routine? |
---|---|
No | Yes |
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.
For more information about High-Availability Data Replication, see the IBM Informix: Dynamic Server Administrator's Guide.