Вы находитесь на странице: 1из 11

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:
SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj # FROM scheduler$_window); OBJECT_NAME ------------------------------------------------------------------------------WEEKNIGHT_WINDOW WEEKEND_WINDOW SQL> SELECT object_name FROM dba_objects WHERE object_id IN (SELECT obj # FROM scheduler$_job); OBJECT_NAME ------------------------------------------------------------------------------PURGE_LOG FGR$AUTOPURGE_JOB GATHER_STATS_JOB AUTO_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 immediate Database 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

On the Welcome screen, click Next.

Select appropriate Oracle Home name and path and click next

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

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=TC P)(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)

Run the script form root user to complete installation.

Run this script from root user to complete installation.

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. Connected to an idle instance. SQL> STARTUP UPGRADE ORACLE instance started. Total System Global Area 1073741824 Fixed Size 1271540 Variable Size 427821324 Database Buffers 633339904 Redo Buffers 11309056 Database mounted. Database opened. SQL> SPOOL upgrade_info.log bytes bytes bytes bytes bytes All Rights Reserved.

SQL> @/u01/oracle/PROD/db/tech_st/10.2.0/rdbms/admin/utlu102i.sql Oracle 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

--> 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 UPGRADE SQL> @/u01/oracle/PROD/db/tech_st/10.2.0/rdbms/admin/catupgrd.sql (Apporx 30 mins)

Restart the database:


SQL> SHUTDOWN IMMEDIATE SQL> 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> DOC> DOC> DOC> DOC> DOC> DOC> DOC># 1. Query showing jobs created by UTL_RECOMP SELECT job_name FROM dba_scheduler_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%'; 2. Query showing UTL_RECOMP jobs that are running SELECT job_name FROM dba_scheduler_running_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%';

PL/SQL procedure successfully completed. TIMESTAMP

------------------------------------------------------------------------------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 compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$). If the number is higher than expected, 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. 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 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># 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.

Вам также может понравиться