Upgrade Oracle 10g Release 2 from 10201 to 10204

Posted by Zahid on July 3, 2010. This post demonstrate a step by step guide to apply oracle patchset 10.2.0.4 (patch number 6810189) on 10.2.0.1 database. My current environment is Oracle 10gR2 (10.2.0.1) installed on Redhat Enterprise Linux 5 update 4 32-bit.

Preparing for the upgrade to 10.2.0.4
Stop all oracle components running like LISTENER, EM , ISQLPLUS and DB itself etc. /* Stop the isqlplus if running */ $ isqlplusctl stop iSQL*Plus 10.2.0.1.0 Copyright (c) 2003, 2005, Oracle. All rights reserved. Stopping iSQL*Plus ... iSQL*Plus stopped. /* Stop the EM dbconsole */ $ emctl stop dbconsole TZ set to US/Eastern Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://ora10.home.com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... ... Stopped. /* Stop the listener */ $ lsnrctl stop Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) The command completed successfully /* Shutdown the database itself */ $ sqlplus / as sysdba SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> Take a backup of Oracle Home and Database Once the oracle database is shutdown, take a cold backup of your database and a backup of your ORACLE_HOME. $cd /u01/apps/oracle/oradata/

/* All my data files , control files and log files are in a directory ora10g at the location /u01/apps/oracle/oradata/. I am going to make a tar archive of ora10g directory. If these files are at separate locations then add all those locations into the tar archive. And since this is just a test database and is very small in size so tar archive works much better then every thing else. But if it would be a production db and is big in size then I would consider other faster ways to take a cold backup of my data files. */ $ tar czf /home/oracle/ora10g.tar.gz ora10g $ echo $ORACLE_HOME /u01/apps/oracle/product/10.2.0/db_1 /* This is my ORACLE_HOME so I would make a tar archive of "db_1" directory. */ $ cd /u01/apps/oracle/product/10.2.0/ $ tar czf /home/oracle/oraHomeBackup.tar.gz db_1 Manage your data with TimeZone before upgrade

(Only perform this step if you have data or Scheduler jobs with TZ info) From 9i onwards Oracle has 2 datatypes that may have data stored affected by a update of the RDBMS DST (Daylight Saving Time) definitions, those are TIMESTAMP WITH LOCAL TIME ZONE (TSLTZ) and TIMESTAMP WITH TIME ZONE (TSTZ). If you have TZ data stored in your database you need to go through the following steps to ensure the integrity of your data while the database upgrade. Check which TIMEZONE version file you are currently using. SQL> select version from v$timezone_file; VERSION ---------2 If this gives 4 then you may simply proceed with the upgrade even if you have TZ data. If this gives higher then 4, look at the meta link note: Note 553812.1 If this gives lower then 4, perform the following steps: Download utltzpv4.sql and run it. SQL> @utltzpv4.sql DROP TABLE sys.sys_tzuv2_temptab CASCADE CONSTRAINTS * ERROR at line 1:

ORA-00942: table or view does not exist

Table created. DROP TABLE sys.sys_tzuv2_affected_regions CASCADE CONSTRAINTS * ERROR at line 1: ORA-00942: table or view does not exist

Table created. Your current timezone version is 2! . Do a select * from sys.sys_tzuv2_temptab; to see if any TIMEZONE data is affected by version 4 transition rules. . Any table with YES in the nested_tab column (last column) needs a manual check as these are nested tables. PL/SQL procedure successfully completed. Commit complete. SQL> /* Once the script finishes successfully execute the following query */ column table_owner format a4 column column_name format a18 select * from sys_tzuv2_temptab; TABL ---SYS SYS SYS SYS SYS SYS SYS SYS SYS TABLE_NAME -----------------------------SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB_RUN_DETAILS SCHEDULER$_JOB_RUN_DETAILS SCHEDULER$_WINDOW SCHEDULER$_WINDOW COLUMN_NAME ROWCOUNT NES ------------------ ---------- --LAST_ENABLED_TIME 3 LAST_END_DATE 1 LAST_START_DATE 1 NEXT_RUN_DATE 1 START_DATE 1 REQ_START_DATE 1 START_DATE 1 LAST_START_DATE 2 NEXT_START_DATE 2

9 rows selected. If it returns no rows, there is nothing that needs to be done. Just proceed with the upgrade. If it retunrs the detail of columns that contain TZ data which may be affected by the upgrade, see metalink note: Note 553812.1 The Note 553812.1 states that if you see SYS owned SCHEDULER objects then it is safe to ignore them and proceed with the upgrade. But if you see user data or user created jobs here then you need to take a

0.2.0.4 for Linux x86 For Linux x86-64 (64-bit): 10. You can download the patchset from For Linux x86 (32-bit): 10.2.4 patchset installer.2. Remove any user created jobs and re-create them after the upgrade.0.backup of data before upgrade and restore it back after the upgrade. Download Oracle Patchset 10. ./runInstaller The first screen is welcome screen.4 Now come back to the oracle user console and move to the directory where you downloaded the patch and unzip the file.2.0.4 for Linux x86-64 Once downloaded login as root in another console and execute following: # xhost +SI:localuser:oracle Install the patchset 10.zip cd Disk1/ .2. $ $ $ $ cd /home/oracle unzip p6810189_10204_Linux-x86.0.4 (6810189) Now is the time to prepare the oracle 10.

Provide the Oracle home details here (The oracle 10.2. .0.1 home).

Make sure you see the message "The overall result of this check is passed" in the output.The installer will perform prerequisite checks on this screen. .

.Oracle configuration Manager allows you to associate your configuration with your metalink support account. You may skip this.

.Installation Summary.

.Installation progress.

.Once progress shows 100%. you will be asked to perform some root specific actions.

2.0/db_1/root.2. Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created .1 as the root. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/apps/oracle/product/10.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin . Copying oraenv to /usr/local/bin .....Login as root # which dbhome /usr/local/bin/dbhome /* this shows the location of dbhome.2.4 */ # cd /usr/local/bin/ # mv dbhome dbhome_10201 # mv oraenv oraenv_10201 # mv coraenv coraenv_10201 /* Now execute the script suggested by the installer.sh Running Oracle10 root.sh script. oraenv and coraenv files rename them for 10.2. Copying coraenv to /usr/local/bin .0... */ # /u01/apps/oracle/product/10...sh create new ones for 10.0.

All your db's working under this ORACLE_HOME will become unusable unless you upgrade your database to 10. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers 608174080 1268896 171967328 427819008 7118848 bytes bytes bytes bytes bytes .Finished running generic part of root.0. Now product-specific root actions will be performed.4 patchset. Press exit and your ORACLE_HOME is patched with 10.2.2. $ sqlplus / as sysdba Connected to an idle instance.sh script. SQL> startup ORACLE instance started.sh finishes successfully come back to installer and press ok. When root.04 as well. Then you should see the End of Installation page as below.

********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade.log SQL> @utlu102i.0.0 --> compatible: 10.1.2 Upgrade Information Utility 07-02-2010 17:39:25 . $ cd $ORACLE_HOME/rdbms/admin $ sqlplus / as sysdba SQL> startup upgrade SQL> spool pre_upgrade. pid = 12856 ORA-1092 signalled during: ALTER DATABASE OPEN.2. shutting down database USER: terminating instance due to error 704 Instance terminated by USER..0 --> blocksize: 8192 .. minimum required size: 488 MB . minimum required size: 400 MB . Upgrade the database from 10.1. ORA-01092: ORACLE instance terminated...0. $ The alert log states that the database has to be upgraded first using UPGRADE option to be able to OPEN normally. Disconnection forced SQL> exit As you can see the database is unable to open and throwing the error ORA-01092.1 to 10.sql Oracle Database 10.trc: ORA-00704: bootstrap process failure ORA-39700: database must be opened with UPGRADE option Fri Jul 2 15:30:15 2010 Error 704 happened during db open.. AUTOEXTEND additional space required: 8 MB --> UNDOTBS1 tablespace is adequate for the upgrade.log SMON: enabling cache recovery Fri Jul 2 15:30:15 2010 Errors in file /u01/apps/oracle/admin/ora10g/udump/ora10g_ora_12856.4 Now startup the database with upgrade option and run the pre-upgrade information tool to see if the database is okay for the upgrade and if there is some thing to be changed before starting the upgrade. Lets look at the alert log file to know what actually happened. . ********************************************************************** Database: ********************************************************************** --> name: ORA10G --> version: 10..0.2. $ tail -f /u01/apps/oracle/admin/ora10g/bdump/alert_ora10g.0....Database mounted..2.2.. .

.. .ora or spfile] ********************************************************************** -..2 init. .. ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 10.. AUTOEXTEND additional space required: 15 MB --> TEMP tablespace is adequate for the upgrade.No update parameter changes are required. ... ********************************************************************** Renamed Parameters: [Update Oracle Database 10. Lets start the upgrade process. minimum required size: 245 MB . AUTOEXTEND additional space required: 370 MB --> SYSAUX tablespace is adequate for the upgrade. ********************************************************************** 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 Java Packages [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [upgrade] VALID --> Oracle Workspace Manager [upgrade] VALID --> Oracle Data Mining [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> Oracle OLAP API [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID --> Expression Filter [upgrade] VALID --> EM Repository [upgrade] VALID --> Rule Manager [upgrade] VALID . . no changes are required and the database is ready for upgrade. ********************************************************************** Update Parameters: [Update Oracle Database 10.2 init.... No changes are required . minimum required size: 58 MB . AUTOEXTEND additional space required: 38 MB --> EXAMPLE tablespace is adequate for the upgrade.sql shows that every thing is fine....ora or spfile] ********************************************************************** -. .2 init..No renamed parameters found...ora or spfile] ********************************************************************** -. minimum required size: 69 MB . PL/SQL procedure successfully completed. ..No obsolete parameters found... No changes are required. SQL> spool off The output from utlu102i.

0.0. [output trimmed] .4.0. Database dismounted.0 00:09:32 JServer JAVA Virtual Machine VALID 10. DOC> DOC>####################################################################### DOC>####################################################################### DOC># SQL> spool off SQL> shutdown immediate Database closed. .4.0.2. ORACLE instance shut down. If there are errors in the spool DOC> file.3 00:00:39 Oracle Data Mining VALID 10.0.0.2.sql .2 Upgrade Status Utility 07-02-2010 18:13:40 . .0.2.2. Total Upgrade Time: 00:25:52 DOC>####################################################################### DOC>####################################################################### DOC> DOC> The above PL/SQL lists the SERVER components in the upgraded DOC> database.2.2.0 00:01:29 Oracle Expression Filter VALID 10. and then DOC> run utlrp.0 00:03:48 Spatial VALID 10.4.4. Component Status Version HH:MM:SS Oracle Database Server VALID 10.4.0.0 00:00:18 OLAP Analytic Workspace VALID 10.2.0.0 00:00:39 Oracle Text VALID 10. DOC> DOC> Next shutdown immediate.0 00:01:16 Oracle Rule Manager VALID 10.0 00:01:29 Oracle Workspace Manager VALID 10. . restart for normal operation.4. or any components are not VALID or not the current version.2. DOC> consult the Oracle Database Upgrade Guide for troubleshooting DOC> recommendations.0 00:00:09 Oracle Enterprise Manager VALID 10.0 00:00:07 .log SQL> @catupgrd.2.2.0 00:03:34 Oracle XDK VALID 10.0.4.SQL> spool upgrade.0 00:00:20 Oracle XML Database VALID 10.4.0.4.4.4.0.0. SQL> .2. Oracle Database 10.4.2.2. DOC> DOC> Please review the status and version columns and look for DOC> any errors in the spool log file.0 00:00:45 Oracle interMedia VALID 10. .0 00:00:50 Oracle OLAP API VALID 10.0 00:00:19 OLAP Catalog VALID 10.0 00:00:29 Oracle Database Java Packages VALID 10.0.0.2.0.4.2.4.sql to recompile any invalid application objects.4.4. along with their current version and status.2.

this number is added across all RAC nodes. The upgrade process may leave many objects invalid in the database. 6). Query showing jobs created by UTL_RECOMP SELECT job_name FROM dba_scheduler_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%'. SQL> startup SQL> spool recompile. 2. SELECT COUNT(*) FROM UTL_RECOMP_COMPILED. Query returning the number of invalid objects remaining. . If you see something failed try to fix it and re-run the upgrade process. On RAC.sql TIMESTAMP ------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_BGN 2010-07-02 18:23:16 DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC> DOC># The following PL/SQL block invokes UTL_RECOMP to recompile invalid objects in the database.When the upgrade script catupgrd. Perform a normal startup and run the utlrp. Use the following queries to track recompilation progress: 1. Use the following queries to verify whether UTL_RECOMP jobs are being created and run correctly: 1. This number should increase with time. Query returning the number of objects compiled so far. This script automatically chooses serial or parallel recompilation based on the number of CPUs available (parameter cpu_count) multiplied by the number of threads per CPU (parameter parallel_threads_per_cpu). Query showing UTL_RECOMP jobs that are running SELECT job_name FROM dba_scheduler_running_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%'. SELECT COUNT(*) FROM obj$ WHERE status IN (4. 2. Recompilation time is proportional to the number of invalid objects in the database. This number should decrease with time. UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel recompilation. Jobs are created without instance affinity so that they can migrate across RAC nodes.sql finishes shutdown the database and open the spool of the upgrade process and try to find out if any thing failed. $ sqlplus / as sysdba Connected to an idle instance. so this command may take a long time to execute on a database with a large number of invalid objects.sql script to recompile any invalid objects. 5.log SQL> @utlrp.

version.0.2.2.0.3 STATUS -----VALID VALID VALID . please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. If the number is higher than expected. SQL> spool off /* When the script utlrp.0.0 10.0.sql completes go ahead and verify if all the components are upgraded to 10.4. TIMESTAMP ------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_END 2010-07-02 18:23:50 PL/SQL procedure successfully completed.2.4 */ set lines 10000 set pages 1000 column comp_name format a40 column version format a12 column status format a6 select comp_name. DOC># ERRORS DURING RECOMPILATION --------------------------0 PL/SQL procedure successfully completed. DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$).0 10.4.2. COMP_NAME ---------------------------------------Oracle Database Catalog Views Oracle Database Packages and Types Oracle Workspace Manager VERSION -----------10. DOC># OBJECTS WITH ERRORS ------------------0 DOC> The following query reports the number of errors caught during DOC> recompilation. status from sys. If this number is non-zero. please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects.dba_registry.4.PL/SQL procedure successfully completed.

0 10.2.2.2.0 10.0.0 10.4.0.gz * /* This will restore the old ORACLE_HOME */ $ cd /u01/apps/oracle/oradata/ $ rm -fr ora10g $ tar xzf /home/oracle/ora10g.0.4.2.0.0/ $ rm -fr db_1 $ tar xzf /home/oracle/oraHomeBackup.4.4.4.4.0. then you can always go back to 10. controlfiles and redo log files */ Now start the database and see which version is it? $ sqlplus / as sysdba Connected to an idle instance.tar.4.2.4 version now.4.0 10. Restore the database back to 10.4.0.0.0.0 10.0.2.0.2.2. 10.0.2.2.0 10.0 10.4.4.4.2.0 10.0 10.4.0/db_1 $ cd /u01/apps/oracle/product/10.0 10.2.2.0.0 10.tar.JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages Oracle Expression Filter Oracle Data Mining Oracle Text Oracle XML Database Oracle Rule Manager Oracle interMedia OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Spatial Oracle Enterprise Manager 17 rows selected.0.1 if any thing failed Let's suppse the upgrade process fails.0 VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID The above query shows that the database components are at 10.0 10.2.2.0.0.4.2. SQL> startup set lines 10000 set pages 1000 column comp_name format a40 column version format a12 column status format a6 .0.1 level be restoring the backup we took at the beginning of the process and start over the upgrade.0 10.2. Just shutdown the database and restore the backups as follows: $ echo $ORACLE_HOME /u01/apps/oracle/product/10.gz * /* This will restore a consistent copy of datafiles.2.0.2.

Stop all services of oracle .0 10.2.2.1.2.2.0 10.0 10.0 10.0.1.0 10. version.2.1.0 10.0.0 10.0.0 STATUS -----VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID Upgrade Oracle 10g from 10.1.2.1.2.0.0. status from sys.0.0 10.1.0.1.0 10. We are back again from where we started.2.0 10.1.2. 1. COMP_NAME ---------------------------------------Oracle Database Catalog Views Oracle Database Packages and Types Oracle Workspace Manager JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages Oracle Expression Filter Oracle Data Mining Oracle Text Oracle XML Database Oracle Rules Manager Oracle interMedia OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Spatial Oracle Enterprise Manager 17 rows selected.1.select comp_name.1.0 10.0.0.0.1.0.0.4 (Single Instance) Before database upgrade it is recommanded to backup the PRODUCTION database.0. VERSION -----------10.0.2.1.2.2.0 10.1.0.dba_registry.0.2.2.1.0 10.2.2.1.0.0 10.1.1 to 10.0.1.2.0 10.0.2.2.0 10.

All rights reserved.1.0 Copyright (c) 2003.amardhaka.0. Stopping iSQL*Plus … iSQL*Plus stopped. All rights reserved.0/db_1 [oracle@ittestdb ~]$ echo $ORACLE_SID orcl [oracle@ittestdb ~]$ [oracle@ittestdb ~]$ emctl stop dbconsole TZ set to Asia/Baghdad Oracle Enterprise Manager 10g Database Control Release 10.1. Oracle. .com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control … … Stopped.2.2. Oracle. [oracle@ittestdb ~]$ lsnrctl stop LSNRCTL for Linux: Version 10.[oracle@ittestdb ~]$ echo $ORACLE_BASE /u01/app/oracle [oracle@ittestdb ~]$ echo $ORACLE_HOME /u01/app/oracle/product/10. 2005 Oracle Corporation.1. [oracle@ittestdb ~]$ All rights reserved.0.0 – Production on 08-FEB-2010 13:17:18 Copyright (c) 1991. [oracle@ittestdb ~]$ isqlplusctl stop iSQL*Plus 10. 2005. 2005.0 Copyright (c) 1996.2. http://ittestdb.0.2.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) The command completed successfully [oracle@ittestdb ~]$ sqlplus “/as sysdba” SQL*Plus: Release 10.2.0 – Production With the Partitioning.2.0 – Production With the Partitioning.1.1. OLAP and Data Mining options SQL> shutdown immediate Database closed.1.0 – Production on Mon Feb 8 13:17:29 2010 Copyright (c) 1982.0. Database dismounted. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10. OLAP and Data Mining options [oracle@ittestdb ~]$ ps -ef|grep oracle root oracle oracle oracle 13754 32094 13755 13754 14525 13755 14526 13755 0 13:13 pts/1 0 13:13 pts/1 0 13:18 pts/1 0 13:18 pts/1 00:00:00 su – oracle 00:00:00 -bash 00:00:00 ps -ef 00:00:00 grep oracle [oracle@ittestdb ~]$ . All rights reserved. 2005.2. Oracle. ORACLE instance shut down.0. Connected to: Oracle Database 10g Enterprise Edition Release 10.0.

0 [oracle@ittestdb ~]$ /u01/stage/patch/Disk1/runInstaller Starting Oracle Universal Installer… Checking installer requirements… Checking operating system version: must be redhat-3.5. 2008.0.0 Production Copyright (C) 1999. Please wait …[oracle@ittestdb ~]$ Oracle Universal Installer.95:0.13. Version 10.Step 2: Install the Database Patch Set [oracle@ittestdb ~]$ export DISPLAY=10. UnitedLinux-1. All rights reserved.4. SuSE-10. Oracle. SuSE-9. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-0208_01-22-19PM. asianux-1. asianux-2 or asianux-3 Passed All installer requirements met.2. redhat-5. [oracle@ittestdb ~]$ . redhat4.0.

0.Step 3 : Upgrade Database [oracle@ittestdb ~]$ ps -ef|grep oracle root oracle oracle oracle 13754 32094 13755 13754 18304 13755 18305 13755 0 13:13 pts/1 0 13:13 pts/1 0 13:28 pts/1 0 13:28 pts/1 00:00:00 su – oracle 00:00:00 -bash 00:00:00 ps -ef 00:00:00 grep oracle [oracle@ittestdb ~]$ sqlplus “/as sysdba” SQL*Plus: Release 10. 2007. All Rights Reserved.4.0 – Production on Mon Feb 8 13:28:53 2010 Copyright (c) 1982. Oracle.2. SQL> STARTUP UPGRADE ORACLE instance started. Connected to an idle instance. Total System Global Area 1224736768 bytes Fixed Size Variable Size 1267188 bytes 318769676 bytes .

….0 . SQL> SPOOL /u01/stage/patch/Disk1/upgrade_info.0.0.0 8192 02-08-2010 13:30:50 1267188 bytes 318769676 bytes 889192448 bytes 15507456 bytes –> compatible: 10.log SQL> @?/rdbms/admin/utlu102i.2 Upgrade Information Utility . ….1. Total System Global Area 1224736768 bytes Fixed Size Variable Size Database Buffers Redo Buffers Database mounted.1.2.sql Oracle Database 10.2. Database opened. Database opened. minimum required size: 488 MB ….Database Buffers Redo Buffers Database mounted. ********************************************************************** Database: ********************************************************************** –> name: –> version: –> blocksize: . AUTOEXTEND additional space required: 8 MB –> UNDOTBS1 tablespace is adequate for the upgrade. minimum required size: 400 MB ORCL 10. SQL> 889192448 bytes 15507456 bytes SQL> STARTUP UPGRADE ORACLE instance started. ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** –> SYSTEM tablespace is adequate for the upgrade.

AUTOEXTEND additional space required: 38 MB –> EXAMPLE tablespace is adequate for the upgrade. AUTOEXTEND additional space required: 370 MB –> SYSAUX tablespace is adequate for the upgrade.…. …. …. No changes are required.2 init. minimum required size: 69 MB . minimum required size: 58 MB ….2 init.2 init. AUTOEXTEND additional space required: 16 MB –> TEMP tablespace is adequate for the upgrade. . No changes are required . .ora or spfile] ********************************************************************** – No update parameter changes are required. ********************************************************************** Renamed Parameters: [Update Oracle Database 10. ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** –> Oracle Catalog Views –> Oracle Packages and Types –> Oracle XDK for Java –> Oracle Java Packages –> Oracle Text –> Oracle XML Database –> Oracle Workspace Manager –> Oracle Data Mining [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] VALID VALID VALID VALID VALID VALID VALID VALID VALID –> JServer JAVA Virtual Machine [upgrade] . ….ora or spfile] ********************************************************************** – No renamed parameters found. minimum required size: 246 MB …. ********************************************************************** Update Parameters: [Update Oracle Database 10. ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 10.ora or spfile] ********************************************************************** – No obsolete parameters found.

sql …………………………………………… …………………………. This procedure . 177 178 179 180 PROCEDURE selectTablespace( tsname IN varchar2 ).log SQL> @?/rdbms/admin/catupgrd. SQL> SPOOL /u01/stage/patch/Disk1/patch.. SQL> SPOOL OFF.–> OLAP Analytic Workspace –> OLAP Catalog –> Oracle OLAP API –> Oracle interMedia –> Spatial –> Expression Filter –> EM Repository –> Rule Manager . [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] [upgrade] VALID VALID VALID VALID VALID VALID VALID VALID PL/SQL procedure successfully completed. — This procedure informs this package that the caller intends to do — point-in-time recovery on the specified tablespace.

— It alter selected tablespace read only. WRONG_TSNAME (ORA-29304) select tablespace does not exist NOT_READ_ONLY (ORA-29305) cannot alter the tablespace read only FILE_OFFLINE (ORA-29306) datafile is not online tsname The tablespace name. SQL> STARTUP ORACLE instance started. SQL> SQL> SQL> SQL> SPOOL OFF SQL> SHUTDOWN IMMEDIATE Database closed.must 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 — be called once for each tablespace in the recovery set. also checks datafiles in the — selected tablespace. Database dismounted. Total System Global Area 1224736768 bytes Fixed Size Variable Size 1267188 bytes 335546892 bytes . – — Input parameters: – – – — Exceptions: – – – – – – – – WRONG_ORDER (ORA-29301) wrong dbms_pitr package functions/procedure order. ORACLE instance shut down.

………………………………… TIMESTAMP ——————————————————————————– COMP_TIMESTAMP UTLRP_END 2010-02-08 15:02:23 DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in . Database opened..Database Buffers Redo Buffers Database mounted. SQL> 872415232 bytes 15507456 bytes To compile invalid objects SQL> @?/rdbms/admin/utlrp.sql …………………………….

DOC> obj$). DOC># OBJECTS WITH ERRORS ——————- 0 DOC> The following query reports the number of errors caught during DOC> recompilation. If this number is non-zero. please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. If the number is higher than expected. please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors .

version.DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. COMP_NAME TATUS VERSION S ——————————————— —————————— ———– . DOC># ERRORS DURING RECOMPILATION ————————— 0 SQL> SQL> select comp_name.dba_registry. status from sys.

4.2.0 VALID Oracle Workspace Manager 10.4.0.0.2.0 VALID Oracle XDK 10.2.4.0.0.2.4.2.3 VALID JServer JAVA Virtual Machine 10.0 VALID Oracle Data Mining 10.0 VALID Oracle Database Java Packages 10.4.0.0.0 VALID Oracle Text 10.2.0.0 VALID Oracle Expression Filter 10.Oracle Database Catalog Views 10.2.4.4.2.0.2.4.4.0.0 VALID .0 VALID Oracle Database Packages and Types 10.

0.Oracle XML Database 10.2.2.4.2.4.0.0 V Oracle Enterprise Manager 10.0.0 VALID Spatial ALID 10.4.2.4.2.0 VALID OLAP Analytic Workspace 10.0.0.2.4.2.2.4.0 VALID OLAP Catalog 10.0.0 VALID SQL>exit .0.0 VALID Oracle OLAP API 10.0 VALID Oracle Rule Manager 10.0.0 VALID Oracle interMedia 10.4.4.

Now Start other services (listener.4. Requirements Oracle DB : Oracle 10.4 1. Identify prior installation Before installing this patch you must install oracle 10.1. SQL> connect sys@GOLDLINK as sysdba Enter password: Connected. C:\>set oracle_sid= GOLDLINK C:\>sqlplus /nolog SQL*Plus: Release 10.1 version.2.2. iSQLPlus…) Upgrade Oracle from 10.0. 2002. All rights reserved. Download Patch set Download 6810189 patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory.1 (later) Operating System: Windows 3.2. 3.0.0.Installation Tasks 1. SQL> SHUTDOWN . EM.0.0.2. 2.2. Before installing this patch set you must be need 10. Shutdown oracle database.0 .2.1 (or later version) 2.0.Production on Tue Nov 13 10:49:26 2007 Copyright (c) 1982.1 To 10.2. Patch Set Overview Patch set release 10. Pre .0. Oracle Corporation.

C:\>net stop OracleOraDB10g_Home1TNSListener The OracleOraDb10g_home1TNSListener service is stopping.. C:\>net stop OracleServiceGOLDLINK The OracleServiceGOLDLINK service is stopping...Database closed.. The OracleServiceGOLDLINK service was stopped successfully.... 8.. you must perform the following steps on every database ...... Oracle recommends that you create a backup of the Oracle 10g installation before you install the patch set. Stop all services C:\>set oracle_sid=GoldLink C:\>net stop OracleDBConsoleGOLDLINK The OracleDBConsoleGOLDLINK service is stopping. You should be stop this service C:\>net stop msdtc The Distributed Transaction Coordinator service is stopping. The OracleOraDb10g_home1iSQL*Plus service was stopped successfully. 4. Upgrade the Database After you install the patch set. 4. Note: while patch installation time If you face Distributed Transaction Coordinator still running. C:\>net stop OracleOraDB10g_Home1iSQL*Plus. Check Tablespace Sizes and Set Parameter Values Review the following sections before upgrading a database. The OracleOraDb10g_home1TNSListener service was stopped successfully. The OracleDBConsoleGOLDLINK service was stopped successfully. Backup your database. The Distributed Transaction Coordinator service was stopped successfully. 5. Database dismounted.. ORACLE instance shut down...

associated with the upgraded Oracle home: 1. Connect sys user C:\> sqlplus /NOLOG SQL> CONNECT SYS/SYS_password AS SYSDBA 3. BANNER ---------------------------------------------------------------Oracle Database 10g Release 10.sql SQL> SPOOL OFF Review the patch.sql SQL> select * from v$version.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. Start all services 2.Production .4.sql script. rerun the catupgrd. This list provides the version and status of each SERVER component in the database. SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp. Enter the following SQL*Plus commands: SQL> STARTUP UPGRADE SQL> SPOOL patch. Restart the database: SQL> SHUTDOWN SQL> STARTUP 5.0. This step is optional but recommended.sql script after correcting any problems. If necessary.0 .2.log SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd. 4. Compile Invalid Objects Run the utlrp.

COMP_NAME VERSION STATUS ———————————————– ———— —— Oracle Database Catalog Views 10.0. status from sys.0.2.metalink.2.0 VALID 10.4.Production NLSRTL Version 10.0.2.2.4.2.0.0 .0.0 VALID Oracle Database Packages and Types 10.0 .0. Have a look at the below output Column comp_name format a40 Column version format a12 Column status format a6 Select comp_name.4 download from www.0.0 VALID .4 April 18th.1. version.1 to 10.0.2.4.1.Production step by step oracle database 10g upgrade from 10.com Step 1: Prerequisites check to before applying the patch set (6810189).4.2.0.Production CORE 10.dba_registry.0 Production TNS for 32-bit Windows: Version 10.2.2.2.0.2.0 VALID Oracle Workspace Manager JServer JAVA Virtual Machine 10.oracle. 2011 in Oracle Database 10G • posts • Redhat Enterprise Linux by admin Requirements: Oracle database 10g patch set 10.0.1.PL/SQL Release 10.0. version is 10.2.1.1. Check your dba_registry view oracle database components status is valid or not.0 .

2.0.0.0.1.0.2.0.0 – Prod PL/SQL Release 10.2. Check your v$version view SQL> select * from v$version.0 VALID 10.2.0 VALID —————————————————————Oracle Database 10g Enterprise Edition Release 10.1.1.0 VALID 10.1.2.1.2.1.0.0.1.0.1.0 VALID 10.0.2.0.0 VALID 10.1.0 – Production CORE 10.2.2.0 Production .0.2.1.1.2.1.2.0 VALID 10.1.Oracle XDK Oracle Database Java Packages Oracle Expression Filter Oracle Data Mining Oracle Text Oracle XML Database Oracle Rules Manager Oracle interMedia OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Spatial Oracle Enterprise Manager 17 rows selected.1.2.1.0.0 VALID 10.0 VALID 10.0.0 VALID 10.2.1.0 VALID 10.0.0 VALID 10.0.2.2.0 VALID 10.0.0 VALID 10. BANNER 10.

emctl. -> this is for all user’s objects across the database Then stop all the process like sql.1.2.0.status from dba_objects where status=’INVALID’.0 – Production NLSRTL Version 10. tnslistener and shutdown your database. $ sqlplus / as sysdba SQL> shutdown immediate Database closed Database dismounted. ORACLE instance shut down.2. All rights reserved. $ isqlplusctl stop iSQL*Plus 10.0 – Production Check your database objects are valid or not SQL> select object_name.2. Oracle.1.0. No rows selected In my environment there are no invalid objects.0 Copyright (c) 2003.recomp_serial (). Stopping iSQL*Plus … iSQL*Plus stopped.TNS for Linux: Version 10. $ emctl stop dbconsole TZ set to US/Eastern .0.1. 2005. If you have any invalid objects then you have to really Validate your database objects through the below scripts SQL> exec utl_recomp.

All rights reserved http://ora10.com:1158/em/console/aboutApplication Stopping Oracle Enterprise manager 10g database Control ….2. 2005 Oracle Corporation. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) The command completed successfully Step 2: Cold Backup of your oracle database 10g and $ORACLE_HOME using Operating system Command Step 3: Manage your data with Time Zone before upgrade In my environment there are no data and scheduler jobs with Time Zone information that’s why I skip the step.home.Stoped $ lsnrctl stop Copyright (c) 1991. 2005.Oracle Enterprise Manager 10g Database Control Release 10. If you have huge volume of data and scheduler jobs means please follow the below steps SQL> select version from v$timezone_file.1. All rights reserved.0. Version ———2 .0 Copyright (c) 1996. Oracle.

DROP TABLE sys.oracle. SQL> @utltzpv4.sys_tzuv2_temptab. SQL> Once the script finishes successfully execute the following query .com and run it. Commit complete. Any table with YES in the nested_tab column (last column) needs a manual check as these are nested tables.sys_tzuv2_temptab CASCADE CONSTRAINTS ERROR at line 1: ORA-00942: table or view does not exist Table created. If this gives higher then 4 look at the Meta link note: Note 553812. Your current timezone version is 2! Do a select * from sys.sql from www.If this gives 4 then you may simply proceed with the upgrade even if you have TZ data.1 If this gives lower then 4 perform the following steps: Download utltzpv4.sql DROP TABLE sys. to see if any TIMEZONE data is affected by version 4 transition rules.sys_tzuv2_affected_regions CASCADE CONSTRAINTS ERROR at line 1: ORA-00942: table or view does not exist Table created.metalink. PL/SQL procedure successfully completed.

column table_owner format a4 column column_name format a18 select * from sys_tzuv2_temptab.---------SYS SYS SYS SYS SYS SYS SYS SYS SYS SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB SCHEDULER$_JOB_RUN_DETAILS SCHEDULER$_JOB_RUN_DETAILS SCHEDULER$_WINDOW SCHEDULER$_WINDOW LAST_ENABLED_TIME LAST_END_DATE LAST_START_DATE NEXT_RUN_DATE START_DATE REQ_START_DATE START_DATE LAST_START_DATE NEXT_START_DATE 3 1 1 1 1 1 1 2 2 9 rows selected. Step 3: Applying Oracle database 10g patch set (Patch number 6810189) After downloaded the patch set.-----------------.0.2.4 $ cd /home/oracle $ unzip p6810189_10204_Linux-x86. you have login as a root user and execute the following # xhost +SI:localuser:oracle Install the patch set 10. TABL TABLE_NAME COLUMN_NAME ROWCOUNT NES ---.-----------------------------.zip $ cd Disk1/ .

1) detail Click Next .2./runInstaller Click Next to proceed the next step Here you should provide your $ORACLE_HOME(10.$ .0.

Click Next Click Install .

SQL> startup .Click OK and run the above script as a root user Then startup database with upgrade option otherwise the below error will come and you can see the error in the alert log file $ sqlplus / as sysdba Connected to an idle instance.

pid = 12856 ORA-1092 signalled during: ALTER DATABASE OPEN… 1268896 bytes 171967328 bytes 427819008 bytes 7118848 bytes . Disconnection forced SQL> exit $ tail -f /opt/oracle/admin/test/bdump/alert_ora10g.log SMON: enabling cache recovery Fri Jul 2 15:30:15 2010 Errors in file /u01/apps/oracle/admin/ora10g/udump/ora10g_ora_12856. Total System Global Area 608174080 bytes Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. ORA-01092: ORACLE instance terminated.trc: ORA-00704: bootstrap process failure ORA-39700: database must be opened with UPGRADE option Fri Jul 2 15:30:15 2010 Error 704 happened during db open. shutting down database USER: terminating instance due to error 704 Instance terminated by USER.ORACLE instance started.

2.0.0.0.2.Now startup the database with upgrade option and run the pre-upgrade information tool to see if there are any recommendation.0 00:09:32 10.4.0 00:00:18 10.0.0 00:00:19 10.0.0.2.0 00:00:20 10.4.0 00:03:34 10. If there is any recommendation then you have to really follow the recommendations. Let’s start the upgrade process.2.0 00:00:45 10.4.4.2.4.2.3 00:00:39 10.2.0.log SQL> @catupgrd.4.0.0.2 Upgrade Status Utility Component Oracle Database Server JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages Oracle Text Oracle XML Database Oracle Workspace Manager Oracle Data Mining OLAP Analytic Workspace OLAP Catalog Oracle OLAP API Oracle interMedia Spatial Status VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID 07-02-2010 18:13:40 Version HH:MM:SS 10.4.0.sql [output trimmed] Oracle Database 10.2.2.0 00:00:50 10. $ cd $ORACLE_HOME/rdbms/admin SQL> spool upgrade.4.4.2.4.4.0 00:03:48 10.0 00:01:29 .0.2.2.0 00:00:29 10.4.0 00:00:39 10.0.2.0.4.0 00:01:29 10.

or any components are not VALID or not the current version. DOC> DOC> Please review the status and version columns and look for DOC> any errors in the spool log file.sql to recompile any invalid application objects.2.0 00:01:16 10.0. DOC> DOC> Next shutdown immediate.0.4.4.4.0 00:00:07 DOC>##################################### DOC>###################################### DOC> DOC> The above PL/SQL lists the SERVER components in the upgraded DOC> database.2. If there are errors in the spool DOC> file.0 00:00:09 10. and then DOC> run utlrp.0.2.Oracle Expression Filter Oracle Enterprise Manager Oracle Rule Manager Total Upgrade Time: 00:25:52 VALID VALID VALID 10. along with their current version and status. restart for normal operation. DOC> DOC>########################################## DOC>###################################### . DOC> consult the Oracle Database Upgrade Guide for troubleshooting DOC> recommendations.

$ sqlplus / as sysdba Connected to an idle instance. If you see something failed try to fix it and re-run the upgrade process. SQL> When the upgrade script catupgrd. Database dismounted.sql TIMESTAMP ============== COMP_TIMESTAMP UTLRP_BGN 2010-07-02 18:23:116 DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database.DOC># SQL> spool off SQL> shutdown immediate Database closed. ORACLE instance shut down. The upgrade process may leave many objects invalid in the database. Perform a normal startup and run the utlrp. SQL> startup SQL> spool recompile.log SQL> @utlrp.sql script to recompile any invalid objects.sql finishes shutdown the database and open the spool of the upgrade process and try to find out if any thing failed. so this command may take .

DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they should increase with time. SELECT COUNT(*) FROM UTL_RECOMP_COMPILED. This DOC> DOC> DOC> DOC> 2. 5. Query returning the number of invalid objects remaining. DOC> On RAC. SELECT COUNT(*) FROM obj$ WHERE status IN (4. this number is added across all RAC nodes.DOC> a long time to execute on a database with a large number of invalid DOC> objects. This number DOC> DOC> DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). 6). number should decrease with time. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of objects compiled so far. .

TIMESTAMP ============= COMP_TIMESTAMP UTLRP_END 2010-07-02 18:23:50 PL/SQL procedure successfully completed. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1.DOC> can migrate across RAC nodes. Query showing jobs created by UTL_RECOMP DOC> DOC> DOC> DOC> 2. please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be SELECT job_name FROM dba_scheduler_running_jobs WHERE job_name like ‘UTL_RECOMP_SLAVE_%’. . Query showing UTL_RECOMP jobs that are running DOC> DOC> DOC># PL/SQL procedure successfully completed. If the number is higher than expected. SELECT job_name FROM dba_scheduler_jobs WHERE job_name like ‘UTL_RECOMP_SLAVE_%’. DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$).

DOC># OBJECTS WITH ERROR =============== 0 DOC> The following query reports the number of errors caught during DOC> recompilation. SQL> spool off Step 5: Post installation steps set lines 10000 set pages 1000 column comp_name format a40 . DOC># ERRORS DURING RECOMPILATION --------------------------0 PL/SQL procedure successfully completed. please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully.DOC> fixed before attempting to recompile these objects. If this number is non-zero.

0 VALID 10.4.2.4.0 VALID 10.0 VALID 10.4.4.0 VALID .2.4.2. version.2.0 VALID 10.4.0 VALID 10. COMP_NAME ============ Oracle Database Catalog Views Oracle Database Packages and Types Oracle Workspace Manager JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages Oracle Expression Filter Oracle Data Mining Oracle Text Oracle XML Database Oracle Rule Manager Oracle interMedia OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Spatial VERSION STATUS =========== ===== 10.0 VALID 10.4.0.2.2.0 VALID 10.0.0 VALID 10.0 VALID 10.2.0.0 VALID 10.0 VALID 10. status from sys.4.0.dba_registry.3 VALID 10.2.4.2.4.0.0.column version format a12 column status format a6 select comp_name.0.4.4.4.0 VALID 10.2.0 VALID 10.0.0.2.0.0 VALID 10.0.2.0.2.4.4.2.0.2.0.0.4.0.2.

2.0 – Prod PL/SQL Release 10. No rows selected.0 – Production CORE 10.0.0.4 to 11.4.2.2.status from dba_objects where status=’INVALID’.2.2.0. 11g.0 VALID —————————————————————Oracle Database 10g Enterprise Edition Release 10. SQL> select * from v$version. Oracle — kkempf @ 9:38 am Rate This . BANNER 10.4.2.0. More 10.4.4.0.4.0 Production TNS for Linux: Version 10.0.2.0 – Production NLSRTL Version 10.1 upgrades Filed under: 10g.Oracle Enterprise Manager 17 rows selected.2.0.0.0 – Production Check your database objects are valid or not SQL> select object_name.4.

SYS and SYSMAN schemas Run 10g_home/rdbms/admin/utlrp to recompile invalids Shutdown the 10g instance Source the new Oracle Home so $ORACLE_HOME points to the 11. In my case: a. then cut it back) Empty the recycle bin: purge dba_recyclebin exec dbms_stats. Archivelog formats now require %r in them user/background/core dump destination parameters are depricated (I simply removed them and went with the new defaults) minimum sga_target of 700M & minimum java_pool_size of 128M (I allowed this for the upgrade. etc.1.2. 8.0 11.0.0.2. VALID Oracle Workspace Manager .1 and cut to the chase: Make sure you have a backup before you start the upgrade.0 10.1.2 coming in July of next year (Officially from Oracle here). Oracle Server .0 HH:MM:SS 00:31:18 00:11:33 00:01:00 00:00:00 00:00:00 .0 to 11. I’m going to skip all the detailed checks outlined in 837570.2. Run 11g_home/rdbms/admin/utlrp. Component Status .sql (the doc incorrectly identifies this as utlu111s.ora and tnsnames. 7. Like you don’t have duplicate items in SYS and SYSTEM schemas.2 Post-Upgrade Status Tool . OPTION OFF 12-15-2009 09:34:18 Version 11. copy the listener.sql script against your 10gR2 database and see what it says. Check your compatible parameter (in my case I simply changed it from 10. OPTION OFF OLAP Catalog .5 hours on a wimpy 2 CPU VM) Run 11g_home/rdbms/admin/utlu112s. etc.0) and restart the database if required 12. 9.sql (recompile) 11. you understand what the new connect role is. 1. 3. etc. b.2.2.2 home Copy the new/modified initSID.0.1.1.2.With the end of Premier support for RDBMS 10.ora file to the 11g_home/dbs directory. 6 upgrades later.0 11. d. 4. 2. about 1.2. e. 5.sql (catalog upgrade.1. VALID JServer JAVA Virtual Machine . c.2. I am happy to say that it’s been successful across the board.2. you don’t have TIMESTAMP WITH TIMEZONE Datatypes in the database.0. this script takes quite a while to finish. Start your listener Oracle Database 11. In the interest of brevity.0. The rest of this assumes a vanilla database. you are smart enough to already have a SYSAUX tablespace. VALID OLAP Analytic Workspace .ora file from the 10g home to the 11g_home/network/admin directory startup upgrade pfile=initSID. meaning you don’t have any of the issues outlined in 836570. I started doing some more 10g to 11g migrations.0 10.2.0.0.gather_schema_stats vs.ora (11g version) Run 11g_home/rdbms/admin/catupgrd.sql) 10. 6. Install 11g in a new home Run the 11g_home/rdbms/admin/utlu112i.

Oracle OLAP API . Oracle Enterprise Manager . Oracle XDK . Oracle Text . Oracle XML Database . Oracle Database Java Packages . Oracle Multimedia . Spatial . Oracle Expression Filter . Oracle Rule Manager . Gathering Statistics . Total Upgrade Time: 01:24:57

OPTION OFF VALID VALID VALID VALID VALID VALID OPTION OFF VALID VALID

10.2.0.2.0 11.2.0.1.0 11.2.0.1.0 11.2.0.1.0 11.2.0.1.0 11.2.0.1.0 11.2.0.1.0 10.2.0.2.0 11.2.0.1.0 11.2.0.1.0

00:00:00 00:12:34 00:01:29 00:01:17 00:04:45 00:00:33 00:04:37 00:00:00 00:00:21 00:00:11 00:15:12

Step By Step Manual Database Upgrade to 11.2.0.2
Compatibility Matrix

Minimum Version of the database that can be directly upgraded to Oracle 11g Release 2 Source Database 9.2.0.8 or higher 10.1.0.5 or higher 10.2.0.2 or higher 11.1.0.6 or higher Target Database 11.2.x 11.2.x 11.2.x 11.2.x

The following database version will require an indirect upgrade path. Source Database ---> Upgrade Path for Target Database--->Target Database 7.3.3 (or lower)-----> 7.3.4 ---> 9.2.0.8 ---->11.2.x 8.0.5 (or lower)----> 8.0.6 ---> 9.2.0.8 ---->11.2.x 8.1.7 (or lower)----> 8.1.7.4---> 10.2.0.4---->11.2.x 9.0.1.3 (or lower)----> 9.0.1.4-- ->10.2.0.4---->11.2.x 9.2.0.7(or lower)---->9.2.0.8---->11.2.x Here I am upgrading my Oracle 10.2.0.4 database to Oracle 11.2.0.2 1. Copy Pre upgrade Information gathering Script:

• •

Log in to the system as the owner of the Oracle Database 11g Release 2 (11.2) Oracle home directory. Copy the Pre-Upgrade Information Tool (utlu112i.sql) and utltzuv2.sql from the Oracle Database 11gRelease 2 (11.2) ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home, such as the temporary directory on your system.

$ORACLE_HOME/rdbms/admin/utlu112i.sql

2. Execute Pre Upgrade Script: • •

Should be change to the directory where utlu112i.sql had been copied in the previous step. Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Then run and spool the utlu112i.sql file. Please note that the database should be started using the Source Oracle Home.

$ sqlplus '/ as sysdba' SQL> spool upgrade_info.log SQL> @utlu112i.sql SQL> spool off SQL>

Check the spool file and examine the output of the upgrade information tool.
3. Check for the integrity of the source database: Check for the integrity of the source database prior to starting the upgrade by downloading and running dbupgdiag.sql script from below My Oracle Support article Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql) (Avoid this step if don’t have support access)

If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/rdbms/admin/utlrp.sql (multiple times) to validate the invalid objects in the database, until there is no change in the number of invalid objects. $ cd $ORACLE_HOME/rdbms/admin $ sqlplus "/ as sysdba" SQL> @utlrp.sql

After validating the invalid objects, re-run dbupgdiag.sql in the database once again and make sure that everything is fine. 4. Check that National Characterset:

Check that National Characterset (NLS_NCHAR_CHARACTERSET) is UTF8 and AL16UTF16. select value from NLS_DATABASE_PARAMETERS where parameter = 'NLS_NCHAR_CHARACTERSET'; If this is UTF8 or AL16UTF16 then no action is needed. If is not UTF8 or AL16UTF16 then refer the following article Note 276914.1 The National Character Set in Oracle 9i and 10g.

5. Optimizer Statistics: When upgrading to Oracle Database 11g Release 2 (11.2), optimizer statistics are collected for dictionary tables that lack statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade

$ sqlplus "/as sysdba" SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

6. Ensure that no files need media recovery: Sql> SELECT * FROM v$recover_file;

7. Stop the listener for the database:

Make pfile from spfile;

$ lsnrctl stop

8. Suhtdown the Database:

Shutdown the database.

BACKUP CURRENT CONTROLFILE TO ''. Comment out obsolete parameters * The DIAGNOSTIC_DEST initialization parameter replaces the USER_DUMP_DEST. 9.$ sqlplus "/as sysdba" SQL> shutdown immediate. Note: Once the Parameter file is modified as per your requirement. } 10 Backup and change pfile: Make a backup of the init. BACKGROUND_DUMP_DEST. else skip to next Step.Take a backup using RMAN Connect to RMAN: rman "target / nocatalog" RUN { ALLOCATE CHANNEL chan_name TYPE DISK. copy the file to $ORACLE_HOME/dbs (11g Oracle Home ) 11 Set Environment Variables: If your operating system is UNIX then complete this step. Back Up the Database: 1. 1.ora file.Perform Cold Backup (or) 2. Make sure the following environment variables point to the Oracle 11g Release directories: . BACKUP DATABASE FORMAT '%U' TAG before_upgrade.

2/db_1:N Note : After /etc/oratab is updated to have sid and Oracle Home (11. Update the oratab entry. . execute 'orabase'.PATH $ export ORACLE_HOME=<location of oracle 11.ORACLE_BASE . [oracle@localhost ~]$ .2> Note : If ORACLE_BASE is not known.2).2/db_1:N orcl:/opt/oracle/product/11. you can execute oraenv (/usr/local/bin/oraenv) and set the environment. $ orabase /uo1/app/oracle 2.2/db_1 is /u01/app/oracle [oracle@localhost ~]$ 12 Upgrade Database: At the operating system prompt. change to the $ORACLE_HOME/rdbms/admin directory of 11gR2 Oracle Home.ORACLE_HOME .2> $ export PATH=$ORACLE_HOME/bin:$PATH $ export ORACLE_BASE=<oracle_base set during installation></oracle_base set during installation></lo cation of oracle 11. oraenv ORACLE_SID = [orcl] ? orcl The Oracle base for ORACLE_HOME=/opt/oracle/product/11. for Instance. after setting Path towards 11g Oracle Home.. The input has to be the sid which is entered in /etc/oratab against 11g home. which will point the location of base. to set the new ORACLE_HOME pointing towards ORCL and disable automatic startup Sample /etc/oratab #orcl:/opt/oracle/product/10.

Also.$ cd $ORACLE_HOME/rdbms/admin $ sqlplus "/ as sysdba" SQL> startup UPGRADE Set the system to spool results to a log file for later verification after the upgrade is completed and start the upgrade script.sql to recompile any remaining stored PL/SQL and Java code in another session. Run utlrp.sql . convert the SPFILE to a PFILE so you can edit the file to delete parameters. SQL> @utlrp. SQL> set echo on SQL> SPOOL upgrade.sql which provides a summary of the upgrade at the end of the spool log.sql.log SQL> @catupgrd. if you encountered a message listing obsolete initialization parameters when you started the database for upgrade. Post Upgrade Steps 13 Post Upgrade: Start the database and run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu112s. then remove the obsolete initialization parameters from the parameter file before restarting.sql 14 Recompile Invalid Objects: This script can be run concurrently with utlrp. Any errors that occur during the upgrade are listed with each component and must be addressed $ sqlplus "/as sysdba" SQL> STARTUP SQL> @utlu112s. If necessary. It displays the status of the database components in the upgraded database and the time required to complete each component upgrade.sql SQL> spool off These measures are an important final step to ensure the integrity and consistency of the newly upgraded Oracle Database software.

sql (multiple times) to validate the invalid objects in the database. 16 Configure & Start Listener.sql script reports any invalid objects. then perform these checks on all nodes in which this cluster database has instances configured. re-run dbupgdiag.ORACLE_HOME . Start the listener : lsnrctl start 17 Crosscheck Environment Variables: Set Environment Variables 1. Modify /etc/oratab entry to use automatic startup SID:ORACLE_HOME:Y .1 Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.15 Check for the integrity of the source database: Check for the integrity of the upgraded database by running dbupgdiag. 2. Make sure the following environment variables point to the Oracle 11g Release directories: .2) home.sql script from below Metalink article Note 556610.ORACLE_BASE . Note : If you are upgrading a cluster database.ora : Modify the listener.PATH Also check that your oratab file and any client scripts that set the value of ORACLE_HOME point to the Oracle Database 11g Release 2 (11. until there is no change in the number of invalid objects.ora file: For the upgraded instance(s) modify the ORACLE_HOME parameter to point to the new ORACLE_HOME. After validating the invalid objects.sql in the upgraded database once again and make sure that everything is fine. run $ORACLE_HOME/rdbms/admin/utlrp.sql) If the dbupgdiag.

4 Ent Edition single Instance to Oracle 11.0.0.Migrate your initialization parameter file to a server parameter file.If you changed the CLUSTER_DATABASE parameter prior the upgrade set it back to TRUE . The following topics guide you through the process of performing a manual upgrade. This will create a spfile as a copy of the init.4 Ent. They assume that you have previously run the Pre-Upgrade Information Tool • Backing up the Database • Preparing the New Oracle Home .2. Edition on Red Hat Linux 5.For Instance. Create a server parameter file with a initialization parameter file SQL> create spfile from pfile.0.0.2. This document will guide you how to upgrade Oracle 10.2/db_1:Y 18 Spfile from Pfile: Edit init.2.2. 19 Start the Database with spfile: Shutdown the database: Sql> shutdown immediate Now start the database it will user spfile Sql> startup Check the Alert log file for any Error.ora: . orcl:/opt/oracle/product/11.2.2 More Sharing ServicesShare|Share on facebookShare on twitterShare on emailShare on print Introduction: This document applies for Oracle 10.2 Ent. Edition.4 to Oracle 11. Manual Upgrade Database from Oracle 10.0. Database is ready to use now.ora file located in $ORACLE_HOME/dbs (UNIX) & %ORACLE_HOME%\database (Windows).

BACKUP CURRENT CONTROLFILE FORMAT ‘controlfile location and name’. Oracle recommends that you back up your database now as a precaution. Copy configuration files from the Oracle home of the database being upgraded to the new Oracle Database 11gRelease 2 (11. Issue the following RMAN commands: RUN { ALLOCATE CHANNEL chan_name TYPE DISK. control files and Redo log files to a different location. BACKUP DATABASE FORMAT ‘some_backup_directory%U’ TAG before_upgrade. The parameter file can reside anywhere you wish.2) Oracle home: 2. Do this for any release of Oracle Database for which you are upgrading. Rman Backup: Sign on to RMAN: 1. Therefore. . By default. There are two ways to take backup: 1. If your parameter file resides within the old environment’s Oracle home. then you must restore the database from this backup. If you encounter problems with the upgrade and wish to abandon the upgrade completely. Oracle recommends that you back up the database as described in this section. then copy it to the new Oracle home. Cold Backup 2. whether the database is release 11. To prepare the new Oracle home 1. but it should not reside in the old environment’s Oracle home after you upgrade to Oracle Database 11g Release 2 (11.• • Manually Upgrading the Database Troubleshooting the Upgrade • Cancelling the Upgrade Backing Up the Database After running the Pre-Upgrade Information Tool and cleanly shutting down the instance. rman “target / nocatalog” 2. Oracle looks for the parameter file in the ORACLE_HOME/dbs directory on Linux or UNIX platforms.2). Rman Backup Cold Backup: Copy all the datafiles.2 or earlier. prepare the new Oracle home in a new location. } Preparing the New Oracle Home After backing up the database to be upgraded.

The Pre-Upgrade Information Tool displays a warning in the Database section if COMPATIBLE is not properly set. then move or copy the password file to the new Oracle Database 11g Release 2 (11. To manually upgrade the database • Shut down the instance: Sql> SHUTDOWN IMMEDIATE • On Linux or UNIX operating system perform the following checks: Your ORACLE_SID is set correctly. The oratab file points to your Oracle Database 11g Release 2 (11. located in the ORACLE_HOME/dbs directory. 5. If you have a password file that resides within the old environment’s Oracle home. 7.2) Oracle home • The following environment variables should point to the Oracle Database 11g Release 2 (11. Make sure all path names in the parameter file are fully specified. 4. Sql> CREATE pfile FROM spfile. PATH Any scripts that clients use to set the ORACLE_HOME value must point to the new Oracle home. [oracle@ ~]$ export ORACLE_SID=[instance_name] [oracle@ ~]$ sqlplus sys as sysdba .2) directories: ORACLE_HOME.2). On Linux or UNIX platforms. The Pre-Upgrade Information Tool displays any deprecated parameters and obsolete parameters it finds in the Deprecated Parameters and Obsolete Parameters sections. Adjust the values of the initialization parameters to at least the minimum values indicated by the Pre-Upgrade Information Tool. • Log in to the system as the owner of the Oracle Database 11g Release 2 (11. You should not have relative path names in the parameter file. [oracle@ ~]$ cd $ ORACLE_HOME/rdbms/admin • Start SQL*Plus.2) Oracle home. In both cases.2) Oracle home directory.Note: It might be necessary to create a text initialization parameter file (PFILE) from the server parameter file (SPFILE) so that you can edit the initialization parameters. 3. you are ready to proceed with the manual upgrade. sid is your Oracle instance ID. Make sure the COMPATIBLE initialization parameter is properly set for Oracle Database 11g Release 2 (11. Make sure you save all of the files you modified after making these adjustments. 6.The name and location of the password file are operating system-specific. • At a system prompt. Manually Upgrading the Database After preparing the new Oracle home. change to the ORACLE_HOME/rdbms/admin directory. the default password file is orapwsid.

disables system triggers. . 2010. Enter password: • Start the instance by issuing the following command: Sql> STARTUP UPGRADE ORACLE instance started.2. Note: The UPGRADE keyword enables you to open a database based on an earlier Oracle Database release.sql script is run. Once the database is started in upgrade mode. Total System Global Area 1000189952 bytes Fixed Size 1337492 bytes Variable Size 708839276 bytes Database Buffers 285212672 bytes Redo Buffers 4800512 bytes Database mounted.0. You might be required to use the PFILE option to specify the location of your initialization parameter file.sql.0 Production on Fri Apr 29 10:29:11 2011 Copyright (c) 1982. queries on any other view or the use of PL/SQL returns an error. Oracle. If you receive any of these errors.SQL*Plus: Release 11. ORA-00401: the value for parameter compatible is not supported by this release Solution: The COMPATIBLE initialization parameter is set to a value less than 10. then issue the SHUTDOWN ABORT command to shut down the database and correct the problem.2.2) database. only queries on fixed views execute without errors until after the catupgrd. Some of these errors are written to the alert log and not to your session. Common Error & Solution for Database Upgrade: The following are common errors that might occur when attempting to start the new Oracle Database 11g Release 2 (11. Before running catupgrd.0. ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE Solution: The CLUSTER_DATABASE initialization parameter is set to TRUE instead of FALSE. Database opened. and performs additional operations that prepare the environment for the upgrade.0. All rights reserved. It also restricts logons to AS SYSDBA sessions.

You must run the script in the Oracle Database 11g Release 2 (11. Remove the obsolete initialization parameters the next time you shut down the database. Note: If you encountered a message listing obsolete initialization parameters when you started the database. runs them.2) environment.sql) The catupgrd.sql Note: If you did not run the Pre-Upgrade Information Tool. Sql> STARTUP This restart. and run the Pre-Upgrade Information Tool (utlu112i. then remove the obsolete initialization parameters from the parameter file before restarting.sql script determines which upgrade scripts must be run. the catupgrd. following the database shutdown performed as part of the catupgrd. clears buffers. convert the SPFILE to a PFILE so you can edit the file to delete parameters .sql script: Sql> @catupgrd. issue the SHUTDOWN ABORT statement. flushes all caches.sql script terminates with one of the following errors: RA-00942: table or view does not exist ORA-00904: “TZ_VERSION”: invalid identifier ORA-01722: invalid number If you receive any of these errors. and then shuts down the database.ORA-39700: database must be opened with UPGRADE option Solution: The STARTUP command was issued without the UPGRADE keyword.log • Run the Pre-Upgrade Information Tool by executing the utlu112i. These measures are an important final step to ensure the integrity and consistency of the newly upgraded Oracle Database software. and performs other housekeeping activities.sql script: Sql> @utlu112i.sql script. • Sql> SPOOL upgrade. then make a note of the obsolete initialization parameters and continue with the upgrade. • Restart the instance to reinitialize the system parameters for normal operation. ORA-00336: log file size xxxx blocks is less than minimum 8192 blocks Solution: A redo log file size is less than 4 MB: If errors appear listing obsolete initialization parameters.sql • Run the catupgrd. If necessary. revert to the original Oracle home directory.

• Exit SQL*Plus. About the Post-Upgrade Status Tool The Post-Upgrade Status Tool.sql to display only those objects which are newly invalid because of the upgrade process.sql script. The utluiobj. which is the utlu112s. You must run utlu112s. Your database is now upgraded to the new Oracle Database 11g release. • Run utlrp. See the Oracle Database Administrator’s Guide for information about relocating data files. the Post-Upgrade Status Tool.sql Verify that all expected packages and classes are valid: Sql> SELECT count(*) FROM dba_invalid_objects. WARNING: If you retain the old Oracle software. make sure you relocate any data files in that environment to the new Oracle Database environment. Sql> SELECT distinct object_name FROM dba_invalid_objects. which provides a summary of the upgrade at the end of the spool log.sql If the Post-Upgrade Status Tool returns errors or shows components that are not VALID or not the most recent release.sql only immediately after running catupgrd. Any errors that occur during the upgrade are listed with each . before you remove the old Oracle environment.sql.sql script only displays objects that are now INVALID but which were VALID before the upgrade. Also.• Run utlu112s. Run utlu112s. then never start the upgraded database with the old software. then execute ORACLE_HOME/rdbms/admin/utluiobj.sql. You are ready to complete the procedures described in Chapter 4.sql to recompile any remaining stored PL/SQL and Java code. Sql> @utlrp. “After Upgrading to the New Release”. then see “Troubleshooting the Upgrade” for more information. Only start the database with the executables in the new Oracle Database installation. displays the status of the database components in the upgraded database and the time required to complete each component upgrade.sql to display the results of the upgrade as follows: Sql> @utlu112s. Note: If the pre-upgrade information tool detected INVALID objects and populated the registry$sys_inv_objs and registry$nonsys_inv_objs tables.

0 00:17:31 JServer JAVA Virtual Machine. VALID 3. VALID 11. run this query: SELECT COMP_NAME. 00:05:12 Total Upgrade Time: 01:29:03 Note: Any time after utlrp.sql is run instead of using utl112s. After increasing the resource allocation.VERSION. VALID 11.sql script or restarting DBUA.2.sql The Post-Upgrade Status Tool displays a report similar to the following output: Oracle Database 11.12 00:23:25 Gathering Statistics.component and must be addressed.sql script must only be run immediately after catupgrd.2. Troubleshooting the Upgrade: This section explains what to do if something goes wrong with your upgrade.sql to determine the STATUS of a component.STATUS FROM DBA_REGISTRY.2. This will return the most up-to-date information. you should perform a SHUTDOWN ABORT and restart the instance (in UPGRADE mode) before rerunning the catupgrd. This section contains the following topics: • Resource Limits • • • • • • Edition Session Startup Error Manual Workaround for ORA-01408 Running the DBMS_DST Package After Upgrade Can Result in ORA-01822 DBUA May Mark Invalid Components with an X Before Entire Upgrade is Done Component Status Rerunning the Upgrade • Cancelling the Upgrade Resource Limits If you run out of resources during the upgrade.1.2.0.0. The utlu112s.00. then increase the resource allocation.0 00:02:32 ————————– ————————– Oracle Application Express. The resources that generally require increases for a new Oracle Database release are as follows: • SYSTEM and SYSAUX tablespaces Typically you receive one of the following messages during the upgrade if your SYSTEM tablespace size is insufficient: ORA-01650: unable to extend rollback segment string by string in tablespace string ORA-01651: unable to extend save undo segment by string for tablespace string .2.2 Post-Upgrade Status Tool 10-18-2010 22:48:55 Component Status Version HH:MM:SS Oracle Server.

Sql> SPOOL upgrade. 4.sql script as many times as necessary. 2. If you are using an undo tablespace.log 7. You can safely ignore this message. To cancel the upgrade by restoring the previous backup Restore Usingin RMAN: 1. Shut down the database as follows: Sql> SHUTDOWN IMMEDIATE Restart the database in UPGRADE mode: Sql> STARTUP UPGRADE 5. 4. If you rerun the script.”string”.sql: Sql> @catupgrd. then the easiest way to cancel the upgrade is to restore that backup as described in the following procedure.ORA-01652: unable to extend temp segment by string in tablespace string ORA-01653: unable to extend table string.”string”.”string”) You might require larger shared memory pool sizes in some cases. The first time you run the script.string by string in tablespace string ORA-01654: unable to extend index string. Rerunning the Upgrade You can rerun the upgrade with the catupgrd. Log in to the system as the owner of the Oracle home directory of the previous release. rman “target / nocatalog” Issue the following RMAN commands: . ORA-04031: unable to allocate string bytes of shared memory (“string”. 2. To rerun the upgrade 1. then be sure it is at least 400 MB. The error message indicates which shared memory initialization parameter must be increased. Rerun catupgrd.sql script as described in the following steps. set AUTOEXTEND ON MAXSIZE UNLIMITED for the SYSTEM and SYSAUX tablespaces. Set the system to spool results to a log file for later verification of success: 6. Cancelling the Upgrade If you completed the steps in “Backing Up the Database” to back up your database.string by string in tablespace string To avoid these errors. then the ORA-00001 message is displayed. 3. Sign on to RMAN: 3.sql Note: You can rerun the catupgrd. there should be no error messages returned.string by string in tablespace string ORA-01655: unable to extend cluster string.

ora initSID. } Restore Using Cold Backup: Copy database backup files to original location and database is restored. Description .5.ora File Systems Known Issues Error ORA-06550 During Upgrade.2 Database to an 11. RESTORE DATABASE FROM TAG before_upgrade ALTER DATABASE OPEN RESETLOGS. ALTER DATABASE MOUNT.2 Database Fold Table of Contents Background & Overview Assumptions & Pre-Requisites Useful Information Step-By-Step Guide Example Install Example Upgrade File Listings Oracle . How to Upgrade a 10.profile oratab listener.2 Database Oracle Database » How To Guides » How to Upgrade a 10.2 Database to an 11. STARTUP NOMOUNT RUN { RESTORE CONTROLFILE FROM ‘save_controlfile_location’.

• • • Step-By-Step Guide 1. There is only ONE database installed on the server.ora file has a new parameter called ADR_BASE_LISTENER. Assumptions & Pre-Requisites This document expects and assumes the following: • • • • • • The instructions are carried out by a qualified DBA.2. A new init. A listener. Download the binaries for the Oracle 11g Database into/u01/app/oracle/SOFTWARE/DATABASE_11G .e.Fix Background & Overview The following documentation provides instructions for upgrading an Oracle 10. 2. There are a number of new maintenance jobs in 11g. • • A new directory structure exists. This maps to the base of the diag directory. Useful Information This section outlines useful information and changes to previous 10g documentation found on this site. Telnet and X-Server is available. See below. These can be turned off as part of this step-by-step guide. e. Read the Known Issues section below. See below. The resultant database will be standalone.2 database residing on Sun Solaris 10.ora parameter called diag_dest has been set and maps to the diag directory in the new directory structure mentioned above. Access to the internet is available. All references to SID should be replaced with correct database name as derived using a suitable database naming standard. Ensure the new directory structure exists.g. Some have been made for cosmetic reasons.4 database to an Oracle 11. i. not part of a cluster or failover configuration.0. others for more practical considerations. All necessary client software.

2779246655 solaris./runInstaller 7.373.3179998886 3. Ensure all Pre-Upgrade Requirements are Met. Download the Latest Upgrade Check Script from Metalink article 884522. • • • cd /u01/app/oracle/SOFTWARE/DATABASE_11G/database export DISPLAY= Enter Your IP Address .Enterprise Edition for Oracle Solaris Operating System (SPARC) (64bit) solaris.2 has been applied then patch avoid ORA-06550druing the upgrade.sparc64_11gR2_database_1of2.zip unzip solaris. Perform an upgrade check on the exiting 10g database. cksum .1.591 bytes.zip := 1.sparc64_11gR2_database_2of2.zip := 1. Unset the • • ORACLE_HOME and TNS_ADMIN unset ORACLE_HOME unset TNS_ADMIN 5. Start the installer.dbf' resize 1000m.048.sparc64_11gR2_database_1of2. patch bundles or CPU patch bundles recommended by Oracle or the application vendor. oraenv 9315778 will need to be applied to ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> @?/rdbms/admin/utlrp SQL> purge dba_recyclebin SQL> alter database datafile '/u03/oradata/SID/system/d1/system_01. . If PSU 11. Before continuing apply any oneoff patches. Unzip the downloaded files using the following commands • • • cd /u01/app/oracle/SOFTWARE/DATABASE_11G unzip solaris. 9. 10.225 bytes.zip 4. 6. the following PSU is available: 9654983 8.sparc64_11gR2_database_2of2. • • • • • • . At the time of writing this guide.1 11.619.903. Start x-server. Follow the instructions as demonstrated in the Example Install section below.0. cksum .2.

profile 17. Update the Oracle • • . 16. Review the output and resolve any issues.0/dbhome_1/rdbms/admin/utlu112i.2. oraenv ORACLE_SID = [oracle] ? SID lsnrctl stop lsnrctl start 19.ora' from spfile shutdown immediate quit . Follow the instructions as demonstrated in the Example Upgrade section below.2. Create the admin directories • • • cd /u01/app/oracle/admin/SID mkdir pfile mkdir audit 18.profile using the listing below as a template.profile Update the .• • • • • • . Log off and log back onto Oracle to pick up the new . oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> startup SQL> spool /tmp/upgrade_check. oraenv ORACLE_SID = [oracle] ? SID lsnrctl start 14.0/dbhome_1/bin export DISPLAY= Enter Your IP Address dbua 15.sql 12. Start the listener • • • . 13. oraenv spfile ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' create pfile='/u01/app/oracle/admin/SID/pfile/initSID. Reconfigure the new listener • • • • .log SQL> @/u01/app/oracle/product/11. Start DBUA. • • • cd /u01/app/oracle/product/11. Create new • • • • • • .

2.0.ora cd /u01/app/oracle/admin/SID/pfile rm initSID. 30) value from database_properties where property_name like 'DST_%' order by property_name.2.ora' from pfile. Remove the old binaries • rm -rf OLD_ORACLE_HOME 21.• • • • • • • • • • • • • • • • • • • • cd /u01/app/oracle/admin/SID/pfile mv initSID. the latest version is 11. 1. For 11. . oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> exec DBMS_DST. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> select property_name.ora ln -s /u01/app/oracle/admin/SID/pfile/initSID. substr(property_value.ora rm initSID. 24. shutdown immediate quit cd $ORACLE_HOME/dbs rm initSID.POST_UPGRADE Create a pfile using the listing below.ora initSID. o NB For 11. cd $ORACLE_HOME/dbs rm spfileSID.ora sqlplus '/ as sysdba' startup quit 20.ord ln -s /u01/app/oracle/admin/SID/pfile/spfileSID.BEGIN_PREPARE(&version).2 the latest version is 14.0. Prepare the DST Timezone Update • • • • . o NB DST_SECONDARY_TT_VERSION should be set to 0 o NB DST_UPGRADE_STATE should be set to NONE 23.1.ora sqlplus '/ as sysdba' startup create spfile='/u01/app/oracle/admin/SID/pfile/spfileSID. Ensure DST update is not in progress • • • • . Check the database is registered with the listener • lsnrctl status 22. Ensure the prepare has completed successfully.

• • • • . 26. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> EXEC DBMS_DST. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> select property_name. Clear out the DST upgrade logging tables prior to checkinng for affected data • • • • • • . E. • • • • • . substr(property_value. SQL> select property_name.dst$error_table'). 1. SQL> truncate table sys.dst$affected_tables. o NB DST_SECONDARY_TT_VERSION should be set to 0 o NB DST_UPGRADE_STATE should be set to NONE 28. 30) value from database_properties where property_name like 'DST_%' order by property_name. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> BEGIN DBMS_DST. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> shutdown immediate . o NB This will show type errors that occured in the rows reported in dst$affected_tables. 30) value from database_properties where property_name like 'DST_%' order by property_name. substr(property_value.dst$affected_tables. 11 o NB DST_UPGRADE_STATE should be set to prepare 25. o NB This will show a list of tables affected by the DST update. o NB DST_SECONDARY_TT_VERSION should be set to the version being upgraded to. 1.dst$error_table. End the prepare state in preparation for the upgrade. / SQL> select * from sys. 27. Upgrade the DST timezone.• • • • . END. log_errors_table => 'sys.FIND_AFFECTED_TABLES (affected_tables => 'sys. Hopefully none. SQL> truncate table sys. log_errors => TRUE.dst$affected_tables'.dst$trigger_table.END_PREPARE.g. Check for data that may be affected by the DST update • • • • • • . SQL> SELECT * FROM sys. oraenv ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> truncate table sys.dst$error_table.

/ SQL> select * from v$timezone_file.log_errors => TRUE.PUT_LINE('Failures:'|| :fail). non-default parameters.disable(client_name => 'auto space advisor'. SQL> END. substr(property_value. SQL> / 31.log_triggers_table => 'SYS. If not. migrate to a more suitable init.UPGRADE_DATABASE(:numfail. 30. operation => NULL.dst$affected_tables. EXEC DBMS_DST. 11 29. window_name => NULL).g.PUT_LINE('Failures:'|| :numfail). Check for Depricated.• • • • • • • • • • • • SQL> SQL> SQL> SQL> SQL> SQL> SQL> • • • startup upgrade purge dba_recyclebin truncate table sys. END. DBMS_OUTPUT.error_on_overlap_time => FALSE. select property_name. Disable the default • • • • • • • • 11g maintenance jobs if required.BEGIN_UPGRADE(11).parallel => TRUE.disable(client_name => 'auto optimizer stats collection'. SQL> dbms_auto_task_admin. • • • ORACLE_SID = [oracle] ? SID sqlplus '/ as sysdba' SQL> SELECT name FROM v$parameter WHERE isdeprecated = 'TRUE' and isdefault='FALSE' o NB This should return 0 rows. operation => NULL. END.dst$error_table. DBMS_OUTPUT.DST$TRIGGER_TABLE'. Run Gather Stats against 'SYS. window_name => NULL). o NB This should report the new timezone file version.ora.error_on_nonexisting_time => FALSE). truncate table sys.log_errors_table => 'SYS. E. operation => NULL. sqlplus /nolog SQL> connect sys as sysdba SQL> BEGIN SQL> dbms_auto_task_admin. / SQL> VAR fail number SQL> BEGIN DBMS_DST. • sqlplus /nolog .dst$trigger_table. truncate table sys. SQL> startup SQL> set serveroutput on SQL> VAR numfail number SQL> BEGIN DBMS_DST.disable(client_name => 'sql tuning advisor'. SQL> dbms_auto_task_admin.END_UPGRADE(:fail). 1. 30) value from database_properties where property_name like 'DST_%' order by property_name.window_name => NULL). SQL> shutdown immediate.DST$ERROR_TABLE'.

method_opt => 'FOR ALL COLUMNS SIZE AUTO'. estimate_percent => dbms_stats.options=>'GATHER'. Click Next. Example Install • • Un-tick the I wish to receive security updates via My Oracle Support box. cascade => TRUE).• • SQL> connect sys as sysdba SQL> exec dbms_stats.gather_schema_stats('SYS'. .auto_sample_size.

• Click Yes to remain uninformed. . Click Next. • • Select Install database software only.

Click Next. .• • Ensure Single instance database installation is selected.

. Click Next.• • Ensure languages Englsih and English (United Kingdom) are selected.

• • Ensure Enterprise Edition is selected. Click Next. .

• • •

Set Oracle Base to /u01/app/oracle Allow Software Location to default Click Next.

• • •

Ensure Database Administrator (OSDBA) Group is set to dba Ensure Database Operator (OSOPER) Group is set to dba Click Next

• • •

This page may not be displayed. Review and fix any issues. Click Next

Note: The installer may report a failed check on OS Patch 124861-15. Its possible that this
failed check can be ignored. Review Metalink document 969497.1

If required save the response file by selecting Save Response File Click Finish .• • • Review the summary.

. • Ask Unix Administrator to run root.sh.• This screen moves on automatically when complete.

• Click Close. Example Upgrade .• Click OK.

.• Click Next.

Click Next.• • Select the database you wish to upgrade. .

• • Review the warnings and fix if applicable. . Click Yes.

Turn off archiving if required. o NB You should backup the database prior to this step using the normal backup method. Ensure Backup database is NOT ticked. Click Next.• • • • Ensure Recompile invalid objects at the end of upgrade is ticked. Mostly this will not be necessary. .

Click Yes to continue. .• If you left archiving on.

Ensure the Diagnostics Destination is set to /u01/app/oracle Click Next. Click Next. • • • Ensure Specify Flash Recovery Area is Un-Ticked.• • Ensure Do Not Move Database Files as Part of Upgrade is selected. .

Click Finish.• • Review the Database Upgrade Summary. .

• • Monitor the upgrade progress. . NOTE . NOTE This screen will move on automatically. • • Click Ignore.Review the Known Issues section below regarding this error message.

profile #----------------------------------------------------------------------# Configure Terminal Settings.• • Review the Upgrade Results Click Close. File Listings Oracle . #------------------------------------------------------------------stty susp ^Z .

0/dbhome_1 TNS_ADMIN=$ORACLE_HOME/network/admin ORACLE_HOME_LISTNER=$ORACLE_BASE/product/11.2.2.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = <SID>) (ORACLE_HOME = /u01/app/oracle/product/11. #------------------------------------------------------------------- ----- ----- export export export export export export export ORACLE_BASE=/u01/app/oracle SQLPATH=$ORACLE_BASE/scripts/dba/sql ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 PATH=$ORACLE_HOME/bin:$PATH ORATAB=/var/opt/oracle/oratab oratab SID:/u01/app/oracle/product/11.2. #------------------------------------------------------------------alias ll="ls -la" alias bdf="df -k" #------------------------------------------------------------------# Configure Oracle Settings. #------------------------------------------------------------------set -o vi export PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin:$PATH export EDITOR=vi export HOSTNAME=`hostname` export PS1='$LOGNAME@$HOSTNAME:$ORACLE_SID> ' export TMPDIR=/tmp export TEMP=/tmp umask 022 #------------------------------------------------------------------# Configure Aliases.----- stty quit ^C stty erase ^? export TERM=vt100-w export ORACLE_TERM=vt100 #------------------------------------------------------------------# Configure Shell Settings.0/dbhome_1:Y listener.0/dbhome_1) (SID_NAME = <SID>) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521)) ) ADR_BASE_LISTENER = /u01/app/oracle .

'+DATA/SID/control03.ctl' ########################################### # Processes ########################################### processes=1000 ########################################### # System Managed Undo and Rollback Segments ########################################### undo_tablespace='UNDO' ########################################### # Security and Auditing ########################################### audit_trail='db' remote_login_passwordfile='EXCLUSIVE' ########################################### # Enabling Archivelog mode ########################################### log_archive_dest='+FRA/SID/arch/d1' log_archive_format=arch_%t_%s_%r.ctl'.initSID.log ########################################### # Defer Segment Creation ########################################### .2.ctl'.0.'+DATA/SID/control02.ora ########################################### # Cache and I/O ########################################### db_block_size=8192 memory_target=1606418432 db_block_checking=MEDIUM db_block_checksum='FULL' ########################################### # Cursors and Library Cache ########################################### open_cursors=500 ########################################### # Database Identification ########################################### compatible='11.0' db_name='SID' ########################################### # Diagnostics and Statistics ########################################### diagnostic_dest='/u01/app/oracle' ########################################### # File Configuration ########################################### control_files='+DATA/SID/control01.0.

/var --./oradata | | | --./create | --./oracle --./oracle --./SID --./sql | --./admin --./oradata | --./u08 --./oradata | --.0 | --.2./dba --./opt | --./d1 | --./diag | --./SID --./app | | | | | | | | ---/dbhome_1 | | | | | | | /u09) | | | | | | /scripts ---/base ---/rfc | | --./u04 --./redo --./software | --./SID --./temp --./d1 /tools --./product --./SID --./oradata | | | | | | | | | --./oradata | --./pfile | --- --./parfile | --./redo --./11./oradata | --./u06 --./adump | --./SID --./u01 --./indx --| --| --| --| --/d1 /sysaux /system --./u02 --./d1 /users --./undo --./d1 --./u03 --./u07 --./d1 --./d1 --./arch --./u05 --./d1 --./d1 --./index --./SID --./d1 --./oradata | --./scripts | --.deferred_segment_creation=FALSE File Systems /--./data --./SID --./d2 --./exp | (link to | --./SID --./d1 .

4.2.0 .Production With the Partitioning.0. RDBMS Upgrade : 10.sql Oracle Database 11.2 Pre-Upgrade Information Tool 04-15-2012 03:44:22 Script Version: 11.log SQL> @utlu112i.4 to 11./oradata --.0. OLAP.2./exp --.1 oracle dba 204205 Apr 15 03:43 utlu112i. ORA-06550 as detailled in Metalink Fix This error can be ignored.Production on Fri Apr 15 03:43:48 2012 Copyright (c) 1982. Oracle.1. Data Mining Scoring Engine and Real Application Testing options SQL> spool upgrade_info./flash --. you can avoid the error by applying patch 9315778 to the 11./SID --.2.0. Connected to: Oracle Database 10g Enterprise Edition Release 10. Description Whilst running the upgrade you may encouner an article 1066828.0. All Rights Reserved./d1 Known Issues Error ORA-06550 During Upgrade.0 Build: 001 . However.sql $ORACLE_HOME/test/upgrade11gR2 nitiserver[oracle]_test> cd $ORACLE_HOME/test/upgrade11gR2 nitiserver[oracle]_test> pwd /nitiserver/dba01/oracle/test/upgrade11gR2 nitiserver[oracle]_test> ls -ltr total 204 -rw-r--r-.0./oradata --.2. 2007.2.0./u10 --./d1 | --. ********************************************************************** ./SID --.2 binaries prior to the upgrade starting.2.2.--./u09 --.2 nitiserver[oracle]_test> mkdir -p /nitiserver/dba01/oracle/test/upgrade11gR2 nitiserver[oracle]_test> cp /nitiserver/testdb/oracle/product/11.0 .4.2/rdbms/admin/utlu112i.sql nitiserver[oracle]_test> sqlplus "/ as sysdba" SQL*Plus: Release 10.

.2. ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 11. refer here for Update Parameters: WARNING: --> "shared_pool_size" needs to be increased to at least 472 MB .0.ora or spfile] Note: Pre-upgrade tool was run on a lower version 32-bit database. ********************************************************************** Flashback: OFF ********************************************************************** ********************************************************************** Update Parameters: [Update Oracle Database 11..Database: ********************************************************************** --> name: test --> version: 10. ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** --> Oracle Catalog Views [upgrade] VALID ....0 --> compatible: 10.2 init..2 init.. minimum required size: 318 MB .2.0...0 --> blocksize: 8192 --> platform: Linux IA (32-bit) --> timezone file: V4 . ..2 init. minimum required size: 61 MB --> SYSAUX tablespace is adequate for the upgrade.1 DEPRECATED replaced by "diagnostic_dest" . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade. ********************************************************************** --> If Target Oracle is 32-Bit.1 DEPRECATED replaced by "diagnostic_dest" --> user_dump_dest 11. --> If Target Oracle is 64-Bit.. .No renamed parameters found. ********************************************************************** Renamed Parameters: [Update Oracle Database 11.4.ora or spfile] ********************************************************************** --> background_dump_dest 11. . minimum required size: 389 MB --> UNDOTBS1 tablespace is adequate for the upgrade. No changes are required.ora or spfile] ********************************************************************** -..2. minimum required size: 211 MB --> TEMP tablespace is adequate for the upgrade. refer here for Update Parameters: WARNING: --> "shared_pool_size" needs to be increased to at least 236 MB . ..

... ********************************************************************** SQL> EXEC DBMS_STATS.0 database timezone version .sql . The list of non-SYS/SYSTEM objects was written to ........ USER SYS has 2 INVALID objects.gather_dictionary_stats.chr(13)||chr(10).ora or spfile.0.....2.. ********************************************************************** Oracle recommends reviewing any defined events prior to upgrading..v$parameter2 WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE' Changes will need to be made in the init.. .--> Oracle Packages and Types [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> Oracle OLAP API [upgrade] VALID . The list of invalid SYS/SYSTEM objects was written to .. ..v$parameter2 WHERE UPPER(name) ='EVENT' AND isdefault='FALSE' Trace Events: SELECT (translate(value.4. ********************************************************************** Recommendations ********************************************************************** Oracle recommends gathering dictionary statistics prior to upgrading the database. .. To view existing non-default events execute the following commands while connected AS SYSDBA: Events: SELECT (translate(value... to the latest version which comes with the new release.chr(13)||chr(10).. objects due to the upgrade.sql after the upgrade to identify any new invalid .. ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Database is using a timezone file older than version 14.. .. USER testBAPRD has 27 INVALID objects. To gather dictionary statistics execute the following command while connected as SYSDBA: EXECUTE dbms_stats. . . be used to upgrade the 10.. registry$sys_inv_objs. . registry$nonsys_inv_objs.. USER SYSTEM has 11 INVALID objects... .. Use utluiobj... WARNING: --> Database contains INVALID objects prior to upgrade. . After the release migration.' ')) from sys..' ')) FROM sys.. SQL> @$ORACLE_HOME/rdbms/admin/utlrp..GATHER_DICTIONARY_STATS... USER testBA has 2 INVALID objects.. it is recommended that DBMS_DST package .

'#'.2. ':'.0 shared_pool_size=263402291 #################################################################################### ########## nitiserver[oracle]_test> ln -s $SID_HOME/pfile/init$ORACLE_SID.4/oraInventory inventory_loc=/nitiserver/testdb/oracle/product/11.SQL> SHUTDOWN IMMEDIATE ############################################################################# cd /nitiserver/oracle/bin cp test_11202 test nitiserver[oracle]_test> vi /etc/oratab # This file is used by ORACLE utilities. are comments.ora . # "N".2/oraInventory inst_group=dba #################################################################################### ######## Change the init paramete diagnostic_dest=/nitiserver/dump01/oracle/test/bdump diagnostic_dest=/nitiserver/dump01/oracle/test/udump core_dump_dest=/nitiserver/dump01/oracle/test/cdump compatible=11.2.0. # #test:/nitiserver/testdb/oracle/product/test_10. # # Multiple entries with the same $ORACLE_SID are not allowed.2.2. It is created by root.4:N test:/nitiserver/testdb/oracle/product/11.2. The third filed indicates # to the dbstart utility that the database should .0. A new line terminates # the entry.0. is used as the field terminator.loc #inventory_loc=/nitiserver/testdb/oracle/product/test_10. "Y". or should not. be brought up at system boot time. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively.2.0.sh # and updated by the Database Configuration Assistant when creating # a database.0. Lines beginning with a pound sign. # A colon.2:N #################################################################################### ## nitiserver[oracle]_test> cat /etc/oraInst.

$ORACLE_HOME/dbs/init$ORACLE_SID.ora nitiserver[oracle]_test> ls -ltr $ORACLE_HOME/dbs/ total 4 -rw-r--r-- 1 oracle dba 2851 May 15 2009 init.ora lrwxrwxrwx 1 oracle dba 50 Apr 15 04:37 inittest.ora -> /nitiserver/dba01/oracle/test/pfile/inittest.ora nitiserver[oracle]_test> cd $SID_HOME/upgrade11gR2 nitiserver[oracle]_test> pwd /nitiserver/dba01/oracle/test/upgrade11gR2 SQL> STARTUP UPGRADE; ORA-00371: not enough shared pool memory, should be atleast 263402291 bytes #################################################################################### ############# [oracle@nitiserver ~]$ sqlplus SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 15 06:36:42 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter user-name: / as sysdba Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> !echo $ORACLE_SID test SQL> STARTUP UPGRADE; ORACLE instance started. Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted. Database opened. SQL> SET SERVEROUTPUT ON SQL> purge dba_recyclebin; DBA Recyclebin purged. SQL> TRUNCATE TABLE SYS.DST$TRIGGER_TABLE; Table truncated. SQL> TRUNCATE TABLE SYS.DST$AFFECTED_TABLES; Table truncated. SQL> TRUNCATE TABLE SYS.DST$ERROR_TABLE; Table truncated. SQL> EXEC DBMS_DST.BEGIN_UPGRADE(11); An upgrade window has been successfully started.

PL/SQL procedure successfully completed. SQL> column PROPERTY_NAME format a30 column VALUE format a30 SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME; SQL> SQL> 2 3 4 PROPERTY_NAME VALUE ------------------------------ -----------------------------DST_PRIMARY_TT_VERSION 11 DST_SECONDARY_TT_VERSION 4 DST_UPGRADE_STATE UPGRADE SQL> EXEC DBMS_DST.BEGIN_UPGRADE(14); BEGIN DBMS_DST.BEGIN_UPGRADE(14); END; * ERROR at line 1: ORA-56920: a prepare or upgrade window or an on-demand or datapump-job loading of a secondary time zone data file is in an active state ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DST", line 1158 ORA-06512: at line 1 SQL> SELECT OWNER, TABLE_NAME, UPGRADE_IN_PROGRESS FROM ALL_TSTZ_TABLES WHERE UPGRADE_IN_PROGRESS='YES'; 2 3 no rows selected SQL> SHUTDOWN IMMEDIATE Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP ORACLE instance started. Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted. Database opened. SQL> set serveroutput on VAR numfail number BEGIN SQL> SQL> 2 DBMS_DST.UPGRADE_DATABASE(:numfail, 3 parallel => TRUE, 4 log_errors => TRUE, 5 log_errors_table => 'SYS.DST$ERROR_TABLE', 6 log_triggers_table => 'SYS.DST$TRIGGER_TABLE',

7 error_on_overlap_time => FALSE, 8 error_on_nonexisting_time => FALSE); 9 DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail); 10 END; 11 / Failures:0 PL/SQL procedure successfully completed. SQL> VAR fail number BEGIN DBMS_DST.END_UPGRADE(:fail); DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail); END; SQL> 2 3 4 5 6 ; 7 8 / ; * ERROR at line 6: ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol ";" SQL> VAR fail number BEGIN DBMS_DST.END_UPGRADE(:fail); DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail); END; SQL> 2 3 4 5 / An upgrade window has been successfully ended. Failures:0 PL/SQL procedure successfully completed. SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME; SELECT * FROM v$timezone_file; 2 3 4 PROPERTY_NAME VALUE ------------------------------ -----------------------------DST_PRIMARY_TT_VERSION 11 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE SQL> SQL> FILENAME VERSION -------------------- ---------timezlrg_11.dat 11 SQL> EXEC DBMS_DST.BEGIN_UPGRADE(14); BEGIN DBMS_DST.BEGIN_UPGRADE(14); END; *

2.0. status FROM dba_registry.2. COMP_NAME -------------------------------------------------------------------------------VERSION STATUS -----------------------------.2.0 VALID COMP_NAME -------------------------------------------------------------------------------VERSION STATUS -----------------------------.2.2. SQL> SQL> startup ORACLE instance started.----------Oracle OLAP API . line 1195 ORA-06512: at line 1 SQL> shutdown immediate Database closed.0 VALID Oracle Database Packages and Types 11.DBMS_SYS_ERROR". SQL> SELECT comp_name. Database opened.0. SQL> SQL> startup ORACLE instance started. version.DBMS_DST". Database dismounted. ORACLE instance shut down. SQL> shutdown immediate Database closed. Database dismounted. Database opened.0 VALID OLAP Analytic Workspace 11.2. ORACLE instance shut down.----------Oracle Database Catalog Views 11. Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted. line 79 ORA-06512: at "SYS.ERROR at line 1: ORA-56926: database must be in UPGRADE mode in order to start an upgrade window ORA-06512: at "SYS. Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted.0.

2 3 no rows selected SQL> SHUTDOWN IMMEDIATE startup Database closed. .DST$TRIGGER_TABLE. Database dismounted. SQL> SQL> 2 3 4 PROPERTY_NAME VALUE -----------------------------. PL/SQL procedure successfully completed. Table truncated. SQL> TRUNCATE TABLE SYS. SUBSTR(property_value. SQL> column PROPERTY_NAME format a30 column VALUE format a30 SELECT PROPERTY_NAME.DST$ERROR_TABLE. SQL> STARTUP UPGRADE. SQL> ORACLE instance started. 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME. TABLE_NAME.2. Database opened. ORACLE instance shut down. Table truncated.-----------------------------DST_PRIMARY_TT_VERSION 14 DST_SECONDARY_TT_VERSION 11 DST_UPGRADE_STATE UPGRADE SQL> SQL> SELECT OWNER. ORACLE instance started. SQL> TRUNCATE TABLE SYS. SQL> purge dba_recyclebin.0 VALID SQL> shutdown immediate Database closed. DBA Recyclebin purged. 1.DST$AFFECTED_TABLES.11.BEGIN_UPGRADE(14). ORACLE instance shut down. Database dismounted.2. Table truncated.0. Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted. SQL> EXEC DBMS_DST. SQL> TRUNCATE TABLE SYS. UPGRADE_IN_PROGRESS FROM ALL_TSTZ_TABLES WHERE UPGRADE_IN_PROGRESS='YES'.

DST$TRIGGER_TABLE'. SQL> set serveroutput on VAR numfail number BEGIN SQL> SQL> 2 DBMS_DST. 4 log_errors => TRUE. 3 parallel => TRUE. END. 2 3 4 PROPERTY_NAME VALUE -----------------------------. 8 error_on_nonexisting_time => FALSE). 7 error_on_overlap_time => FALSE. Database opened.END_UPGRADE(:fail). SUBSTR(property_value. 11 / Failures:0 PL/SQL procedure successfully completed. FILENAME VERSION -------------------.UPGRADE_DATABASE(:numfail.-----------------------------DST_PRIMARY_TT_VERSION 14 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE SQL> SQL> SELECT * FROM v$timezone_file. Failures:0 PL/SQL procedure successfully completed. SQL> VAR fail number BEGIN DBMS_DST.PUT_LINE('Failures:'|| :numfail).DST$ERROR_TABLE'. 1.---------timezlrg_14.Total System Global Area 481275904 bytes Fixed Size 1344952 bytes Variable Size 339741256 bytes Database Buffers 134217728 bytes Redo Buffers 5971968 bytes Database mounted. / SQL> 2 3 4 5 An upgrade window has been successfully ended. 6 log_triggers_table => 'SYS. SQL> SELECT PROPERTY_NAME. 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME. DBMS_OUTPUT. 10 END. 5 log_errors_table => 'SYS. 9 DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail).dat 14 #################################################################################### ############# .

Service "test. All rights reserved.2.2. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nitiserver)(PORT=1599))) Services Summary.2.2.2. 0 min.0.0 VALID Oracle Database Packages and Types 11.2/log/diag/tnslsnr/nitiserver/lstntest/alert/log.----------Oracle Database Catalog Views 11. Instance "test".2.0.0.Production on 15-APR-2012 05:38:30 Copyright (c) 1997.0..0 . Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = ( ADDRESS = (PROTOCOL = TCP) ( HOST = nitiserver)(PORT .2. TNSLSNR for Linux: Version 11. status UNKNOWN..0 VALID Oracle OLAP API 11.0. 2010." has 1 instance(s).Production Start Date 15-APR-2012 05:37:37 Uptime 0 days 0 hr.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nitiserver)(PORT=1599))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=nitiserver)(PORT=1599))) STATUS of the LISTENER -----------------------Alias LSTNtest Version TNSLSNR for Linux: Version 11..2.2/network/admin/test_nitiserver/listener. has 1 handler(s) for this service.0.0.ora Listener Log File /nitiserver/testdb/oracle/product/11.0.2.0 VALID #################################################################################### ############### LSNRCTL> start LSTNtest Starting /nitiserver/testdb/oracle/product/11.2. The command completed successfully #################################################################################### #################### [oracle@nitiserver test_nitiserver]$ tnsping test TNS Ping Utility for Linux: Version 11.2.2/log/diag/tnslsnr/nitiserver/lstntest/alert/log.xml Listening Endpoints Summary. 0 sec Trace Level off Security ON: Local OS Authentication SNMP ON Listener Parameter File /nitiserver/testdb/oracle/product/11.0.2.2/network/admin/test_nitiserver/listener.2..2.2.0 VALID OLAP Analytic Workspace 11.0..2.2/bin/tnslsnr: please wait.2..0..2..ora Log messages written to /nitiserver/testdb/oracle/product/11.0.2.0 .0 .COMP_NAME VERSION STATUS --------------------------------------------. Oracle.-----------------------------.Production System parameter file is /nitiserver/testdb/oracle/product/11.

1] 1.2.sql to some other location e.0.ora or spfile] Note: Pre-upgrade tool was run on a lower version 64-bit database. Check dba_registry for correctness of status and version at the source 10. ****************************************************************** **** WARNING: --> "shared_pool_size" needs to be increased to at least 472 MB WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes ==> dbua would take care of this. Take necessary steps to validate them. /tmp 3. From 10g Env: cd /tmp $ sqlplus '/ as sysdba' SQL> spool upgrade_prereq.2 init.2 init.4 database.ora or spfile] .log SQL> @utlu112i. .sql SQL> spool off 4. ****************************************************************** **** Obsolete/Deprecated Parameters: [Update Oracle Database 11...2. I will put some lines from my log file where it suggested some changes: .g.2 Standalone DB upgrade using dbua Followed Complete checklist to upgrade the database to 11g R2 using DBUA [ID 870814.2.= 1599)) ( CONNECT_DATA = ( SID = test))) OK (0 msec) 10.0. 2.4 to 11.0. Update Parameters: [Update Oracle Database 11.log and fix them. Review the upgrade_prereq. Copy from 11g Env: $ORACLE_HOME/rdbms/admin/utlu112i.

0.. .. Use utluiobj.2 Patchset (Doc ID 1201253..... .0 database timezone version . Direct downgrade of EM Database Control is not supported. to the latest version which comes with the new release. objects due to the upgrade.. dbua gives an option of upgrading the timezone version and TIMESTAMP WITH TIME ZONE data. registry$sys_inv_objs. WARNING: --> EM Database Control Repository exists in the database.. The list of invalid SYS/SYSTEM objects was written to .. registry$nonsys_inv_objs.0. . Upgrade Guide for instructions to save the EM data prior to upgrade..4.1 DEPRECATED replaced by "diagnostic_dest" ==> dbua would take care of this ****************************************************************** **** Miscellaneous Warnings ****************************************************************** **** WARNING: --> Database is using a timezone file older than version 14... .. . After the release migration. it is recommended that DBMS_DST package . Check step B.. ==> Checked "Actions FOR DST Updates When Upgrading To Or Applying The 11.. be used to upgrade the 10.....2. .3b)...2.... It says we can skip the DST related upgrade instructions.1 DEPRECATED replaced by "diagnostic_dest" --> user_dump_dest 11... The list of non-SYS/SYSTEM objects was written to ....sql after the upgrade to identify any new invalid .****************************************************************** **** --> background_dump_dest 11... Refer to the ... WARNING: --> Database contains INVALID objects prior to upgrade.1)" .

must be executed immediately prior to executing your upgrade. ==> This actually needs be done post upgrade. I havent done this yet.. Export/Import (exp/imp..1)“. Manual Upgrade (Oracle provided scripts) 3. Gather dictionary stats prior to upgrade: On 10g ENV: sqlplus "/as sysdba" EXECUTE dbms_stats. The reasons we decided using this method are: .2. Will write another post for this one. I’m thinking we are beneficial from using export/import approach. . as I would leave it to 10. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. or expdp/impdp) Besides benefits mentioned in above upgrade document.. 1.gather_dictionary_stats. Database Upgrade Assistant (DBUA) 2.oracle. As described in “Oracle Database Upgrade Guide 11g Release 1 (11.0.. http://download... WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.htm# BABJHIHH 5. your database.. purge dba_recyclebin 7. As most of them were ORA04063.112/e17222/upgrade. Change compatible. there are three upgrade methods offered while you want to upgrade database from 10g to 11g. . 8... 6.. It is REQUIRED that the recycle bin is empty prior to upgrading . ==>Also EM configuration failed.. May be because my 10g db had many invalid objects. The command: PURGE DBA_RECYCLEBIN .com/docs/cd/E11882_01/server. Run dbua ==> I saw few errors during oracle server upgrade but I could ignore those.WARNING: --> Your recycle bin contains 93 object(s).4 for few days so that in case I want to downgrade it..

Oracle 11g Net Asistant. USERS tablespaces Step 2: Export full database of source 10g database expdp system@database directory=DATA_PUMP_DIR full=y dumpfile=export. oracle 11g install. Step 1: Pre-create tablespaces on target 11g database   using the Generate_Create_Tablespaces.dbt. Oracle11g | Tags: 10g R1 to 11g upgrade. Database Upgrade Assistant. SOA suite version oracle.0 installation upgrade.dmp logfile=export. we first installed Oracle 11g software on development server and created empty database by using provided standard template New_Database. 11g enterprise manager emca. which could be found at $ORACLE_HOME/assistants/dbca/templates.  we want to set up identical testing databases on development server first we want to keep original production databases unchanged anyway for safety reason With this approach.log Step 3: Copy dumpfile over network to development server Step 4: Grant IMPORT_FULL_DATABASE system privilege to user SYSTEM of target 11g database Step 5: Import full database to target 11g database Note: If you have co-existing oracle home/version on development server. Impdp system@database directory=DATA_PUMP_DIR full=y dumpfile=export. upgrade oracle 10g to 11g | 1 Comment 6 Votes .0.sql to generate tablespace script editing generated script to remove entries for SYSTEM. oracle 11g tns create.1. creating oracle 11g TNS. we followed the following steps to move data from 10g database to newly created 11g database.6.log Step by Step Upgrading Oracle 10g to Oracle 11g Posted by Debashis Paul * A Passionate Blogger * under Oracle in Windows. oracle 11. After that. which will assure to use data pump at 11g version to import data. 11g EMCA configuration. please make sure switching to Oracle 11g environment. oracle enterprise manager console 11g.dmp logfile=import.

So finally kickoff 11g installation after executing the setup file and follow the onscreen instruction step by step . my Oracle 10g in Windows XP SP2 is the older one i. But bit lethargic about this upgrade as I do have to again download the Patch from Metalink i.4 or higher ) . But again the pain is to export all Db objects and again import into new DB .What if the new DB failed to import in 11g ? What if there is Unicode/Non-Unicode character set incompatibility occurs ? I know patchset available but I can’t rely on my knowledge about applying those pathset successfully ! After lots of brainstorming the final thought come is that there might be some way to upgrade the DB from already installed 10g to 11g using the available installer rather using the upgrade patchset for 11g. Since I have had Oracle 11g installer so best possible option is to throw my Oracle 10g DB and install 11g afresh .2 which doesn’t Support the SOA Suite installation .0.e of size ~972 MB .0. Here you goes … —————————————————————————————– .Hell ! Yes .2. Oracle suggest to upgrade this to 10R2 (10.1.e 10.

My aim is to upgrade the existing 10g instance as 11g . 1) Copy file : utlu111i.sql to d:\temp (any temporary location) from “D:\Oradb11g\RDBMS\ADMIN” .—————————————————————————————So I have installed 11g softwares without having any Database . .

Patch the 10. …. Re-run utlu111i. BEFORE upgrading the database. SQL> SELECT CASE COUNT(DISTINCT(tzname)) WHEN 183 then 1 WHEN 355 then 1 .2) Connected into Oracle 10g instance while DB is up and running and execute the .2. 3) To resolve the below warning : WARNING: –> Database is using an old timezone file version.sql after ….0.sql file from SQL prompt and get the below stat . Execute : SQL> select * from v$timezone_file. patching the database to record the new timezone file version.0 database to timezone file version 4 ….1.

So I need to apply it prior to go ahead . Refer to the 11g Upgrade Guide for instructions to update …. Make sure to keep backup of existing folder so that you could revert if any problem occurs . If the output of this is < 4 then prior to upgrade we need to apply the Timezone patch . WARNING: –> Database contains stale optimizer statistics. 4) Copy the files from location : D:\temp\5731187\files\oracore\zoneinfo and paste it to existing Oracle 10g location “D:\oracle\oracore\zoneinfo” . Otherwise assist Oracle Support . statistics prior to upgrading the database.WHEN 347 then 1 WHEN 377 then 2 WHEN 186 then case COUNT(tzname) WHEN 636 then 2 WHEN 626 then 3 ELSE 0 end WHEN 185 then 3 WHEN 386 then 3 WHEN 387 then case COUNT(tzname) WHEN 1438 then 3 ELSE 0 end WHEN 391 then case COUNT(tzname) WHEN 1457 then 4 ELSE 0 end WHEN 392 then case COUNT(tzname) WHEN 1458 then 4 ELSE 0 end WHEN 188 then case COUNT(tzname) WHEN 637 then 4 ELSE 0 end WHEN 189 then case COUNT(tzname) WHEN 638 then 4 ELSE 0 end ELSE 0 end VERSION FROM v$timezone_names. …. 5) Stop the DB instance and Start . 6) To remove below warning execute the below command from sysdba users .zip and un-archive to location as : D:\temp\5731187 . After that execute Step 2&3 again and the warning should be removed and timzone file version should be upgraded. Download the file : p5731187_10105_WINNT. For my Windows 32 bit the patch(5731187) could be found at Metalink. .

…. PL/SQL procedure successfully completed. SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS(’SYSMAN’).GATHER_DICTIONARY_STATS. SYSMAN Gather Dictionary stats: Connect as sys user and gather statistics SQL> EXEC DBMS_STATS. PL/SQL procedure successfully completed. SYS …. Component Schemas with stale statistics: ….GATHER_SCHEMA_STATS(’SYS’). .To avoid showing other warnings use Oracle Documentation about Pre-Upgrade Information Final) Now lets perform the Database upgrade steps using : Database Upgrade Assistant(DBUA) a GUI to upgrade the DB and it can be found under Start -) All Programs -) Oracle 11g Home -) Configuration and Migration Tool and follow through the onscreen steps …. 7) I skip the other warnings . SQL> EXEC DBMS_STATS.

.

N. But alas ! life is no longer easy and another problem crops up .B : You if are interested about the Manual upgradation using the scripts rather using the DBUA you can take the reference of onlineappsdba or Advait Blog . everything looks fine after post upgradation messages ! So lets wash hands and think more . The problem was I supposed to delete the Oracle11g TNS Service for 11g from Windows Registry after Software installation only and before creating the DB using DBUA .Apart from this.That is the reason why the . After running for quite a long time (more than ~1 hr) the upgrade finishes .Enterprise Manager console is not getting configured as there are some problem with 11g TNS service .

The nuisance created by me and need to solve by me only .Its pretty simple …again if you know the right way of doing it and finally reconfigure it .Follow the below command line utilities to drop the Enterprise Manager Repository and reconfigure it . N.TNS fails and this inturn cause the configuration failure for EMCA . .e at Registry ! Also don’t try to create service manually by using sc. Rely on Oracle Native Net Config Assistant all time Hence … My Oracle 11g TNS is ready …DB is up and running fine…See below : Now lets resolve the problem of EMCA.Otherwise run : D:\Oradb11g\bin\launch. Run the “Net Configuration Assistant” from Program files OracleHome entry of start menu . This problem might not crops up in your case .exe windows utility .I suppose . Its pretty hard believe me until you dont know the impact in Windows Heart … i.Otherwise follow the below steps to create the TNS .exe .B : Dont try to tweak registry and copy 10g TNS listener or modify it to point to 11g . Create the TNS service is pretty easy there .msc from Windows Run option .Add new service with a name and the entry will be added automatically in Windows service list . Check by running : services.

DB.2. BACKUP BINARIES.SPFILE.PWFILE THAT ARE BEING UPGRADED 2. COMPATIBLE PARAMETER MUST BE SET TO MINIMUM 10. .0. Part A.INIT.TNSNAMES.And finally all is done and lets Cheers ! Follow Me on: Upgrade Steps From 10g to 11gR2 1.LISTENER. THE RECOMMENDED IS 11. Install the New Oracle Database Software & Apply any patches necessary.0.0 FOR 11gR2 PARAMETER FILE.0.

Change directory to /tmp that you copied u in Step 1. Start SQL*Plus and login as ‘/ as sysdba’ 5. 2. Spool the results to a log file: o SQL> SPOOL upgrade_info. 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. The following is an example of the output generated by the Pre-Upgrade Information Tool: Run the Pre-Upgrade Information Tool Upgrading to the New Release 3-9 .lo g .Part B. Run the Pre-Upgrade Information Tool tool) (You Must Run This 1. 3.log 6. Copy the Pre-Upgrade Information Tool (ufrom the Oracle Database 11gR2 )t directory: $ORACLE_HOME/rdbms/admin to a temporary directory /tmp. to t 4. Assuming 10g. Set your environment to the one that is being upgraded.

Run the Pre-Upgrade Information Tool 3-10 Oracle Database Upgrade Guide .

Example: CONNECT role now only has create session privilege.Run the Pre-Upgrade Information Tool Upgrading to the New Release 3-11 1 . The following points must be addressed correctly otherwise there maybe problems. . . Check the warning messages and rectify them as needed.

you may want to back up the sys. Oracle recommends gathering stats before the upgrade: EX B M DEC ■ 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 Resolve Outstanding Distributed Transactions Sync Standby Database with the Primary Database Purging the Database Recycle Bin ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ Part C. Update init files with new COMPATIBLE parameter.link$ table to save the information. Update any relative path names in parameter file to fully path names. 2.If you have any db links with passwords. tnsnames. 3. Shutdown the database: o SQL> SHUTDOWN IMMEDIATE. fix any deprecated ones. Copy configuration files (init file. pwfile) from old Oracle Home to new. Make sure the following checks: . 2. and adjust the values to at least the minimum values indicated by the Pre-Upgrade Tool. Upgrade the Database 1. Part D. Prepare the new 11gR2 ORACLE_HOME 1. listener.

1/rdbms/admin> pwd /opt/app/oracle/product/11. Change to the $ORACLE_HOME/rdbms/admin directory and start SQL*Plus o sqlplus ‘/ as sysdba’ 4. Run catuppst. o SQL> SPOOL upgrade.1/rdbms/admin> pwd /opt/app/oracle/product/11.1/rdbms/admin oracle@apt-amd-02:/opt/app/oracle/product/11.sql -rw-r--r-. Start the instance by issuing following command (you may get messages that parameters are obsolete. shutdown the database and restart it.) o SQL> @utlul12s. Run the Post-Upgrade Status Tool to provide a summary of the upgrade. Upgrade Oracle Database 10g to 11g Manual Upgrade We are going to use Manual Upgrade Install 11g database software in different ORACLE_HOME from source Database oracle@apt-amd-02:/opt/app/oracle/product/11. Once completed. 7.o The oratab file points to Oracle Database 11g Release 2 Oracle Home o The following environment variables point to the Oracle 11g Release 2 directories:  ORACLE_HOME  PATH 3. o SQL> STARTUP.sql 8. o SQL> SELECT distinct object_name FROM dba_invalid_objects.sql 6. Verify that all objects are valid: o SQL> SELECT count(*) FROM dba_invalid_objects. o SQL> $ORACLE_HOME/rdbms/admin/utlrp.sql oracle@apt-amd-02:/opt/app/oracle/product/11.1 oracle oinstall 138636 2007-07-11 09:01 utlu111i. then check upgrade manual for fixes.0 .0.1/rdbms/admin oracle@apt-amd-02:/opt/app/oracle/product/11.4. Run utlrp to recompile any remaining stored PL/SQL and other objects.sql script: o SQL> @catupgrd.log 5.1/rdbms/admin> sqlplus /nolog SQL*Plus: Release 10.sql to perform upgrade actions that do not require db to be in upgrade mode: o SQL> $ORACLE_HOME/rdbms/admin/catuppst. fix those and start up the db again): o SQL> STARTUP UPGRADE.sql 10. Run the catupgrd.1/rdbms/admin> ls -lt utlu111i. o SQL> SHUTDOWN IMMEDIATE.2.sql 9. (If there are any INVALID components.Production on Tue Apr 27 09:28:04 2010 .

.ora or spfile] ********************************************************************** -..lst SQL> @utlu111i.0. .3. ..1 Pre-Upgrade Information Tool 04-27-2010 09:29:25 . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade.. .0 --> blocksize: 8192 --> platform: Linux x86 64-bit --> timezone file: V4 .. ********************************************************************** Database: ********************************************************************** --> name: VIHAAN --> version: 10.... SQL> spool anujupgrade. AUTOEXTEND additional space required: 41 MB --> EXAMPLE tablespace is adequate for the upgrade. ********************************************************************** Update Parameters: [Update Oracle Database 11. 2007. AUTOEXTEND additional space required: 443 MB --> SYSAUX tablespace is adequate for the upgrade.0.... ********************************************************************** Renamed Parameters: [Update Oracle Database 11.ora or spfile] ********************************************************************** WARNING: --> "sga_target" needs to be increased to at least 672 MB . minimum required size: 69 MB . ..0 --> compatible: 10. minimum required size: 473 MB ...4.Copyright (c) 1982... No changes are required.1 init.sql Oracle Database 11.No renamed parameters found.. minimum required size: 425 MB . .2. AUTOEXTEND additional space required: 175 MB --> TEMP tablespace is adequate for the upgrade. .. All Rights Reserved. minimum required size: 727 MB .. Oracle. AUTOEXTEND additional space required: 247 MB --> UNDOTBS1 tablespace is adequate for the upgrade....1 init. minimum required size: 61 MB ..... ..2.

.. Refer to the 11g Upgrade Guide for instructions to update .. Component Schemas with stale statistics: . ...1 init. ... USER PUBLIC has 1 INVALID objects..... XDB .... SYSMAN . WARNING: --> Database contains schemas with objects dependent on network . USER SYS has 2 INVALID objects.... SYS ... MDSYS WARNING: --> Database contains INVALID objects prior to upgrade.ora or spfile] ********************************************************************** --> "background_dump_dest" replaced by "diagnostic_dest" --> "user_dump_dest" replaced by "diagnostic_dest" --> "core_dump_dest" replaced by "diagnostic_dest" .. statistics prior to upgrading the database. ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Database contains stale optimizer statistics...********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 11..... ********************************************************************** 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 --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> EM Repository [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [upgrade] VALID --> Oracle Java Packages [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID --> Data Mining [upgrade] VALID --> Expression Filter [upgrade] VALID --> Rule Manager [upgrade] VALID --> Oracle OLAP API [upgrade] VALID ... CTXSYS . . ...... OLAPSYS .

.2.2..4. SQL> select object_name. .3 VALID JServer JAVA Virtual Machine 10. object_type from all_objects where status like 'INVALID'. ..0 VALID Oracle XDK 10.2.2.0. status from dba_registry COMP_NAME VERSION STATUS -------------------------------------------------.. If time zone file version is less than 4 then apply time zone patch 5632264 manually select object_name. Refer to the .version.0 VALID Oracle Workspace Manager 10. SQL> select * from v$timezone_file.0.4.0.4.0 VALID Oracle Database Packages and Types 10. WARNING: --> EM Database Control Repository exists in the database. PL/SQL procedure successfully completed.------------------------------------------------------------------------Oracle Database Catalog Views 10.packages.-----------------------------OBJECT_TYPE ------------------DBMS_REGISTRY SYS PACKAGE BODY DBA_REGISTRY_DATABASE SYS VIEW DBA_REGISTRY_DATABASE PUBLIC SYNONYM col COMP_NAME format a50 set linesize 200 set pagesize 200 SQL> r 1* select comp_name.0. .. owner..4.0.. owner.2.. OBJECT_NAME OWNER -----------------------------.4.0 VALID Oracle Database Java Packages 10.. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.2. Direct downgrade of EM Database Control is not supported.0 VALID .4. object_type from all_objects where status like 'INVALID'. 11g Upgrade Guide for instructions to save the EM data prior to upgrade.0.

compatible=’11.ctl' *.diagnostic_dest=’/11g_base’ (11g Base Directory) b) Change *.control_files='/opt/app/oracle/datafile/vihaan/control01.db_domain='apt-amd-02' *.4.0.0. *.4.__large_pool_size=4194304 vihaan.0.0 VALID Spatial 10.0 VALID Oracle Data Mining 10.0' to *.ctl'.background_dump_dest.2.4.ora a) Remove *.4.Oracle Expression Filter 10.0.0 VALID Oracle Enterprise Manager 10.0.1.4.4.0 VALID Oracle Text 10.2.2.2.0.__java_pool_size=4194304 vihaan.2.'/opt/app/oracle/datafile/vihaa n/control02. 1.__shared_pool_size=142606336 vihaan.2.4.core_dump_dest.0 VALID OLAP Analytic Workspace 10.0.4.2.0 VALID Oracle XML Database 10.__db_cache_size=377487360 vihaan.4.7 If you are using spfile.2.compatible='10.2.4.__streams_pool_size=0 *.0 VALID 17 rows selected.user_dump_dest and add *.4.1.2.0.db_file_multiblock_read_count=16 .0 VALID Oracle Rules Manager 10.ctl'.2. create pfile SQL> create pfile from spfile . This will create pfile in 10g $ORACLE_HOME/dbs/init[SID].0 VALID Oracle interMedia 10.db_block_size=8192 *.0.0. *.0 VALID OLAP Catalog 10.0.0.'/opt/app/oracle/datafile/vihaan/control03.2.0′ vihaan.0 VALID Oracle OLAP API 10.

processes=150 *.2 Set your environment variables to Oracle Database 11g Release 1 (11.2 oracle oinstall 4096 2010-04-27 09:20 udump drwxr-x--. SQL> shutdown immediate .2 oracle oinstall 6 2010-04-26 13:20 dpdump 2. Database dismounted.1.2 oracle oinstall 6 2010-04-26 13:20 cdump drwxr-x--.0' *.nls_language='ENGLISH' *.2/dbs> mkdir -p /opt/app/oracle/admin/vihaan/diagnostic oracle@apt-amd-02:/opt/app/oracle/product/10. Upgrade Database Shut down source database (10g) .sga_target=536870912 *.db_name='vihaan' *.job_queue_processes=10 *.2 oracle oinstall 35 2010-04-26 13:26 pfile drwxr-x--.*.compatible='11.remote_login_passwordfile='EXCLUSIVE' *.undo_management='AUTO' *.nls_territory='UNITED KINGDOM' *.2 oracle oinstall 141 2010-04-27 09:20 bdump drwxr-x--. 2.Your downtime starts here SQL> connect sys/sys as sysdba Connected.2/dbs> cd /opt/app/oracle/admin/vihaan/ oracle@apt-amd-02:/opt/app/oracle/admin/vihaan> ls -lt total 8 drwxr-xr-x 2 oracle oinstall 6 2010-04-27 09:43 diagnostic drwxr-x--. Database closed.1) : .undo_tablespace='UNDOTBS1' *.pga_aggregate_target=199229440 *.dispatchers='(PROTOCOL=TCP) (SERVICE=vihaanXDB)' *.2 oracle oinstall 4096 2010-04-27 09:29 adump drwxr-x--. ORACLE instance shut down.open_cursors=300 *.diagnostic_dest='/opt/app/oracle/admin/vihaan/diagnostic' oracle@apt-amd-02:/opt/app/oracle/product/10.

Production on Tue Apr 27 09:50:25 2010 Copyright (c) 1982.3 Start Upgrade oracle@apt-amd-02:~> pwd /home/oracle oracle@apt-amd-02:~> sqlplus / as sysdba SQL*Plus: Release 11.1.export ORACLE_HOME=/u01/oracle/11gbase/11. Oracle.1 export ORACLE_SID=vihaan export PATH=$ORACLE_HOME/bin:$PATH:.0 export ORACLE_SID=TEST export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_BASE=/opt/app/oracle export ORACLE_HOME=/opt/app/oracle/product/10. All rights reserved.2 #export ORACLE_HOME=/opt/app/oracle/product/11. SQL> startup upgrade pfile='/tmp/initvihaan.0.0 . 2007.ora' . Total System Global Area 534462464 bytes Fixed Size 2146112 bytes Variable Size 150995136 bytes Database Buffers 377487360 bytes Redo Buffers 3833856 bytes Database mounted.1. Database opened. Check shared_pool & java_pool size. Connected to an idle instance. export LIBXCB_ALLOW_SLOPPY_LOCK=1 export TZ=GMT comment the oracle 10g home and uncomment 11g 2. to set new values . ORACLE instance started.6.

Database closed. ORACLE instance shut down. SQL> SQL> SQL> SQL> DOC DOC>############################################################# ########## DOC>############################################################# ########## DOC> DOC> The above sql script is the final step of the upgrade. DOC> DOC> Next restart for normal operation.SQL> spool anujupgrade. SQL> SQL> Rem ********************************************************************* . Please DOC> review any errors in the spool log file. and then run utlrp. SQL> /*****************************************************************************/ SQL> /* Step 10 . If there are any errors in DOC> the spool file.sql after catupgrd. Database dismounted.log SQL> @?/rdbms/admin/catupgrd.!!!!! SQL> */ SQL> /*****************************************************************************/ SQL> shutdown immediate.. DOC> DOC>############################################################# ########## DOC>############################################################# ########## DOC># SQL> SQL> SQL> SQL> SQL> SQL> Rem Set errorlogging off SQL> SET ERRORLOGGING OFF.sql to DOC> recompile any invalid application objects.SHUTDOWN THE DATABASE.sql database will be shutdown . consult the Oracle Database Upgrade Guide for DOC> troubleshooting recommendations.

0 00:01:40 Oracle OLAP API .6. VALID 11.6.6. column 1: . PL/SQL: SQL Statement ignored .0 00:00:26 Oracle Enterprise Manager .0.2. Database opened.6. VALID 10.6. ORA-06550: line 5.SQL> Rem END catupgrd.0.1.0 00:42:49 JServer JAVA Virtual Machine .1.0. ORA-06550: line 5.sql SQL> Rem ********************************************************************* SQL> ===== SQL> startup pfile='/tmp/initvihaan.4. PL/SQL: ORA-00942: table or view does not exist . column 35: .1. Total System Global Area 534462464 bytes Fixed Size 2146112 bytes Variable Size 150995136 bytes Database Buffers 377487360 bytes Redo Buffers 3833856 bytes Database mounted.0. ORA-00001: unique constraint (SYSMAN.0. SQL> @?/rdbms/admin/utlu111s.1 Post-Upgrade Status Tool 04-27-2010 12:11:48 .3 00:00:01 OLAP Analytic Workspace . VALID 11. VALID 11. VALID 11.0.1.PARAMETERS_PRIMARY_KEY) violated .ora' . Oracle Server .0 00:20:34 Oracle Workspace Manager .0 00:00:55 OLAP Catalog . VALID 11. Component Status Version HH:MM:SS . ORACLE instance started.1.sql Oracle Database 11.

0 00:13:43 Oracle Database Java Packages . VALID 11.0. ORA-06512: at line 2 .0 00:01:41 Oracle XML Database .6.1.0. VALID 11.6. VALID 11.6. VALID 11.0.MGMT_TIME_SYNC".0 00:00:15 Oracle Rules Manager .0 00:00:42 Oracle Multimedia .1. ORA-06512: at "SYSMAN.0 00:00:13 Gathering Statistics .0. SQL> SQL> SET SERVEROUTPUT OFF SQL> SET VERIFY ON Workaround: These errors do not result in any data loss.0 00:09:04 Spatial .1.1.1. VALID 11.6.0.MGMT_TIME_SYNC".0. ORA-06512: at "SYSMAN.0. Therefore. line 108 . =============================== or apply Patch 7449757 oracle@apt-amd-02:~> unzip p7449757_111070_Generic.1.zip creating: 7449757/ creating: 7449757/etc/ creating: 7449757/etc/xml/ . line 166 .6.0 00:01:37 Oracle Text . VALID 11.6. 00:05:25 Total Upgrade Time: 02:06:28 PL/SQL procedure successfully completed.1. you can ignore these errors.1.0 00:06:41 Oracle Expression Filter .6.6.0 00:20:30 Oracle XDK . VALID 11..0.0.zip Archive: p7449757_111070_Generic.1.6. VALID 11. VALID 11.

COUNT(*) ---------0 Post Upgrade steps Check status of database components SQL>select comp_name.xml inflating: 7449757/README.0 ==== SQL> @?/rdbms/admin/catuppst.1.xml inflating: 7449757/etc/xml/GenericActions. File created.sql SQL> create spfile from pfile='/tmp/initvihaan.ora' . status from dba_registry.xml creating: 7449757/etc/config/ inflating: 7449757/etc/config/actions.sql oracle@apt-amd-02:~> cd 7449757/ oracle@apt-amd-02:~/7449757> pwd /home/oracle/7449757 oracle@apt-amd-02:~/7449757> /opt/app/oracle/product/11.0.inflating: 7449757/etc/xml/ShiphomeDirectoryStructure.6.xml inflating: 7449757/etc/config/inventory. SQL> col COMP_NAME format a40 SQL> set pagesize 200 . Check invalid objects SQL> select count(*) from dba_objects where status like 'INVALID'.txt creating: 7449757/files/ creating: 7449757/files/rdbms/ creating: 7449757/files/rdbms/admin/ inflating: 7449757/files/rdbms/admin/i1002000.version.1/OPatch/opatch apply Invoking OPatch 11.sql SQL> @?/rdbms/admin/utlrp.

7 # 413671.0 VALID OLAP Catalog 11.0.6.429825.1.1.0.0.0.6.0 VALID JServer JAVA Virtual Machine 11.0.6.0.1.1.1 Upgrading to 11g Fails with ORA-01722: invalid number Check Metalink note: Complete Checklist for Manual Upgrades to 11gR1 .DIANA_VERSION$ During RDBMS Upgrade From 11.0.--------------Oracle Enterprise Manager 11.version.-----------------------------.4.1.0 VALID Oracle Rules Manager 11.2.1 Complete Checklist for Manual Upgrades to 11gR1 # 744693.ora.6.6.3 VALID Oracle Database Catalog Views 11.0 VALID Oracle XDK 11.1.0.1.6.0.1.6 To 11.0.1.0.0.1.0. sqlnet.ora and include file from source (10g) oracle_home to target (11g) oracle_home === useful link # 429825.6.1.0 VALID 17 rows selected.ora.0 VALID Spatial 11.0.1 .0 VALID Oracle Workspace Manager 10.0 VALID Oracle Database Packages and Types 11.1.1 Usage of utltzuv2.0.1.0 VALID Oracle Multimedia 11.6.1 Workarounds when Database time zone patches are not available for your patchset # 396671.0 VALID Oracle OLAP API 11.0 VALID Oracle Database Java Packages 11. status from dba_registry COMP_NAME VERSION STATUS ---------------------------------------.1.6.sql before updating time zone files in Oracle 10 # 730057.6.0 VALID Oracle XML Database 11.6.6.0.0 VALID OLAP Analytic Workspace 11.0.1 ORA-00001 For SYS.0. listener.6.1.1.0 VALID Oracle Data Mining 11.6.0. Copy tnsnames.1.1 Applying version 4 Time Zone Files on an Oracle Database # 396387.0 VALID Oracle Expression Filter 11.6.0 VALID Oracle Text 11.1.6.SQL> set linesize 200 SQL> col STATUS format a15 SQL> select comp_name.

Manually upgrade Database (10.. SQL> exec dbms_stats. for schema stats exec dbms_stats.gather_fixed_objects_stats.sql 2.4) to Oracle database 11g2 on RHEL 5 1. Run utlrp...AUTO_DEGREE . SQL> exec dbms_stats.cascade=>true) . 2010 2 comments: Anuj Singh said.2. Check dba_registry .sql to recompile any remaining stored PL/SQL and Java code. PL/SQL procedure successfully completed.method_opt=>'for all columns size skewonly'.Posted by Anuj Singh at Tuesday.gather_dictionary_stats. PL/SQL procedure successfully completed.0. 2 September 2011 16:45 Anuj Singh said. SQL> @utlrp.gather_schema_stats (ownname=>'PROD1'. April 27. estimate_percent=>100.. degree => DBMS_STATS.

. 8.2) Oracle home directory. Analyze the existing instance using the SQL>@$ORACLE_11G_HOME/rdbms/admin/utlu112i. Your ORACLE_SID is set correctly c. If your operating system is Linux or UNIX. version .object_type order by 1. Shut down the instance: SQL> SHUTDOWN IMMEDIATE 7. b. 2 Oracle home. At a system prompt. Log in to the system as the owner of the Oracle Database 11g Release 2 (11.count(*) from dba_objects where status <>’VALID’ group by owner.sql script 6. The following environment variables point to the Oracle Database 11g2 directories: – ORACLE_HOME – PATH d. then perform these checks on all nodes in which this cluster database has instances configured. Any scripts that clients use to set the ORACLE_HOME value must point to the New Oracle home. Backup the database. SQL>select owner. Verify that all expected packages and classes are valid: SQL> select count(*) from dba_objects where status <>’VALID’. 3. change to the $ORACLE_HOME/rdbms/admin directory.2.object_type. Note: If you are upgrading a cluster database.column comp_name format a40 set pagesize 50 set line 2000 select trim(comp_name) comp_name . status from dba_registry. 5. The oratab file points to your Oracle Database 11g Rel. 4. then make the following checks: a.

Set the system to spool results to a log file for later verification of success: SQL> SPOOL upgrade.sql to display the results of the upgrade: SQL> @$ORACLE_HOME/rdbms/admin/utlu112s. to perform upgrade actions that do not require the database to be in UPGRADE mode: SQL> @rdbms/admin/catuppst. Run utlrp.sql. Restart the instance to reinitialize the system parameters for normal operation. Connect to the database instance as a user with SYSDBA privileges. located in the ORACLE_HOME/rdbms/admin directory. SQL> STARTUP 14.sql 16. 13. Run utlu112s.log 12.sql This scripts runs the desired upgrade scripts and Shuts Down the database.sql script: SQL> @catupgrd.9.sql 15. Copy init or spfile file to 11g ORACLE_HOME. Start the instance by issuing the following command: SQL> STARTUP UPGRADE 11. (Optional ) Run catuppst. .sql to recompile any remaining stored PL/SQL and Java code. 10. Run the catupgrd.

SQL> @utlrp.sql

17. Verify that all expected packages and classes are valid:
SQL> SELECT count(*) FROM dba_invalid_objects; SQL> SELECT distinct object_name FROM dba_invalid_objects;

18. Exit SQL* Plus

Upgrade Oracle from 10.2.0.1 To 10.2.0.4
1. Patch Set Overview Patch set release 10.2.0.4. Before installing this patch set you must be need 10.2.0.1 version. 2. Requirements Oracle DB : Oracle 10.2.0.1 (later) Operating System: Windows

3. Pre - Installation Tasks 1. Identify prior installation Before installing this patch you must install oracle 10.2.0.1 (or later version) 2. Download Patch set Download 6810189 patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory. 3. Shutdown oracle database. C:\>set oracle_sid= GOLDLINK C:\>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 13 10:49:26 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> connect sys@GOLDLINK as sysdba Enter password: Connected. SQL> SHUTDOWN Database closed. Database dismounted. ORACLE instance shut down. 4. Stop all services C:\>set oracle_sid=GoldLink C:\>net stop OracleDBConsoleGOLDLINK The OracleDBConsoleGOLDLINK service is stopping................ The OracleDBConsoleGOLDLINK service was stopped successfully.

C:\>net stop OracleServiceGOLDLINK The OracleServiceGOLDLINK service is stopping. The OracleServiceGOLDLINK service was stopped successfully.

C:\>net stop OracleOraDB10g_Home1iSQL*Plus.. The OracleOraDb10g_home1iSQL*Plus service was stopped successfully. C:\>net stop OracleOraDB10g_Home1TNSListener The OracleOraDb10g_home1TNSListener service is stopping. The OracleOraDb10g_home1TNSListener service was stopped successfully. Note: while patch installation time If you face Distributed Transaction Coordinator still running. You should be stop this service C:\>net stop msdtc The Distributed Transaction Coordinator service is stopping. The Distributed Transaction Coordinator service was stopped successfully. 4. Backup your database & Old oracle binaries. Oracle recommends that you create a backup of the Oracle 10g installation before you install the patch set.

--- Check Tablespace Sizes and Set Parameter Values Review the following sections before upgrading a database.

5. Install the new patch Binaries on same Oracle Home Install the new patch binaries on same oracle home.

6. Upgrade the Database After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home: 1. Start all services 2. Connect sys user C:\> sqlplus /NOLOG SQL> CONNECT SYS/SYS_password AS SYSDBA 3. Enter the following SQL*Plus commands: SQL> STARTUP UPGRADE SQL> SPOOL patch.log SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sql SQL> SPOOL OFF Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script. This list provides the version and status of each SERVER component in the database. If necessary, rerun the catupgrd.sql script after correcting any problems. 4. Restart the database: SQL> SHUTDOWN SQL> STARTUP 5. Compile Invalid Objects

3.4.sql SQL> select * from v$version. the following must be done for every database the DBA is responsible for: 1.Run the utlrp.2.2. 7.0. http://www.4.Production NLSRTL Version 10.0.Shutdown DB ( Shut down all database of ORACLE_HOME) sqlplus /nolog & Listner . Restart the database and listener Run Catcpu. Regardless of the reason. 6. 4. BANNER ---------------------------------------------------------------Oracle Database 10g Release 10. This step is optional but recommended.5_ UNIX A common DBA task is to patch Oracle homes and databases. unzip p10249537_10205_LINUX.sql. 2. Make sure the environment is setup properly to run Opatch.htm =================================================================== ====================================================== step 1 --.sql to compile PL/SQL.Production PL/SQL Release 10.0 .sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time.0. Patch the Oracle home. Run Utlrp.2.4.2. 5.zip step 2 --.0 .0 .Production CORE 10.2.0.dba-oracle.0 Production TNS for 32-bit Windows: Version 10.Production PSU Patch_Implementation_steps 10.0 . SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp. The DBA must move the patch software to the server and unzip the file. Shutdown the listener and database.2.0.0.copy the patch patch software to the server and unzip the file. These patches can be one of the many bug fixes or the quarterly CPU.4.com/t_patching_cloning_oracle_home.4.

0.2.loc tar -cvzf /u01/oradata/backup/myOracleInventoryClonePSU.gz /u01/app/oracle/product/10. $lsnrctl LSNRCTL> status LSNRCTL> stop step 3 --. they are located in /usr/ccs/bin.tar.2. and nm.9 .conn / as sysdba SQL> create pfile from spfile. SQL> shutdown immediate.0/db_1 Database Cold Backup --------------------tar -cvzf /u01/oradata/backup/myOracleDATABASEClonePSU. ld.Patch Installation Instructions #Ensure that the $PATH has the following executables: make.4.gz /u01/oradata/stumarket step 4 --.tar.tar. #The location of these executables depends on your operating system. in which case you can set your PATH as follows: #export PATH=$PATH:/usr/ccs/bin $ export PATH=$PATH:/usr/bin #Check applied patches $ORACLE_HOME/OPatch/opatch lsinventory ********************************************************* [oracle@aud1ora01 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory Invoking OPatch 10. ar.gz /u01/app/oracle/oraInventory ORACLE_HOME Binaries backup --------------------------tar -cvzf /u01/oradata/backup/myOracleHomeClonePSU.Take the backup of ORACLE Binaries & Database ( RMAN or COLD) inventory backup ---------------cat /etc/oraInst. SQL> alter database backup controlfile to trace. On many operating systems.

0 OUI location : /u01/app/oracle/product/10.4.4.5. Interim patches (2) : Patch 9963497 : applied on Thu Feb 10 17:58:14 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 2 Aug 2010.2.2.0a -------------------------------------------------------------------------------OPatch succeeded.0.Oracle Interim Patch Installer version 10.0/db_1/cfgtoollogs/opatch/opatch2011-02-14_17-3620PM. 9952270 10.2.2.1.2. All rights reserved. Oracle Home : /u01/app/oracle/product/10.0.2.2. .2. 08:51:21 hrs PST8PDT Bugs fixed: 10249537. Oracle Corporation. All rights reserved.9 OUI version : 10.2.0.loc OPatch version : 10.9 Copyright (c) 2009.2.5.0 10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt -------------------------------------------------------------------------------Installed Top-level Products (2): Oracle Database 10g Oracle Database 10g Release 2 Patch Set 4 There are 2 products installed in this Oracle Home. 03:38:02 hrs PST8PDT Bugs fixed: 9963497 Patch 10249537 : applied on Thu Feb 10 17:58:10 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 14 Dec 2010.0.9 Oracle Interim Patch Installer version 10.9 Copyright (c) 2009.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst.0.log Patch history file: /u01/app/oracle/product/10.0/db_1/oui Log file location : /u01/app/oracle/product/10.0. ************************************************************ #One-off Patch Conflict Detection and Resolution $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/10248542 ************************************************************* [oracle@aud1ora01 10248542]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/10248542 Invoking OPatch 10.4. Oracle Corporation.0.4.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-02-14_17-36-20PM.2.txt Lsinventory Output file location : /u01/app/oracle/product/10.

1 OPatch Version: 10.5.loc OPatch version : 10.2.2.0.2.0.0/db_1/oui Log file location : /u01/app/oracle/product/10. Prereq "checkConflictAgainstOHWithDetail" failed.2.0/db_1/cfgtoollogs/opatch/opatch2011-02-14_17-3936PM.2. as they are subset of the patches in Oracle Home or subset of the patches in the given list : 9963497. 10249537 Following patches will be rolled back from Oracle Home on application of the patches in the given list : 9963497.9 OUI version : 10.2.5.4.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst.zip $ORACLE_HOME/OPatch/opatch version Invoking OPatch 10. 10249537 Conflicts/Supersets for each patch are: Patch : 10248542 Bug Superset of 9963497 Super set bugs are: 9963497 Bug Superset of 10249537 Super set bugs are: 10249537.0/db_1/cfgtoollogs/opatch/opatch_history.5.0.2.txt Invoking prereq "checkconflictagainstohwithdetail" ZOP-40: The patch(es) has conflicts/supersets with other patches installed in the Oracle Home (or) among themselves. 9952270 OPatch succeeded.2. ************************************************************* # Update the opatch cp p6880880_102000_LINUX.log Patch history file: /u01/app/oracle/product/10.1 =================================== .0.PREREQ session Oracle Home : /u01/app/oracle/product/10.zip $ORACLE_HOME cd $ORACLE_HOME unzip p6880880_102000_LINUX. Summary of Conflict Analysis: Patches that can be applied now without any conflicts are : 10248542 Following patches are not required.0 OUI location : /u01/app/oracle/product/10.

This might take a while..0/db_1' Backing up files affected by the patch '10249537' for rollback.0.4.0/db_1/cfgtoollogs/opatch/opatch_history.2.9 Copyright (c) 2009..0/db_1/oui Log file location : /u01/app/oracle/product/10. . This might take a while. Checking skip_duplicate Checking skip_subset Checking conflicts against Oracle Home..0/db_1/cfgtoollogs/opatch/opatch2011-02-10_17-5737PM.5. OPatch continues with these patches: 10249537 9963497 Do you want to proceed? [y|n] y User Responded with: Y Running prerequisite checks.2..2..2. UTIL session Oracle Home : /u01/app/oracle/product/10.2.9 Oracle Interim Patch Installer version 10.2.0. Oracle Corporation.. ApplySession applying interim patch '10249537' to OH '/u01/app/oracle/product/10.4. Backing up files affected by the patch 'NApply' for restore. All rights reserved.2.9 OUI version : 10..2. OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only...0.0..#Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands: $ cd 10248542 $ $ORACLE_HOME/OPatch/opatch apply ******************************************** [oracle@aud1ora01 10249537]$ $ORACLE_HOME/OPatch/opatch apply Invoking OPatch 10.log Patch history file: /u01/app/oracle/product/10. Execution of 'sh /home/oracle/10249537/10249537/custom/scripts/pre -apply 10249537 ': Return Code = 0 Applying patch 10249537.2.4. Skip patch 10327179 from list of patches to apply: This patch is not needed.. Checking if Oracle Home has components required by patches.txt Invoking utility "napply" Checking conflict among patches.loc OPatch version : 10..0 OUI location : /u01/app/oracle/product/10..0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst..

sql" Copying file to "/u01/app/oracle/product/10. 10.sql ################################################################## Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle for any errors: catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.0/db_1/cpu/CPUJan2011/catcpu. 10.log catbundle_CPU_<database SID>_GENERATE_<TIMESTAMP>.rdbms. Connect as SYSDBA and run the catbundle..lst" Copying file to "/u01/app/oracle/product/10. This might take a while. Copying file to "/u01/app/oracle/product/10. Files check OK: Files from Patch ID 10249537 are present in Oracle Home.0. OPatch succeeded.sql" Patching component oracle.0/db_1/rdbms/admin/prvtjob. The local system has been patched and can be restarted.0/db_1/cpu/CPUJan2011/rollback_new..0. Files check OK: Files from Patch ID 9963497 are present in Oracle Home.5.plb" ApplySession adding interim patch '9963497' to inventory Verifying the update. Copying file to "/u01/app/oracle/product/10.rdbms.2.2....2.0.5.. Patching component oracle.. 10.Post Installation Instructions Loading Modified SQL Files into the Database -------------------------------------------#For each database instance running on the Oracle home being patched.2.2.lst" ApplySession adding interim patch '10249537' to inventory Verifying the update. [oracle@aud1ora01 10249537]$ ************************************************************************************* Step 5 -. UtilSession: N-Apply done.sql script as follows: cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> @catbundle.0...0/db_1/cpu/CPUJan2011/rollback_all..0/db_1' Backing up files affected by the patch '9963497' for rollback. Inventory check OK: Patch ID 10249537 is registered in Oracle Home inventory with proper meta-data.2.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS..2.0.0/db_1/cpu/CPUJan2011/catcpu_rollback.2.2..2. ApplySession applying interim patch '9963497' to OH '/u01/app/oracle/product/10..0/db_1/rdbms/admin/bundledata_CPU..0. .5. Applying patch 9963497.Patching component oracle. Copying file to "/u01/app/oracle/product/10. Inventory check OK: Patch ID 9963497 is registered in Oracle Home inventory with proper meta-data. connect to the database using SQL*Plus.sql psu apply SQL> @utlrp.rdbms.rsf.xml" Copying file to "/u01/app/oracle/product/10.

4.2. 9952270 10.0a -------------------------------------------------------------------------------OPatch succeeded.log Patch history file: /u01/app/oracle/product/10.2. Oracle Corporation.2.2.0/db_1/cfgtoollogs/catbundle/catbundle_CPU_UMARKET_APPLY_2011Feb10_ 18_04_02.0.0 10.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst.0.loc OPatch version : 10. .0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-02-10_18-07-49PM.0/db_1/cfgtoollogs/opatch/opatch_history.2. Oracle Home : /u01/app/oracle/product/10.2.2. Interim patches (2) : Patch 9963497 : applied on Thu Feb 10 17:58:14 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 2 Aug 2010.2. $ORACLE_HOME/OPatch/opatch lsinventory ****************************************************************** [oracle@aud1ora01 admin]$ $ORACLE_HOME/OPatch/opatch lsinventory Invoking OPatch 10.9 OUI version : 10.Cross check patch implementation.log ################################################################## Step 6 -.0/db_1/cfgtoollogs/opatch/opatch2011-02-10_18-0749PM.9 Oracle Interim Patch Installer version 10.5.2.1.txt Lsinventory Output file location : /u01/app/oracle/product/10.0.0.2.0 OUI location : /u01/app/oracle/product/10. 08:51:21 hrs PST8PDT Bugs fixed: 10249537.4.4.txt -------------------------------------------------------------------------------Installed Top-level Products (2): Oracle Database 10g Oracle Database 10g Release 2 Patch Set 4 There are 2 products installed in this Oracle Home.0.5. 03:38:02 hrs PST8PDT Bugs fixed: 9963497 Patch 10249537 : applied on Thu Feb 10 17:58:10 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 14 Dec 2010.2.0/db_1/oui Log file location : /u01/app/oracle/product/10.0.9 Copyright (c) 2009.2.Note --Check the following log file for errors: /u01/app/oracle/product/10. All rights reserved.

-----------------------------10-FEB-11 06.02. 6. Make sure the environment is setup properly to run Opatch.copy the patch patch software to the server and unzip the file. http://www. 3.2.0. Regardless of the reason.zip step 2 --.Shutdown DB ( Shut down all database of ORACLE_HOME) & Listner .sql. The DBA must move the patch software to the server and unzip the file.************************************************************************************** ******** col col col col col col action_time for a28 action for a6 namespace for a9 version for a10 id for 99999999 comments for a10 select * from registry.693640 PM APPLY SERVER 10.--------. Patch the Oracle home.dba-oracle. Restart the database and listener Run Catcpu.0. the following must be done for every database the DBA is responsible for: 1. Run Utlrp.04.5_ UNIX A common DBA task is to patch Oracle homes and databases.-----.--------. unzip p10249537_10205_LINUX. Shutdown the listener and database. 7.htm =================================================================== ====================================================== step 1 --. 5.2. These patches can be one of the many bug fixes or the quarterly CPU.5 2 CPUJan2011 CPU CPU Patch_Implementation_steps 10. 4.sql to compile PL/SQL.---------.com/t_patching_cloning_oracle_home. 2.---------. ************************************************************************************** ******** ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SERIES ---------------------------.

SQL> shutdown immediate.tar. On many operating systems.sqlplus /nolog conn / as sysdba SQL> create pfile from spfile.gz /u01/app/oracle/product/10. in which case you can set your PATH as follows: #export PATH=$PATH:/usr/ccs/bin $ export PATH=$PATH:/usr/bin #Check applied patches $ORACLE_HOME/OPatch/opatch lsinventory ********************************************************* . ar. $lsnrctl LSNRCTL> status LSNRCTL> stop step 3 --. #The location of these executables depends on your operating system.gz /u01/oradata/stumarket step 4 --.0/db_1 Database Cold Backup --------------------tar -cvzf /u01/oradata/backup/myOracleDATABASEClone.loc tar -cvzf /u01/oradata/backup/myOracleInventoryClone.gz /u01/app/oracle/oraInventory ORACLE_HOME Binaries backup --------------------------tar -cvzf /u01/oradata/backup/myOracleHomeClone.tar. they are located in /usr/ccs/bin.Patch Installation Instructions #Ensure that the $PATH has the following executables: make. and nm.2. SQL> alter database backup controlfile to trace.tar. ld.Take the backup of ORACLE Binaries & Database ( RMAN or COLD) inventory backup ---------------cat /etc/oraInst.

4.2.2.loc OPatch version : 10.9 OUI version : 10.2.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst. Oracle Home : /u01/app/oracle/product/10.0/db_1/cfgtoollogs/opatch/opatch_history.0.4.2. -------------------------------------------------------------------------------OPatch succeeded. All rights reserved.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst.4.5.2.txt -------------------------------------------------------------------------------Installed Top-level Products (2): Oracle Database 10g Oracle Database 10g Release 2 Patch Set 4 There are 2 products installed in this Oracle Home. UTIL session Oracle Home : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-02-10_17-56-35PM.2.1.0.2.0.9 Copyright (c) 2009.0.loc .2.4.4.9 Oracle Interim Patch Installer version 10.5.0a There are no Interim patches installed in this Oracle Home.0.[oracle@aud1ora01 10249537]$ $ORACLE_HOME/OPatch/opatch lsinventory Invoking OPatch 10. 10.2.2.0. Oracle Corporation.0.2.txt Lsinventory Output file location : /u01/app/oracle/product/10. ************************************************************ #Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands: $ cd 10249537 $ ORACLE_HOME/OPatch/opatch napply -skip_subset -skip_duplicate ******************************************** [oracle@aud1ora01 10249537]$ $ORACLE_HOME/OPatch/opatch napply -skip_subset -skip_duplicate Invoking OPatch 10.0.log Patch history file: /u01/app/oracle/product/10. Oracle Corporation.0/db_1/cfgtoollogs/opatch/opatch2011-02-10_17-5635PM.2.0/db_1/oui Log file location : /u01/app/oracle/product/10.0 OUI location : /u01/app/oracle/product/10. All rights reserved.9 Copyright (c) 2009.9 Oracle Interim Patch Installer version 10.2.0 10.

..sql" Patching component oracle. 10.rdbms.0.plb" ApplySession adding interim patch '9963497' to inventory Verifying the update..2. Execution of 'sh /home/oracle/10249537/10249537/custom/scripts/pre -apply 10249537 ': Return Code = 0 Applying patch 10249537.9 OUI version : 10.2.0..rdbms. Files check OK: Files from Patch ID 10249537 are present in Oracle Home. ApplySession applying interim patch '9963497' to OH '/u01/app/oracle/product/10. Inventory check OK: Patch ID 9963497 is registered in Oracle Home inventory with proper meta-data. This might take a while.2.5. Inventory check OK: Patch ID 10249537 is registered in Oracle Home inventory with proper meta-data.5. .0 OUI location : /u01/app/oracle/product/10..0. 10..2.0/db_1/oui Log file location : /u01/app/oracle/product/10..2.0/db_1/cfgtoollogs/opatch/opatch_history. This might take a while...2.rdbms.0/db_1/cpu/CPUJan2011/catcpu.0/db_1/cpu/CPUJan2011/catcpu_rollback.xml" Copying file to "/u01/app/oracle/product/10...rsf. Copying file to "/u01/app/oracle/product/10.0..5. Patching component oracle.2.lst" ApplySession adding interim patch '10249537' to inventory Verifying the update... Checking if Oracle Home has components required by patches.0/db_1' Backing up files affected by the patch '9963497' for rollback. OPatch continues with these patches: 10249537 9963497 Do you want to proceed? [y|n] y User Responded with: Y Running prerequisite checks. ApplySession applying interim patch '10249537' to OH '/u01/app/oracle/product/10.0/db_1/rdbms/admin/prvtjob. Skip patch 10327179 from list of patches to apply: This patch is not needed.. Copying file to "/u01/app/oracle/product/10..0/db_1/cfgtoollogs/opatch/opatch2011-02-10_17-5737PM. OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.txt Invoking utility "napply" Checking conflict among patches. Backing up files affected by the patch 'NApply' for restore.0.0/db_1/rdbms/admin/bundledata_CPU.....0/db_1' Backing up files affected by the patch '10249537' for rollback.2. 10.2. This might take a while..0.2.2.0/db_1/cpu/CPUJan2011/rollback_all. Copying file to "/u01/app/oracle/product/10.0.2. Applying patch 9963497.sql" Copying file to "/u01/app/oracle/product/10..OPatch version : 10... Files check OK: Files from Patch ID 9963497 are present in Oracle Home.log Patch history file: /u01/app/oracle/product/10.2.0. Checking skip_duplicate Checking skip_subset Checking conflicts against Oracle Home.0/db_1/cpu/CPUJan2011/rollback_new..4.. Patching component oracle..lst" Copying file to "/u01/app/oracle/product/10.2.2..2.5.

log catbundle_CPU_<database SID>_GENERATE_<TIMESTAMP>.2. Note --Check the following log file for errors: /u01/app/oracle/product/10.9 Oracle Interim Patch Installer version 10. Oracle Corporation.Cross check patch implementation. Connect as SYSDBA and run the catbundle.The local system has been patched and can be restarted.2.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst. All rights reserved. $ORACLE_HOME/OPatch/opatch lsinventory ****************************************************************** [oracle@aud1ora01 admin]$ $ORACLE_HOME/OPatch/opatch lsinventory Invoking OPatch 10.4.0 OUI location : /u01/app/oracle/product/10.0/db_1/cfgtoollogs/catbundle/catbundle_CPU_UMARKET_APPLY_2011Feb10_ 18_04_02.0. Oracle Home : /u01/app/oracle/product/10. [oracle@aud1ora01 10249537]$ ************************************************************************************* Step 5 -.log ################################################################## Step 6 -.0.2.sql ################################################################## Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle for any errors: catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.4. OPatch succeeded.2.2.sql script as follows: cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> @catbundle.Post Installation Instructions Loading Modified SQL Files into the Database -------------------------------------------#For each database instance running on the Oracle home being patched. connect to the database using SQL*Plus.5.loc OPatch version : 10.sql cpu apply SQL> @utlrp.0.0.4. UtilSession: N-Apply done.0/db_1/oui .9 OUI version : 10.2.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS.9 Copyright (c) 2009.2.

0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-02-10_18-07-49PM.0.2.04. 03:38:02 hrs PST8PDT Bugs fixed: 9963497 Patch 10249537 : applied on Thu Feb 10 17:58:10 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 14 Dec 2010.--------.5 2 CPUJan2011 CPU UPGRADATION 10gR2 to 11gR1 Pre-Requisite: .693640 PM APPLY SERVER 10.txt Lsinventory Output file location : /u01/app/oracle/product/10. ************************************************************************************** ******** col col col col col col action_time for a28 action for a6 namespace for a9 version for a10 id for 99999999 comments for a10 select * from registry.2.0.5.2.0/db_1/cfgtoollogs/opatch/opatch2011-02-10_18-0749PM.2.--------. ************************************************************************************** ******** ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SERIES ---------------------------.0a -------------------------------------------------------------------------------OPatch succeeded. 08:51:21 hrs PST8PDT Bugs fixed: 10249537.2.-----------------------------10-FEB-11 06.02.---------. Interim patches (2) : Patch 9963497 : applied on Thu Feb 10 17:58:14 GMT+05:30 2011 Unique Patch ID: 13098966 Created on 2 Aug 2010.1.---------.0/db_1/cfgtoollogs/opatch/opatch_history.txt -------------------------------------------------------------------------------Installed Top-level Products (2): Oracle Database 10g Oracle Database 10g Release 2 Patch Set 4 There are 2 products installed in this Oracle Home.2.Log file location : /u01/app/oracle/product/10. 9952270 10.-----.0 10.log Patch history file: /u01/app/oracle/product/10.0.

The script utltzuv2.html Step 3) Executing the recommended steps Following are the critical steps to be executed based on above warnings.0. which you want to migrate.sql creates a table .0 Also here we are upgrading to Oracle Database 11g – Beta 6 (11.sql to see if there is data that will be affected by the timezone file version upgrade.0. ….You should have the Oracle database 10g. Finding the Version of existing timezone files: SQL> select version from v$timezone_file.1. These commands are to be executed while connecting to database from 10g Oracle Home WARNING: –> Database is using an old timezone file version. Patch the 10. We have to install 11g oracle home as a separate ORACLE_HOME in parallel to 10g Oracle Home. for more about utlu111i.6) Step 1) Installing Oracle 11g Home We cannot upgrade the existing Oracle Home. you must run utltzuv2.1. go to $ORACLE_HOME/rdbms/admin and copy the file utlu111i.0 database to timezone file version 4 ….sql to some temp location.2. Re-run utlu111i.sql after …. OS level should be RHEL 4.com/38/Oracle-11g-Release-1-Pre-Upgrade-tool-utlu111i-sql. version -----------2 here oracle 10. since 11g is not a patchset. Step 2) Pre-Upgrade Utility In 11g Home you installed.0.sql : http://oracleflash.2. BEFORE upgrading the database. patching the database to record the new timezone file version.1 has timezone file version of 2 Before you upgrade your timezone file version.

SQL > select * from sys. Step 5) Starting Upgrade . you don’t get any critical warnings. 2. run the pre-upgrade utility once again to make sure.sql To View the INVALID Objects use: SQL> select count(*) from dba_objects Create pfile from spfile --It creates pfile for database in ORACLE_HOME/dbs location(init<dbname>. UDUMP and their locations Add Diagnostic_dest=/’$ORACLE_BASE/diag’-location for diagnostic dest Change audit_file_dest location Change compatibility to 11g and save it. SQL> @?/rdbms/admin/utlrp. After executing the recommended steps.named sys.sys_tzuv2_temptab . Copy the pfile of database from ORACLE_HOME/dbs(10g) to ORACLE_HOME/dbs(11g) using cp command. shut down the database from 10g Oracle Home. If everything looks fine.sys_tzuv2_temptab.ora) Shutdown -shut down the database in oracle 10g.sql to validate the objects if there is any invalidate objects. Remove BDUMP. no rows selected here we see no rows but if we see any rows then we need to take that data backup and restore after timezone file version upgrade Step 4) Run Pre-Upgrade Utility again Run utlrp. CDUMP. In that make changes shown below. 1. 3. 4. and fills it with data that may get affected by the timezone file version.

0/db_1 [oracle@ocvmrh2178 db_1]$ export PATH=$ORACLE_HOME/bin:$PATH [oracle@ocvmrh2178 db_1]$ export ORACLE_SID=orcl [oracle@ocvmrh2178 db_1]$ export TNS_ADMIN=$ORACLE_HOME/network/admin connected to the database sys as sysdba sqlplus “/ as sysdba” –> will be connected to idle instance SQL> startup upgrade SQL> SPOOL upgrade. STATUS.sql Run catuppst.sql to display/verify the results of the upgrade: SQL> @?/rdbms/admin/utlu111s.sql Once the upgrades finishes.1. located in the ORACLE_HOME/rdbms/admin directory. restart the instance to reinitialize the system parameters for normal operation.log SQL> @catupgrd. to perform upgrade actions that do not require the database to be in UPGRADE mode: SQL> @?/rdbms/admin/catuppst. Login again as sysdba and startup in normal mode.sql to recompile invalid objects SQL> select count(*) from dba_objects where status = ‘INVALID’. VERSION from DBA_REGISTRY. Step 6) Post-Upgrade Steps Once the upgrade completes.sql. .sql Run utlrp. It will shut down the database automatically. SQL> STARTUP Run utlu111s. Check the dba_registry for the components and its status SQL> select COMP_NAME.Source the following variables for 11g Oracle Home [oracle@ocvmrh2178 db_1]$ export ORACLE_HOME=/home/oracle/oracle/product/product/11.