Midgard2 and Oracle
Posted on 2007-07-03 11:37:39 EEST.
Yesterday I tested Midgard2 libraries with Oracle database.
Download deb or rpm files ( install them of course ): http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html
Make sure you have libgda configured and compiled with Oracle support. If you configure on debian and already have oracle debs installed, configure oracle support ( for libgda ) like this:
--with-oracle=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
Configure Midgard configuration file. Define Oracle provider.
Type=Oracle Name=XE Username=system Password=secret
By default XE database is created so make sure you have defined this database and it also exists in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/tnsnames.ora file.
Export ORACLE_HOME.
export ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server"
If ORACLE_HOME is not set , you should get error message like this:
midgard-core (pid:5222):(WARNING):Not connected to the Midgard database Database XE@. Could not initialize Oracle
- Start midgard application.
In my case midgard-schema has been used with TableCreate option set to true. Unfortunatelly libgda doesn't support table create spec file for Oracle provider so all I got from application is this error:
midgard-core (pid:5226):(WARNING):Midgard connection error: ORA-00942: table or view does not exist
, No:(942), src:gda-oracle:gda-oracle-provider.c:666, SQL: Not available midgard-core (pid:5226):(WARNING):Can not prepare create statements for table 'repligard. Missing spec. file '(null)'
Let's hope Oracle spec files will be added soon.