db_oracle_admin.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?xml version="1.0" encoding='ISO-8859-1'?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!-- Include general documentation entities -->
  5. <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
  6. %docentities;
  7. ]>
  8. <!-- Module User's Guide -->
  9. <chapter>
  10. <title>User's Guide</title>
  11. <section>
  12. <title>Overview</title>
  13. <para>
  14. This is a module which provides Oracle connectivity for &kamailio;.
  15. It implements the DB API defined in &kamailio;. If you want to use
  16. the nathelper module, or any other modules that calls the
  17. get_all_ucontacts API export from usrloc, then you need to set
  18. the <emphasis>DORACLE_USRLOC</emphasis> define in the Makefile.defs
  19. file before compilation.
  20. </para>
  21. </section>
  22. <section>
  23. <title>Dependencies</title>
  24. <section>
  25. <title>&kamailio; Modules</title>
  26. <para>
  27. The following modules must be loaded before this module:
  28. <itemizedlist>
  29. <listitem>
  30. <para>
  31. <emphasis>No dependencies on other &kamailio; modules</emphasis>.
  32. </para>
  33. </listitem>
  34. </itemizedlist>
  35. </para>
  36. </section>
  37. <section>
  38. <title>External Libraries or Applications</title>
  39. <para>
  40. The following libraries or applications must be installed before running
  41. &kamailio; with this module loaded:
  42. <itemizedlist>
  43. <listitem>
  44. <para>
  45. <emphasis>instantclient-sdk-10.2.0.3</emphasis> - the development headers and libraries of OCI.
  46. </para>
  47. </listitem>
  48. </itemizedlist>
  49. </para>
  50. </section>
  51. </section>
  52. <section>
  53. <title>Parameters</title>
  54. <section>
  55. <title><varname>timeout</varname> (fixedpoint)</title>
  56. <para>
  57. Timeout value for any operation with BD.
  58. </para>
  59. <para>
  60. Possible values is from 0.1 to 10.0 seconds.
  61. </para>
  62. <para>
  63. <emphasis>
  64. Default value is 3.0 (3 second).
  65. </emphasis>
  66. </para>
  67. <para>
  68. If value of timeout parameter set to 0, module use synchronous
  69. mode (without timeout).
  70. </para>
  71. <example>
  72. <title>Set <varname>timeout</varname> parameter</title>
  73. <programlisting format="linespecific">
  74. ...
  75. modparam("db_oracle", "timeout", 1.5)
  76. ...
  77. </programlisting>
  78. </example>
  79. <example>
  80. <title>Disable asynchronous mode</title>
  81. <programlisting format="linespecific">
  82. ...
  83. modparam("db_oracle", "timeout", 0)
  84. ...
  85. </programlisting>
  86. </example>
  87. </section>
  88. <section>
  89. <title><varname>reconnect</varname> (fixedpoint)</title>
  90. <para>
  91. Timeout value for connect (create session) operation.
  92. </para>
  93. <para>
  94. Possible values is from 0.1 to 10.0 seconds.
  95. </para>
  96. <para>
  97. <emphasis>
  98. Default value is 0.2 (200 milliseconds).
  99. </emphasis>
  100. </para>
  101. <example>
  102. <title>Set <varname>reconnect</varname> parameter</title>
  103. <programlisting format="linespecific">
  104. ...
  105. modparam("db_oracle", "reconnect", 0.5)
  106. ...
  107. </programlisting>
  108. </example>
  109. </section>
  110. </section>
  111. <section>
  112. <title>Functions</title>
  113. <para>
  114. No function exported to be used from configuration file.
  115. </para>
  116. </section>
  117. <section>
  118. <title>Installation</title>
  119. <para>
  120. Because it dependes on an external library, the oracle module is not
  121. compiled and installed by default. You can use one of the next options.
  122. </para>
  123. <itemizedlist>
  124. <listitem>
  125. <para>
  126. - edit the "Makefile" and remove "db_oracle" from "excluded_modules"
  127. list. Then follow the standard procedure to install &kamailio;:
  128. "make all; make install".
  129. </para>
  130. </listitem>
  131. <listitem>
  132. <para>
  133. - from command line use: 'make all include_modules="db_oracle";
  134. make install include_modules="db_oracle"'.
  135. </para>
  136. </listitem>
  137. </itemizedlist>
  138. </section>
  139. <section>
  140. <title>Utility openser_orasel</title>
  141. <para>
  142. For working with &ctltool; script, should be able to print the 'query'
  143. results to the terminal in a user-readable form. The standard command-line
  144. Oracle client (sqlplus) is not quite suitable for this, as it cannot align
  145. row width to real (received) data's (it always prints a cell width as
  146. described in the db scheme). This problem has been solved by inclusion the
  147. utility openser_orasel, which formats printing approximately in the same
  148. way as the 'mysql' client utility. In addition, this utility known about
  149. the "agreements and types" in DB that are used in &kamailio; for the work
  150. with Oracle and formats printing taking these into account.
  151. </para>
  152. </section>
  153. </chapter>