New Feature Request
Zabbix Server on RHEL8 and Oracle database using Oracle Real Application Cluster (RAC).
We have a Zabbix Server running on RHEL8 connected to an Oracle Database which works with the capability of Real Application Cluster (Oracle RAC).
Oracle RAC means that you have 2 instances of the database running on different machines at the same time, and the query that Zabbix Server sends to the database can be replied by any of the instances.
In a typical database intervention, all the sessions are moved from one instance to the other one (called drain-sessions), so you can stop one instance without affect the application because the other one is giving service. To intervene the other instance, you can do the same procedure.
We have tested this behavior and we weren't able to do this kind of intervention without getting a Zabbix Server crash.
So, with the database configured in TAC (used by RAC, means "Transparent Application Continuty"), Zabbix shows the next errors when you stop one instance (after trying to move the sessions to the other instance with no success):
So, the error "ORA-25412: transaction replay disabled by call to OCIStmtPrepare" is documented here: https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/deprecated-oci-functions.html#GUID-FD74B639-8B97-4A5A-BC3E-269CE59345CA
So talking about "OCIStmtPrepare", it says the next:
"This call does not support Application Continuity and if this call is used, it returns the following error: Error - ORA-25412: transaction replay disabled by call to OCIStmtPrepare. Use the OCIStmtPrepare2() call to support the use of Application Continuity in an HA infrastructure."
On the Oracle deprecated documentation, we also find the next one:
"The following function is deprecated beginning with Oracle 12c Release 2 (220.127.116.11): OCIStmtPrepare().
Oracle strongly encourages use of OCIStmtPrepare2() in all OCI applications instead of the deprecated call OCIStmtPrepare().
Use the OCIStmtPrepare2() call to support the use of Application Continuity in an HA infrastructure.
Applications that use OCIStmtPrepare() return the following error: Error - ORA-25412: transaction replay disabled by call to OCIStmtPrepare."
So, it is possible to change the call to use OCIStmtPrepare2() insted of the deprecated OCIStmtPrepare()?
You can improve the HA behavior of Zabbix for those customers that uses Oracle backend database.
Thanks for reading.
Kind Regards, Francisco.