Upgrade rac10g10.2.0.1 to 10.2.0.5
Upgrade RAC 10.2.0.1 to 10.2.0.5
I. preparation:
Patch package: p8202632_10205_LINUX.zip
Number of nodes: 3
RAC1 RAC2 RAC3
Current node status
Node 1:
[Root @ rac1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... B1.inst application ONLINE rac1
Ora... B2.inst application ONLINE rac2
Ora... B3.inst application ONLINE rac3
Ora. RACDB. db application ONLINE rac1
Ora... SM1.asm application ONLINE rac1
Ora... C1.lsnr application ONLINE rac1
Ora. rac1.gsd application ONLINE rac1
Ora. rac1.ons application ONLINE rac1
Ora. rac1.vip application ONLINE rac1
Ora... SM2.asm application ONLINE rac2
Ora... C2.lsnr application ONLINE rac2
Ora. rac2.gsd application ONLINE rac2
Ora. rac2.ons application ONLINE rac2
Ora. rac2.vip application ONLINE rac2
Ora... SM3.asm application ONLINE rac3
Ora... C3.lsnr application ONLINE rac3
Ora. rac3.gsd application ONLINE rac3
Ora. rac3.ons application ONLINE rac3
Ora. rac3.vip application ONLINE rac3
View the current database version
SYS @ RACDB1> select * from v $ version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release10.2.0.1.0-Prod
PL/SQL Release 10.2.0.1.0-Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0-Production
NLSRTL Version 10.2.0.1.0-Production
Ii. Cluster software upgrade
2.1 patch required for upload and upgrade
[Root @ rac1 soft] # chown oracle: oinstall-R Disk1/
[Root @ rac1 soft] # ll
Drwxr-xr-x 5 oracle oinstall 4096 Jul 23 2010 Disk1
2.2 switch to the oracle user
[Root @ rac1 Disk1] # su-oracle
[Oracle @ rac1 ~] $ Cd/soft/Disk1/
[Oracle @ rac1 Disk1] $ ls
Install patch_note.htm response runInstaller stage
[Oracle @ rac1 Disk1] $ ll
Total 184
Drwxr-xr-x 4 oracle oinstall 4096 Apr 20 2010 install
-Rwxrwxr-x 1 oracle oinstall 165290 Jul 23 2010patch_note.htm
Drwxr-xr-x 2 oracle oinstall 4096 Apr 20 2010 response
-Rwxr-xr-x 1 oracle oinstall 3927 Apr 20 2010 runInstaller
Drwxr-xr-x 11 oracle oinstall 4096 Jul 19 2010 stage
2.3 use srvctl to disable processes and resources
Note: Execute on each node in sequence !!!
[Oracle @ rac1 Disk1] $ srvctl stop nodeapps-n rac1
[Oracle @ rac2] $ srvctl stop nodeapps-n rac2
[Oracle @ rac3] $ srvctl stop nodeapps-n rac3
[Oracle @ rac1 Disk1] $ crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... B1.inst application OFFLINE
Ora... B2.inst application OFFLINE
Ora... B3.inst application OFFLINE
Ora. RACDB. db application OFFLINE
Ora... SM1.asm application OFFLINE
Ora... C1.lsnr application OFFLINE
Ora. rac1.gsd application OFFLINE
Ora. rac1.ons application OFFLINE
Ora. rac1.vip application OFFLINE
Ora... SM2.asm application OFFLINE
Ora... C2.lsnr application OFFLINE
Ora. rac2.gsd application OFFLINE
Ora. rac2.ons application OFFLINE
Ora. rac2.vip application OFFLINE
Ora... SM3.asm application OFFLINE
Ora... C3.lsnr application OFFLINE
Ora. rac3.gsd application OFFLINE
Ora. rac3.ons application OFFLINE
Ora. rac3.vip application OFFLINE
2.4 start patch installation
[Root @ rac1 Disk1] # xhost +
Access control disabled, clients can connect frow.host
[Root @ rac1 Disk1] # su-oracle
[Oracle @ rac1 ~] $ Cd/soft/Disk1/
[Oracle @ rac1 Disk1] $./runInstaller
Select the location where the CRS patch is installed. It must be the same as the previous location !!!
Warning says swap space is insufficient. Select next step.
General configuration preview start Installation
Special attention !!! Check whether the script needs to be executed.
It must be executed in order !!!
Node 1:
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/install/root102.sh
Creating pre-patch directory for saving pre-patchclusterware files
Completed patching clusterware files to/u01/app/oracle/product/10.2.0/db_1
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is notowned by root
WARNING: directory '/u01/app/oracle' is not ownedby root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
This maytake a while on some systems.
.
10205 patch successfully applied.
Clscfg: EXISTING configuration version 3 detected.
Clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS = 49895 CRS = 49896 EVMC = 49898 andEVMR = 49897.
Node <nodenumber>: <nodename> <private interconnect name>
Node 1: rac1 rac1-priv rac1
Creating OCR keys for user 'root', privgrp 'root '..
Operation successful.
Clscfg-upgrade completed successfully
Creating '/u01/app/oracle/product/10.2.0/db_1/install/paramfile. crs' with data used forCRS configuration
Setting CRS configuration values in/u01/app/oracle/product/10.2.0/db_1/install/paramfile. crs
Node 2:
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/install/root102.sh
Node 3:
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs
[Root @ rac1 crsd] #/u01/app/oracle/product/10.2.0/db_1/install/root102.sh
2.5 view status
[Oracle @ rac1 Disk1] $ crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... B1.inst application ONLINE rac1
Ora... B2.inst application ONLINE rac2
Ora... B3.inst application ONLINE rac3
Ora. RACDB. db application ONLINE rac1
Ora... SM1.asm application ONLINE rac1
Ora... C1.lsnr application ONLINE rac1
Ora. rac1.gsd application ONLINE rac1
Ora. rac1.ons application ONLINE rac1
Ora. rac1.vip application ONLINE rac1
Ora... SM2.asm application ONLINE rac2
Ora... C2.lsnr application ONLINE rac2
Ora. rac2.gsd application ONLINE rac2
Ora. rac2.ons application ONLINE rac2
Ora. rac2.vip application ONLINE rac2
Ora... SM3.asm application ONLINE rac3
Ora... C3.lsnr application ONLINE rac3
Ora. rac3.gsd application ONLINE rac3
Ora. rac3.ons application ONLINE rac3
Ora. rac3.vip application ONLINE rac3
Iii. database software upgrade
It is best to upgrade the database before the database is created. I will perform this operation after the database is created.
3.1 stop em and isqlplus
[Oracle @ rac1 Disk1] $ export ORACLE_SID = RACDB1
[Oracle @ rac1 Disk1] $ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database ControlRelease 10.2.0.1.0
Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.
Http: // racing 1: 1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g DatabaseControl...
... Stopped.
[Oracle @ rac1 Disk1] $ isqlplusctl stop
ISQL * Plus 10.2.0.1.0
Copyright (c) 2003,200 5, Oracle. All rights reserved.
ISQL * Plus instance on port 5560 is not running...
3.2 close services and Instances
All nodes are executed !!!
[Oracle @ rac1 ~] $ Srvctl stop nodeapps-n rac1
[Oracle @ rac2 ~] $ Srvctl stop nodeapps-n rac2
[Oracle @ rac3 ~ ] $ Srvctl stop nodeapps-n rac3
[Oracle @ rac1 Disk1] $ crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... B1.inst application OFFLINE
Ora... B2.inst application OFFLINE
Ora... B3.inst application OFFLINE
Ora. RACDB. db application OFFLINE
Ora... SM1.asm application OFFLINE
Ora... C1.lsnr application OFFLINE
Ora. rac1.gsd application OFFLINE
Ora. rac1.ons application OFFLINE
Ora. rac1.vip application OFFLINE
Ora... SM2.asm application OFFLINE
Ora... C2.lsnr application OFFLINE
Ora. rac2.gsd application OFFLINE
Ora. rac2.ons application OFFLINE
Ora. rac2.vip application OFFLINE
Ora... SM3.asm application OFFLINE
Ora... C3.lsnr application OFFLINE
Ora. rac3.gsd application OFFLINE
Ora. rac3.ons application OFFLINE
Ora. rac3.vip application OFFLINE
Note: If the VM is restarted, the crs of both nodes is shut down.
./Crsctl stop crs
Select the database installation directory:
Not execute and warning both select the next step
Start Installation
Execute scripts in sequence
After executing the following script, click OK.
It is best not to use ssh for fear of certain permissions!
Node 1:
[Root @ rac1 bin] #/u01/app/oracle/product/10.2.0/db_2/root. sh
Running Oracle 10g root. sh script...
The following environment variables are set:
ORACLE_OWNER = oracle
ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_2
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]:
The file "oraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
The file "coraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
Entries will be added to the/etc/oratab file asneeded
Database Configuration Assistant when a database iscreated
Finished running generic part of root. sh script.
Now product-specific root actions will beperformed.
Node 2:
[Root @ rac2 cssd] #/u01/app/oracle/product/10.2.0/db_2/root. sh
Running Oracle 10g root. sh script...
The following environment variables are set:
ORACLE_OWNER = oracle
ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_2
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]:
The file "oraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
The file "coraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
Entries will be added to the/etc/oratab file asneeded
Database Configuration Assistant when a database iscreated
Finished running generic part of root. sh script.
Now product-specific root actions will beperformed.
Node 3
[Root @ rac3 cssd] #/u01/app/oracle/product/10.2.0/db_2/root. sh
Running Oracle 10g root. sh script...
The following environment variables are set:
ORACLE_OWNER = oracle
ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_2
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]:
The file "oraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
The file "coraenv" already exists in/usr/local/bin. Overwrite it? (Y/n)
[N]:
Entries will be added to the/etc/oratab file asneeded
Database Configuration Assistant when a database iscreated
Finished running generic part of root. sh script.
Now product-specific root actions will beperformed.
4. Database Upgrade
4.1 current crs status-it feels very harmonious !!
[Root @ rac1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... B1.inst application ONLINE OFFLINE
Ora... B2.inst application ONLINE OFFLINE
Ora... B3.inst application ONLINE OFFLINE
Ora. RACDB. db application ONLINE OFFLINE
Ora... SM1.asm application ONLINE rac1
Ora... C1.lsnr application ONLINE rac1
Ora. rac1.gsd application ONLINE rac1
Ora. rac1.ons application ONLINE rac1
Ora. rac1.vip application ONLINE rac1
Ora... SM2.asm application ONLINE rac2
Ora... C2.lsnr application ONLINE rac2
Ora. rac2.gsd application ONLINE rac2
Ora. rac2.ons application ONLINE rac2
Ora. rac2.vip application ONLINE rac2
Ora... SM3.asm application ONLINE rac3
Ora... C3.lsnr application ONLINE rac3
Ora. rac3.gsd application ONLINE rac3
Ora. rac3.ons application ONLINE rac3
Ora. rac3.vip application ONLINE rac3
It is relatively simple to upgrade the database, and dbua is simpler. Here we will introduce the manual upgrade method.
4.2 run the following command on any node:
This execution on rac1
[Oracle @ rac1 ~] $ Export ORACLE_SID = RACDB1
[Oracle @ rac1 ~] $ Sqlplus/as sysdba
SQL * Plus: Release 10.2.0.5.0-Production on ThuAug 28 13:37:32 2014
Copyright (c) 1982,201 0, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1273276 bytes
Variable Size 109052484 bytes
Database Buffers 171966464 bytes
Redo Buffers 2920448 bytes
SQL> alter system set sga_max_size = 400 Mscope = spfile;
System altered.
SQL> alter system set sga_target = 400 Mscope = spfile;
System altered.
SQL> show parameter shared
NAME TYPE VALUE
-----------------------------------------------------------------------------
Hi_shared_memory_address integer 0
Max_shared_servers integer
Shared_memory_address integer 0
Shared_pool_reserved_size big integer 5033164
Shared_pool_size big integer 0
Shared_server_sessions integer
Shared_servers integer 1
SQL> alter system set shared_pool_size = '150m' scope = spfile;
System altered.
SQL> alter system set java_pool_size = '150m' scope = spfile;
System altered.
SQL> show parameter cluster
NAME TYPE VALUE
-----------------------------------------------------------------------------
Cluster_database boolean TRUE
Cluster_database_instances integer 2
Cluster_interconnects string
SQL> alter system set cluster_database = falsescope = spfile;
System altered.
Note: Make sure that the shared_pool_size and java_pool_size are not less than 150 MB. Because data files are shared, you only need to upgrade the database on one node during upgrade. Therefore, set CLUSTER_DATABASE to FALSE.
4.3 execute the update script
SQL> shutdown immediate
SQL> startup upgrade
SQL> spool/tmp/patch. log
SQL> @? /Rdbms/admin/catupgrd. SQL
SQL> spool off
Check whether there are any errors in the log. If not, start the database: -- a large number of files
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1274068 bytes
Variable Size 331353900 bytes
Database Buffers 83886080 bytes
Redo Buffers 2916352 bytes
Database mounted.
Database opened.
4.4 Invalid object Compilation
SQL> @? /Rdbms/admin/utlrp. SQL
4.5 modify parameters
SQL> show parameter cluster
NAME TYPE VALUE
-----------------------------------------------------------------------------
Cluster_database boolean FALSE
Cluster_database_instances integer 1
Cluster_interconnects string
SQL> alter system set cluster_database = trusty = spfile;
System altered.
4.6 restart the database. The upgrade is complete.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1274068 bytes
Variable Size 331353900 bytes
Database Buffers 83886080 bytes
Redo Buffers 2916352 bytes
Database mounted.
Database opened.
SQL> select * from v $ version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release10.2.0.5.0-Prod
PL/SQL Release 10.2.0.5.0-Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0-Production
NLSRTL Version 10.2.0.5.0-Production