Applies to

:
Oracle Server - Enterprise Edition - Version: 8.1.7.4 to 10.2.0 Information in this document applies to any platform.

Purpose
This document is created for use as a guideline and checklist when manually upgrading Oracle 8i, Oracle 9i or Oracle 10gR1 to Oracle 10gR2. This document is divided into three major sections. -- Preparing to Upgrade -- Upgrading to the New Oracle Database 10g Release 2 -- After Upgrading a Database Please read the whole article before starting to perform an upgrade

Scope and Application
Database administrators

Complete checklist for manual upgrades to 10gR2
Prerequisites
• • • • •

Install Oracle 10g Release 2 in a new Oracle Home. Install JAccelerator (NCOMP) into the home from the Companion media. Install the latest available patchset from Metalink. Install the latest available Critical Patch Update. Note 290738.1 Oracle Critical Patch Update Program General FAQ If you are upgrading to 10.2.0.3, review the following alerts before performing the upgrade and apply any required patches: Note 412271.1 "ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While Upgrading or Patching Databases to 10.2.0.3" Note 406472.1 "Mandatory Patch 5752399 for 10.2.0.3 on Solaris 64-bit and Filesystems Managed By Veritas or Solstice Disk Suite software"

If you are upgrading to any 10.2.0.x version, review the following alert before performing the upgrade and apply any required patch: Note 471479.1 "IOT Corruptions After Upgrade from COMPATIBLE <= 9.2 to COMPATIBLE >= 10.1"

Either take a cold or hot backup for your database.

Make sure to take a backup of Oracle Home and Central Inventory. Central inventory can be located by the contents of oraInst.loc files. "oraInst.loc" is available in the following locations on various platforms: /var/opt/oracle/oraInst.loc -- Solaris /etc/oraInst.loc -- other operating systems HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\inst_loc -- On windows Platform.

• •

Verify kernel parameters are set according to the 10gR2 Installation Guide. Verify that all O/S packages and patches are installed as per the Installation Guide. Compatibility Matrix Minimum Version of the database that can be directly upgraded to Oracle 10g Release 2 8.1.7.4 -> 10.2.X.X.X 9.0.1.4 or 9.0.1.5 -> 10.2.X.X.X 9.2.0.4 or higher -> 10.2.X.X.X 10.1.0.2 or higher -> 10.2.X.X.X The following database version will require an indirect upgrade path. 7.3.3 (or lower) -> 7.3.4 -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X 7.3.4 -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X 8.0.n -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X 8.1.n -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X

Steps for Upgrading the Database to 10g Release 2 Preparing to Upgrade
In this section all the steps need to be performed to the previous version of Oracle. Please note that the database must be running in normal mode in the old release. Step 1: Log in to the system as the owner of the new 10gR2 ORACLE_HOME and 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 Make a note of the new location of these files.

NOTE: If you are upgrading from 8. Any redo log files less than 4 MB must be dropped before the database is upgraded.1.sql file.4.sql SQL> spool off Then. group number. If the tablespace does not have enough free space. release number. the tablespace name and minimum required size is displayed. a message is displayed if the tablespace is adequate for the upgrade. Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Update Parameters: This section displays a list of initialization parameters in the parameter file of the . Logfiles: This section displays a list of redo log files in the current database whose size is less than 4 MB. and recommended size is displayed.sql script will fail with an ORA-1403 error. the utlu102i. For each tablespace. Database: This section displays global database information about the current database such as the database name. then space must be added to the tablespace in the current database.7. describe the output of the Upgrade Information Tool (utlu102i.8 to enable utlu102i. check the spool file and examine the output of the upgrade information tool. A warning is displayed if the COMPATIBLE initialization parameter needs to be adjusted before the database is upgraded. Please follow the workaround in Note 5640527. and compatibility level. the file name. For each log file. In addition. sqlplus '/as sysdba' SQL> spool Database_Info.sql to run. New files of at least 4 MB (preferably 10 MB) need to be created in the current database. Then run and spool the utlu102i.sql).Step 2: Change to the temporary directory that you copied files to in Step 1. Tablespace adjustments need to be made before the database is upgraded.log SQL> @utlu102i. The sections which follow. Tablespaces: This section displays a list of tablespaces in the current database.

Obsolete Parameters: This section displays a list of initialization parameters in the parameter file of the current database that are obsolete in the new Oracle Database 10g release. 'SYSTEM'. Step 3: Check for the deprecated CONNECT Role After upgrading to 10gR2. SYSAUX Tablespace: This section displays the minimum required size for the SYSAUX tablespace. the other privileges granted to the CONNECT role in earlier releases will be revoked during the upgrade. 'DBSNMP'. To identify which users and roles in your database are granted the CONNECT role. Deprecated Parameters: This section displays a list of initialization parameters in the parameter file of the current database that are deprecated in the new Oracle Database 10g release. The adjustments need to be made to the parameter file after it is copied to the new Oracle Database 10g release. use the following query: SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS'. The SYSAUX tablespace must be created after the new Oracle Database 10g release is started and BEFORE the upgrade scripts are invoked. 'OUTLN'. . which is required in Oracle Database 10g. Miscellaneous Warnings: This section provides warnings about specific situations that may require attention before and/or after the upgrade. the CONNECT role will only have the CREATE SESSION privilege.current database that must be adjusted before the database is upgraded. Components: This section displays a list of database components in the new Oracle Database 10g release that will be upgraded or installed when the current database is upgraded. 'CTXSYS'. Obsolete initialization parameters need to be removed from the parameter file before the database is upgraded.

'DMSYS'.Null. SELECT 'create '||DECODE(U. 'EXFSYS'.2 the CONNECT role only includes CREATE SESSION privilege.LINK$ table. 'LBACSYS'. so that you can recreate the database links after the downgrade.1. Consequently. 'ORDPLUGINS'. all of the database links with encrypted passwords must be dropped prior to the downgrade.--------------------------CONNECT CREATE VIEW CONNECT CREATE TABLE CONNECT ALTER SESSION CONNECT CREATE CLUSTER CONNECT CREATE SESSION CONNECT CREATE SYNONYM CONNECT CREATE SEQUENCE CONNECT CREATE DATABASE LINK In Oracle 10. 'XDB'. U.x CONNECT role includes the following privileges: SELECT GRANTEE. then save the information about affected database links from the SYS. 'ORDSYS'. 'ODM'). During the upgrade to 10gR2.PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE='CONNECT' GRANTEE PRIVILEGE -----------------------------. 'WKPROXY'. To downgrade back to the original release.'PUBLIC'. If users or roles require privileges other than CREATE SESSION.2. If you anticipate a requirement to be able to downgrade back to your original release. 'WK_TEST'.USERID || ' identified by ''' ||L. 'OLAP_USER'.host || '''' .')|| L. 'WKSYS'.NAME. then grant the specific required privileges prior to upgrading. 'OLAPSYS'.NAME. 'MDSYS'. The upgrade scripts adjust the privileges for the Oracle-supplied users. 'SI_INFORMTN_SCHEMA'.'LOGSTDBY_ADMINISTRATOR'.NAME||chr(10) ||'connect to ' || L. 'MDDATA'. In Oracle 9. the database links will not exist in the downgraded database.'PUBLIC'.x and 10.'public ')||'database link '||CHR(10) ||DECODE(U.NAME||'. 'WKUSER'. 'OLAPDBA'. Following script can be used to construct the dblink. 'WMSYS'.PASSWORD||''' using ''' || L. 'OLAPSVR'. 'SYSMAN'. Step 4: Create the script for dblink incase of downgrade of the database. any passwords in database links will be encrypted. 'OEM_MONITOR'.

and recreate the TIMESTAMP data from these tables after the upgrade. to_char(y. create tables with the time zone information in character format (for example.SSXFF TZR'). . you can create a table tztab_back. y varchar2(256)). y timestamp with time zone).SSXFF TZR') from tztab. Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. if users enter TIMESTAMP '2003-02-17 09:00:00 America/Sao_Paulo'.log SQL> @utltzuv2. 'YYYY-MM-DD HH24. when users retrieve the data. 'YYYY-MM-DD HH24. $ sqlplus '/as sysdba' SQL> spool TimeZone_Info.USER# .MI.' TEXT FROM sys.||chr(10)||'.user$ U WHERE L. they will get '2003-02-17 08:00:00 America/Sao_Paulo'. Please this step is only required for the 10gR1 The may affect existing data of TIMESTAMP WITH TIME ZONE datatype. then use the solution to solve this problem. For example. Then run and spool the utltzuv2. insert into tztab_back select x. timestamp ''). create table tztab_back(x number primary key. insert into tztab values(1. Now the transition rules are modified and the offset for this particular time is changed to '-03:00'.link$ L. note column y here is defined as VARCHAR2 to preserve the original value. Before upgrade.sql SQL> spool off If the utltzuv2. There is one hour difference compared to the original value.sql file. TO_CHAR(column. sys. user scott has a table tztab: create table tztab(x number primary key. So '2003-02-17 11:00:00' along with the time zone id for 'America/Sao_Paulo' is stored because the offset for this particular time is '-02:00'.OWNER# = U. For example.MI. Change to the temporary directory that you copied files to in Step 1. we convert the data to UTC based on the transition rules in the time zone file and store them on the disk. Step 5: Check for the TIMESTAMP WITH TIMEZONE Datatype.sql script identifies columns with time zone data affected by a database upgrade.

'YYYY-MM-DD HH24.N-type data (= data in columns using NCHAR.y = (select to_timestamp_tz(t1.SSXFF TZR') from tztab_back t1 where t. JA16EUCFIXED . The change itself is done in step 38 by running the upgrade script.After upgrade. Step 6: Starting in Oracle 9i the National Characterset (NLS_NCHAR_CHARACTERSET) will be limited to UTF8 and AL16UTF16. If you have N-type columns for user data then run the following query: SQL> select * from nls_database_parameters where parameter ='NLS_NCHAR_CHARACTERSET'.'NVARCHAR2'.'SYSTEM'. If you are using N-type columns AND your National Characterset is UTF8 or is in the following list: JA16SJISFIXED . ZHT32TRISFIXED KO16KSC5601FIXED . 'NCLOB') and OWNER not in ('SYS'.x=t1. JA16DBCSFIXED . ZHS16CGB231280FIXED ZHS16GBKFIXED . NVARCHAR2 orNCLOB ) may need to be converted. When upgrading to 10g the value of NLS_NCHAR_CHARACTERSET is based on value currently used in the Oracle8 version.x).'XDB').MI. In all other cases the NLS_NCHAR_CHARACTERSET is changed to AL16UTF16 and -if used. you need update the data in the table tztab using the value in tztab_back. TABLE_NAME from DBA_TAB_COLUMNS where DATA_TYPE in ('NCHAR'. If the NLS_NCHAR_CHARACTERSET is UTF8 then new it will stay UTF8. ZHS16DBCSFIXED . For more details refer to The National Character Set in Oracle 9i and 10g Any other NLS_NCHAR_CHARACTERSET will no longer be supported. US16TSTFIXED . If no rows are returned it should mean that the database is not using N-type columns for user data. KO16DBCSFIXED . so simply go to the next step. . To check whether there are any N-type objects in a database.y. update tztab t set t. ZHT16DBCSFIXED . run the following query: select distinct OWNER.

WE8ISO8859P1. The conversion of the user data itself will then be done in step 37 If you are using N-type columns AND your National Characterset is NOT UTF8 or NOT in the following list: JA16SJISFIXED . ZHT32TRISFIXED KO16KSC5601FIXED . JA16DBCSFIXED . CL8MSWIN1251 ... not the NLS_NCHAR_CHARACTERSET Step 7: When upgrading to Oracle Database 10g. US16TSTFIXED . ZHS16DBCSFIXED .) then you have to: • change the tables to use CHAR. VARCHAR2 or CLOB instead the N-type or use export/import the table(s) containing N-type column and truncate those tables before migrating to 9i. KO16DBCSFIXED . JA16EUCFIXED . ZHS16CGB231280FIXED ZHS16GBKFIXED . but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade. As of Oracle Database 10g Release 10. You can enter the following: $ sqlplus '/as sysdba' SQL> EXEC DBMS_STATS. The recommended NLS_LANG during export is simply the NLS_CHARACTERSET. To decrease the amount of downtime incurred when collecting statistics.GATHER_DICTIONARY_STATS procedure to gather these statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables. you can collect statistics prior to performing the actual database upgrade.GATHER_DICTIONARY_STATS.ZHT16BIG5FIXED ZHT32EUCFIXED then also simply go to point next step. Oracle recommends that you use the DBMS_STATS. optimizer statistics are collected for dictionary tables that lack statistics. ZHT16DBCSFIXED . ZHT16BIG5FIXED ZHT32EUCFIXED (your current NLS_NCHAR_CHARACTERSET is for example US7ASCII. • .1.

statown => 'SYS'). SQL>exec dbms_stats.delete_schema_stats('SYS').export_schema_stats('DMSYS'. then you should use the DBMS_STATS. SQL>exec dbms_stats.statown => 'SYS').'dictstattab'. SQL>exec dbms_stats.export_schema_stats('WMSYS'.export_schema_stats('ORDPLUGINS'.'dictstattab'.statown => 'SYS').statown => 'SYS').export_schema_stats('OUTLN'. SQL>exec dbms_stats. SQL>exec dbms_stats.stat own => 'SYS'). SQL>exec dbms_stats.'dictstattab'. exec dbms_stats.statown => 'SYS').'dictstattab'.import_schema_stats('SYS'.statown => 'SYS').statown => 'SYS').statown => 'SYS').export_schema_stats('ORDSYS'.'dictstattab'.0. SQL>exec dbms_stats.'dictstattab'.statown => 'SYS').statown => 'SYS').'dictstattab'. SQL>exec dbms_stats. the following PL/SQL subprograms import the statistics for the SYS schema after deleting the existing statistics: exec dbms_stats.2. SQL>exec dbms_stats.export_schema_stats('OLAPSYS'. SQL>exec dbms_stats.'dictstattab'.'dictstattab'.statown => 'SYS'). Backup the existing statistics as follows: $ sqlplus '/as sysdba' SQL>spool sdict SQL>grant analyze any to sys.1 or 9.export_schema_stats('SI_INFORMTN_SCHEMA'.statown => 'SYS').export_schema_stats('ODM'. .'dictstattab'.export_schema_stats('XDB'.export_schema_stats('CTXSYS'.export_schema_stats('WKSYS'. SQL>exec dbms_stats.'dictstattab'.statown => 'SYS').'dictstattab').'dictstatt ab'.'dictstattab'. SQL>exec dbms_stats. SQL>spool off This data is useful if you want to revert back the statistics For example.GATHER_SCHEMA_STATS procedure to gather statistics.statown => 'SYS').export_schema_stats('LBACSYS'.statown => 'SYS').'dictstatta ').'dictstattab'.0 release.export_schema_stats('DBSNMP'.export_schema_stats('SYS'. SQL>exec dbms_stats.In Case of the 9.export_schema_stats('MDSYS'. SQL>exec dbms_stats.create_stat_table('SYS'.export_schema_stats('SYSTEM'.'dictstattab'. SQL>exec dbms_stats. SQL>exec dbms_stats.'dictstattab'. SQL>exec dbms_stats.

options=>'GATHER'. cascade => TRUE).TRUE).AUTO_SAMPLE_SIZE. cascade => TRUE).options=>'GATHER'. SQL>exec dbms_stats.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. SQL>exec dbms_stats. cascade => TRUE). cascade => TRUE). cascade => TRUE). estimate_percent => DBMS_STATS. SQL>exec dbms_stats.gather_sche a_stats('CTXSYS'. . .method_opt&nbs . cascade => TRUE).options=>'GATHER'. .To gather statistics run this script.gather_schema_stats('ODM'. estimate_percent => DBMS_STATS.method_opt => 'FOR ALL COLUMNS SIZE AUTO'.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. SQL>exe dbms_stats.gather_schema_stats('OLAPSYS'. $ sqlplus '/as sysdba' SQL>spool gdi t SQL>grant analyze any to sys. .method_opt => 'FOR&nbs . -&n sp. SQL>exec dbms_stats.options=>'GATHER'.gather_schema_stats('LBACSYS'. estimate_percent => DBMS_STATS. cascade => TRUE).options=>'GATHER'. estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE. cascade => TRUE).gather_schema_stats('OUTLN'.=> 'FOR ALL COLUMNS SIZE AUTO'.options=>'GATHER'. . estimate_percent => DBMS_STATS.options=>' GATHER'.AUTO_SAMPLE_SIZE.AUTO_SAMPLE_SIZE. SQL>exec dbms_stats. SQL>exec dbms_stats.AUTO_SAMPLE_SIZE.gather_schema_stats(' DSYS'.AUTO_SAMPLE_SIZE. . .gather_schema_stats('DBSNMP'. estimate_percent => DBMS_STATS. cascade&nb p. .method_opt =>&nbs .gather_schema_stats('DMSYS'.method_opt => 'FOR ALL COLUMNS SIZE AUTO'.'FOR ALL COLUMNS SIZE AUTO'.options=>'GATHER'.options=>'GATHER'. cascade =>&n sp.AUTO_SAMPLE_SIZE. . estimate_percent => DBMS_STATS.gather_schema_stats('WKSYS'. estimate_percent => DBMS_STATS. SQL>exec dbms_stats. cascade => TRUE). SQL>exec dbms_stats. estimate_percent => DBMS_STATS.method opt => 'FOR ALL COLUMNS SIZE AUTO'.AUTO_SAMPLE_SIZE.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. connect to the database AS SYSDBA using SQL*Plus.gather_schema_stats('SYSTEM'.gather_schema_stats('SYS'. . cascade => TRUE).method_opt => 'FOR ALL COLUMNS SIZE AUTO'.method_opt => 'FOR ALL COLUMNS SIZE AUTO'.method_opt => 'FOR ALL COLUMNS SIZE AUTO'.AUTO_SAMPLE_SIZE. ather_schema_stats('XDB'.AUTO_SAMPLE_SIZE. .options=>'GATHER'.SQL>exec dbms_stats.ALL COLUMNS SIZE AUTO'. SQL>exec dbms_stats.AUTO_SAMPLE_ IZE.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. estimate_percent => DBMS_STATS. estimate_percent => DBMS_STATS.options=>'GATHER'.gather_schema_stats('ORDSYS'.options=>'GATHER'. SQL>exec dbms_stats. estimate_percent => DBMS_STATS. estimate_percent => D MS_STATS.AUTO_SAMPLE_SIZE. UTO_SAMPLE_SIZE. SQL>exec dbms_stats.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. cascade => TRUE). ca cade => TRUE).gather_schema_stats('ORDPLUGINS'.=> TRUE). SQL>exec dbm _stats. .options=>'GATHER'.gather_schema_stats('WMSYS'. SQL>exec dbms_stats. SQL>exec dbms_stats. .opt ons=>'GATHER'.options=>'GATHER'. . .AUTO_SAMPLE_SIZE.options=>'GATHER'.method_opt => 'FOR ALL COLUMNS SIZE AUTO'. estimate_percent => DBMS_STATS.gather_schema_stats('SI_INFORMTN_SCHEMA'. cascade => TRUE).AUTO_SAMPLE_SIZE. estimate_percent => DBMS_STATS.

spool invalid_pre. spool off Run the following script and then requery invalid objects: This script must be run as a user with SYSDBA privs using SQL*Plus: $ cd $ORACLE_HOME/rdbms/admin $ sqlplus '/as sysdba' SQL> @utlrp. substr(object_name. . status from dba_objects where status <>'VALID'.sql This last query will return a list of all objects that cannot be recompiled before the upgrade in the file 'invalid_pre. 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.1.' from dba_clusters where owner='SYS' union Select 'Analyze table "'||table_name||'" validate structure cascade.lst' Step 9: Check for corruption in the dictionary. substr(object_type.lst select substr(owner.AUTO_SAMPLE_SIZE.30) type. cascade => TRUE).estimate_percent => DBMS_STATS.' 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 .30) object. SQL>spool off Step 8: Check for invalid objects invalid objects.method_opt => 'FOR ALL COLUMNS SIZE AUTO'.sql Select 'Analyze cluster "'||cluster_name||'" validate structure cascade .12) owner.1.1.

sql SQL> @analyze.invalid_rows. $ sqlplus '/as sysdba' SQL> @$ORACLE_HOME/rdbms/admin/utlvalid. This should return no rows.sql This script (analyze. Step 13: . $ sqlplus '/ as sysdba' SQL> select distinct(trunc(last_refresh)) from dba_snapshot_refresh_times. Now execute the following steps. and that replication is stopped. 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.sql.' from dba_tables where owner='SYS' and partitioned='YES'. This should return no rows. spool off This creates a script called analyze. Step 10: Ensure that all Snapshot refreshes are successfully completed.sql) should not return any errors. Step 12: Ensure no files are in backup mode: SQL> select * from v$backup where status!='NOT ACTIVE'.

Step 14: Disable all batch and cron jobs. SQL> alter user system default tablespace SYSTEM. default_tablespace from dba_users where username in ('SYS'. SQL> select tablespace_name from dba_tables where table_name='AUD$'.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> select * from v$controlfile. SQL> select username. Step 18: Shutdown the database $ sqlplus '/as sysdba' SQL> shutdown immediate. Step 15: Ensure the users sys and system have 'system' as their default tablespace.purge_lost_db_entry(''). Step 19: . Step 17: Note down where all control files are located. To modify use: SQL> alter user sys default tablespace SYSTEM. Step 16: Ensure that the aud$ is in the system tablespace when auditing is enabled. SQL> execute dbms_transaction.'SYSTEM'). SQL> commit.

If you are upgrading from 9.0 until after the upgrade has been completed successfully.MIGR9202STATUS exists in the database.2 objects that have not yet been created) .7.Change all deprecated parameters(list in appendix B).1.0 or 10.4 then set the COMPATIBLE parameter to 9. BACKUP DATABASE FORMAT 'some_backup_directory%U' TAG before_upgrade. This will avoid any unnecessary ORA942 errors from being reported in SMON trace files during the upgrade (because the upgrade is looking for 10. . .1) Step 20: Perform a full cold backup (or an online backup using RMAN) 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.1. drop it before upgrading the database (to avoid the issue described in Note 356082.2.2. If you are upgrading from 8.0 then leave the COMPATIBLE parameter set to it's current value until the upgrade has been completed successfully. } Upgrading to the New Oracle Database 10g Release 2 Step 21: Update the init.ora file: .Comment out obsoleted parameters(list in appendix A).ora file.Make a backup of the init.Set the COMPATIBLE initialization parameter to an appropriate value. . BACKUP CURRENT CONTROLFILE TO 'save_controlfile_location'.If table XDB.

. . You should not have relative path names in the parameter file. .On Windows operating systems. .Comment out any existing AQ_TM_PROCESSES parameter setting.Verify that the parameter DB_DOMAIN is set properly. .Set the parameter UNDO_MANAGEMENT=AUTO . 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. set the parameter CLUSTER_DATABASE=FALSE during the upgrade. . then modify the initdb_name. Please also the check the "KNOWN ISSUES" section .Make sure the JAVA_POOL_SIZE initialization parameter is set to at least 150 MB. change the value to BYTE during the upgrade (to avoid the issue described in Note 4638550.8) .If you are using a cluster database.If you have set the parameter NLS_LENGTH_SEMANTICS to CHAR.If you are upgrading a cluster database.Ensure there is a value for DB_BLOCK_SIZE . 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 .ora file in the same way that you modified the parameter file.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..

For example. Stop the OracleServiceSID Oracle service of the database you are upgrading. XP or 2003) delete your services With the ORADIM of your old oracle version.ora. where SID is the instance name. Parameter is used) $ cp $OLD_ORACLE_HOME/network/admin/*. if your SID is ORCL.0 this is: C:\ORADIM80 -DELETE -SID For Oracle 8i or higher this is: C:\ORADIM -DELETE -SID Also create the new Oracle Database 10gR2 service at a command prompt using the ORADIM command of the new Oracle Database release: C:\> ORADIM -NEW -SID SID -INTPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA Step 26: Copy configuration files from the ORACLE_HOME of the database being upgraded to the new Oracle Database 10g ORACLE_HOME: . then enter the following at a command prompt: C:\> NET STOP OracleServiceORCL For Oracle 8.tnsnames.Step 22 : Check for adequate freespace on archive log destination file systems. Step 23 : Ensure the NLS_LANG variable is set correctly: $ env | grep $NLS_LANG Step 24: If needed copy the SQL*Net files like (listener.ora /network/admin Step 25: If your Operating system is Windows (NT.ora etc) to the new location (when no TNS_ADMIN env. 2000.

On Windows operating systems. The parameter file can reside anywhere you wish. If you have a password file that resides within the old environments ORACLE_HOME. to set the new ORACLE_HOME and disable automatic startup: ::N Step 28: Update the environment variables like ORACLE_HOME and PATH . then copy it to the new ORACLE_HOME.ora file to the new ORACLE_HOME. then copy the file specified by the IFILE or SPFILE entry to the new ORACLE_HOME. In both cases. On UNIX platforms. the default password file is ORACLE_HOME/dbs/orapwsid. and the file specified in the IFILE or SPFILE entry resides within the old environment's ORACLE_HOME. If you are upgrading a cluster database and your initdb_name. If your parameter file is a text-based initialization parameter file with either an IFILE (include file) or a SPFILE (server parameter file) entry. then perform this step on all nodes in which this cluster database has instances configured. The file specified in the IFILE or SPFILE entry contains additional initialization parameters. sid is your Oracle instance ID. Step 27: Update the oratab entry. then move or copy the initdb_name. The name and location of the password file are operating system-specific. By default. then move or copy the password file to the new Oracle Database 10g ORACLE_HOME. Oracle looks for the parameter file in ORACLE_HOME/dbs on UNIX platforms and in ORACLE_HOME\database on Windows operating systems.ora file resides within the old environment's ORACLE_HOME. but it should not reside in the old environment's ORACLE_HOME after you upgrade to Oracle Database 10g.If your parameter file resides within the old environment's ORACLE_HOME. Note: If you are upgrading a cluster database. the default password file is ORACLE_HOME\database\pwdsid.ora.

LD_LIBRARY_PATH_64 (Solaris only) . the SYSAUX tablespace is used to consolidate data from a number of tablespaces that .LD_LIBRARY_PATH .ORA_NLS10 .SHLIB_PATH (HPUX only) .$. In Oracle Database 10g. Step 30: Startup upgrade the database: $ cd $ORACLE_HOME/rdbms/admin $ sqlplus / as sysdba Use Startup with the UPGRADE option: SQL> startup upgrade Step 31: Create a SYSAUX tablespace.ORACLE_PATH $ env | grep ORACLE_HOME $ env | grep PATH $ env | grep ORA_NLS10 $ env | grep ORACLE_BASE $ env | grep LD_LIBRARY_PATH $ env | grep ORACLE_PATH AIX: $ env | grep LIBPATH HP-UX: $ env | grep SHLIB_PATH Note that the ORA_NLS10 environment variable replaces the ORA_NLS33 environment variable.ORACLE_HOME .ORACLE_BASE .PATH .LIBPATH (AIX only) . so you may need to unset ORA_NLS33 and set ORA_NLS10. oraenv Step 29: Make sure the following environment variables point to the new Release directories: .

2 environment.EXTENT MANAGEMENT LOCAL .log SQL> @catupgrd.sql in step 4) provides an estimate of the minimum required size for the SYSAUX tablespace in the SYSAUX Tablespace section. The SYSAUX tablespace must be created with the following mandatory attributes: .ONLINE .2 database (if the components were installed in the database before the upgrade). The following SQL statement would create a 500 MB SYSAUX tablespace for the database: SQL> CREATE TABLESPACE sysaux DATAFILE 'sysaux01.were separate in previous releases.dbf' SIZE 500M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE.PERMANENT .sql script determines which upgrade scripts need to be run and then runs each necessary script.sql The catupgrd. It also upgrades and configures the following database components in the new release 10.SEGMENT SPACE MANAGEMENT AUTO The Upgrade Information Tool(utlu102i.READ WRITE . Oracle Database Catalog Views Oracle Database Packages and Types JServer JAVA Virtual Machine Oracle Database Java Packages Oracle XDK . The upgrade script creates and alters certain data dictionary tables. You must run the script in the new release 10. Step 32: Spool the output so you can take a look at possible errors after the upgrade: SQL> spool upgrade.

1.2.0 00:00:48 Oracle Text VALID 10.0.1.sql TEXT This is the Post-upgrade Status Tool displays the status of the database components in the upgraded database.2.0 00:02:15 Oracle Database Java Packages VALID 10.2.0 00:00:35 .0 00:11:37 JServer JAVA Virtual Machine VALID 10. specifying the TEXT option: SQL> @utlu102s.sql.2 Upgrade Status Utility 04-20-2005 05:18:40 Component Status Version HH:MM:SS Oracle Database Server VALID 10.1. You can rerun any of the scripts described in this note as many times as necessary.log. check the spool file and verify that the packages and procedures compiled successfully. Step 33: Run utlu102s.2.0.1.2. Correct any problems you find in this file and rerun the appropriate upgrade script if necessary.1.2.1.0.0.Oracle Real Application Clusters Oracle Workspace Manager Oracle interMedia Oracle XML Database OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Oracle Text Spatial Oracle Data Mining Oracle Label Security Messaging Gateway Expression Filter Oracle Enterprise Manager Repository Turn off the spooling of script results to the log file: SQL> SPOOL OFF Then.2.0 00:00:28 Oracle XML Database VALID 10.0 00:02:47 Oracle XDK VALID 10.0. the suggested name was upgrade.1. The Upgrade Status Tool displays output similar to the following: Oracle Database 10.0. You named the spool file earlier in this step.0.0 00:01:27 Oracle Workspace Manager VALID 10.

2.0.0.sql Step 36: Run utlrp. Which is needed if you want to upgrade specific components.lst .1.1.1.1.0.1.sql Verify that all expected packages and classes are valid: If there are still objects which are not valid after running the script run the following: spool invalid_post.0.0.1.0 00:00:11 OLAP Analytic Workspace VALID 10.in RAC environments.0 00:00:28 OLAP Catalog VALID 10.1. SQL> @utlrp.2.0 00:00:46 Oracle Label Security VALID 10. clears buffers and performs other database housekeeping tasks.2.0.1.0 00:00:14 Oracle Expression Filter VALID 10.0 00:15:56 Messaging Gateway VALID 10.0.2.sql to recompile any remaining stored PL/SQL and Java code.0 00:05:37 Oracle Ultra Search VALID 10.2.1. SQL> @olstrig.1. This step is only necessary if Oracle Label Security is in your database.2.0 00:00:16 Oracle Enterprise Manager VALID 10. (Check from Step 33).2.0. this script may suggest that the status of the RAC component is INVALID when in actual fact it is VALID (as shown in the output from DBA_REGISTRY) Step 34: Restart the database: SQL> shutdown immediate (DO NOT USE SHUTDOWN ABORT!!!!!!!!!) SQL> startup restrict Executing this clean shutdown flushes all caches.0 00:00:59 Oracle OLAP API VALID 10.0.0 00:00:53 Oracle interMedia VALID 10.2.0 00:00:58 Note .2.Oracle Data Mining VALID 10.2.0 00:08:03 Spatial VALID 10. Step 35: Run olstrig.sql to re-create DML triggers on tables with Oracle Label Security policies.1.2.0.0.

the query select distinct OWNER.2 to version 10. TABLE_NAME from DBA_TAB_COLUMNS where DATA_TYPE in ('NCHAR'.1. 'NCLOB') and OWNER not in ('SYS'. substr(object_name. spool off Now compare the invalid objects in the file 'invalid_post.'NVARCHAR2'.V_$KQRSD SYS.30) object.1.1.Select substr(owner.1. NOTE: If you have upgraded from version 9.GV_$KQRPD SYS. A) If you are not using N-type columns for user data.12) owner.'XDB'). did not return rows in Step 6 of this note then: .2 and find that the following views are invalid.7 Otherwise skip to Step 40. substr(object_type.lst' with the invalid objects in the file 'invalid_pre.GV_$KQRSD After Upgrading a Database Step 37: Shutdown the database and startup the database. ie.V_$KQRPD SYS. the views can be safely ignored (or dropped): SYS.lst' you create in step 9.30) type. status from dba_objects where status <>'VALID'.'SYSTEM'. % sqlplus '/as sysdba' SQL> shutdown SQL> startup restrict Step 38: Complete the Step 38 only if you upgraded your database from release 8.

KO16DBCSFIXED . ZHT16BIG5FIXED ZHT32EUCFIXED then the N-type columns *data* need to be converted to AL16UTF16: To upgrade user tables with N-type columns to AL16UTF16 run the script utlnchar. JA16DBCSFIXED .% sqlplus '/as sysdba' SQL> shutdown immediate and go to step 40. ZHT16DBCSFIXED . go to step 40. ZHS16DBCSFIXED . KO16DBCSFIXED .sql SQL> shutdown immediate. ZHT32TRISFIXED KO16KSC5601FIXED . ZHT32TRISFIXED KO16KSC5601FIXED . JA16EUCFIXED . ZHS16DBCSFIXED . C) IF you are using N-type columns for *user* data *AND* your previous NLS_NCHAR_CHARACTERSET was in the following list: JA16SJISFIXED .sql: % sqlplus '/as sysdba' SQL> @utlnchar. US16TSTFIXED . ZHS16CGB231280FIXED ZHS16GBKFIXED . US16TSTFIXED . B) IF your version 8 NLS_NCHAR_CHARACTERSET was UTF8: You can look up your previous NLS_NCHAR_CHARACTERSET using this select: select * from nls_database_parameters where parameter ='NLS_SAVED_NCHAR_CS'. JA16DBCSFIXED . then: % sqlplus '/as sysdba' SQL> shutdown immediate and go to step 40. D) IF you are using N-type columns for *user* data *AND * your previous NLS_NCHAR_CHARACTERSET was *NOT* in the following list: JA16SJISFIXED . . ZHS16CGB231280FIXED ZHS16GBKFIXED . JA16EUCFIXED . ZHT16DBCSFIXED .

you will need to update the affected timestamp data based on your backed up table.y. if you previously backed up your table. For example. The import utility will update the timestamp data as it imports. you must update the data so that it is converted and stored based on the new time zone rules that come with the upgrade.x).'YYYY-MM-DD HH24. go to step 40.SSXFF TZR') FROM tztab_back t1 WHERE t.y = (SELECT to_timestamp_tz(t1.ZHT16BIG5FIXED ZHT32EUCFIXED then import the data exported in point 8 of this note.If you changed the CLUSTER_DATABASE parameter prior the upgrade set it back to TRUE Step 41: Startup the database: .MI. Step 39: If your database has TIMESTAMP WITH TIMEZONE data. you need to run an update statement similar to the one below to update your timestamp data. If you used the export utility to export a copy of the affected tables. UPDATE tztab t SET t. The recommended NLS_LANG during import is simply the NLS_CHARACTERSET. .ora: . (Step 6). you should now use the import utility to import your data from these tables back into your database.If you change the value for NLS_LENGTH_SEMANTICS prior to the upgrade put the value back to CHAR. If you used the manual script method. not the NLS_NCHAR_CHARACTERSET After the import: % sqlplus '/as sysdba' SQL> shutdown immediate. Step 40: Now edit the init.x=t1.

If you are using Oracle Cluster Services. * Use srvconfig from the 10g 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.SQL> startup Create a server parameter file with a initialization parameter file SQL> create spfile from pfile. so you do not need to do anything to them during the upgrade.ora file: For the upgraded intstance(s) modify the ORACLE_HOME parameter to point to the new ORACLE_HOME. Step 42: Modify the listener. For example: % srvconfig -upgrade -dbname db_name -orahome pre-10g_Oracle_home Useful Hints ** Upgrading With Read-Only and Offline Tablespaces The Oracle database can read file headers created prior to Oracle 10g.ora file located in the $ORACLE_HOME/dbs directory. In this case. then you must upgrade the Oracle Cluster Registry (OCR)keys for the database. This will create a spfile as a copy of the init. The only exception to this is if you want to transport tablespaces created prior to Oracle 10g. the file headers must be . to another platform.

This is because the utlip.1) to Release 2 (10. ** Converting Databases to 64-bit Oracle Database Software If you are installing 64-bit Oracle Database 10g software but were previously using a 32-bit Oracle Database installation. However.sql script to finish the upgrade process and complete the the upgrade process. before upgrading to release 10.2. Note: You must OFFLINE the TABLESPACE as migrate does not allow OFFLINE files in an ONLINE tablespace. but is automatic for all other upgrades. there are no special actions required on them during the upgrade. ** If error occurs while executing the catupgrd.sql If an error occurs during the running of the catupgrd.2). You must run the utlip. Appendix A: Initialization Parameters Obsolete in 10g ENQUEUE_RESOURCES DBLINK_ENCRYPT_LOGIN HASH_JOIN_ENABLED LOG_PARALLELISM MAX_ROLLBACK_SEGMENTS MTS_CIRCUITS MTS_DISPATCHERS MTS_LISTENER_ADDRESS MTS_MAX_DISPATCHERS . The process is not automatic for the release 1 to release 2 upgrade. and the file headers of read-only tablespaces are updated if and when they are made read-write sometime after the upgrade. then the databases will automatically be converted to 64-bit during the upgrade to Oracle Database 10g except when upgrading from Release 1 (10. It is a good idea to OFFLINE NORMAL all tablespaces except for SYSTEM and those containing rollback/UNDO tablespace prior to migration.made read-write at some point before the transport. once the problem is fixed you can simply rerun the catupgrd. The file headers of offline datafiles are updated later when they are brought online.1 environment. This way if migration fails only the SYSTEM and rollback datafiles need to be restored rather than the entire database.sql script.sql script as the last step in the release 10. In any other circumstance. read-only tablespaces never have to be made read-write.sql script is not run during the release 1 to release 2 upgrade to invalid all PL/SQL objects.

sql script as directed in step 2 Its output informs to add streams_pool_size=50331648 to the init.992 1) While doing a upgrade from 9iR2 to 10. STREAMS_POOL_SIZE.0.2. This message .X.X. on running the utlu102i. was introduced in release 10gR1. While adding the parameter Oracle gives streams_pool_size as invalid parameter.MTS_MAX_SERVERS MTS_MULTIPLE_LISTENERS MTS_SERVERS MTS_SERVICE MTS_SESSIONS OPTIMIZER_MAX_PERMUTATIONS ORACLE_TRACE_COLLECTION_NAME ORACLE_TRACE_COLLECTION_PATH ORACLE_TRACE_COLLECTION_SIZE ORACLE_TRACE_ENABLE ORACLE_TRACE_FACILITY_NAME ORACLE_TRACE_FACILITY_PATH PARTITION_VIEW_ENABLED PLSQL_NATIVE_C_COMPILER PLSQL_NATIVE_LINKER PLSQL_NATIVE_MAKE_FILE_NAME PLSQL_NATIVE_MAKE_UTILITY ROW_LOCKING SERIALIZABLE TRANSACTION_AUDITING UNDO_SUPPRESS_ERRORS Appendix B: Initialization Parameters Deprecated in 10g LOGMNR_MAX_PERSISTENT_SESSIONS MAX_COMMIT_PROPAGATION_DELAY REMOTE_ARCHIVE_ENABLE SERIAL_REUSE SQL_TRACE BUFFER_POOL_KEEP (replaced by DB_KEEP_CACHE_SIZE) BUFFER_POOL_RECYCLE (replaced by DB_RECYCLE_CACHE_SIZE) GLOBAL_CONTEXT_POOL_SIZE LOCK_NAME_SPACE LOG_ARCHIVE_START MAX_ENABLED_ROLES PARALLEL_AUTOMATIC_TUNING PLSQL_COMPILER_FLAGS (replaced by PLSQL_CODE_TYPE and PLSQL_DEBUG) Known issues @SR:4697649.ora file.

at the time of upgrading the database.Complete checklist for manual upgrades to 10gR1 (10.1 .1 PLSQL_V2_COMPATIBLITY=TRUE causes STANDARD and DBMS_STANDARD to Error at Compile @ Always disconnect from the session which issues the STARTUP and connect as a fresh session before doing any further SQL.1 . catmeta.0) Note 170282.may be ignored for database version 9iR2 or less 2) One of the customer has reported on keeping the shared_pool_size at 150 MB.1 to 10. exit sqlplus .1 . ORA-00955: name is already used by an existing object Please make sure to set the following init parameters as below in the spfile/init file or comment them out to their default values.X / 9. eg: On upgrade to 10.2 startup the instance with the upgrade option. References Note 159657. reconnect a fresh SQLPLUS session as SYSDBA and then run the upgrade scripts.sql fails with insuffient shared memory during the processing of view KU$_PHFTABLE_VI. Please set the shared_pool_size at 200M. 3) While upgrade following error was encountered.1 .3 on Solaris 64-bit and Filesystems Managed By Veritas or Solstice Disk Suite software Note 412271. create or replace * ERROR at line 1: ORA-06553: PLS-213: package STANDARD not accessible.0.2.Complete Upgrade Checklist for Manual Upgrades from 8.0.2 Upgrade Note 406472.1 .PLSQL_V2_COMPATIBLITY=TRUE causes STANDARD and DBMS_STANDARD to Error at Compile Note 263809.1 to Oracle9iR2 (9.2. PLSQL_V2_COMPATIBILITY = FALSE PLSQL_CODE_TYPE = INTERPRETED # Only applicable to 10gR1 PLSQL_NATIVE_LIBRARY_DIR = "" PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT = 0 Refer to Note 170282.0.x) Note 356082.Mandatory Patch 5752399 for 10.1 .ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While .ORA-7445 [qmeLoadMetadata()+452] During 10.1.

IOT Corruptions After Upgrade from COMPATIBLE <= 9.com/docs/cd/B19306_01/server.htm Note 471479.3 Oracle Database Upgrade Guide 10g Release 2 (10.102/b14238/toc.2.2 to COMPATIBLE >= 10.0.1 Errors PLS-213 package STANDARD not accessible ORA-6553 "PLS-%s: %s" ORA-942 "table or view does not exist" ORA-955 <name> is already used by an existing object ORA-1403 no data found ORA-600 [22635] ORA-600[KOKEIIX1] OCI-21500 Keywords 'UPGRADE~TO~10GR2' .Upgrading Or Patching Databases To 10.oracle.1 .2) Part Number B1423801 http://download.