Manually Upgrading Oracle Database 10g 10.2.0.x to 10.2.0.5

Oracle Database Installation Procedures
Post Reply
User avatar
jimb
Site Admin
Posts: 6146
Joined: Thu Jan 19, 2012 1:10 pm
Location: New Delhi, India
Contact:

Manually Upgrading Oracle Database 10g 10.2.0.x to 10.2.0.5

Post by jimb »

The below is a guide on how to manually upgrade an Oracle Database 10g release 10.2.0.x to Oracle Database 10g release 10.2.0.5

In this guide, I considered the following specifications:
Operating System: Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
Architecture: i686 (32-bit)
Oracle Database Version Before Upgrade: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Oracle Database Version After Upgrade: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0
Patch number for 10.2.0.5: 8202632


Note: When upgrade, instructions are already present in the readme of the patch which contains very detailed guide with regards to the upgrade process. You can also refer to My Oracle Support Document: Complete Checklist for Manual Upgrades to 10gR2 [ID 316889.1] For educational purposes, the guide that I will present will walk you through the upgrade process.

- Download, upload and extract the p8202632_10205_LINUX.zip patch set installation archive from My Oracle Support to your Server staging directory as the oracle user via the FTP client, e.g. WinSCP, FileZilla, Core FTP, etc.
ScreenShot045.jpg
- Log in to your server as the oracle user.
- Stop All Processes that is using the current ORACLE_HOME
> Shutdown all EM dbconsole: [oracle@oracle10g ~]$ emctl stop dbconsole
[oracle@oracle10g ~]$ emctl stop dbconsole
TZ set to Asia/Manila
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://oracle10g.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
> Shutdown all databases: SQL> shutdown immediate;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
> Shutdown all listeners: [oracle@oracle10g ~]$ lsnrctl stop
[oracle@oracle10g ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 26-JAN-2012 22:42:45

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle10g.localdomain)(PORT=1521)))
The command completed successfully
- BACKUP YOUR CURRENT ORACLE_HOME
> [oracle@oracle10g ~]$ cp -R $ORACLE_HOME $ORACLE_HOME.bak

- Change to directory where you unpacked the patch set software.
> [oracle@oracle10g ~]$ cd /u01/staging/Disk1/
- Start Oracle Universal Installer
> [oracle@oracle10g Disk1]$ ./runInstaller
ScreenShot046.jpg
> Specify the ORACLE_HOME you want to upgrade. This will override the current version.
ScreenShot047.jpg
> You can UNcheck "I wish to receive security updates via My Oracle Support"
ScreenShot048.jpg
> Installer will now perform Prerequisite Checks. Fix all issues if any before proceeding.
ScreenShot049.jpg
> Follow the succeeding instructions and then Install
ScreenShot050.jpg
- Execute Configuration Scripts as root user
ScreenShot051.jpg
> [oracle@oracle10g db_1]$ su - root
[oracle@oracle10g db_1]$ su - root
Password:
> [root@oracle10g ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh
[root@oracle10g ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle 10g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
- End of ORACLE_HOME Upgrade
ScreenShot052.jpg
- Set your ORACLE_SID to the database you want to upgrade
> . oraenv
[oracle@oracle10g ~]$ . oraenv
ORACLE_SID = [ORCL10G] ? ORCL10G
- Run the Pre-Upgrade Information Tool
> When upgrading database manually, then you should analyze it first by running the Pre-Upgrade Information Tool (utlu102i.sql).

- Shutdown database and start the database in the UPGRADE mode only
> [oracle@oracle10g ~]$ sqlplus '/as sysdba'
> SQL> shutdown immediate;
> SQL> STARTUP UPGRADE
SQL> STARTUP UPGRADE
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 1273276 bytes
Variable Size 92275268 bytes
Database Buffers 188743680 bytes
Redo Buffers 2920448 bytes
Database mounted.
Database opened.
- Spool results to a log file for later analysis
> SQL> SPOOL upgrade_info.log

- Run the Pre-Upgrade Information Tool. Fix issues if any.
> SQL> @?/rdbms/admin/utlu102i.sql
SQL> @?/rdbms/admin/utlu102i.sql
Oracle Database 10.2 Upgrade Information Utility 01-26-2012 23:06:01
.
**********************************************************************
Database:
**********************************************************************
--> name: ORCL10G
--> version: 10.2.0.1.0
--> compatible: 10.2.0.1.0
--> blocksize: 8192
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 489 MB
.... AUTOEXTEND additional space required: 9 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 402 MB
.... AUTOEXTEND additional space required: 357 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 259 MB
.... AUTOEXTEND additional space required: 9 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 33 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: --> "sga_target" needs to be increased to at least 327155712
.
**********************************************************************
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
--> 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
.

PL/SQL procedure successfully completed.

SQL>
> Turn off the spooling of script results to the log file.
SQL> SPOOL OFF

- Start the listener
> [oracle@oracle10g ~]$ lsnrctl start

- Begin Database Upgrade.
- Enter the following SQL*Plus commands:
SQL> STARTUP UPGRADE
SQL> STARTUP UPGRADE
ORACLE instance started.

Total System Global Area 327155712 bytes
Fixed Size 1273516 bytes
Variable Size 100663636 bytes
Database Buffers 222298112 bytes
Redo Buffers 2920448 bytes
Database mounted.
Database opened.
SQL> SPOOL patch_10.2.0.5.log

SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF
SQL> EXIT
- Review the SPOOL patch_10.2.0.5.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script. If necessary, rerun the catupgrd.sql script after correcting any problems.


-Restart the database:
> SQL> SHUTDOWN IMMEDIATE
> SQL> STARTUP

- Run the utlrp.sql script to recompile all invalid PL/SQL packages.
> SQL> @?/rdbms/admin/utlrp.sql


- Check the status of all the components after the upgrade. The status of all the components should be VALID for a successful upgrade.
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

- Configure and secure Enterprise Manager. Ensure the database and Listener are operational.

Note: Starting 10.2.0.4, Oracle Enterprise Manager is configured with HTTPS by default, instead of HTTP, which was used in earlier versions but the SSL certificate used for this cannot be renewed or created after 2010-12-31 due to a bug in the related JAR files
Check $ORACLE_HOME/$HOSTNAME'_'$ORACLE_SID/sysman/log/emdctl.trc . You will find below error:
2012-01-17 23:06:15 Thread-3086993632 ERROR http: 6: Unable to initialize ssl connection with server, aborting connection attempt
2012-01-17 23:06:15 Thread-3086993632 ERROR ssl: Open wallet failed, ret = 28750
2012-01-17 23:06:15 Thread-3086993632 ERROR ssl: nmehlenv_openWallet failed
- To correct the issue,
> Change back to HTTP (emctl unsecure dbconsole) or install patch 8350262
> [ORCLA10 /]$ emctl unsecure dbconsole
[oracle@oracle10g ~]$ emctl unsecure dbconsole
TZ set to Asia/Manila
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
https://oracle10g.localdomain:1158/em/console/aboutApplication
Configuring DBConsole for HTTP... Done.
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Unsecuring dbconsole... Started.
DBConsole is now unsecured... Done.
Unsecuring dbconsole... Sucessful.
[oracle@oracle10g ~]$
> [oracle@oracle10g ~]$ emca -upgrade db
[oracle@oracle10g ~]$ emca -upgrade db

STARTED EMCA at Jan 27, 2012 9:45:10 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle. All rights reserved.

Enter the following information:
ORACLE_HOME for the database to be upgraded: /u01/app/oracle/product/10.2.0/db_1
Database SID: ORCL10G
Listener port number: 1521

Do you wish to continue? [yes(Y)/no(N)]: Y
Jan 27, 2012 9:45:32 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ORCL10G/emca_2012-01-27_09-45-10-AM.log.
Jan 27, 2012 9:45:33 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jan 27, 2012 9:45:38 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole
Jan 27, 2012 9:45:45 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jan 27, 2012 9:45:53 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/10.2.0/db_1/bin/emctl secure dbconsole -host oracle10g.localdomain -sid ORCL10G
Jan 27, 2012 9:45:53 AM oracle.sysman.emcp.EMDBPostConfig performUpgrade
WARNING: Error securing Database control.
Jan 27, 2012 9:45:53 AM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):

1) Set the environment variable ORACLE_SID to ORCL10G
2) /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/10.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole

To secure Em Key, run /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Jan 27, 2012 9:45:53 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 27, 2012 9:46:01 AM oracle.sysman.emcp.EMDBPostConfig performUpgrade
INFO: Database Control started successfully
Jan 27, 2012 9:46:01 AM oracle.sysman.emcp.EMDBPostConfig performUpgrade
INFO: >>>>>>>>>>> The Database Control URL is http://oracle10g.localdomain:1158/em <<<<<<<<<<<


Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):

1) Set the environment variable ORACLE_SID to ORCL10G
2) /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/10.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole

To secure Em Key, run /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
[oracle@oracle10g ~]$
Oracle Database Administration Forums
http://www.oracle-forums.com/
xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Manually Upgrading Oracle Database 10g 10.2.0.x to 10.2.0.5

Post by xaeresis »

xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Manually Upgrading Oracle Database 10g 10.2.0.x to 10.2.0.5

Post by xaeresis »

xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Manually Upgrading Oracle Database 10g 10.2.0.x to 10.2.0.5

Post by xaeresis »

Post Reply