mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334955 c90b9560-bf6c-de11-be94-00142212c4b1
121 lines
4 KiB
XML
121 lines
4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<chapter xml:id="oci8.fan" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>OCI8 Fast Application Notification (FAN) Support</title>
|
|
<section>
|
|
<para>
|
|
FAN support gives fast connection failover, an Oracle Database high availability
|
|
feature. This allows PHP OCI8 scripts to be notified when a
|
|
database machine or database instance becomes unavailable. Without
|
|
FAN, OCI8 can hang until a TCP timeout occurs and an error is
|
|
returned, which might be several minutes. Enabling FAN in OCI8 can
|
|
allow applications to detect errors and re-connect to an available
|
|
database instance without the web user being aware of an outage.
|
|
</para>
|
|
<para>
|
|
FAN support is available when the Oracle client libraries that PHP
|
|
links with and the Oracle Database are either version 10gR2 or later.
|
|
</para>
|
|
<para>
|
|
FAN benefits users of Oracle's clustering technology (RAC) because
|
|
connections to surviving database instances can be immediately
|
|
made. Users of Oracle's Data Guard with a broker will see the FAN
|
|
events generated when the standby database goes online. Standalone
|
|
databases will send FAN events when the database restarts.
|
|
</para>
|
|
<para>
|
|
For active connections, when a machine or database instance becomes
|
|
unavailable, a connection failure error will be returned by the
|
|
OCI8 extension function currently being called. On a subsequent
|
|
PHP script re-connect, a connection to a surviving database
|
|
instance will be established. The OCI8 extension also
|
|
transparently cleans up any idle connections affected by a database
|
|
machine or instance failure so PHP connect calls will establish a
|
|
fresh connection without the script being aware of any service
|
|
disruption.
|
|
</para>
|
|
<para>
|
|
When <link linkend="ini.oci8.events">oci8.events</link>
|
|
is <literal>On</literal>, it is suggested to
|
|
set <link linkend="ini.oci8.ping-interval">oci8.ping_interval</link>
|
|
to -1 to disable pinging, since enabling FAN events provide
|
|
pro-active connection management of idle connections made invalid
|
|
by a service disruption.
|
|
</para>
|
|
<para>
|
|
To enable FAN support in PHP OCI8, build PHP OCI8 with Oracle 10gR2 or later
|
|
libraries and then follow these steps:
|
|
</para>
|
|
<para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
As a privileged database administrator, use a program like
|
|
SQL*Plus to enable the database service to post FAN events, for
|
|
example:
|
|
</simpara>
|
|
<para>
|
|
<informalexample>
|
|
<screen>
|
|
<![CDATA[
|
|
SQL> execute dbms_service.modify_service(
|
|
SERVICE_NAME => 'sales',
|
|
AQ_HA_NOTIFICATIONS => TRUE);
|
|
]]>
|
|
</screen>
|
|
</informalexample>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
Edit php.ini and add
|
|
</simpara>
|
|
<para>
|
|
<informalexample>
|
|
<screen>
|
|
<![CDATA[
|
|
oci8.events = On
|
|
]]>
|
|
</screen>
|
|
</informalexample>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
If the application does not already handle OCI8 error
|
|
conditions, modify it to detect failures and take appropriate
|
|
action. This may include re-connecting and re-executing
|
|
statements.
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
Run the application, connecting to Oracle Database 10gR2 or later.
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
</chapter>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|