Upgrade Oracle DB to 10

14
Upgrade Oracle DB to 10.2.0.4 from 10.2.0.2 Step 1: Download the p6810189_10204_Linux-x86.zip patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory. Enter the following command to unzip and extract the installation files: $ unzip p6810189_10204_Linux-x86.zip Step 2: Update Oracle Time Zone Definitions When patching from a lower 10.2 release or upgrading from 10.1.0.X directly to 10.2.0.4, check the current version of the Oracle time zone definitions with the following command: SELECT version FROM v$timezone_file; If this query reports version 4, no action is required; SQL> SELECT version FROM v$timezone_file; VERSION ---------- 3 (If this reports a version lower or higher then 4, see OracleMetalink document 553812.1 "Actions for the DSTv4 update in the Release 10.2.0.4 patchset".) Step 2a: when upgrading from 10.1.0.x or updating a lower 10.2.0.X version to 10.2.0.4. Check if you are storing *user* TZ (TSTZ and TSLTZ) data use this sql query:

Transcript of Upgrade Oracle DB to 10

Page 1: Upgrade Oracle DB to 10

Upgrade Oracle DB to 10.2.0.4 from 10.2.0.2

Step 1: Download the p6810189_10204_Linux-x86.zip patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory. Enter the following command to unzip and extract the installation files:

$ unzip p6810189_10204_Linux-x86.zip

Step 2:

Update Oracle Time Zone Definitions

When patching from a lower 10.2 release or upgrading from 10.1.0.X directly to 10.2.0.4, check the current version of the Oracle time zone definitions with the following command:

SELECT version FROM v$timezone_file;

If this query reports version 4, no action is required;

SQL> SELECT version FROM v$timezone_file;

VERSION ----------

3 (If this reports a version lower or higher then 4, see OracleMetalink document 553812.1 "Actions for the DSTv4 update in the Release 10.2.0.4 patchset".)

Step 2a:

when upgrading from 10.1.0.x or updating a lower 10.2.0.X version to 10.2.0.4.

Check if you are storing *user* TZ (TSTZ and TSLTZ) data use this sql query:

select c.owner || '.' || c.table_name || '(' || c.column_name || ') -' || c.data_type || ' ' col  from dba_tab_cols c, dba_objects o where c.data_type like '%TIME ZONE'    and c.owner=o.owner   and c.table_name = o.object_name   and o.object_type = 'TABLE'order by col/ Check if there is something outside the Data Dictionary (= other then SYS or WMSYS objects).

These are the standard Oracle provided jobs and schedules for a 10g database:

Page 2: Upgrade Oracle DB to 10

SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj# FROM scheduler$_window);

OBJECT_NAME--------------------------------------------------------------------------------

WEEKNIGHT_WINDOWWEEKEND_WINDOW

SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj# FROM scheduler$_job);

OBJECT_NAME--------------------------------------------------------------------------------PURGE_LOGFGR$AUTOPURGE_JOBGATHER_STATS_JOBAUTO_SPACE_ADVISOR_JOB

3Ba) If you have no user TZ (TSTZ and/or TSLTZ) data and only the Oracle provided jobs in DBMS_SCHEDULER jobs defined then there is no action to take for the Oracle time zone definitions, upgrade from 10.1.0.x or patch 10.2.0.x to 10.2.0.4, you can skip any DST related sections in the upgrade or patch instructions.

Step 3:

Stop All Processes

SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.

Change in the file /home/oraprod/.vnc/xstartup to open Vnc server

#twm &gnome-session &~

Enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where you unpacked the patch set software:% cd patchset_directory/Disk1% ./runInstaller

Page 3: Upgrade Oracle DB to 10

On the Welcome screen, click Next.

Page 4: Upgrade Oracle DB to 10

Select appropriate Oracle Home name and path and click next

On next step It’ll check for pre-requisite, Once that become successful then click next.

Page 5: Upgrade Oracle DB to 10

Before Upgrade Shutdown all the process or else you get the alert

(Here I got this error because not shut downing lsnr)

Shutting down lsnr[oraprod@linux admin]$ lsnrctl stop TEST

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 11-JUN-2012 13:45:25

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=TEST.svss.net))(ADDRESS=(PROTOCOL=TCP)(HOST=92.242.132.8)(PORT=1521)))

[oraprod@linux admin]$ lsnrctl stop PROD

LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 11-JUN-2012 13:45:32

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCPROD))The command completed successfully

After this you will directed to this page (click on Install button)

Page 6: Upgrade Oracle DB to 10
Page 7: Upgrade Oracle DB to 10

Run the script form root user to complete installation.

Run this script from root user to complete installation.

Page 8: Upgrade Oracle DB to 10

Upgrade Database using Manual Upgrade Method:

[oraprod@linux ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jun 11 19:08:30 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> STARTUP UPGRADEORACLE instance started.

Total System Global Area 1073741824 bytesFixed Size 1271540 bytesVariable Size 427821324 bytesDatabase Buffers 633339904 bytesRedo Buffers 11309056 bytesDatabase mounted.Database opened.SQL> SPOOL upgrade_info.log

Page 9: Upgrade Oracle DB to 10

SQL> @/u01/oracle/PROD/db/tech_st/10.2.0/rdbms/admin/utlu102i.sqlOracle Database 10.2 Upgrade Information Utility 06-11-2012 19:13:59.**********************************************************************Database:**********************************************************************--> name: PROD--> version: 10.2.0.2.0--> compatible: 10.2.0--> blocksize: 8192.**********************************************************************Tablespaces: [make adjustments in the current environment]**********************************************************************--> SYSTEM tablespace is adequate for the upgrade..... minimum required size: 9523 MB--> CTXD tablespace is adequate for the upgrade..... minimum required size: 15 MB--> ODM tablespace is adequate for the upgrade..... minimum required size: 10 MB--> APPS_UNDOTS1 tablespace is adequate for the upgrade..... minimum required size: 855 MB--> APPS_TS_TX_DATA tablespace is adequate for the upgrade..... minimum required size: 3642 MB--> APPS_TS_QUEUES tablespace is adequate for the upgrade..... minimum required size: 85 MB--> OLAP tablespace is adequate for the upgrade..... minimum required size: 16 MB--> SYSAUX tablespace is adequate for the upgrade..... minimum required size: 291 MB.**********************************************************************Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]**********************************************************************-- No update parameter changes are required..**********************************************************************Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]**********************************************************************-- No renamed parameters found. No changes are required..**********************************************************************Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]**********************************************************************-- No obsolete parameters found. No changes are required.**********************************************************************Components: [The following database components will be upgraded or installed]**********************************************************************--> Oracle Catalog Views [upgrade] VALID--> Oracle Packages and Types [upgrade] VALID--> 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

Page 10: Upgrade Oracle DB to 10

--> Real Application Clusters [upgrade] INVALID--> 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.**********************************************************************Miscellaneous Warnings**********************************************************************WARNING: --> Database contains INVALID objects prior to upgrade..... USER APPS has 1 INVALID objects..... USER ORDSYS has 2 INVALID objects..... USER ODM has 8 INVALID objects..... USER XDB has 5 INVALID objects..... USER SYS has 1 INVALID objects..

PL/SQL procedure successfully completed.

SQL> spool off

Again shutdown database and startup with upgrade

SQL> STARTUP UPGRADESQL> @/u01/oracle/PROD/db/tech_st/10.2.0/rdbms/admin/catupgrd.sql (Apporx 30 mins)

Restart the database:

SQL> SHUTDOWN IMMEDIATESQL> STARTUP

Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.

SQL> @?/rdbms/admin/utlrp.sql (Approx 1.5 hours)

DOC> 1. Query showing jobs created by UTL_RECOMPDOC> SELECT job_name FROM dba_scheduler_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>DOC> 2. Query showing UTL_RECOMP jobs that are runningDOC> SELECT job_name FROM dba_scheduler_running_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>#

PL/SQL procedure successfully completed.

TIMESTAMP

Page 11: Upgrade Oracle DB to 10

--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_END 2012-06-11 21:31:16

PL/SQL procedure successfully completed.

DOC> The following query reports the number of objects that have compiledDOC> with errors (objects that compile with errors have status set to 3 inDOC> obj$). If the number is higher than expected, please examine the errorDOC> messages reported with each object (using SHOW ERRORS) to see if theyDOC> point to system misconfiguration or resource constraints that must beDOC> fixed before attempting to recompile these objects.DOC>#

OBJECTS WITH ERRORS------------------- 0

DOC> The following query reports the number of errors caught duringDOC> recompilation. If this number is non-zero, please query the errorDOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errorsDOC> are due to misconfiguration or resource constraints that must beDOC> fixed before objects can compile successfully.DOC>#

ERRORS DURING RECOMPILATION--------------------------- 42

PL/SQL procedure successfully completed.

Run the following command to check the status of all the components after the upgrade:

SQL> select comp_name, version, status from sys.dba_registry;

In the output of the preceding command, the status of all the components should be VALID for a successful upgrade.

Change to the install directory by using the following command:

$ cd $ORACLE_HOME/install

Run changePerm.sh and specify the patched server Oracle home location, before accessing client-side utilities or libraries in the database home.