LIII. IBM DB2, Cloudscape and Apache Derby FunctionsIntroducciónThese functions enable you to access IBM DB2 Universal Database, IBM Cloudscape, and Apache Derby databases using the DB2 Call Level Interface (DB2 CLI). RequisitosTo connect to IBM DB2 Universal Database for Linux, UNIX, and Windows, or IBM Cloudscape, or Apache Derby, you must install an IBM DB2 Universal Database client on the same computer on which you are running PHP. The extension has been developed and tested with DB2 Version 8.2. To connect to IBM DB2 Universal Database for z/OS or iSeries, you also require IBM DB2 Connect or the equivalent DRDA gateway software. Requirements on Linux or UnixThe user invoking the PHP executable or SAPI must specify the DB2 instance before accessing these functions. You can set the name of the DB2 instance in php.ini using the ibm_db2.instance_name configuration option, or you can source the DB2 instance profile before invoking the PHP executable. If you created a DB2 instance named db2inst1 in /home/db2inst1/, for example, you can add the following line to php.ini:
InstalaciónTo build the ibm_db2 extension, the DB2 application development header files and libraries must be installed on your system. DB2 does not install these by default, so you may have to return to your DB2 installer and add this option. The header files are included with the DB2 Application Development Client freely available for download from the IBM DB2 Universal Database support site. If you add the DB2 application development header files and libraries to a Linux or Unix operating system on which DB2 was already installed, you must issue the command db2iupdt -e to update the symbolic links to the header files and libraries in your DB2 instances. ibm_db2 is a PECL extension, so follow the instructions in Capítulo 7 to install the ibm_db2 extension for PHP. Issue the configure command to point to the location of your DB2 header files and libraries as follows:
Configuración en tiempo de ejecuciónEl comportamiento de estas funciones está afectado por los valores definidos en php.ini.
Tabla 1. ibm_db2 Configure Options
A continuación se presenta una corta explicación de las directivas de configuración.
Constantes predefinidasEstas constantes están definidas por esta extensión y estarán disponibles solamente cuando la extensión ha sido o bien compilada dentro de PHP o grabada dinámicamente en tiempo de ejecución.
Tipos de recursosThe ibm_db2 extension returns connection resources, statement resources, and result set resources.
|
|||||||||||||||||||||||||