debug = 2047; error_reporting($CFG->debug); ini_set ('display_errors', 1); ini_set ('display_startup_errors', 1); ini_set ('log_errors', 1); ini_set ('error_log', 'd:/web/apache/logs/oracle-errors.log'); $CFG->cachetype = ''; $CFG->rcache = false; $sql = 'SELECT a.NAME, b.sid, b.VALUE FROM v$statname a, v$mystat b WHERE a.statistic# = b.statistic# AND lower(a.NAME) LIKE '."'%cursor%'"; for ($j = 1; $j <= 2; $j++) { echo '
';
    for ($i = 1; $i <= 10; $i++) {
        $roles = get_recordset ('role');
        $ns = get_records_sql($sql);
        echo $i . '.- Iteration. Oracle open cursors: ' . $ns['opened cursors current']->value . "\n";
        $roles->Close();
        unset($roles);
    }
    print_r ($PERF);
    echo '
'; echo '
';
    for ($i = 1; $i <= 10; $i++) {
        $roles = get_recordset ('role', 'shortname', '*');
        $ns = get_records_sql($sql);
        echo $i . '.- Iteration. Oracle open cursors: ' . $ns['opened cursors current']->value . "\n";
        $roles->Close();
        unset($roles);
    }
    print_r ($PERF);
    echo '
'; db_conn_reset(); } function db_conn_reset () { global $CFG, $db; $db->Close(); // ripped from lib/setup.php // $dbconnected = $db->NConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname); if (! $dbconnected) { // In the name of protocol correctness, monitoring and performance // profiling, set the appropriate error headers for machine comsumption if (isset($_SERVER['SERVER_PROTOCOL'])) { // Avoid it with cron.php. Note that we assume it's HTTP/1.x header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); } // and then for human consumption... echo ''; echo ''; echo '
'; echo '

Error: Database connection failed.

'; echo '

It is possible that the database is overloaded or otherwise not running properly.

'; echo '

The site administrator should also check that the database details have been correctly specified in config\ .php

'; echo '
'; echo ''; if (!empty($CFG->emailconnectionerrorsto)) { mail($CFG->emailconnectionerrorsto, 'WARNING: Database connection error: '.$CFG->wwwroot, 'Connection error: '.$CFG->wwwroot); } die; } /// Forcing ASSOC mode for ADOdb (some DBs default to FETCH_BOTH) $db->SetFetchMode(ADODB_FETCH_ASSOC); $CFG->cachetype = ''; $CFG->rcache = false; /// Set the client/server and connection to utf8 /// and configure some other specific variables for each db configure_dbconnection(); /// Load up any configuration from the config table unset($CFG->rcache); $CFG = get_config(); /// Turn on SQL logging if required $CFG->logsql = true; if (!empty($CFG->logsql)) { $db->LogSQL(); } } ?>