Symfony 2 meets Oracle (part 3)


First of all you will need to configure the database connection. We will assumme you have followed the previous tutorials and have an Oracle XE database.

    database_driver: oci8 
    database_host: your_VM_IP
    database_port: '1521'
    database_name: XE
    database_user: your_username
    database_password: your_password
    database_charset: AL32UTF8

Database charset is by default AL32UTF8 in Oracle XE but if you have to move your database to another Oracle version I would recommend to specify it explicitely in the configuration.
You need to make sure you have the following parameter in your app/config/config.yml

        charset:  %database_charset%

Adding a listener

You need then to add a custom listener to handle the session properly.

        class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
            - { name: doctrine.event_listener, event: postConnect }

SonataPageBundle and Oracle

Doctrine does not support where conditions on CLOB. You need to update your schema using the following PR

Doctrine and Oracle

Finally there are a few known issues between Oracle and Doctrine