Friday, November 19, 2010

FSG Transfer Gives ORA-01000: Maximum Open Cursors Exceeded

Problem Description
-------------------
The FSG Transfer program is completing in error with the following message:

ORA-01000: Maximum Open Cursors Exceeded

Is there a script that can be run to determine how many open cursors
exist and what is causing the open cursors?

Solution Description
--------------------
In order to determine how many SQL statements have been parsed AND have an
open cursor use the following query:

SELECT s.osuser, s.username, s.sid, count(*)
FROM v$session s, v$open_cursor oc
WHERE s.saddr = oc.saddr AND
s.username IS NOT NULL
GROUP BY s.osuser, s.username, s.sid;

If there is one user with a large number of cursors open, the following query
can be used to determine the leading edge of the query in question:

SELECT s.username, SUBSTR(oc.sql_text,1,40)
FROM v$session s, v$open_cursor oc
WHERE s.saddr = oc.saddr AND
s.username = ;

If all of the sessions are connected with the same username, then change the
last line of the the above query to the following:

s.sid = ;


Search Words
------------
RGRXFR
ORA-00604
ORA-06512

No comments:

Post a Comment