You are on page 1of 8

Upgrade Steps From 10g to 11gR2

1.
BACKUP BINARIES, DB,TNSNAMES,LISTENER,INIT,SPFILE,PWFILE THAT ARE BEING
UPGRADED
2.
COMPATIBLE PARAMETER MUST BE SET TO MINIMUM 10.0.0.0. THE RECOMMENDED I
S 11.2.0 FOR 11gR2 PARAMETER FILE.
Part A.
Install the New Oracle Database Software & Apply any patches necessary.
Part B.
Run the Pre-Upgrade Information Tool (You Must Run This tool)
1.
Copy the Pre-Upgrade Information Tool (utlul12i.sql) from the Oracle Dat
abase 11gR2 directory: $ORACLE_HOME/rdbms/admin to a temporary directory /tmp.
2.

Set your environment to the one that is being upgraded. Assuming 10g.

3.

Change directory to /tmp that you copied utlu112i.sql to in Step 1.

4.

Start SQL*Plus and login as

5.

Spool the results to a log file:

o
6.

/ as sysdba

SQL> SPOOL upgrade_info.log
Run the Pre-Upgrade Information Tool:

o

SQL> @utlul12i.sql

o

SQL> SPOOL OFF

Check the output of the Pre-Upgrade Information Tool in upgrade_info.log.
The following is an example of the output generated by the Pre-Upgrade Informati
on Tool:

Oracle Database 11.2 Pre-Upgrade Information Tool 10-14-2008 23:25:25
.
**********************************************************************
Database:
**********************************************************************
--> name: ORCL
--> version: 10.2.0.2.0
--> compatible: 10.2.0.2
--> blocksize: 8192

. minimum required size: 61 MB . minimum required size: 69 MB ... AUTOEXTEND additional space required: 287 MB --> TEMP tablespace is adequate for the upgrade. AUTOEXTEND additional space required: 41 MB --> EXAMPLE tablespace is adequate for the upgrade. ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** WARNING: --> SYSTEM tablespace is not large enough for the upgrade.. currently allocated size: 560 MB . ......2 init. increase current size by: 350 MB .... minimum required size: 617 MB ... ********************************************************************** Update Parameters: [Update Oracle Database 11. .Run the Pre-Upgrade Information Tool Upgrading to the New Release 3-9 --> platform: Linux IA (32-bit) --> timezone file: V2 . minimum required size: 910 MB .. ..ora or spfile] ********************************************************************** .. AUTOEXTEND additional space required: 352 MB --> SYSAUX tablespace is adequate for the upgrade. --> UNDOTBS1 tablespace is adequate for the upgrade.......... tablespace is NOT AUTOEXTEND ENABLED.... . minimum required size: 457 MB .... ..

WARNING: --> "sga_target" needs to be increased to at least 388 MB .2 init.2 init. ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** --> Oracle Catalog Views [upgrade] VALID --> Oracle Packages and Types [upgrade] VALID --> JServer JAVA Virtual Machine [upgrade] VALID --> Oracle XDK for Java [upgrade] VALID --> Oracle Workspace Manager [upgrade] VALID --> Messaging Gateway [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> Oracle Label Security [upgrade] VALID --> EM Repository [upgrade] VALID --> Oracle Text [upgrade] VALID . new name is "plsql_code_type" new value is "INTERPRETED" . ********************************************************************** Renamed Parameters: [Update Oracle Database 11. ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 11.ora or spfile] ********************************************************************** --> "max_enabled_roles" --> "remote_os_authent" --> "background_dump_dest" replaced by "diagnostic_dest" --> "user_dump_dest" replaced by "diagnostic_dest" .ora or spfile] ********************************************************************** WARNING: --> "plsql_compiler_flags" old value was "INTERPRETED".

. WMSYS . . WARNING: --> Database contains stale optimizer statistics.........0 database timezone version ... SYS . it is recommended that DBMS_DST package . statistics prior to upgrading the database. . .0. Refer to the 11g Upgrade Guide for instructions to update .. to the latest version which comes with the new release. . ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Database is using a timezone file older than version 11.. be used to upgrade the 10....--> Oracle XML Database [upgrade] VALID --> Oracle Java Packages [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID Run the Pre-Upgrade Information Tool 3-10 Oracle Database Upgrade Guide --> Data Mining [upgrade] VALID --> Expression Filter [upgrade] VALID --> Rule Manager [upgrade] VALID --> Oracle Application Express [upgrade] --> Oracle OLAP API [upgrade] VALID . CTXSYS WARNING: --> Database contains INVALID objects prior to upgrade.... Component Schemas with stale statistics: ..2.. After the release migration........ The list of invalid SYS/SYSTEM objects was written to ...2.

objects due to the upgrade.. WARNING:--> A standby database exists.. Refer to the ...sql after the upgrade to identify any new invalid . Ensure no files are in backup mode prior to upgrade.... Your current setting is: . .. The list of non-SYS/SYSTEM objects was written to .. registry$nonsys_inv_objs. WARNING: --> There are files which need media recovery....... As of 10.. . USER SYSMAN has dependent objects. USER SYS has 1 INVALID objects.. .. WARNING: --> There are materialized view refreshes in progress... . Ensure all materialized view refreshes are complete prior to upgrade.. log_archive_format requires a %r format qualifier ... . WARNING:--> There are outstanding unresolved distributed transactions. 11g Upgrade Guide for instructions to save the EM data prior to upgrade......... .... . Direct downgrade of EM Database Control is not supported. . WARNING: --> log_archive_format must be updated... .. . Use utluiobj. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.. Resolve outstanding distributed transactions prior to upgrade.. . registry$sys_inv_objs. USER PUBLIC has 7 INVALID objects........... WARNING: --> Database contains schemas with objects dependent on network package s.. . Sync standby database prior to upgrade. Ensure no files need media recovery prior to upgrade.. ....1... WARNING: --> There are files in backup mode.... USER FLOWS_010600 has 1 INVALID objects. . USER FLOWS_010600 has dependent objects.. USER WKSYS has dependent objects. be present in its format string.. .. . ... WARNING: --> EM Database Control Repository exists in the database.

...dbf'.... log_archive_format='%t_%s.. The command: PURGE DBA_RECYCLEBIN 1. you may want to back up the sys. ...... your database. Run the Pre-Upgrade Information Tool Upgrading to the New Release 3-11 .. format string will still prevent the upgraded database from starting up.link$ t able to save the information. WARNING:--> recycle bin in use.GATHER_D ICTIONARY_STATS. Oracle recommends gathering stats before the upgrade: EXEC DBMS_STATS.. Check the warning messages and rectify them as needed.... ¦ Deprecated CONNECT Role ¦ Access Control to Network Utility Packages ¦ Database Links with passwords ¦ TIMESTAMP WITH TIME ZONE Data Type ¦ Optimizer Statistics ¦ Invalid Objects ¦ Save Oracle Enterprise Manager Database Control Data ¦ Complete Materialized View Refreshes ¦ Ensure No Files Need Media Recovery ¦ Ensure No Files Are in Backup Mode . must be executed immediately prior to executing your upgrade. .. The following points mu st be addressed correctly otherwise there maybe problems.. that the recycle bin is empty prior to upgrading . 3 object(s)... but failure to add the %r to the ... Archive Logging is currently OFF.. Your recycle bin is turned on and it contains .. Example: CONNECT role now only has create session privilege... If you have any db links with passwords.. It is REQUIRED . .

Start the instance by issuing following command (you may get messages th at parameters are obsolete. SQL> SHUTDOWN IMMEDIATE. and adjust the values to at least the minimum values indicated by the Pre-Upgr ade Tool. Update any relative path names in parameter file to fully path names. Upgrade the Database 1. o Run the catupgrd. 3. Copy configuration files (init file.log 5. listener. Update init files with new COMPATIBLE parameter. 2. o Shutdown the database: SQL> SHUTDOWN IMMEDIATE. 2. tnsnames. pwfile) from ol d Oracle Home to new. fix any deprecated ones .sql Once completed.sql script: SQL> @catupgrd. o Change to the $ORACLE_HOME/rdbms/admin directory and start SQL*Plus sqlplus / as sysdba 4. fix those and start up the db again): o SQL> STARTUP UPGRADE. .¦ Resolve Outstanding Distributed Transactions ¦ Sync Standby Database with the Primary Database ¦ Purging the Database Recycle Bin Part C. o SQL> SPOOL upgrade. shutdown the database and restart it. Prepare the new 11gR2 ORACLE_HOME 1. o Make sure the following checks: The oratab file points to Oracle Database 11g Release 2 Oracle Home o The following environment variables point to the Oracle 11g Release 2 direct ories: § ORACLE_HOME § PATH 3. Part D. o 6.

then check upgrade manual for fixes. SQL> $ORACLE_HOME/rdbms/admin/utlrp. o SQL> SELECT distinct object_name FROM dba_invalid_objects. o SQL> $ORACLE_HOME/rdbms/admin/catuppst. (I f there are any INVALID components.sql to perform upgrade actions that do not require db to be in upgrade mode: o 9. Run the Post-Upgrade Status Tool to provide a summary of the upgrade.sql 10.sql 8. Verify that all objects are valid: o SQL> SELECT count(*) FROM dba_invalid_objects. Run catuppst.sql Run utlrp to recompile any remaining stored PL/SQL and other objects. 7. .o SQL> STARTUP.) o SQL> @utlul12s.