reference/oci8/fan.xml
e9366ee458b2900c53a503b1ad97664e1d9a8859
...
...
@@ -1,121 +1,121 @@
1
-
<?xml version="1.0" encoding="utf-8"?>
2
-
<!-- $Revision$ -->
3
-
<chapter xml:id="oci8.fan" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
-
<title>OCI8 Fast Application Notification (FAN) Support</title>
5
-
<section>
6
-
<para>
7
-
FAN support gives fast connection failover, an Oracle Database high availability
8
-
feature. This allows PHP OCI8 scripts to be notified when a
9
-
database machine or database instance becomes unavailable. Without
10
-
FAN, OCI8 can hang until a TCP timeout occurs and an error is
11
-
returned, which might be several minutes. Enabling FAN in OCI8 can
12
-
allow applications to detect errors and re-connect to an available
13
-
database instance without the web user being aware of an outage.
14
-
</para>
15
-
<para>
16
-
FAN support is available when the Oracle client libraries that PHP
17
-
links with and the Oracle Database are either version 10gR2 or later.
18
-
</para>
19
-
<para>
20
-
FAN benefits users of Oracle's clustering technology (RAC) because
21
-
connections to surviving database instances can be immediately
22
-
made. Users of Oracle's Data Guard with a broker will see the FAN
23
-
events generated when the standby database goes online. Standalone
24
-
databases will send FAN events when the database restarts.
25
-
</para>
26
-
<para>
27
-
For active connections, when a machine or database instance becomes
28
-
unavailable, a connection failure error will be returned by the
29
-
OCI8 extension function currently being called. On a subsequent
30
-
PHP script re-connect, a connection to a surviving database
31
-
instance will be established. The OCI8 extension also
32
-
transparently cleans up any idle connections affected by a database
33
-
machine or instance failure so PHP connect calls will establish a
34
-
fresh connection without the script being aware of any service
35
-
disruption.
36
-
</para>
37
-
<para>
38
-
When <link linkend="ini.oci8.events">oci8.events</link>
39
-
is <literal>On</literal>, it is suggested to
40
-
set <link linkend="ini.oci8.ping-interval">oci8.ping_interval</link>
41
-
to -1 to disable pinging, since enabling FAN events provide
42
-
pro-active connection management of idle connections made invalid
43
-
by a service disruption.
44
-
</para>
45
-
<para>
46
-
To enable FAN support in PHP OCI8, build PHP OCI8 with Oracle 10gR2 or later
47
-
libraries and then follow these steps:
48
-
</para>
49
-
<para>
50
-
<itemizedlist>
51
-
<listitem>
52
-
<simpara>
53
-
As a privileged database administrator, use a program like
54
-
SQL*Plus to enable the database service to post FAN events, for
55
-
example:
56
-
</simpara>
57
-
<para>
58
-
<informalexample>
59
-
<screen>
60
-
<![CDATA[
61
-
SQL> execute dbms_service.modify_service(
62
-
SERVICE_NAME => 'sales',
63
-
AQ_HA_NOTIFICATIONS => TRUE);
64
-
]]>
65
-
</screen>
66
-
</informalexample>
67
-
</para>
68
-
</listitem>
69
-
<listitem>
70
-
<simpara>
71
-
Edit php.ini and add
72
-
</simpara>
73
-
<para>
74
-
<informalexample>
75
-
<screen>
76
-
<![CDATA[
77
-
oci8.events = On
78
-
]]>
79
-
</screen>
80
-
</informalexample>
81
-
</para>
82
-
</listitem>
83
-
<listitem>
84
-
<simpara>
85
-
If the application does not already handle OCI8 error
86
-
conditions, modify it to detect failures and take appropriate
87
-
action. This may include re-connecting and re-executing
88
-
statements.
89
-
</simpara>
90
-
</listitem>
91
-
<listitem>
92
-
<simpara>
93
-
Run the application, connecting to Oracle Database 10gR2 or later.
94
-
</simpara>
95
-
</listitem>
96
-
</itemizedlist>
97
-
</para>
98
-
</section>
99
-
</chapter>
100
-
101
-
<!-- Keep this comment at the end of the file
102
-
Local variables:
103
-
mode: sgml
104
-
sgml-omittag:t
105
-
sgml-shorttag:t
106
-
sgml-minimize-attributes:nil
107
-
sgml-always-quote-attributes:t
108
-
sgml-indent-step:1
109
-
sgml-indent-data:t
110
-
indent-tabs-mode:nil
111
-
sgml-parent-document:nil
112
-
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
113
-
sgml-exposed-tags:nil
114
-
sgml-local-catalogs:nil
115
-
sgml-local-ecat-files:nil
116
-
End:
117
-
vim600: syn=xml fen fdm=syntax fdl=2 si
118
-
vim: et tw=78 syn=sgml
119
-
vi: ts=1 sw=1
120
-
-->
121
-
1
+
<?xml version="1.0" encoding="utf-8"?>
2
+
<!-- $Revision$ -->
3
+
<chapter xml:id="oci8.fan" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+
<title>OCI8 Fast Application Notification (FAN) Support</title>
5
+
<section>
6
+
<para>
7
+
FAN support gives fast connection failover, an Oracle Database high availability
8
+
feature. This allows PHP OCI8 scripts to be notified when a
9
+
database machine or database instance becomes unavailable. Without
10
+
FAN, OCI8 can hang until a TCP timeout occurs and an error is
11
+
returned, which might be several minutes. Enabling FAN in OCI8 can
12
+
allow applications to detect errors and re-connect to an available
13
+
database instance without the web user being aware of an outage.
14
+
</para>
15
+
<para>
16
+
FAN support is available when the Oracle client libraries that PHP
17
+
links with and the Oracle Database are either version 10gR2 or later.
18
+
</para>
19
+
<para>
20
+
FAN benefits users of Oracle's clustering technology (RAC) because
21
+
connections to surviving database instances can be immediately
22
+
made. Users of Oracle's Data Guard with a broker will see the FAN
23
+
events generated when the standby database goes online. Standalone
24
+
databases will send FAN events when the database restarts.
25
+
</para>
26
+
<para>
27
+
For active connections, when a machine or database instance becomes
28
+
unavailable, a connection failure error will be returned by the
29
+
OCI8 extension function currently being called. On a subsequent
30
+
PHP script re-connect, a connection to a surviving database
31
+
instance will be established. The OCI8 extension also
32
+
transparently cleans up any idle connections affected by a database
33
+
machine or instance failure so PHP connect calls will establish a
34
+
fresh connection without the script being aware of any service
35
+
disruption.
36
+
</para>
37
+
<para>
38
+
When <link linkend="ini.oci8.events">oci8.events</link>
39
+
is <literal>On</literal>, it is suggested to
40
+
set <link linkend="ini.oci8.ping-interval">oci8.ping_interval</link>
41
+
to -1 to disable pinging, since enabling FAN events provide
42
+
pro-active connection management of idle connections made invalid
43
+
by a service disruption.
44
+
</para>
45
+
<para>
46
+
To enable FAN support in PHP OCI8, build PHP OCI8 with Oracle 10gR2 or later
47
+
libraries and then follow these steps:
48
+
</para>
49
+
<para>
50
+
<itemizedlist>
51
+
<listitem>
52
+
<simpara>
53
+
As a privileged database administrator, use a program like
54
+
SQL*Plus to enable the database service to post FAN events, for
55
+
example:
56
+
</simpara>
57
+
<para>
58
+
<informalexample>
59
+
<screen>
60
+
<![CDATA[
61
+
SQL> execute dbms_service.modify_service(
62
+
SERVICE_NAME => 'sales',
63
+
AQ_HA_NOTIFICATIONS => TRUE);
64
+
]]>
65
+
</screen>
66
+
</informalexample>
67
+
</para>
68
+
</listitem>
69
+
<listitem>
70
+
<simpara>
71
+
Edit php.ini and add
72
+
</simpara>
73
+
<para>
74
+
<informalexample>
75
+
<screen>
76
+
<![CDATA[
77
+
oci8.events = On
78
+
]]>
79
+
</screen>
80
+
</informalexample>
81
+
</para>
82
+
</listitem>
83
+
<listitem>
84
+
<simpara>
85
+
If the application does not already handle OCI8 error
86
+
conditions, modify it to detect failures and take appropriate
87
+
action. This may include re-connecting and re-executing
88
+
statements.
89
+
</simpara>
90
+
</listitem>
91
+
<listitem>
92
+
<simpara>
93
+
Run the application, connecting to Oracle Database 10gR2 or later.
94
+
</simpara>
95
+
</listitem>
96
+
</itemizedlist>
97
+
</para>
98
+
</section>
99
+
</chapter>
100
+

101
+
<!-- Keep this comment at the end of the file
102
+
Local variables:
103
+
mode: sgml
104
+
sgml-omittag:t
105
+
sgml-shorttag:t
106
+
sgml-minimize-attributes:nil
107
+
sgml-always-quote-attributes:t
108
+
sgml-indent-step:1
109
+
sgml-indent-data:t
110
+
indent-tabs-mode:nil
111
+
sgml-parent-document:nil
112
+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
113
+
sgml-exposed-tags:nil
114
+
sgml-local-catalogs:nil
115
+
sgml-local-ecat-files:nil
116
+
End:
117
+
vim600: syn=xml fen fdm=syntax fdl=2 si
118
+
vim: et tw=78 syn=sgml
119
+
vi: ts=1 sw=1
120
+
-->
121
+

122
122