File: fan.xml

package info (click to toggle)
php-doc 20241205~git.dfcbb86%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,956 kB
  • sloc: xml: 968,269; php: 23,883; javascript: 671; sh: 177; makefile: 37
file content (117 lines) | stat: -rw-r--r-- 3,966 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?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>
  <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>
</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
-->