This is my notes about the execersice of upgrading a 9.2 toy database to 10.2. The steps here follow the MetaLink Note:316889.1
Step 1:
~~~~~~~
Copy the following files from the 10gR2 ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home, such as the /tmp directory on your system:
ORACLE_HOME/rdbms/admin/utlu102i.sql
ORACLE_HOME/rdbms/admin/utltzuv2.sql
$ cp utlu102i.sql utltzuv2.sql /tmp
Step 2:
~~~~~~~
Login as sysdba, run and spool the utlu102i.sql file.
sys@TOY9I> spool database_info.log
sys@TOY9I> @utlu102i.sql
sys@TOY9I> spool off
---------------------------------
- Contents of database_info.log -
---------------------------------
sys@TOY9I> @utlu102i.sql
Oracle Database 10.2 Upgrade Information Utility 04-07-2007 12:34:59
.
**********************************************************************
Database:
**********************************************************************
--> name: TOY9I
--> version: 9.2.0.4.0
--> compatible: 9.2.0
--> blocksize: 8192
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 245 MB
WARNING: --> TEMP tablespace is not large enough for the upgrade.
.... currently allocated size: 20 MB
.... minimum required size: 58 MB
.... increase current size by: 38 MB
.... tablespace is NOT AUTOEXTEND ENABLED.
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: --> "shared_pool_size" needs to be increased to at least
197337907
WARNING: --> "java_pool_size" needs to be increased to at least 67108864
WARNING: --> "streams_pool_size" is not currently defined and needs a
value of at least 50331648
WARNING: --> "large_pool_size" needs to be increased to at least 8388608
WARNING: --> "session_max_open_files" needs to be increased to at least
20
**********************************************************************
Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or
spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or
installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database contains stale optimizer statistics.
.... Refer to the 10g Upgrade Guide for instructions to update
.... statistics prior to upgrading the database.
.... Component Schemas with stale statistics:
.... SYS
.
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 10.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
PL/SQL procedure successfully completed.
-------------------------------
- End of database_info.log -
-------------------------------
Action:
1. WARNING: --> TEMP tablespace is not large enough for the upgrade.
Increase temp tablespace to 60M
sys@TOY9I> select name, bytes/1024/1024 "Size(M)" from
v$tempfile;
NAME
Size(M)
--------------------------------------------------------------------------------
/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/temp01.dbf20
sys@TOY9I> alter database tempfile
'/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/temp01.dbf' resize
60M;
sys@TOY9I> select name, bytes/1024/1024 "Size(M)" from
v$tempfile;
NAME
Size(M)
--------------------------------------------------------------------------------
/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/temp01.dbf 60
2. Modify the following two parameter in the init.ora
WARNING: --> "shared_pool_size" needs to be increased to at least
197337907
WARNING: --> "session_max_open_files" needs to be increased to at
least 20
Step 3:
~~~~~~~
Check for the deprecated CONNECT Role
sys@TOY9I> SELECT grantee FROM dba_role_privs
WHERE granted_role = 'CONNECT' and
grantee NOT IN (
'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP',
'LOGSTDBY_ADMINISTRATOR', 'ORDSYS',
'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY',
'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS',
'WMSYS', 'OLAPDBA', 'OLAPSVR', 'OLAP_USER',
'OLAPSYS', 'EXFSYS', 'SYSMAN', 'MDDATA',
2 'SI_INFORMTN_SCHEMA', 'XDB', 'ODM'); 3 4 5
6 7 8 9 10
GRANTEE
------------------------------
SCOTT
In Oracle 10.2 the CONNECT role only includes CREATE SESSION privilege.
So after upgrade if we want SCOTT has other privileges, we must do the
grant as necessary
Step 4:
~~~~~~~
Create the script for dblink in case of downgrade of the database.
sys@TOY9I> SELECT
'create 'DECODE(U.NAME,'PUBLIC','public ')'database link 'CHR(10)
DECODE(U.NAME,'PUBLIC',Null, U.NAME'.') L.NAMEchr(10)
'connect to ' L.USERID ' identified by '''
L.PASSWORD''' using ''' L.host ''''
chr(10)';' TEXT
FROM sys.link$ L,
sys.user$ U
WHERE L.OWNER# = U.USER# ;
2 3 4 5 6 7 8 9
no rows selected
Step 5:
~~~~~~~
Check for the TIMESTAMP WITH TIMEZONE Datatype. This step is only required for the 10gR1
sys@TOY9I> spool timezone_info.log
sys@TOY9I> @utltzuv2.sql
DROP TABLE sys.sys_tzuv2_temptab
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
Query sys.sys_tzuv2_temptab Table to see if any TIMEZONE data is
affected by version 2 transition
rules
PL/SQL procedure successfully completed.
Commit complete.
sys@TOY9I> spool off;
Step 6:
~~~~~~~
about NLS_NCHAR_CHARACTERSET
sys@TOY9I> select distinct OWNER, TABLE_NAME from DBA_TAB_COLUMNS where
DATA_TYPE in ('NCHAR','NVARCHAR2', 'NCLOB') and OWNER not in
('SYS','SYSTEM');
2 3
no rows selected
if no rows select, go to next step
Step 7:
~~~~~~~
Statistics
==> Backup the existing statistics as follow
sys@TOY9I> spool sdict
sys@TOY9I> grant analyze any to sys;
Grant succeeded.
sys@TOY9I> exec dbms_stats.create_stat_table('SYS','dictstattab');
PL/SQL procedure successfully completed.
sys@TOY9I> exec
dbms_stats.export_schema_stats('DBSNMP','dictstattab',statown => 'SYS');
sys@TOY9I> exec
dbms_stats.export_schema_stats('OUTLN','dictstattab',statown => 'SYS');
sys@TOY9I> exec
dbms_stats.export_schema_stats('SCOTT','dictstattab',statown => 'SYS');
sys@TOY9I> exec
dbms_stats.export_schema_stats('SYSTEM','dictstattab',statown => 'SYS');
sys@TOY9I> exec
dbms_stats.export_schema_stats('SYS','dictstattab',statown => 'SYS');
Note:
This data is useful if you want to revert back the statistics. For example, the following PL/SQL subprograms import the statistics for the SYS schema after deleting the existing statistics:
exec dbms_stats.delete_schema_stats('SYS');
exec dbms_stats.import_schema_stats('SYS','dictstattab');
==> To gather statistics
exec dbms_stats.gather_schema_stats('SCOTT', options=>'GATHER', -
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO', -
cascade => TRUE)
/
exec dbms_stats.gather_schema_stats('OUTLN',options=>'GATHER', -
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE)
/
exec dbms_stats.gather_schema_stats('DBSNMP', -
options=>'GATHER', -
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO', -
cascade => TRUE)
/
exec dbms_stats.gather_schema_stats('SYSTEM', -
options=>'GATHER', -
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO', -
cascade => TRUE)
/
exec dbms_stats.gather_schema_stats('SYS', -
options=>'GATHER', -
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO', -
cascade => TRUE)
Step 8:
~~~~~~~
Check for invalid objects
Step 9:
~~~~~~~~
Check for corruption in the dictionary, use the following commands in sqlplus
connected as sys:
Set verify off
Set space 0
Set line 120
Set heading off
Set feedback off
Set pages 1000
Spool analyze.sql
Select 'Analyze cluster "'cluster_name'" validate structure
cascade;'
from dba_clusters
where owner='SYS'
union
Select 'Analyze table "'table_name'" validate structure cascade;'
from dba_tables
where owner='SYS' and partitioned='NO' and (iot_type='IOT' or iot_type
is NULL)
union
Select 'Analyze table "'table_name'" validate structure cascade
into invalid_rows;'
from dba_tables
where owner='SYS' and partitioned='YES';
spool off
This creates a script called analyze.sql.
Now execute the following steps.
$ sqlplus '/as sysdba'
SQL> @$ORACLE_HOME/rdbms/admin/utlvalid.sql
SQL> @analyze.sql
This script (analyze.sql) should not return any errors.
Step 10:
~~~~~~~~
Ensure that all Snapshot refreshes are successfully completed, and that replication is stopped.
$ sqlplus '/as sysdba'
SQL> select distinct(trunc(last_refresh)) from
dba_snapshot_refresh_times;
Step 11:
~~~~~~~~
Stop the listener for the database:
$ lsnrctl
LSNRCTL> stop
Ensure no files need media recovery:
$ sqlplus '/ as sysdba'
SQL> select * from v$recover_file;
This should return no rows.
Step 12:
~~~~~~~~
Ensure no files are in backup mode:
SQL> select * from v$backup where status!='NOT ACTIVE';
This should return no rows.
Step 13:
~~~~~~~~
Resolve any outstanding unresolved distributed transaction:
SQL> select * from dba_2pc_pending;
If this returns rows you should do the following:
SQL> select local_tran_id from dba_2pc_pending;
SQL> execute dbms_transaction.purge_lost_db_entry('');
SQL> commit;
Step 14:
~~~~~~~~
Disable all batch and cron jobs.
Step 15:
~~~~~~~~
Ensure the users sys and system have 'system' as their default tablespace.
sys@TOY9I> select username, default_tablespace from dba_users
where username in ('SYS','SYSTEM');
2
SYS SYSTEM
SYSTEM SYSTEM
Step 16:
~~~~~~~~
Optionally ensure the aud$ is in the system tablespace when auditing is enabled.
sys@TOY9I> select tablespace_name from dba_tables where
table_name='AUD$';
TABLESPACE_NAME
------------------------------
SYSTEM
Step 17:
~~~~~~~~
Note down where all control files are located.
sys@TOY9I> select name from v$controlfile;
NAME
------------------------------------------------------------------------
/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/control.001.dbf
/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/control.002.dbf
/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/control.003.dbf
Step 18:
~~~~~~~~
Shutdown the database
$ sqlplus '/as sysdba'
SQL> shutdown immediate;
Step 19: (skip)
~~~~~~~~
PERFORM a Full cold backup!!!!!!!
You can either do this by manually copying the files or
sign on to RMAN:
$rman "target / nocatalog"
And issue the following RMAN commands:
RUN
{
ALLOCATE CHANNEL chan_name TYPE DISK;
BACKUP DATABASE FORMAT
'/ora01/orabkup/GENQ/.temp_toy10g/ora01/orabkup/TOY9I/%U' TAG
before_upgrade;
backup current controlfile format
'/ora01/orabkup/GENQ/.temp_toy10g/ora01/orabkup/TOY9I/%U';
}
Upgrading to the New Oracle Database 10g Release 2
--------------------------------------------------
Step 20:
~~~~~~~~
Update the init.ora file:
- Make a backup of the init.ora file.
- Comment out obsoleted parameters(list in appendix A).
- Change all deprecated parameters(list in appendix B).
- Set the COMPATIBLE initialization parameter to an appropriate value.
If you are upgrading from 8.1.7.4 then set the COMPATIBLE parameter to 9.2.0
until after the
upgrade has been completed successfully. If you are upgrading from
9.2.0 or 10.1.0 then leave the COMPATIBLE parameter set to it's current value until
the upgrade has been completed successfully. This will avoid any unnecessary
ORA-942 errors from being reported in SMON trace files during the upgrade (because
the upgrade is looking for 10.2 objects that have not yet been created)
- If you have set the parameter NLS_LENGTH_SEMANTICS to CHAR, change the
value to BYTE during the upgrade.
- Verify that the parameter DB_DOMAIN is set properly.
- Make sure the PGA_AGGREGATE_TARGET initialization parameter is set to at least 24 MB.
- Ensure that the SHARED_POOL_SIZE and the LARGE_POOL_SIZE are at least 150Mb.
Please also the check the "KNOWN ISSUES" section
- Make sure the JAVA_POOL_SIZE initialization parameter is set to at least 150 MB.
- Ensure there is a value for DB_BLOCK_SIZE
- On Windows operating systems, change the BACKGROUND_DUMP_DEST and USER_DUMP_DEST initialization parameters that point to RDBMS80 or any other
environment variable to point to the following directories instead:
BACKGROUND_DUMP_DEST to ORACLE_BASE\oradata\DB_NAME
and
USER_DUMP_DEST to ORACLE_BASE\oradata\DB_NAME\archive
- Comment out any existing AQ_TM_PROCESSES parameter setting, and enter
a new one
that explicitly sets AQ_TM_PROCESSES=0 for the duration of the upgrade
- Make sure all path names in the parameter file are fully specified.
You should not
have relative path names in the parameter file.
- If you are using a cluster database, set the parameter
CLUSTER_DATABASE=FALSE
during the upgrade.
- If you are upgrading a cluster database, then modify the
initdb_name.ora
file in the same way that you modified the parameter file.
Step 21 :
~~~~~~~~~
Check for adequate freespace on archive log destination file systems.
Step 22 :
~~~~~~~~~
Ensure the NLS_LANG variable is set correctly:
$ env grep $NLS_LANG
sys@TOY9I> ho echo $NLS_LANG
american_america.we8dec
Note: what should we expect?
Step 23:
~~~~~~~~
If needed copy the SQL*Net files like (listener.ora,tnsnames.ora etc) to the new location (when no TNS_ADMIN env. Parameter is used)
$ cp $OLD_ORACLE_HOME/network/admin/*.ora /network/admin
Step 24: (ignore)
~~~~~~~~
If your Operating system is Windows NT, delete your services With the ORADIM of your old oracle version.
Step 25:
~~~~~~~~
copy spfile to new location
tx2qdfsdb1:TOY9I: /oracle/product/9.2.0/dbs > pwd
/oracle/product/9.2.0/dbs
tx2qdfsdb1:TOY9I: /oracle/product/9.2.0/dbs > cp spfileTOY9I.ora
/oracle/product/10.2.0/db_1/dbs/
tx2qdfsdb1:TOY9I: /oracle/product/9.2.0/dbs > ls
/oracle/product/10.2.0/db_1/dbs/
hc_BIODSQ.dat init.ora initdw.ora lkTOY10G
spfileBIODSQ.ora
hc_TOY10G.dat initBIODSQ.ora lkBIODSQ orapwBIODSQ
spfileTOY9I.ora
Step 26:
~~~~~~~~
Update the oratab entry, to set the new ORACLE_HOME and disable
automatic startup:
::N
Step 27:
~~~~~~~~
Update the environment variables like ORACLE_HOME and PATH
$. oraenv
Step 28:
~~~~~~~~
Make sure the following environment variables point to the new
Release directories:
- ORACLE_HOME
- ORACLE_BASE
- PATH
- ORA_NLS10
- LD_LIBRARY_PATH
- LD_LIBRARY_PATH_64 (Solaris only)
- LIBPATH (AIX only)
- SHLIB_PATH (HPUX only)
- ORACLE_PATH
tx2qdfsdb1:TOY9I: /oracle > env grep ORACLE
ORACLE_BASE=/oracle
ORACLE_SID=TOY9I
PS1=${SNAME}:${ORACLE_SID}: ${PWD} >
ORACLE_TERM=vt100
ORACLE_HOME=/oracle/product/10.2.0/db_1
tx2qdfsdb1:TOY9I: /oracle > env grep PATH
MANPATH=/usr/share/man:/opt/ssh2/man
SHLIB_PATH=/oracle/product/10.2.0/db_1/lib:/usr/lib
SQLPATH=/oracle/product/8.1.7.4/sqlplus/admin
PATH=/bin:/oracle/dba/local:/usr/local/bin:/usr/bin:/usr/ccs/bin:/usr/uc
b:/etc:/usr/sbin:/sbin:/usr/dt/bin:/usr/lpp/X11/bin:/opt/bin:/usr/lbin:/
usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin:/opt/STSssh/bin:/oracle/dba/
standard:/oracle/dba/standard/rman:/opt/pb/bin:/opt/UDSssh/bin:/banktool
s:/banktools/local/bin:/opt/SDSssh/bin/scp:/oracle/dba/foglight/script:/
usr/openv/netbackup/bin:/opt/VRTSvmsa/bin/vmsa:/banktools/pbrun/3.2/bin:
/oracle/product/10.2.0/db_1/bin:/oracle/product/10.2.0/db_1/oracm/bin:/o
racle/product/10.2.0/db_1/OPatch:.
CLASSPATH=/oracle/product/10.2.0/db_1/jdbc/lib/classes111.zip:/oracle/pr
oduct/10.2.0/db_1/ord/jlib:/oracle/product/10.2.0/db_1/JRE:/oracle/produ
ct/10.2.0/db_1/jlib:/oracle/product/10.2.0/db_1/rdbms/jlib:/oracle/produ
ct/10.2.0/db_1/network/jlib:
LIBPATH=/oracle/product/10.2.0/db_1/lib32:/oracle/product/10.2.0/db_1/li
b:/oracle/product/10.2.0/db_1/db_1/lib:/oracle/product/10.2.0/db_1/jdbc/
lib:/usr/lib:/usr/ccs/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/usr/ucblib
:/usr/dt/lib:/oracle/product/10.2.0/db_1/oracm/lib:
LD_RUN_PATH=/opt/SUNWspro/lib
LD_LIBRARY_PATH=/oracle/product/10.2.0/db_1/lib32:/oracle/product/10.2.0
/db_1/lib:/oracle/product/10.2.0/db_1/db_1/lib:/oracle/product/10.2.0/db
_1/jdbc/lib:/usr/lib:/usr/ccs/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/us
r/ucblib:/usr/dt/lib:/oracle/product/10.2.0/db_1/oracm/lib:
tx2qdfsdb1:TOY9I: /oracle > env grep ORA_NLS10
ORA_NLS10=/oracle/product/10.2.0/db_1/nls/data
$ env grep LD_LIBRARY_PATH
$ env grep ORACLE_PATH
(no ORACLE_PATH, what is this for)
Note that the ORA_NLS10 environment variable replaces the ORA_NLS33
environment
variable, so you may need to unset ORA_NLS33 and set ORA_NLS10.
Step 29:
~~~~~~~~
Startup upgrade the database:
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus / as sysdba
Use Startup with the UPGRADE option:
SQL> startup upgrade
idle> startup upgrade
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 2031648 bytes
Variable Size 520101856 bytes
Database Buffers 33554432 bytes
Redo Buffers 6348800 bytes
Database mounted.
Database opened.
Step 30:
~~~~~~~~
Create a SYSAUX tablespace. In Oracle Database 10g, the SYSAUX tablespace is used to consolidate data from a number of tablespaces that were separate in previous releases.
The SYSAUX tablespace must be created with the following mandatory attributes:
- ONLINE
- PERMANENT
- READ WRITE
- EXTENT MANAGEMENT LOCAL
- SEGMENT SPACE MANAGEMENT AUTO
The Upgrade Information Tool(utlu102i.sql in step 4) provides an estimate of the minimum required size for the SYSAUX tablespace in the SYSAUX Tablespace section.
The following SQL statement would create a 500 MB SYSAUX tablespace for the database:
CREATE TABLESPACE sysaux DATAFILE
'/ora01/orabkup/GENQ/.temp_toy10g/ora01/oradata/TOY9I/sysaux01.dbf'
SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
Step 31:
~~~~~~~~
If table XDB.MIGR9202STATUS exists in the database, drop it before upgrading
the database (to avoid the issue described in )
Step 32:
~~~~~~~~
Spool the output so you can take a look at possible errors after the
upgrade:
idle> spool /tmp/upgrade.log
idle> @catupgrd.sql
Turn off the spooling of script results to the log file:
SQL> SPOOL OFF
Then, check the spool file and verify that the packages and procedures
compiled successfully. You named the spool file earlier in this step; the suggested name was upgrade.log. Correct any problems you find in this file and rerun the appropriate upgrade script if necessary. You can rerun any of the scripts described in this note as many times as necessary.
-------------------------------------
- last portion of the upgrade.log -
-------------------------------------
Oracle Database 10.2 Upgrade Status Utility 04-07-2007
21:17:46
.
Component Status Version
HH:MM:SS
Oracle Database Server VALID 10.2.0.3.0
00:42:06
.
Total Upgrade Time: 00:43:27
PL/SQL procedure successfully completed.
idle>
idle> SET SERVEROUTPUT OFF
idle> SET VERIFY ON
idle>
idle> DOC
DOC>####################################################################
###
DOC>####################################################################
###
DOC>
DOC> The above PL/SQL lists the SERVER components in the upgraded
DOC> database, along with their current version and status.
DOC>
DOC> Please review the status and version columns and look for
DOC> any errors in the spool log file. If there are errors in the
spool
DOC> file, or any components are not VALID or not the current version,
DOC> consult the Oracle Database Upgrade Guide for troubleshooting
DOC> recommendations.
DOC>
DOC> Next shutdown immediate, restart for normal operation, and then
DOC> run utlrp.sql to recompile any invalid application objects.
DOC>
DOC>####################################################################
###
DOC>####################################################################
###
Step 33:
~~~~~~~~
Run utlu102s.sql, specifying the TEXT option:
SQL> @utlu102s.sql TEXT
This is the Post-upgrade Status Tool displays the status of the database
components in the upgraded database.
Step 34:
~~~~~~~~
Restart the database:
SQL> shutdown immediate (DO NOT USE SHUTDOWN ABORT!!!!!!!!!)
SQL> startup restrict
Executing this clean shutdown flushes all caches, clears buffers and performs
other database housekeeping tasks. Which is needed if you want to upgrade
specific components.
Step 35: (skip)
~~~~~~~~
Run olstrig.sql to re-create DML triggers on tables with Oracle Label
Security policies.
This step is only necessary if Oracle Label Security is in your database.
(Check from Step 33).
SQL> @olstrig.sql
Step 36:
~~~~~~~~
Run utlrp.sql to recompile any remaining stored PL/SQL and Java code.
SQL> @utlrp.sql
Verify that all expected packages and classes are valid:
After Upgrading a Database
--------------------------
Step 37:
~~~~~~~~
Shutdown the database and startup the database.
$ sqlplus '/as sysdba'
SQL> shutdown
SQL> startup restrict
Step 38:
~~~~~~~~
Complete the Step 38 only if you upgraded your database from release 8.1.7
Otherwise skip to Step 40.
Step 39: (skipped)
~~~~~~~~
Step 40:
~~~~~~~~
Now edit the init.ora:
- If you change the value for NLS_LENGTH_SEMANTICS prior to the upgrade
put the value back to CHAR.
- If you changed the CLUSTER_DATABASE parameter prior the upgrade set it
back to TRUE
Step 41:
~~~~~~~~
Startup the database:
SQL> startup
Create a server parameter file with a initialization parameter file
SQL> create spfile from pfile;
This will create a spfile as a copy of the init.ora file located in the
$ORACLE_HOME/dbs directory.
Step 42:
~~~~~~~~
Modify the listener.ora file:
For the upgraded intstance(s) modify the ORACLE_HOME parameter
to point to the new ORACLE_HOME.
Step 43:
~~~~~~~~
Start the listener
$ lsnrctl
LSNRCTL> start
Step 44:
~~~~~~~~
Enable cron and batch jobs
Step 45:
~~~~~~~~
Change oratab entry to use automatic startup
SID:ORACLE_HOME:Y
Step 46:
~~~~~~~~
Upgrade the Oracle Cluster Registry (OCR) Configuration
If you are using Oracle Cluster Services, then you must upgrade the
Oracle Cluster Registry (OCR)keys for the database.
* Use srvconfig from the 10g ORACLE_HOME. For example:
% srvconfig -upgrade -dbname db_name -orahome pre-10g_Oracle_home