I do not know if this what you are encountering, but by the nature of the CURSOR_SHARING=SIMULAR several child parses are created based on the literal values. There are several metalink and blog messages out there about the treeing effect when using CURSOR_SHARING as SIMULAR. We are running 10.2.0.3 and we had to apply a couple of patches for SIMULAR and FORCED.
From what I understand – SIMULAR checks the literal values and see if the plan changes based on their values. If it does, then it stores the plan as a child plan and creates a small tree in the shared pool. If the statement is run enough the treeing effect can take up a large amount of memory. We actually saw this pattern as you are describing. I felt it was because of the traffic – test usually does not have the user load as a production database.
Looking for ideas/comments/suggestions..........
We changed cursor_sharing from EXACT to SIMILAR last Saturday morning at 6am.
Did that via an "ALTER SESSION SET....." command.
The environment is large (7TB) but not very busy on Saturday morning.
We had cursor_sharing=similar in multiple test environments, for many months without issue.
At 9:15am, we started to generated ora-04031 errors.
By 9:30am, we could no longer sign-on.
We ended up shutting down the middle-tier, and deleting all of the
OS processes on the DB server, that represented connections to the instance.
At that point, we were able to signon, backout the change, and startup the middle-tier again.
In the alert log, we saw the ora-04031 errors, and also many (thousands) of messages saying
"PMON failed to acquire latch, see PMON dump".
The PMON trace file show the same entry, repeated thousands of times:
"PMON unable to acquire latch 2c4cb108 library cache
possible holder pid = 1000 ospid=42586708"
Any ideas on what happened would be appreciated.