php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4568 Too many open cursor when inserting large number of records
Submitted: 2000-05-24 02:52 UTC Modified: 2000-07-24 17:30 UTC
From: clau at hgc dot com dot hk Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.0 Release OS: NT 4.0 Server
Private report: No CVE-ID: None
 [2000-05-24 02:52 UTC] clau at hgc dot com dot hk
Environment:
Oracle 8i on NT 4.0 Server with 2GB RAM and 700G Harddisk
PHP 3.6 on NT 4.0 Server with 2GB RAM and 160G Harddisk

We open a connection to Oracle database either through ODBC and OCI interface, and tried to update 30,000 records:

Procedure like:
open database connection;
loop over the available records in text file,
insert each records into Oracle
close database connection after finish

However, after inserting 200-300 records, it result in error like too many cursor opened

Then we modify the procedure to:
loop over the text file;
open connection;
insert one record;
close connection;
loop until finish;

This time it is bettre without error. However, still the program can insert 2,000-3,000 records only and then stop.

Is this generic problem, or there is a missing document to overcome this?

Regards,

Chun Lau

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-24 03:19 UTC] hholzgra at cvs dot php dot net
did you release your insert statements
using OciFreeStatement() after OciExecute()ing them ?
 [2000-07-24 17:30 UTC] david@php.net
No response. Assuming hholzgra's suggestion worked. If you're still having trouble, try upgrading to PHP 4.0.1pl2, if that doesn't help then reopen this bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 00:01:31 2024 UTC