ORA-04031
Getting ORA-04031 on our 19.23 Linux database ( a non-Prod database)
Section 2 of 146599.1 says there can be 2 conditions true, which are "inadequate sizing" and the other "fragmentation"
For the sizing issue it says in Section 3 to check the Library Cache Hit Ratio
THIS is what a actual check on that database gives for the "library cache hit ratio" (this is the database spawning ORA-04031's) :
SYS> select sum(pins),sum(reloads),sum(reloads)/sum(pins)*100 from v$librarycache ;
SUM(PINS) SUM(RELOADS) SUM(RELOADS)/SUM(PINS)*100
46263466 437878 .946487667
SYS>
It literally says "if the ration is more than 1%", increase Shared Pool Size
Now, that isn't the case for me, but it's just below. But. if I do the same on my Production database - which is sized very differently - it says: 0.05%