Oracle XE with PHP
Oracle XE
Installation
- DownLoad and install the Oracle XE rpm
- As root run /etc/init.d/oracle-xe configure
- Answer the configuration questions, remember the password.
- Open your browser to 127.0.0.1:8080/apex
- Start the enterprise manager control agent type: emctl start
- Start the enterprise manager dbconsole type: emctl start dbconsole
Getting started
Tuning
Oracle Block Edit
Nologging
- Use of nologging with append
- Nologging Recovery
- some tests
- Tom Kyte
- Oracle Documentation on Direct Path Loads
Chained Rows
create table CHAINED_ROWS ( owner_name varchar2(30), table_name varchar2(30), cluster_name varchar2(30), partition_name varchar2(30), subpartition_name varchar2(30), head_rowid rowid, analyze_timestamp date );
analyze table test list chained rows into chained_rows;
SQLNet
PHP Oracle
Oracle instant Client with oci8 extension
- Download oracle-instantclient-basic-10.2.0.3-1.i386.rpm
- from Oracle Technet
- Download oracle-instantclient-devel-10.2.0.3-1.i386.rpm
- Optionally also download oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
- Install the rpm packages
- rpm –ivh packagename
- Upgrade the packages
- rpm –Uvh packagename
- Create a /etc/tnsnames.ora file
Oracle XE
If using Oracle XE then add the following to /etc/rc.d/rc.local file
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
ORACLE_SID=XE
export ORACLE_HOME ORACLE_SID
export
Build oci8
- Download php-5.2.4.tar or the version of your php
- Uncompress php-5.2.4
- Change to the php-5.2.4 directory you downloaded earlier
- $ cd <your-download_path>/oci8/php-5.2.4/ext/oci8
- Run phpize
- $ phpize
- Run configure
- ./configure --with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib \
- --prefix=$HOME/php --with-apxs=$HOME/apache/bin/apxs \
- --enable-sigchild --with-config-file-path=$HOME/apache/conf
- Run make
- Create a oci8.ini
- cp /etc/php.d/pdo.ini /etc/php.d/oci8.ini
- Edit the file changing the extension from pdo to oci8
- Copy the oci8.so module just created to /usr/lib/php/modules
- cp /home/oracle/Download/oci8/php-5.2.4/ext/oci8/modules/oci8.so /usr/lib/php/modules
- Restart Apache server /etc/rc.d/init.d/httpd restart
- Test oci8 by creating a file named Oracletest.php like this in your web root
- If you get that means you need to start your oracle database and or unlock the hr user
- Type http://localhost:8080/apex to get to the Oracle XE login