User`s guide

Upgrading a Database
Creating and Upgrading a Database 4-9
4. Enter the following command to create an Oracle Database 11g Release 2
init.ora
and an Oracle Database 11g Release 2
ORAENV
file and save the original files under
the suffix
.OLD
.
/CALL-PROCEDURE $ORAC1120.INSTALL.P.DBA, (sid, jobclass, UPDATE=YES)
5. Modify the newly created files according to your special requirements (for
instance
PROCESSES
,
DB_CACHE_SIZE
, and so on) and set the parameters in the
INIT.ORA
file as recommended in the spoolfile. Ensure that the
COMPATIBLE
initialization parameter is properly set for Oracle Database 10g Release 2 (10.2 or
higher).
6. Set the Oracle environment variables using the
ORAENV
file:
/CALL-PROCEDURE
sid.p.oraenv
To avoid being prompted for many overflow acknowledgements on your screen,
set the overflow to No:
/tchng oflow=no
7. Start the instance in upgrade mode:
/START-PROGRAM $ORAC1120.sqlplus
* /nolog
SQL> connect / as sysdba
SQL> STARTUP UPGRADE
8. Start the upgrade script:
SQL> SPOOL upgrade.log;
SQL> @$ORAC1120.rdbms.admin.catupgrd.sql;
SQL> SPOOL off
9. Shut down and restart the instance to re-initialize the system parameters for
normal operation:
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
10. Run the postupgrade script
utlu112s.sql
to display the results of the upgrade
and run
catuppst.sql
to finish the upgrade. Finally run
utlrp.sql
to recompile
any remaining stored PL/SQL and Java code and verify that all expected packages
and classes are valid:
SQL> SPOOL postupgrade.log;
SQL> @$ORAC1120.rdbms.admin.UTLU112S.SQL;
SQL> SPOOL off
SQL> @$ORA11202.RDBMS.ADMIN.CATUPPST.SQL
SQL> @$ORAC1120.rdbms.admin.utlrp.sql;
SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID';
SQL> SELECT distinct object_name FROM dba_objects WHERE status='INVALID';
Now you should have an upgraded Oracle Database 11g Release 2 database. For
troubleshooting, refer to "Upgrading to the New Oracle Database 10g Release" in
Oracle Database Upgrade Guide.
4.2.3 Postupgrade Activities
This section describes the tasks you must complete after upgrading your database to
Oracle Database 11g Release 2.