ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
s_grosskr
Posts: 26
Joined: Fri 31 Aug 2007 13:14

ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by s_grosskr » Wed 28 Nov 2018 09:23

Dear ODAC Team,

these days I got an error ORA-25412 "transaction replay disabled by call to OCIStmtPrepare" from one of our customers.
The customer changed to ORACLE 12C R2 some weeks ago.
Some research led me to the change log of ORACLE 12c R2, where it reads:
The following function is deprecated beginning with Oracle 12c Release 2 (12.2.0.1): 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.
see https://docs.oracle.com/en/database/ora ... 1185D79360

Are you aware of this fact and consider it in the development of ODAC?

Since more and more customers are planning to change to ORACLE 12c R2 in the near future I'm seriously concerned, that we could see this error message quite often in the future, and this would be a really great problem.

Are there any flags, options or variables we can set to force ODAC to use OCIStmtPrepare2() instead of OCIStmtPrepare()?
Are there any workarounds, config options or insights you could give me to avoid this problem?

I'm hopefully awaiting your answer ;-)
With regards,
Stefan "ostijo" Grosskreutz

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by MaximG » Thu 29 Nov 2018 15:27

At present, our internal auto tests have not revealed any problems when using our product with the Oracle ORACLE 12c R2 server. Of course we will consider the possibility of using the OCIStmtPrepare2 () function in one of the future versions of our product.

s_grosskr
Posts: 26
Joined: Fri 31 Aug 2007 13:14

Re: ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by s_grosskr » Wed 19 Dec 2018 09:29

Dear support team,

Thank you very much for your answer.
We did some further research with our customer, who is indeed working with a HA infrastructure cluster.
We suppose that this error only occurs, when e.g. there is a network stumble or the load balancer wants to switch the connection of the program to another node in the cluster.
The customer configured the oracle service with "-failovertype TRANSACTION".
For the moment we suggested the customer to use "-failovertype NONE".

Nevertheless remains the question, how a Delphi application should handle a transparent application failover (TAF) to another node in a RAC.
Is this transparent for the program logic, meaning that ODAC handles this for me, or do I have to make my program "TAF"-aware to handle these events properly?
Is it possible at all for Delphi programs or is "Application Continuity" restricted to Java programs which use a connection pool?

With regards,
Stefan "ostijo" Grosskreutz

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by MaximG » Sat 22 Dec 2018 13:25

Support for transparent application failover is described in detail in our documentation : https://www.devart.com/odac/docs/work_taf.htm

s_grosskr
Posts: 26
Joined: Fri 31 Aug 2007 13:14

Re: ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by s_grosskr » Wed 02 Jan 2019 07:56

Thank you very much, Maxim.
I think that's all what I need to know for this moment regarding this topic, so thanks for your help.

With regards,
Stefan "ostijo" Grosskreutz

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORACLE 12c R2 - ORA-25412 - use of deprecated function OCIStmtPrepare

Post by MaximG » Thu 03 Jan 2019 11:07

Please don't hesitate to contact us with questions concerning our product usage.

Post Reply