ezoracle extension

Author Message

Amer Azzaz

Tuesday 06 December 2005 7:13:08 am

i installed the ezoracle extension. Can anyone help in how to use it ? my goal is to display data in a page and these data should be retrieved from orcale db.

what are the benefits of using ezoracle extension instead of using PHP to connect and fetch data from oracle db.

Vadym Savchuk

Tuesday 06 December 2005 7:25:37 am

Hi Amer.

"i installed the ezoracle extension. Can anyone help in how to use it ? my goal is to display data in a page and these data should be retrieved from orcale db."

First, please read INSTALL file. It explains how to install the extension and make eZ publish use Oracle.

"what are the benefits of using ezoracle extension instead of using PHP to connect and fetch data from oracle db."

eZ publish does not use database directly. Instead, the interaction is done with ezdb library providing generic database access API. ezoracle contains a driver for ezdb that makes it possible to migrate an eZ publish site to Oracle.
If your site is running on an other DBMS and you just need to execute a couple of Oracle queries, there's no need to use ezoracle.

Amer Azzaz

Tuesday 06 December 2005 7:36:29 am

If i just want to fetch some data from Oracle database for some pages on an ezpublish site. Do you advice to use ezoracle extension ? (it means i will keep mysql and connect to oracle to fetch these data only).

Vadym Savchuk

Tuesday 06 December 2005 7:51:35 am

No, I think you don't need ezoracle much in this case.

Amer Azzaz

Tuesday 06 December 2005 11:58:17 pm

ok, i won't use the ezoracle extension. Can i use ezDB class to connect to oracle DB ? if yes please could you explain how can i pass the parameters ?

Vadym Savchuk

Wednesday 07 December 2005 5:18:37 am

"ok, i won't use the ezoracle extension. Can i use ezDB class to connect to oracle DB ? if yes please could you explain how can i pass the parameters ?"

:-) Sure you can. But if you're using ezdb to connect to Oracle that implies using ezoracle as Oracle driver for ezdb.
Usage of ezdb over Oracle doesn't differ from using it over MySQL.
Please see the INSTALL file.

Amer Azzaz

Wednesday 07 December 2005 6:21:40 am

the idea is that i will still use the mysql connection as a master connection, and for a specific case i want to use the oracle driver to connect to the oracle database to retreive some data for display.

how can i configure ezdb to use the ezoracle extension to do so?

the installation guide shows how to use the oracle connection as a master database connection and not as an oxiliary connection.

thanks for your help.

Vadym Savchuk

Wednesday 07 December 2005 7:19:39 am

"the idea is that i will still use the mysql connection as a master connection, and for a specific case i want to use the oracle driver to connect to the oracle database to retreive some data for display."
Yes, I understood.

"how can i configure ezdb to use the ezoracle extension to do so?
the installation guide shows how to use the oracle connection as a master database connection and not as an oxiliary connection. "

You must pass some extra parameters to eZDB::instance() in this case.
Example:

$parameters = array( 'server' => 'localhost',
                     'user' => 'scott',
                     'password' => 'tiger',
                     'database' => 'orcl' );
$db =& eZDB::instance( 'ezoracle', $parameters, true );

$result = $db->arrayQuery( 'SELECT * FROM tab' );
foreach ( $result as $row )
    echo $row['tname'] . "\n";

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:32:32
Script start
Timing: Jan 31 2025 04:32:32
Module start 'layout'
Timing: Jan 31 2025 04:32:32
Module start 'content'
Timing: Jan 31 2025 04:32:32
Module end 'content'
Timing: Jan 31 2025 04:32:32
Script end

Main resources:

Total runtime0.0153 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0078151.1953
Module start 'layout' 0.00540.0026 739.203136.6172
Module start 'content' 0.00800.0057 775.820398.1094
Module end 'content' 0.01370.0015 873.929737.9922
Script end 0.0152  911.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.4894140.0002
Check MTime0.00117.1619140.0001
Mysql Total
Database connection0.00085.130810.0008
Mysqli_queries0.002818.420430.0009
Looping result0.00000.078110.0000
Template Total0.00106.510.0010
Template load0.00085.282410.0008
Template processing0.00021.231210.0002
Override
Cache load0.00063.846610.0006
General
dbfile0.00031.848380.0000
String conversion0.00000.045340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs