Not closing ResultSet, but not getting ORA-01000

I have an application that is generating the familiar ORA-01000 error.
Whilst investigating the problem, I wrote a small test program. In the test program I tried to get the ORA-01000, but I don't get it (has anyone ever complained about not getting ORA-01000 before?!)
connection = DriverManager.getConnection("<connection string>");
String sql = "SELECT c1 FROM pdtab2 WHERE Id>=? AND Id<=?";
PreparedStatement ps = connection.prepareStatement(sql);
for (int i = 1; i <= 30000; ++i)
    ps.setInt(1, i-1);
    ps.setInt(2, i+1);
    if (i % 100 == 0)
        System.out.println("i=" +i);
        System.out.println("getCurrentOpenCursors(connection)="
                           +getCurrentOpenCursors(connection));
    try
        rs = ps.executeQuery();
        while (rs.next())
            result = rs.getInt(1);
    catch (SQLException e2)
        e2.printStackTrace();
    finally
        // Do nothing! Do not close the result set
}getCurrentOpenCursors does:
select count(*) AS COUNT from v$open_cursor where user_name like 'me'
I have reduced OPEN_CURSORS down from 300 to 100, but getCurrentOpenCursors always returns less that what it is set to. Suggesting that OPEN_CUSRORS is not a limit, but rather a pool size?
The result set returns more than one record, I never close the result set, yet I do not get an ORA-01000 error. I have tried auto-commit true and false on the connection. Is the prepared statement closing its previous result set on each new iteration of the loop, hence stopping me getting a problem?
I am using Oracle version 10.2.0.1, the corresponding ojdbc14.jar, and Java 1.4.
Thanks,
Paul

Here is a program that does that for you.
To fix the program, un-comment the line 24 of the code and run again.
C:\> type TestCursors.java
import java.lang.* ;
import java.util.* ;
import java.sql.* ;
import oracle.jdbc.* ;
public class TestCursors
    public static void main(String[] args) throws SQLException, ClassNotFoundException
        Class.forName("oracle.jdbc.driver.OracleDriver");
        Connection connection = DriverManager.getConnection("jdbc:oracle:oci:@localhost:1521:ORCL");
        ResultSet rs ;
        PreparedStatement ps ;
        for (int i = 1; i <= 30000; ++i)
            String sql = "SELECT 20 FROM scott.emp WHERE deptno = ?";
            ps = connection.prepareStatement(sql);
            ps.setInt(1, 10);
            try
                rs = ps.executeQuery();
                rs.close() ;
                //ps.close() ;
            catch (SQLException e2)
                System.out.println("The value if i is " + i) ;
                throw e2 ;
C:\> javac TestCursors.java
C:\> java TestCursors
The value if i is 301
Exception in thread "main" java.sql.SQLException: ORA-01000: maximum open cursors exceeded
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:671)
        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:597)
        at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:570)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)
        at TestCursors.main(TestCursors.java:22)
C:\>

Similar Messages

  • Getting ORA-01000 : maximum open cursors exceeded  problem

    I am getting ORA-01000 : maximum open cursors exceeded problem in my piece of java code when the
    load is high .Open cursors is set to 1000 still getting the same problem .
    Basically i have to select some rows from a table which i am doing in A() function and process it and insert into
    another table which i do it in another function B() there is a update statement also in this fun.
    There is a particular business logic for which i need to call B() from the A() function
    which happens to be in the select result set like below
    A()
    query ="Select * from temp";
    while(rs.next)
    B();
    All the result sets are properly being closed that too in finally block.
    I dont see any other problem with code .Still I am gettin this cursor problem.
    Is some thing wrong with the design like calling a
    insert from a result set while loop or the update statement

    The code below is deleting fine. Check your $id is valid. I wonder if ADOdb has some quirks with binding and variable creation/destruction, similar to #1 in http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#bindvars
    <?php
    See ADOdb Tutorial for Oracle: http://phplens.com/lens/adodb/docs-oracle.htm
    drop table mytab;
    create table mytab (city varchar2(20), country_id varchar2(20));
    insert into mytab values ('SF', 'US');
    insert into mytab values ('Sydney', 'AU');
    insert into mytab values ('London', 'UK');
    commit;
    require_once("/home/cjones/public_html/php/adodb5/adodb.inc.php");
    $db = ADONewConnection("oci8");
    $db->Connect("//localhost/XE", "hr", "hrpwd");
    echo "Before:\n";
    $rs = $db->Execute("select city from mytab");
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "\n";
    $s = $db->Prepare("delete from mytab where country_id = :ci");
    $db->Parameter($s, $ci, 'ci');
    foreach (array('US', 'AU') as $ci) {
         $db->Execute($s);
    echo "After:\n";
    $rs = $db->Execute("select city from mytab");
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "\n";
    ?>There's another sample in the ADOdb OCI8 driver:
              Usage:
                   $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
                   $DB->Bind($stmt, $p1);
                   $DB->Bind($stmt, $p2);
                   $DB->Bind($stmt, $p3);
                   for ($i = 0; $i < $max; $i++) {     
                        $p1 = ?; $p2 = ?; $p3 = ?;
                        $DB->Execute($stmt);
                   }For queries I know this works. I haven't seen any examples that prepare once.
    $rs = $db->Execute("select city from mytab where country_id = :ci", array('ci' => 'UK'));
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "<br>\n";
    }

  • Help needed, getting ORA-01000: maximum open cursors exceeded

    CJ or anyone that may have come across this problem in the past, I hope that you may be able to help me
    I am trying to implement a function from the Salesforce PHP tool kit that runs against a class that returns a object of ID's that have been updated in a given time frame.
    This is a lot of code. I am sorry for that:
    <?php
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    //Keep the SOAP cache clean
    ini_set("soap.wsdl_cache_enabled","0");
    $delete_count = 0;
    $oracle_deleted = 0;
    //Setup array for local ID's'
    $opportunity_data = array();
    $deleted_data = array();
    //start setup for PL SQL statement
    $strsql = "begin mapsapp.sforce_opp_insert(";
    $strsql .= ":pm_id,";
    $strsql .= ":pm_accountid,";
    $strsql .= ":pm_name,";
    $strsql .= ":pm_description,";
    $strsql .= ":pm_stagename,";
    $strsql .= ":pm_amount,";
    $strsql .= ":pm_probability,";
    $strsql .= ":pm_expectedrevenue,";
    $strsql .= ":pm_closedate,";
    $strsql .= ":pm_type,";
    $strsql .= ":pm_nextstep,";
    $strsql .= ":pm_leadsource,";
    $strsql .= ":pm_isclosed,";
    $strsql .= ":pm_iswon,";
    $strsql .= ":pm_forecastcategory,";
    $strsql .= ":pm_campaignid,";
    $strsql .= ":pm_hasopportunitylineitem,";
    $strsql .= ":pm_pricebook2id,";
    $strsql .= ":pm_ownerid,";
    $strsql .= ":pm_createddate,";
    $strsql .= ":pm_createdbyid,";
    $strsql .= ":pm_lastmodifieddate,";
    $strsql .= ":pm_lastmodifiedbyid,";
    $strsql .= ":pm_systemmodstamp,";
    $strsql .= ":pm_rsm_project_id_score__c,";
    $strsql .= ":pm_lead_fae__c,";
    $strsql .= ":pm_avg_annual_volume__c,";
    $strsql .= ":pm_priority__c,";
    $strsql .= ":pm_design_start_date__c,";
    $strsql .= ":pm_design_proto_date__c,";
    $strsql .= ":pm_production_years__c,";
    $strsql .= ":pm_production_life_months__c,";
    $strsql .= ":pm_production_months__c,";
    $strsql .= ":pm_design_freeze_date__c,";
    $strsql .= ":pm_production_proto_date__c,";
    $strsql .= ":pm_mass_production_date__c,";
    $strsql .= ":pm_fae_status__c,";
    $strsql .= ":pm_fae_assigned_date__c,";
    $strsql .= ":pm_fae_accepted_date__c,";
    $strsql .= ":pm_potential__c,";
    $strsql .= ":pm_fae_reject_reason__c,";
    $strsql .= ":pm_fae_project_complexity__c,";
    $strsql .= ":pm_design_phase__c,";
    $strsql .= ":pm_maxim_id__c,";
    $strsql .= ":pm_project_number__c,";
    $strsql .= ":pm_active__c,";
    $strsql .= ":pm_pivotal_created_by__c,";
    $strsql .= ":pm_manufactured_by__c,";
    $strsql .= ":pm_isdeleted,";
    $strsql .= ":pm_lastactivitydate";
    $strsql .= "); end;";
    //end setup for PL SQL statement
    //include common files
    require_once ('/users/msimonds/public_html/includes/sfdc.inc');
    include_once ('adodb.inc.php');
    $db = ADONewConnection("oci8");
    //connect to Oracle
    $db->Connect('',"database_user","password","dev2");
    //$db->BeginTrans();
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    if ($db)
        try
            //Set current time to get records from Salesforce
            $currentTime = mktime();
            // assume that update occured within the last 24 hrs.
            $startTime = $currentTime - (60 * 60 * 36); //(seconds * minutes * hours)
            $endTime = $currentTime;
            echo "***** Get Updated Opportunities from the last 24 hours *****<br />";
            $getUpdateddResponse = $client->getUpdated('Opportunity',$startTime,$endTime);
            //$getUpdateddResponse->ids = "";
            //echo '<pre>'.print_r($getUpdateddResponse,true).'</pre>';
            //exit;
            $opportunity_data = $getUpdateddResponse->ids;
            if (is_array($opportunity_data) || is_object($opportunity_data))
                set_time_limit(0);
                ini_set("memory_limit","512M");
                //copy data from Object to local array
                //count the number of records coming in from Salesforce
                $record_count = count($opportunity_data);
                echo $record_count;
                exit;
                //echo '<pre>'.print_r($opportunity_data,true).'</pre>';
                //exit;
                //loop through the records
                for ($i = 0; $i < $record_count; $i++)
                    $id = $opportunity_data[$i];
                    //SQL query for Salesforce
                    $soql = "Select Id, IsDeleted, AccountId, Name, Description, StageName, Amount, Probability, ExpectedRevenue, CloseDate, Type, NextStep, LeadSource, IsClosed, IsWon, ForecastCategory, CampaignId, HasOpportunityLineItem, Pricebook2Id, OwnerId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastActivityDate, RSM_Original_Project_ID_Score__c, Lead_FAE__c, Avg_Annual_Volume__c, Priority__c, Design_Start_Date__c, Design_Proto_Date__c, Production_Years__c, Production_Life_months__c, Production_Months__c, Design_Freeze_Date__c, Production_Proto_Date__c, Mass_Production_Date__c, FAE_Status__c, FAE_Assigned_Date__c, FAE_Accepted_Date__c, Project_Potential__c, FAE_Reject_Reason__c, FAE_Project_Complexity__c, Design_Phase__c, maxim_id__c, Project_Number__c, Active__c, Project_Comments__c, Pivotal_Created_By__c, Manufactured_By__c FROM Opportunity WHERE Id = '{$id}'";
                    //setup query to local Oracle MAPS database
                    $get_oracle_record = query_db($id,$db);
                    if ($get_oracle_record)
                        $sql = "DELETE FROM sforce_opportunity WHERE ID = '{$id}'";
                        if ($db->Execute($sql)) ;
                            $insert_records = get_records($client,$soql);
                    else
                        $insert_records = get_records($client,$soql);
                    foreach ($insert_records as $r)
                        $pass_this['id'] = $id;
                        $pass_this['accountid'] = (string )$r->fields->AccountId;
                        $pass_this['name'] = (string )$r->fields->Name;
                        $pass_this['description'] = (string )$r->fields->Description;
                        $pass_this['stagename'] = (string )$r->fields->StageName;
                        $pass_this['amount'] = (int)$r->fields->Amount;
                        $pass_this['probability'] = (int)$r->fields->Probability;
                        $pass_this['expectedrevenue'] = (int)$r->fields->ExpectedRevenue;
                        $pass_this['closedate'] = (string )$r->fields->CloseDate;
                        $pass_this['type'] = (string )$r->fields->Type;
                        $pass_this['nextstep'] = (string )$r->fields->NextStep;
                        $pass_this['leadsource'] = (string )$r->fields->LeadSource;
                        $pass_this['isclosed'] = (string )$r->fields->IsClosed;
                        $pass_this['iswon'] = (string )$r->fields->IsWon;
                        $pass_this['forecastcategory'] = (string )$r->fields->ForecastCategory;
                        $pass_this['campaignid'] = (string )$r->fields->CampaignId;
                        $pass_this['hasopportunitylineitem'] = (string )$r->fields->HasOpportunityLineItem;
                        $pass_this['pricebook2id'] = $r->fields->Pricebook2Id;
                        $pass_this['ownerid'] = $r->fields->OwnerId;
                        $pass_this['createddate'] = (string )$r->fields->CreatedDate;
                        $pass_this['createdbyid'] = (string )$r->fields->CreatedById;
                        $pass_this['lastmodifieddate'] = (string )$r->fields->LastModifiedDate;
                        $pass_this['lastmodifiedbyid'] = (string )$r->fields->LastModifiedById;
                        $pass_this['systemmodstamp'] = (string )$r->fields->SystemModstamp;
                        $pass_this['rsm_project_id_score__c'] = (int)$r->fields->RSM_Original_Project_ID_Score__c;
                        $pass_this['lead_fae__c'] = (string )$r->fields->Lead_FAE__c;
                        $pass_this['avg_annual_volume__c'] = (int)$r->fields->Avg_Annual_Volume__c;
                        $pass_this['priority__c'] = (string )$r->fields->Priority__c;
                        $pass_this['design_start_date__c'] = (string )$r->fields->Design_Start_Date__c;
                        $pass_this['design_proto_date__c'] = (string )$r->fields->Design_Proto_Date__c;
                        $pass_this['production_years__c'] = (int)$r->fields->Production_Years__c;
                        $pass_this['production_life_months__c'] = (int)$r->fields->Production_Life_months__c;
                        $pass_this['production_months__c'] = (int)$r->fields->Production_Months__c;
                        $pass_this['design_freeze_date__c'] = (string )$r->fields->Design_Freeze_Date__c;
                        $pass_this['production_proto_date__c'] = (string )$r->fields->Production_Proto_Date__c;
                        $pass_this['mass_production_date__c'] = (string )$r->fields->Mass_Production_Date__c;
                        $pass_this['fae_status__c'] = (string )$r->fields->FAE_Status__c;
                        $pass_this['fae_assigned_date__c'] = (string )$r->fields->FAE_Assigned_Date__c;
                        $pass_this['fae_accepted_date__c'] = (string )$r->fields->FAE_Accepted_Date__c;
                        $pass_this['project_potential__c'] = (int)$r->fields->Project_Potential__c;
                        $pass_this['fae_reject_reason__c'] = (string )$r->fields->FAE_Reject_Reason__c;
                        $pass_this['fae_project_complexity__c'] = (string )$r->fields->FAE_Project_Complexity__c;
                        $pass_this['design_phase__c'] = (string )$r->fields->Design_Phase__c;
                        $pass_this['maxim_id__c'] = (string )$r->fields->maxim_id__c;
                        $pass_this['objective_status_next_qtr__c'] = (string )$r->fields->Objective_Status_Next_Qtr__c;
                        $pass_this['quality_of_relationship__c'] = (string )$r->fields->Quality_of_Relationship__c;
                        $pass_this['targeted_po_date__c'] = (string )$r->fields->Targeted_PO_Date__c;
                        $pass_this['part_no_involved__c'] = (string )$r->fields->Part_No_Involved__c;
                        $pass_this['first_po_number__c'] = (string )$r->fields->First_PO_Number__c;
                        $pass_this['lost_reason__c'] = (string )$r->fields->Lost_Reason__c;
                        $pass_this['fae_estimate_of_business__c'] = (string )$r->fields->FAE_Estimate_of_Business__c;
                        $pass_this['digital_processor__c'] = (string )$r->fields->Digital_Processor__c;
                        $pass_this['project_number__c'] = (string )$r->fields->Project_Number__c;
                        $pass_this['active__c'] = (string )$r->fields->Active__c;
                        $pass_this['pivotal_created_by__c'] = (string )$r->fields->Pivotal_Created_By__c;
                        $pass_this['manufactured_by__c'] = (string )$r->fields->Manufactured_By__c;
                        $pass_this['isdeleted'] = (string )$r->fields->IsDeleted;
                        $pass_this['lastactivitydate'] = (string )$r->fields->LastActivityDate;
                        $pass_this['optocon_id__c'] = (string )$r->fields->OptoCon_ID__c;
                        if (strlen($pass_this['description']) == 0)
                            $pass_this['description'] = "No Description Posted";
                        else
                            $pass_this['description'] = $pass_this['description'];
                    //echo '<pre>'.print_r($pass_this,true).'</pre>';
                    //exit;
                    $record_inserted = insert_record($pass_this,$strsql,$db);
                    if (!$record_inserted)
                        //mail('[email protected]','insert error','There was a proble trying to insert a record into the database');
            else
                echo "Nothing here";
                //exit;
            //add back in once replication is done
            //get deleted records from the Opportunity
            $getDeletedResponse = $client->getDeleted('Opportunity',$startTime,$endTime);
            //echo '<pre>'.print_r($getDeletedResponse,true).'</pre>';
            //exit;
            $deleted_ids = $getDeletedResponse->deletedRecords;
            //echo '<pre>'.print_r($deleted_ids,true).'</pre>';
            if (is_object($deleted_ids))
                $temp_array[] = $deleted_ids;
                unset($deleted_ids);
                $deleted_ids = $temp_array;
            $delete_count = count($deleted_ids);
            //echo $delete_count;
            for ($i = 0; $i < $delete_count; $i++)
                $d_id = $deleted_ids[$i];
                $id = $d_id->id;
                if (query_db($id,$db))
                    $delete_sql = "Delete from sforce_opportunity WHERE ID = '{$id}'";
                    $oracle_deleted++;
                    if ($db->Execute($delete_sql))
                        echo "<font color=\"#0000FF\">".$id." was removed from the Oracle database</font><br />";
                else
                    echo $id." is not in the Oracle database<br />";
            echo $oracle_deleted." records were deleted from Oracle";
        catch (exception $e)
            $error = '<pre>'.print_r($e,true).'</pre>';
            mail('[email protected]','insert error',$error);
    $db->CommitTrans();
    $db->Close();
    exit;
    function insert_record($pass_this,$strsql,&$db)
        //Prepares PL/SQL Statement
        $stmt = $db->Prepare($strsql);
        $db->InParameter($stmt,$pass_this['id'],'pm_id');
        $db->InParameter($stmt,$pass_this['accountid'],'pm_accountid');
        $db->InParameter($stmt,$pass_this['name'],'pm_name');
        $db->InParameter($stmt,$pass_this['description'],'pm_description',-1,OCI_B_CLOB);
        $db->InParameter($stmt,$pass_this['stagename'],'pm_stagename');
        $db->InParameter($stmt,$pass_this['amount'],'pm_amount');
        $db->InParameter($stmt,$pass_this['probability'],'pm_probability');
        $db->InParameter($stmt,$pass_this['expectedrevenue'],'pm_expectedrevenue');
        $db->InParameter($stmt,$pass_this['closedate'],'pm_closedate');
        $db->InParameter($stmt,$pass_this['type'],'pm_type');
        $db->InParameter($stmt,$pass_this['nextstep'],'pm_nextstep');
        $db->InParameter($stmt,$pass_this['leadsource'],'pm_leadsource');
        $db->InParameter($stmt,$pass_this['isclosed'],'pm_isclosed');
        $db->InParameter($stmt,$pass_this['iswon'],'pm_iswon');
        $db->InParameter($stmt,$pass_this['forecastcategory'],'pm_forecastcategory');
        $db->InParameter($stmt,$pass_this['campaignid'],'pm_campaignid');
        $db->InParameter($stmt,$pass_this['hasopportunitylineitem'],'pm_hasopportunitylineitem');
        $db->InParameter($stmt,$pass_this['pricebook2id'],'pm_pricebook2id');
        $db->InParameter($stmt,$pass_this['ownerid'],'pm_ownerid');
        $db->InParameter($stmt,$pass_this['createddate'],'pm_createddate');
        $db->InParameter($stmt,$pass_this['createdbyid'],'pm_createdbyid');
        $db->InParameter($stmt,$pass_this['lastmodifieddate'],'pm_lastmodifieddate');
        $db->InParameter($stmt,$pass_this['lastmodifiedbyid'],'pm_lastmodifiedbyid');
        $db->InParameter($stmt,$pass_this['systemmodstamp'],'pm_systemmodstamp');
        $db->InParameter($stmt,$pass_this['rsm_project_id_score__c'],'pm_rsm_project_id_score__c');
        $db->InParameter($stmt,$pass_this['lead_fae__c'],'pm_lead_fae__c');
        $db->InParameter($stmt,$pass_this['avg_annual_volume__c'],'pm_avg_annual_volume__c');
        $db->InParameter($stmt,$pass_this['priority__c'],'pm_priority__c');
        $db->InParameter($stmt,$pass_this['design_start_date__c'],'pm_design_start_date__c');
        $db->InParameter($stmt,$pass_this['design_proto_date__c'],'pm_design_proto_date__c');
        $db->InParameter($stmt,$pass_this['production_years__c'],'pm_production_years__c');
        $db->InParameter($stmt,$pass_this['production_life_months__c'],'pm_production_life_months__c');
        $db->InParameter($stmt,$pass_this['production_months__c'],'pm_production_months__c');
        $db->InParameter($stmt,$pass_this['design_freeze_date__c'],'pm_design_freeze_date__c');
        $db->InParameter($stmt,$pass_this['production_proto_date__c'],'pm_production_proto_date__c');
        $db->InParameter($stmt,$pass_this['mass_production_date__c'],'pm_mass_production_date__c');
        $db->InParameter($stmt,$pass_this['fae_status__c'],'pm_fae_status__c');
        $db->InParameter($stmt,$pass_this['fae_assigned_date__c'],'pm_fae_assigned_date__c');
        $db->InParameter($stmt,$pass_this['fae_accepted_date__c'],'pm_fae_accepted_date__c');
        $db->InParameter($stmt,$pass_this['project_potential__c'],'pm_potential__c');
        $db->InParameter($stmt,$pass_this['fae_reject_reason__c'],'pm_fae_reject_reason__c');
        $db->InParameter($stmt,$pass_this['fae_project_complexity__c'],'pm_fae_project_complexity__c');
        $db->InParameter($stmt,$pass_this['design_phase__c'],'pm_design_phase__c');
        $db->InParameter($stmt,$pass_this['maxim_id__c'],'pm_maxim_id__c');
        $db->InParameter($stmt,$pass_this['project_number__c'],'pm_project_number__c');
        $db->InParameter($stmt,$pass_this['active__c'],'pm_active__c');
        $db->InParameter($stmt,$pass_this['pivotal_created_by__c'],'pm_pivotal_created_by__c');
        $db->InParameter($stmt,$pass_this['manufactured_by__c'],'pm_manufactured_by__c');
        $db->InParameter($stmt,$pass_this['isdeleted'],'pm_isdeleted');
        $db->InParameter($stmt,$pass_this['lastactivitydate'],'pm_lastactivitydate');
        //executes and loads data coming from salesforce into table
        if ($db->Execute($stmt))
            echo $pass_this['id']." was inserted into the database<br />";
            flush();
            unset($pass_this);
            unset($stmt);
            return true;
        else
            echo $db->ErrorMsg()."<br>";
            mail('[email protected]','database error',$db->ErrorMsg());
            return false;
    //Get the data from Salesforce to populate Oracle
    function get_records(&$connection,&$query)
        $queryOptions = new QueryOptions(2000);
        $response = new QueryResult($connection->query($query));
        // if the size is zero, where done
        if ($response->size > 0)
            $products = $response->records;
            // Cycles through additional responses if the number of records
            // exceeds the batch size
            while (!$response->done)
                set_time_limit(100);
                $response = $connection->queryMore($response->queryLocator);
                $products = array_merge($products,$response->records);
        return $products;
    function query_db($id,&$db)
        global $db;
        $sql = "SELECT *
                FROM sforce_opportunity
                Where id = '{$id}'";
        $rs = $db->Execute($sql);
        if ($rs && $rs->_numOfRows > 0)
            return true;
        else
            return false;
        exit;
    ?>the code runs fine and I do not commit my inserts until after I am done retrieving all the records, but I am getting the oracle error: ORA-01000: maximum open cursors exceeded
    I am not using any cursors in my PL SQL
    CREATE OR REPLACE PROCEDURE MAPSAPP.sforce_opp_insert (
        pm_id                                               IN     VARCHAR2,
        pm_accountid                                        IN     VARCHAR2,
        pm_name                                             IN     VARCHAR2,
        pm_description                                      IN     VARCHAR2,
        pm_stagename                                        IN     VARCHAR2,
        pm_amount                                           IN     NUMBER,
        pm_probability                                      IN     NUMBER,
        pm_expectedrevenue                                  IN     NUMBER,
        pm_closedate                                        IN     VARCHAR2,
        pm_type                                             IN     VARCHAR2,
        pm_nextstep                                         IN     VARCHAR2,
        pm_leadsource                                       IN     VARCHAR2,
        pm_isclosed                                         IN     VARCHAR2,
        pm_iswon                                            IN     VARCHAR2,
        pm_forecastcategory                                 IN     VARCHAR2,
        pm_campaignid                                       IN     VARCHAR2,
        pm_hasopportunitylineitem                           IN     VARCHAR2,
        pm_pricebook2id                                     IN     VARCHAR2,
        pm_ownerid                                          IN     VARCHAR2,
        pm_createddate                                      IN     VARCHAR2,
        pm_createdbyid                                      IN     VARCHAR2,
        pm_lastmodifieddate                                 IN     VARCHAR2,
        pm_lastmodifiedbyid                                 IN     VARCHAR2,
        pm_systemmodstamp                                   IN     VARCHAR2,
        pm_rsm_project_id_score__c                          IN     VARCHAR2,
        pm_lead_fae__c                                      IN     VARCHAR2,
        pm_avg_annual_volume__c                             IN     VARCHAR2,
        pm_priority__c                                      IN     VARCHAR2,
        pm_design_start_date__c                             IN     VARCHAR2,
        pm_design_proto_date__c                             IN     VARCHAR2,
        pm_production_years__c                              IN     NUMBER,
        pm_production_life_months__c                        IN     NUMBER,
        pm_production_months__c                             IN     NUMBER,
        pm_design_freeze_date__c                            IN     VARCHAR2,
        pm_production_proto_date__c                         IN     VARCHAR2,
        pm_mass_production_date__c                          IN     VARCHAR2,
        pm_fae_status__c                                    IN     VARCHAR2,
        pm_fae_assigned_date__c                             IN     VARCHAR2,
        pm_fae_accepted_date__c                             IN     VARCHAR2,
        pm_potential__c                                     IN     NUMBER,
        pm_fae_reject_reason__c                             IN     VARCHAR2,
        pm_fae_project_complexity__c                        IN     VARCHAR2,
        pm_design_phase__c                                  IN     VARCHAR2,
        pm_maxim_id__c                                      IN     VARCHAR2,
        pm_project_number__c                                IN     VARCHAR2,
        pm_active__c                                        IN     VARCHAR2,
        pm_pivotal_created_by__c                            IN     VARCHAR2,
        pm_manufactured_by__c                               IN     VARCHAR2,
        pm_isdeleted                                        IN     VARCHAR2,
        pm_lastactivitydate                                 IN     VARCHAR2
    IS
    BEGIN
       INSERT INTO SFORCE_OPPORTUNITY
                   (id,
                    accountid,
                    name,
                    description,
                    stagename,
                    amount,
                    probability,
                    expectedrevenue,
                    closedate,
                    type,
                    nextstep,
                    leadsource,
                    isclosed,
                    iswon,
                    forecastcategory,
                    campaignid,
                    hasopportunitylineitem,
                    pricebook2id,
                    ownerid,
                    createddate,
                    createdbyid,
                    lastmodifieddate,
                    lastmodifiedbyid,
                    systemmodstamp,
                    rsm_project_id_score__c,
                    lead_fae__c,
                    avg_annual_volume__c,
                    priority__c,
                    design_start_date__c,
                    design_proto_date__c,
                    production_years__c,
                    production_life_months__c,
                    production_months__c,
                    design_freeze_date__c,
                    production_proto_date__c,
                    mass_production_date__c,
                    fae_status__c,
                    fae_assigned_date__c,
                    fae_accepted_date__c,
                    project_potential__c,
                    fae_reject_reason__c,
                    fae_project_complexity__c,
                    design_phase__c,
                    maxim_id__c,
                    project_number__c,
                    active__c,
                    pivotal_created_by__c,
                    manufactured_by__c,
                    isdeleted,
                    lastactivitydate
            VALUES (pm_id,
                    pm_accountid,
                    pm_name,
                    pm_description,
                    pm_stagename,
                    pm_amount,
                    pm_probability,
                    pm_expectedrevenue,
                    TO_DATE (SUBSTR (REPLACE (pm_closedate, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_type,
                    pm_nextstep,
                    pm_leadsource,
                    pm_isclosed,
                    pm_iswon,
                    pm_forecastcategory,
                    pm_campaignid,
                    pm_hasopportunitylineitem,
                    pm_pricebook2id,
                    pm_ownerid,
                    TO_DATE (SUBSTR (REPLACE (pm_createddate, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_createdbyid,
                    TO_DATE (SUBSTR (REPLACE (pm_lastmodifieddate, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_lastmodifiedbyid,
                    TO_DATE (SUBSTR (REPLACE (pm_systemmodstamp, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_rsm_project_id_score__c,
                    pm_lead_fae__c,
                    pm_avg_annual_volume__c,
                    pm_priority__c,
                    TO_DATE (SUBSTR (REPLACE (pm_design_start_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    TO_DATE (SUBSTR (REPLACE (pm_design_proto_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_production_years__c,
                    pm_production_life_months__c,
                    pm_production_months__c,
                    TO_DATE (SUBSTR (REPLACE (pm_design_freeze_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    TO_DATE (SUBSTR (REPLACE (pm_production_proto_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    TO_DATE (SUBSTR (REPLACE (pm_mass_production_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_fae_status__c,
                    TO_DATE (SUBSTR (REPLACE (pm_fae_assigned_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    TO_DATE (SUBSTR (REPLACE (pm_fae_accepted_date__c, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS'),
                    pm_potential__c,
                    pm_fae_reject_reason__c,
                    pm_fae_project_complexity__c,
                    pm_design_phase__c,
                    pm_maxim_id__c,
                    pm_project_number__c,
                    pm_active__c,
                    pm_pivotal_created_by__c,
                    pm_manufactured_by__c,
                    pm_isdeleted,
                    TO_DATE (SUBSTR (REPLACE (pm_lastactivitydate, 'T', ' '), 1, 19),'YYYY-MM-DD HH24:MI:SS')
    END sforce_opp_insert;
    /I was wondering anyone has seen this before
    TIA,
    Mike

    The code below is deleting fine. Check your $id is valid. I wonder if ADOdb has some quirks with binding and variable creation/destruction, similar to #1 in http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#bindvars
    <?php
    See ADOdb Tutorial for Oracle: http://phplens.com/lens/adodb/docs-oracle.htm
    drop table mytab;
    create table mytab (city varchar2(20), country_id varchar2(20));
    insert into mytab values ('SF', 'US');
    insert into mytab values ('Sydney', 'AU');
    insert into mytab values ('London', 'UK');
    commit;
    require_once("/home/cjones/public_html/php/adodb5/adodb.inc.php");
    $db = ADONewConnection("oci8");
    $db->Connect("//localhost/XE", "hr", "hrpwd");
    echo "Before:\n";
    $rs = $db->Execute("select city from mytab");
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "\n";
    $s = $db->Prepare("delete from mytab where country_id = :ci");
    $db->Parameter($s, $ci, 'ci');
    foreach (array('US', 'AU') as $ci) {
         $db->Execute($s);
    echo "After:\n";
    $rs = $db->Execute("select city from mytab");
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "\n";
    ?>There's another sample in the ADOdb OCI8 driver:
              Usage:
                   $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
                   $DB->Bind($stmt, $p1);
                   $DB->Bind($stmt, $p2);
                   $DB->Bind($stmt, $p3);
                   for ($i = 0; $i < $max; $i++) {     
                        $p1 = ?; $p2 = ?; $p3 = ?;
                        $DB->Execute($stmt);
                   }For queries I know this works. I haven't seen any examples that prepare once.
    $rs = $db->Execute("select city from mytab where country_id = :ci", array('ci' => 'UK'));
    while ($arr = $rs->FetchRow()) {
        echo $arr['CITY'] . "<br>\n";
    }

  • Impdp: looks right, but still getting ORA-39087: directory name invalid

    This is fairly mysterious, particularly since I've done this many other times without problems.
    I created the directory C:\OracleImportTest on the server's filesystem, created a corresponding directory object DP_DIR in Oracle, and granted my user read and write access to it. I've been staring at it and trying different things all morning, but I still get the following results:
    C:\test>impdp cgernon/**** DIRECTORY=dp_dir SERVICE_NAME=test1 DUMPFILE=export.dmp LOGFILE=import.log
    Import: Release 11.1.0.6.0 - Production on Friday, 27 May, 2011 12:01:08
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 11g Release 11.1.0.6.0 - Production
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39087: directory name DP_DIR is invalid"But Mercurial!" you say, "surely you screwed something up setting up the directory and either it doesn't exist or you don't have access to it!" I would be the first to agree that is the most likely cause of the problem, but performing the following queries to double-check leaves me in a state of complete confusion:
    select * from all_directories;
    OWNER DIRECTORY_NAME DIRECTORY_PATH
    SYS   DP_DIR         C:\OracleImportTest                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    select * from user_tab_privs where table_name = 'DP_DIR';
    GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY
    CGERNON SYS   DP_DIR     SYS     READ      NO        NO       
    CGERNON SYS   DP_DIR     SYS     WRITE     NO        NO        Does anyone know of any other conditions that can trigger this error, or see anything I'm missing here? I am thoroughly mystified. Thanks!

    Good suggestion, but I'm still getting the same error ... using that command, as typed above.
    HOWEVER, changing the command as follows works:
    impdp cgernon/****@test1 DIRECTORY=dp_dir DUMPFILE=export.dmp LOGFILE=import.logWhich brings up another question. In the past, I've used the SERVICE_NAME option to specify the TNS Name for the database instance I want to connect to. Is that not what this option actually represents? And if not, why was it working for me in the past?
    At this point, I guess my original problem is resolved, but if anyone can explain the SERVICE_NAME option to me, I would appreciate it - thanks!

  • Partitioning option enabled but still getting ORA-00439

    Hello,
    I'm facing a weird situation. I'm trying to import some partitioned tables on an instance, and it fails with the following error:
    IMP-00003: ORACLE error 439 encountered
    ORA-00439: feature not enabled: Partitioning
    However when I check v$option it seems to be available:
    Partitioning   TRUE
    I'm using Oracle Enterprise server 10.2.0.3 64bit on Linux RedHat 4.5 x86_64
    Anyone can help me?
    Regards, and thanks in advance.

    Thanks all for your responses. Eventually, I reinstalled Oracle software and everything went fine then.
    What I do not come to understand is why v$option reported Partitioning as enabled when it really was not...
    Once again , thanks a lot.
    Fran.

  • Maximum open cursors in SQLJ, ORA-01000

    Hello,
    Can someone please help me with the following: I have a java application that does 7000 insert statements, but I get ORA-01000 after only 200-300 inserts. The error message is:
    Exception: java.sql.SQLException: ORA-01000: maximum open cursors exceeded
    A simplified version of my insert in sqlj:
    try {
         #sql [_ctx] {
              insert into TABLE_X
              ( name, addr ) values
              (:m_name,m_addr)
    } catch(SQLException e){
              m_mgr.GetErrorLog().logError("Critical",
         "Failed to insert user into TABLE_X","","Program aborting","?",e );
              m_mgr.SystemErrorExit();
    1. The only answers I can find in the forums is either to increase max open cursors in inti.ora, or to close your statements correctly. I'v tried increasing max open cursors but this does not help..(its not a very god approach anyway), and I can't see why I should close my statements from SQLJ: This error did not occur in the same application on a different platform 10 months ago.
    2. Could it have something to do with the thin driver version I'm using. Either in JDev or in the database. I use JDev 903 (on win 2000) and a 8.1.7.4 database (on solaris).
    3. I tried using oci8 connectoin, but could not get it working. Using oci8 i got the error
    java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
    Feedback appreciated.
    /Anders

    For oci to work you should have Oracle or SQL client installed on your machine.
    You should also have ORACLE_HOME\bin in you path.
    ocijdbc9.dll is available in the above directory.
    Chandar

  • Cursors are not closed when using Ref Cursor Query in a report  ORA-01000

    Dear Experts
    Oracel database 11g,
    developer suite 10.1.2.0.2,
    application server 10.1.2.0.2,
    Windows xp platform
    For a long time, I'm hitting ORA-01000
    I have a 2 group report (master and detail) using Ref Cusor query, when this report is run, I found that it opens several cursors (should be only one cursor) for the detail query although it should not, I found that the number of these cursors is equal to the number of master records.
    Moreover, after the report is finished, these cursors are not closed, and they are increasing cumulatively each time I run the report, and finally the maximum number of open cursors is exceeded, and thus I get ORA-01000.
    I increased the open cursors parameter for the database to an unbeleivable value 30000, but of course it will be exceeded during the session because the cursors are increasing cumulatively.
    I Found that this problem is solved when using only one master Ref Cursor Query and create a breake group, the problem is solved also if we use SQL Query instead of Ref Query for the master and detail queries, but for some considerations, I should not use neither breake group nor SQL Query, I have to use REF Cursor queries.
    Is this an oracle bug , and how can I overcome ?
    Thanks
    Edited by: Mostafa Abolaynain on May 6, 2012 9:58 AM

    Thank you Inol for your answer, However
    Ref Cursor give me felxibility to control the query, for example see the following query :
    function QR_1RefCurDS return DEF_CURSORS.JOURHEAD_REFCUR is
    temp_JOURHEAD DEF_CURSORS.JOURHEAD_refcur;
              v_from_date DATE;
              v_to_date DATE;
              V_SERIAL_TYPE number;
    begin
    SELECT SERIAL_TYPE INTO V_SERIAL_TYPE
    FROM ACC_VOUCHER_TYPES
    where voucher_type='J'
    and IDENT_NO=:IDENT
    AND COMP_NO=TO_NUMBER(:COMPANY_NO);
         IF :no_date=1 then
                   IF V_SERIAL_TYPE =1 THEN     
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT
              AND ((TO_NUMBER(VOCH_NO)=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (TO_NUMBER(VOCH_NO) BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (TO_NUMBER(VOCH_NO)<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))
                   ORDER BY TO_NUMBER(VOCH_NO);
                   ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT               
              AND ((VOCH_NO=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (VOCH_NO BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (VOCH_NO<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))     
                   ORDER BY VOCH_NO;          
                   END IF;
         ELSE
                   v_from_date:=to_DATE(:from_date);
                   v_to_date:=to_DATE(:to_date);                         
              IF V_SERIAL_TYPE =1 THEN
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
              AND IDENT=:IDENT                         
                   AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,TO_NUMBER(VOCH_NO);     
              ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT                         
              AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,VOCH_NO;          
              END IF;
         END IF;               
         return temp_JOURHEAD;
    end;

  • ORA-01000 maximum open cursors exceeded with XA driver

    We are getting ORA-01000 maximum open cursors exceeded error from Oracle database
    agian and again.We are usimg XA driver.
    What is the weblogic's work around to handle this error?How we can handle this?We
    tried doing "grant select on DBA_PENDING_TRANSACTIONS to public ;" ,this also
    works for some time only.Again the same error starts coming.
    Help please.
    Thanx in advance.

    Thanks for your reply.
    I have increased my cursor size to 2000(default 300).We are using weblogic6.1
    and Oracle9i.Yes I was little aware about this bug so I tried doing "grant select
    on DBA_PENDING_TRANSACTIONS to public " from sys and no of open cursors reduced
    drastically but aftter some time increased again.We are using combination of thin,XA,non
    XA and oci drivers.
    We are using weblogic security framework also in our application and I think that
    consumes maximum no. of cursors.
    Kindly advice.
    Thanx a lot.
    Pinky
    Mitesh Patel <[email protected]> wrote:
    What is the size of cusror set in your oracle init.ora file?
    What version of oracle thin driver and weblogic are you using?
    Please read the following note:
    There is a bug with Oracle 817 driver's XAResource.recover implementation:
    it
    ignores the flag and always return all in-doubt Xids. After initially
    calling a resource's recover with TMSTARTRSCAN, TM subsequently calls
    the
    resource's recover with TMNOFLAGS until no more Xid is returned. Thus,
    Oracle driver's XAResource.recover is called infinitely until eventually
    it
    returns XAER_RMERR. Subsequent XAResource.start then returns ORA-01000
    exception (looks like all their XAResource methods internally uses prepared
    statements to execute some stored procedure.)
    Is this the case wth you?
    Mitesh
    Pinky Arora wrote:
    We are getting ORA-01000 maximum open cursors exceeded error from Oracledatabase
    agian and again.We are usimg XA driver.
    What is the weblogic's work around to handle this error?How we canhandle this?We
    tried doing "grant select on DBA_PENDING_TRANSACTIONS to public ;",this also
    works for some time only.Again the same error starts coming.
    Help please.
    Thanx in advance.

  • ORA-01000

    Hi Guys,
    I am getting ORA-01000 exception. When am extracting the data's from Excel file and upload it into database.
    In that file am having nearly 250 records, i can load only 298 after that the Exception is thrown like ORA-01000.
    Can anyone help me resolve this incident?
    Thanks in advance

    Dhiva wrote:
    I am getting ORA-01000 exception. When am extracting the data's from Excel file and upload it into database.
    In that file am having nearly 250 records, i can load only 298 after that the Exception is thrown like ORA-01000.Your Java code is broken. This is not an Oracle problem. This is Oracle complaining about resource abuse by the client.
    On the client:, the basics are:
    - re-use a cursor handle for performance (no need for extra soft or hard parsing)
    - close a cursor handle when done
    Not closing cursor handles in Oracle that your client code created, leads to an ever increasing number of open cursors for that client session in Oracle. Fortunately Oracle implements a ceiling on this type of abuse, throws an exception when this ceiling is reached, and refuses to simply waste more resources by simply creating more and more cursors in that session.
    Fix your code. Oracle is working as designed and as documented.

  • Oracle 10gR2 on Solaris 10 - Zoned Machine getting ORA-27102 Errors

    Getting Memory issues in Solaris 10. I have configured the database to have only 2GB of SGA, but still getting ORA-27102 and also when we look at top command it seems all the memory is not available. The machine is divided into two zones, machine has 32 GB memory and has 8 processors. The shared memory settings I have done is 8 GB max.
    Any help in this regard would be helpful. Is anything special needs to be done in zones ?
    Thanks,
    Atul
    And these are the details of prctl $$
    NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
    process.max-port-events
    privileged 65.5K - deny -
    system 2.15G max deny -
    process.max-msg-messages
    privileged 8.19K - deny -
    system 4.29G max deny -
    process.max-msg-qbytes
    privileged 64.0KB - deny -
    system 16.0EB max deny -
    process.max-sem-ops
    privileged 512 - deny -
    system 2.15G max deny -
    process.max-sem-nsems
    privileged 512 - deny -
    system 32.8K max deny -
    process.max-address-space
    privileged 16.0EB max deny -
    system 16.0EB max deny -
    process.max-file-descriptor
    basic 256 - deny 12615
    privileged 65.5K - deny -
    system 2.15G max deny -
    process.max-core-size
    privileged 8.00EB max deny -
    system 8.00EB max deny -
    process.max-stack-size
    basic 8.00MB - deny 12615
    privileged 8.00EB - deny -
    system 8.00EB max deny -
    process.max-data-size
    privileged 16.0EB max deny -
    system 16.0EB max deny -
    process.max-file-size
    privileged 8.00EB max deny,signal=XFSZ -
    system 8.00EB max deny -
    process.max-cpu-time
    privileged 18.4Es inf signal=XCPU -
    system 18.4Es inf none -
    task.max-cpu-time
    system 18.4Es inf none -
    task.max-lwps
    system 2.15G max deny -
    project.max-contracts
    privileged 10.0K - deny -
    system 2.15G max deny -
    project.max-device-locked-memory
    privileged 1.96GB - deny -
    system 16.0EB max deny -
    project.max-port-ids
    privileged 8.19K - deny -
    system 65.5K max deny -
    project.max-shm-memory
    privileged 7.40GB - deny -
    system 16.0EB max deny -
    project.max-shm-ids
    privileged 128 - deny -
    system 16.8M max deny -
    project.max-msg-ids
    privileged 128 - deny -
    system 16.8M max deny -
    project.max-sem-ids
    privileged 128 - deny -
    system 16.8M max deny -
    project.max-crypto-memory
    privileged 7.84GB - deny -
    system 16.0EB max deny -
    project.max-tasks
    system 2.15G max deny -
    project.max-lwps
    system 2.15G max deny -
    project.cpu-shares
    privileged 1 - none -
    system 65.5K max none -
    zone.max-lwps
    system 2.15G max deny -
    zone.cpu-shares
    privileged 1 - none -
    system 65.5K max none -

    There is no trace files to look at . Alert log does not have entry and bdump & udump does not have any trace file.
    I was more interested to know, if somebody has installed Oracle 10 on Solaris 10 with a zone or container in solaris. What parameter settings was done on unix setting was it only shared-memory defined, if anybody has come accross memory issues in the machine after installing Oracle 10 with Solaris 10, and the machine has been zoned in two or more zones.
    Thanks,
    Atul

  • OracleTypes & CallableStatement  ORA-01000 bug???

    Hi all,
    we have a problem with OracleTypes from Oracle driver and
    CallableStatement to get a cursor from a stored function.
    Thought we close all Resulset, CallableStatement, and connection
    objects we get ORA-01000 in performance tests.
    On the other hand, if we use PreparedStatement instead of
    OracleTypes, CallableStament and stored procedures (PLSQL),
    the performance tests are successful.
    ?Is there a bug in OracleTypes?
    Thanks a lot.

    I believe I have a similar problem. We are on 10g with application using JBOSS for JDBC. It seems JDBC is closing the connections fine. But where as in db level I see around 1000 open/active(???) sessions when I query V$ACTIVE_SESSION_HISTORY table. For all these sessions the query that they are running is "SELECT VALUE FROM NLS_INSTANCE_PARAMETERS WHERE PARAMETER ='NLS_DATE_FORMAT'". and program/module is 'JDBC Thin Cleint'.
    NLS_DATABASE_PARAMETERS & NLS_SESSION_PARAMETERS have the NLS_DATE_FORMAT of 'DD-MON-RR' and it is null in NLS_INSTANCE_PARAMETERS table.
    So far, application seems to be running fine. Is is something to be concerned about. Is the issue with JDBC Driver or NLS_Date_Format or something else. Please advice!!!
    Thanks.

  • Error During Delete Of Application:ORA-01000: maximum open cursors exceeded

    Hello All.
    I am using Apex version 3.2.0.00.27. I am trying to delete an existing application (App_ID 116). I am continually getting ORA-01000: maximum open cursors exceeded.
    Prior to deleting this application, I attempted to, instead, import (that is, replace) this app with a previously saved Apex app (APP_ID 116). This previously saved app is also at the same version. I get the same error. At that point, I figured that I would delete the app and then import my previously saved app, only to get the same error.
    I then attempted to import the previously saved app as a new APP_ID (256). This time, the app imported without error.
    Does anyone know what is going on? Could it be that my existing app 116 is "corrupted" (whatever that means)? Why can't I delete or import over my existing app 116?
    Any help would be appreciated.
    Thank you.
    Elie

    Post Author: amr_foci
    CA Forum: Information OnDemand
    its a database related Error and it can be fixed
    please check this link
    http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was.doc/html/EJB_Container/1040875.html
    good luck
    Amr

  • Max cursors exceeds problem(ORA-01000)

    Hi
    In my server open_cursors is set as 300 .We are developing a java application(using struts & Jboss web server) nearly 10 computers access the oracle 10g server through plsql procedures/functions ,frequently I am getting ORA-01000 -MAX CURSOR EXCEEDS errors,what should I do .please.....
    by
    s_bala

    That means there is two cursor related parameters
                                            |
                                            |
                                            |
                                            |
                        |                                        |     
    1)Cached cursors                              2)Currently open cursor
    1)Cached cursors     2)Currently open cursor
    SQL> select o.sid,osuser,machine,count(*) num_curs
    from v$open_cursor o,v$session s
    WHERE user_name = 'ERP' and
    o.sid = s.sid GROUP BY o.sid,osuser,machine
    ORDER BY num_curs DESC;     SQL>select max(a.value) as highest_open_cur,
         p.value as max_open_cur
         from v$sesstat a, v$statname b, v$parameter p
         where a.statistic# = b.statistic#
         and b.name = 'opened cursors current'
         and p.name= 'open_cursors'group by p.value;
    THIS IS THE RESULT I GOT
    SID OSUSER MACHINE NUM_CURS
    106 x 18
    93 x 14
    124 x 14
    152 x 13
    90 y y 11
    121 z 8
    132 a 8
    118 b b 6
    105 c 5
    131 b 5
    98 d d 4
    95 x 3
    147 y y 3
    89 e 2
    119 e 2     THIS IS THE RESULT I GOT
    HIGHEST_OPEN_CUR MAX_OPEN_CUR
    83 500
         -This is related to ORA-01000 -MAX CURSOR EXCEEDS
    From the above what I understood is correct ???
    F) How to clear 1)Cached cursors ? (or) how to reduce NUM_CURS (from the above left side table ).
    G) will the 1)Cached cursors give any problems to our database.

  • Projects are seen in workspace but not getting displayed

    I have some Web dynpro, JEEE, Dictonary DCs and projects in workspace, but it is not getting displayed when I open NWDS.
    I have given the correct workspace path but still the Project explorer is blank
    Please help.
    (P.S. NWDS was shut down improperly.)

    Closing this thread

  • For the first time, I'm trying to use adobe premiere elements10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or

    For the first time, I'm trying to use adobe premiere elements 10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or the codex is not installed. As a test, I created another very small project and get the same error message, when I try to open it. Pls give me a simple answer, a refund or a phone

    mike frischenmeyer
    What computer operating system is your Premiere Elements 10 running on? And, what video card/graphics card does that computer use?
    Is this the first time you are using Premiere Elements 10 or have you worked with it before successfully? There is no easy solution until we
    know the details and troubleshoot to determined what caused the problem.
    1. Can you open a new project?
    2. After you saved/closed the problem project, did you move, delete, or rename any of the files/folder that were related to the source media
    for that project?
    3. Please review the Adobe document on troubleshooting damaged projects.
    Troubleshoot damaged projects | Adobe Premiere Elements
    4. What are the steps that you are using to reopen this saved closed project.
    a. File Menu/Open Project/Name of Project
    b. Other
    Please review and consider and then we can decide what next based on your further details and results..
    Thank you.
    ATR

Maybe you are looking for

  • Slow internet on mid 2011 macbook air

    So my internet is intermittently slow on my macbook air. This has been happening for many months although I cannot remember if it corresponded with upgrading to OS X 10.9. It is sporadic and I cannot identify any precipitating causes or solutions. My

  • Problem with JNI on netBeans

    Hi ! After a search on the forum, I request your help about a little JNI app developped to work with a 3D sensor. The research team in which I work use to working with Eclipse IDE, and this JNI appliation work on it. However, impossible to find a way

  • DVD SP Picture Loss

    I'm having trouble maintaining picture quality after importing into DVDSP. Two areas of loss include: fast motion sequences and the beginning of segments that also have motion graphics after black slug. Tried all different variations in compressor. I

  • HANA Sizing for Business Suite Systems (Compression)

    Hi Experts- We ran the HANA memory sizing for our ERP and SRM systems (both are on NW 7.4, ECC is on EHP7 and SRM is on EHP3). We followed SAP Note "1872170 - Suite on HANA memory sizing report" to complete this task. We are little surprised by the r

  • DS 5 SP1 multi-master replication

    I am running DS5 SP1 on Solaris 8 with the recommended patch set. I am using replica id 1 for master1 and replica id 2 for master2. I am replicating 7 nodes in a multi-master scenario. I start with about 1000 base entries in each db node, and add app