A colleague of mine was performing an upgrade of a four node Oracle RAC from 11.2.0.3 to 11.2.0.4 using DBUA silent mode. About halfway through the upgrade the following error was reported and DBUA failed:
Upgrading Oracle interMedia
UPGRADE_PROGRESS : 46%
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
I suspected that the solution was to increase the below parameters and restart the upgrade.
ALTER SYSTEM SET SGA_TARGET=2048M scope=spfile sid='*'; ALTER SYSTEM SET pga_aggregate_target=500M scope=spfile sid='*'; ALTER SYSTEM SET sga_max_size =2048M scope=spfile sid='*';
Also set cluster to false for the upgrade
alter system set cluster_database=true scope=spfile;
However, because this was a production system, I opened a severity one service request with our Oracle to get their opinion before we continued. Oracle agreed with the with the above. The steps we followed were:
01. Set Oracle home to 11.2.0.4
02. Copy initora file from 11.2.0.3 home to 11.2.0.4 home
(file contains 1 line pointing to spfile in asm)
03. Some DB processes were running on node 4. Killed
these via Unix kill commands
04. Startup no mount on node 4 via SQL (not srvctl)
05. Make above alters
06. Shutdown immediate
07. Startup no mount on node 4 via SQL (not srvctl)
08. Confirm above parameter changes were in place
09. Shutdown immediate
10. startup upgrade
11. Exit this session
12. cd to oracle home
13. Start a new session as sqlplus " / as sysdba "
14. spool /tmp/upgrade.log
15. set echo on
16. @$ORACLE_HOME/rdbms/admin/catupgrd.sql;
17. spool off
18. Shutdown immediate (seemed to have been issued
in the catupgrd.sql)
19. Check catupgrd.sql spool file for errors
20. Restart the database in normal mode
21. @$ORACLE_HOME/rdbms/admin/catuppst.sql;
22. @$ORACLE_HOME/rdbms/admin/utlrp.sql;
23. Execute dbupgdiag.sql
After the above is complete, upgrade the Oracle Clusterware Configuration
srvctl upgrade database -d-o
Our time zone was already current so we did not have to upgrade to the latest version.
After all of the above was complete, the database was ready to use. We had to complete some routine tasks such as turning of flash back, confirming that all scripts had been updated to use the new oracle home etc.