oci Oracle driver

  1. Documentation
  2. Change Log

This extension allows using AR and crud commands with Oracle database.

Documentation

Requirements
  • Yii 1.0 or above
  • PHP 5.2
  • Oracle 10g client
Installation
  • Extract the release file under YII_PATH\db\schema

  • In \db\CDbConnaction.php, add the following at getSchema method:

    		case 'oci': // oracle
    			return $this->_schema=new COciSchema($this);
    
  • In YII_PATH\YiiBase.php, add the path to the new classes in coreClasses:

    'COciColumnSchema' => '/db/schema/oci/COciColumnSchema.php',
    'COciSchema' => '/db/schema/oci/COciSchema.php',
    'COciTableSchema' => '/db/schema/oci/COciTableSchema.php',
    'COciCommandBuilder' => '/db/schema/oci/COciCommandBuilder.php',
    

Note 1: Under PHP 5.2 versions, PDO-OCI crashes on $command->prepare in Yii. I don't know exactly, but seems a problems with PHP 5.2 and Oracle 9i client.

Note 2: PHP 5.2 works correctly with Oracle 10g clients.

Note 3: I tested it on Windows, so, if you want to use other versions, maybe in Linux it can work.

Usage

Just remember that Oracle does not have autoincrement columns. To simulate that, use a combination of sequence + trigger (before insert).

Change Log

April 23, 2009
  • Initial release.
3 0
4 followers
994 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Database
Tags:
Developed by: ricardograna
Created on: Apr 23, 2009
Last updated: 15 years ago

Downloads

show all