Enviroment
Old Oracle Home: /u01/app/oracle/product/11.2.0/dbhome_1 Old Inventory: /u01/app/oraInventory New Oracle Home: /u01/app/oracle/product/11.2.0.2/dbhome_1 New Inventory: /u01/app/oraInventory11202
Step 1. Download and UNZIP Oracle Patch
$ unzip p10098816_112020_AIX64-5L_1of7.zip $ unzip p10098816_112020_AIX64-5L_2of7.zip
Step 2. edit response file db_install.rsp
$ cd database $ vi response/db_install.rsp oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=pp3a UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory11202 SELECTED_LANGUAGES=en ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/dbhome_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.EEOptionsSelection=true oracle.install.db.DBA_GROUP=odba oracle.install.db.OPER_GROUP=oper DECLINE_SECURITY_UPDATES=true
Step 3. execute runInstaller
$ ./runInstaller -ignoreSysPrereqs -silent -responseFile /u01/src/database/response/db_install.rsp ******************************************************************************** Your platform requires the root user to perform certain pre-installation OS preparation. The root user should run the shell script 'rootpre.sh' before you proceed with Oracle installation. rootpre.sh can be found at the top level of the CD or the stage area. Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle installation. Answer 'n' to abort installation and then ask root to run 'rootpre.sh'. ******************************************************************************** Has 'rootpre.sh' been run by root? [y/n] (n) y Starting Oracle Universal Installer... Checking Temp space: must be greater than 190 MB. Actual 4892 MB Passed Checking swap space: must be greater than 150 MB. Actual 16384 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2022-03-16_11-49-01AM. Please wait ...oracle@pp3a/u01/src/database>[WARNING] [INS-13001] Environment does not meet minimum requirements. CAUSE: Minimum requirements were not met for this environment ACTION: Either check the logs for more information or check the supported configurations for this product. You can find the log of this install session at: /u01/app/oraInventory11202/logs/installActions2022-03-16_11-49-01AM.log
Step 4. execute root.sh by root
$ su -
# cd <New Oracle Home>
# sh root.sh
Check /u01/app/oracle/product/11.2.0.2/dbhome_1/install/root_pp3a_2022-03-16_12-49-17.log for the output of root script
# cat /u01/app/oracle/product/11.2.0.2/dbhome_1/install/root_pp3a_2022-03-16_12-49-17.log
Running Oracle 11g root script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.2/dbhome_1
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Step 5. check /etc/oratab, the database home at old oracle home
$ cat /etc/oratab ORCL:/u01/app/oracle/product/11.2.0/dbhome_1:N
Step 6. check dbua is in new oracle home
$ which dbua /u01/app/oracle/product/11.2.0.2/dbhome_1/bin/dbua
Step 7. execute dbua from new oracle home
$ dbua -silent -sid ORCL Log files for the upgrade operation are located at: /u01/app/oracle/cfgtoollogs/dbua/ORCL/upgrade3 Performing Pre Upgrade 1% complete 7% complete Upgrading Oracle Server 8% complete ... 24% complete Upgrading JServer JAVA Virtual Machine 26% complete Upgrading Oracle XDK for Java 27% complete Upgrading OLAP Analytic Workspace 29% complete Upgrading OLAP Catalog 30% complete ... 34% complete Upgrading EM Repository 36% complete ... 50% complete Upgrading Oracle Text 51% complete Upgrading Oracle XML Database 53% complete ... 60% complete Upgrading Oracle Java Packages 62% complete Upgrading Oracle interMedia 63% complete 64% complete Upgrading Spatial 66% complete Upgrading Oracle Workspace Manager 68% complete Upgrading Expression Filter 70% complete Upgrading Rule Manager 71% complete Upgrading Oracle Application Express 73% complete Upgrading Oracle OLAP API 74% complete Performing Post Upgrade 76% complete ... 92% complete Generating Summary Database upgrade has been completed successfully, and the database is ready to use. 100% complete Check the log file "/u01/app/oracle/cfgtoollogs/dbua/logs/silent1.log" for upgrade details.
If the log file have Database Vault option error
Database Vault option is enabled in Oracle Home: "/u01/app/oracle/product/11.2.0.2/dbhome_1". This option needs to be disabled prior to upgrade. The Upgrade Assistant failed in executing any query on the database ORCL. Oracle Home /u01/app/oracle/product/11.2.0/dbhome_1 obtained from file /etc/oratab was used to connect to the database. Either the database is not running from Oracle Home /u01/app/oracle/product/11.2.0/dbhome_1 or its not in OPEN status. Correct the error and run the Upgrade Assistant again. Could not proceed with Upgrade due to errors. Fix the errors and restart again!
step a. Disable Oracle Database Vault (Compile New Home)
$ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk dv_off ioracle
step b. Disable Oracle Database Vault (Compile Old Home & Shutdown Database)
$ sqlplus / as sysdba SQL> shutdown immediate; $ lsnrctl stop $ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk dv_off ioracle
step c. Startup Old Database
SQL> startup; $ lsnrctl start
Step 8. If dbua will successful, the /etc/oratab auto change to new oracle home
$ cat /etc/oratab ORCL:/u01/app/oracle/product/11.2.0.2/dbhome_1:N
Step 9. check oracle database is run on new version
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production
Step 10. shutdown database then copy some file from old oracle home
SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down.
Step 11. copy & check spfile pwfile listener.ora sqlnet.ora tnsnames.ora in new oracle home & copy from old oracle home
$ ls -l $ORACLE_HOME/dbs total 56 -rw-rw---- 1 oracle oinstall 1544 Mar 16 13:32 hc_DBUA0.dat -rw-rw---- 1 oracle oinstall 1544 Mar 16 14:16 hc_ORCL.dat -rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora -rw-r----- 1 oracle oinstall 547 Mar 16 13:34 initORCL.ora -rw-r----- 1 oracle oinstall 24 Mar 16 13:35 lkORCL -rwSr----- 1 oracle oinstall 1536 Mar 16 13:34 orapwORCL -rw-r----- 1 oracle oinstall 2560 Mar 16 13:58 spfileORCL.ora $ cd <OLD_ORACLE_HOME>/network/admin $ cp listener.ora $ORACLE_HOME/network/admin/ $ cp tnsnames.ora $ORACLE_HOME/network/admin/ $ cp sqlnet.ora $ORACLE_HOME/network/admin/
Step 12. check any application is run on old database home
$ lsof | grep "/u01/app/oracle/product/11.2.0/dbhome_1"
Step 13. startup new listener
$ lsnrctl start LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production on 16-MAR-2022 14:22:41 Copyright (c) 1991, 2010, Oracle. All rights reserved. Starting /u01/app/oracle/product/11.2.0.2/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production System parameter file is /u01/app/oracle/product/11.2.0.2/dbhome_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/pp3a/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pp3a)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production Start Date 16-MAR-2022 14:22:41 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP ON Listener Parameter File /u01/app/oracle/product/11.2.0.2/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/pp3a/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pp3a)(PORT=1521))) The listener supports no services The command completed successfully
Step 14. startup database from new oracle home
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Wed Mar 16 14:25:17 2022
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1.0689E+10 bytes
Fixed Size 2229040 bytes
Variable Size 5972692176 bytes
Database Buffers 4664066048 bytes
Redo Buffers 50487296 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/11.2.0
.2/dbhome_1/dbs/spfileORCL.ora
If Disable Oracle Database Vault before execute dbua, then need to Enable Oracle Database Vault.
step. Enable Oracle Database Vault
$ sqlplus / as sysdba SQL> shutdown immediate; SQL> exit $ lsnrctl stop $ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk dv_on lbac_on ioracle $ sqlplus / as sysdba $ lsnrctl start SQL> startup; SQL> exit

0 留言