Explore Oracle Database Upgrade 9 12.1.0.1Update12.1.0.2
I. Check the current database version and system information
[oracle@db01 ~]$ lsb_release -aLSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarchDistributor ID: RedHatEnterpriseServerDescription: Red Hat Enterprise Linux Server release 5.8 (Tikanga)Release: 5.8Codename: Tikanga[oracle@db01 ~]$ uname -aLinux db01 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Li[oracle@db01 DBData]$ df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol00 53G 26G 24G 52% //dev/sda1 99M 13M 82M 14% /boottmpfs 4.0G 1.1G 3.0G 26% /dev/shmSQL> select * from v$version;BANNER CON_ID-------------------------------------------------------------------------------- ----------Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0PL/SQL Release 12.1.0.1.0 - Production 0CORE 12.1.0.1.0 Production 0TNS for Linux: Version 12.1.0.1.0 - Production 0NLSRTL Version 12.1.0.1.0 - Production 0SQL> col comp_name format a40SQL> col version format a13SQL> col control format a8SQL> col status format a15SQL> set line 300SQL> set pagesize 800SQL> select comp_name,version,control,status from dba_server_registry;COMP_NAME VERSION CONTROL STATUS---------------------------------------- ------------- -------- ---------------Oracle Database Vault 12.1.0.1.0 SYS VALIDOracle Application Express 4.2.0.00.27 SYS VALIDOracle Label Security 12.1.0.1.0 SYS VALIDSpatial 12.1.0.1.0 SYS VALIDOracle Multimedia 12.1.0.1.0 SYS VALIDOracle Text 12.1.0.1.0 SYS VALIDOracle Workspace Manager 12.1.0.1.0 SYS VALIDOracle XML Database 12.1.0.1.0 SYS VALIDOracle Database Catalog Views 12.1.0.1.0 SYS VALIDOracle Database Packages and Types 12.1.0.1.0 SYS VALIDJServer JAVA Virtual Machine 12.1.0.1.0 SYS VALIDOracle XDK 12.1.0.1.0 SYS VALIDOracle Database Java Packages 12.1.0.1.0 SYS VALIDOLAP Analytic Workspace 12.1.0.1.0 SYS VALIDOracle OLAP API 12.1.0.1.0 SYS VALIDOracle Real Application Clusters 12.1.0.1.0 SYS OPTION OFF16 rows selected.
Ii. Delete EM
[oracle@db01 ~]$ emctl stop dbconsoleSQL> @$ORACLE_HOME/rdbms/admin/emremove.sqlold 69: IF (upper('&LOGGING') = 'VERBOSE')new 69: IF (upper('VERBOSE') = 'VERBOSE')PL/SQL procedure successfully completed.[oracle@db01 ~]$ rm –rf $ORACLE_HOME/$HOSTNAME[oracle@db01 ~]$ rm –rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_*
Iii. Back up databases
RMAN> backup database plus archivelog delete input format '/DBBackup/Phycal/full_%U.bak';Starting backup at 02-DEC-14current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=48 RECID=1 STAMP=865232107input archived log thread=1 sequence=49 RECID=2 STAMP=865232108input archived log thread=1 sequence=50 RECID=3 STAMP=865232110input archived log thread=1 sequence=51 RECID=4 STAMP=865232124input archived log thread=1 sequence=52 RECID=5 STAMP=865232126input archived log thread=1 sequence=53 RECID=6 STAMP=865232129input archived log thread=1 sequence=54 RECID=7 STAMP=865232130input archived log thread=1 sequence=55 RECID=8 STAMP=865232199input archived log thread=1 sequence=56 RECID=9 STAMP=865232199input archived log thread=1 sequence=57 RECID=10 STAMP=865232203input archived log thread=1 sequence=58 RECID=11 STAMP=865232203input archived log thread=1 sequence=59 RECID=12 STAMP=865232203input archived log thread=1 sequence=60 RECID=13 STAMP=865232203input archived log thread=1 sequence=61 RECID=14 STAMP=865232209input archived log thread=1 sequence=62 RECID=15 STAMP=865232380channel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBBackup/Phycal/full_05pp4pfs_1_1.bak tag=TAG20141202T061940 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: deleting archived log(s)archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_48_b7st3cbs_.arc RECID=1 STAMP=865232107archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_49_b7st3d69_.arc RECID=2 STAMP=865232108archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_50_b7st3fwr_.arc RECID=3 STAMP=865232110archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_51_b7st3wto_.arc RECID=4 STAMP=865232124archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_52_b7st3ydw_.arc RECID=5 STAMP=865232126archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_53_b7st41h9_.arc RECID=6 STAMP=865232129archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_54_b7st428n_.arc RECID=7 STAMP=865232130archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_55_b7st66z1_.arc RECID=8 STAMP=865232199archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_56_b7st67ox_.arc RECID=9 STAMP=865232199archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_57_b7st6c1b_.arc RECID=10 STAMP=865232203archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_58_b7st6c22_.arc RECID=11 STAMP=865232203archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_59_b7st6c6y_.arc RECID=12 STAMP=865232203archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_60_b7st6c7o_.arc RECID=13 STAMP=865232203archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_61_b7st6kq8_.arc RECID=14 STAMP=865232209archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_62_b7stcwmv_.arc RECID=15 STAMP=865232380Finished backup at 02-DEC-14Starting backup at 02-DEC-14using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00004 name=/DBData/WOO12C/datafile/o1_mf_undotbs1_b7gh653v_.dbfinput datafile file number=00001 name=/DBData/WOO12C/datafile/o1_mf_system_b7gh4dtv_.dbfinput datafile file number=00003 name=/DBData/WOO12C/datafile/o1_mf_sysaux_b7gh21p2_.dbfinput datafile file number=00006 name=/DBData/WOO12C/datafile/o1_mf_users_b7gh6409_.dbfchannel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBData/fast_recovery_area/WOO12C/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stcyyx_.bkp tag=TAG20141202T061942 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:01:36channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00014 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_sysaux_b7gknfyd_.dbfinput datafile file number=00013 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_system_b7gknfmp_.dbfinput datafile file number=00015 name=/DBData/WOO12C/0847D2A3397B02B0E0533307A8C077E9/datafile/o1_mf_users_b7gkngh6_.dbfchannel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBData/fast_recovery_area/WOO12C/0847D2A3397B02B0E0533307A8C077E9/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stgzdo_.bkp tag=TAG20141202T061942 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:01:55channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00009 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_sysaux_b7ghrvm2_.dbfinput datafile file number=00008 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_system_b7ghrvnw_.dbfinput datafile file number=00010 name=/DBData/WOO12C/08D98EA3271835F9E0533307A8C068EE/datafile/o1_mf_users_b7ght9rv_.dbfchannel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBData/fast_recovery_area/WOO12C/08D98EA3271835F9E0533307A8C068EE/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stlll8_.bkp tag=TAG20141202T061942 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:55channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00007 name=/DBData/WOO12C/datafile/o1_mf_sysaux_b7gh7gjq_.dbfinput datafile file number=00005 name=/DBData/WOO12C/datafile/o1_mf_system_b7gh7gkl_.dbfchannel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBData/fast_recovery_area/WOO12C/08D970F59616336FE0533307A8C03C35/backupset/2014_12_02/o1_mf_nnndf_TAG20141202T061942_b7stn9ly_.bkp tag=TAG20141202T061942 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:01:05Finished backup at 02-DEC-14Starting backup at 02-DEC-14current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=63 RECID=16 STAMP=865232715channel ORA_DISK_1: starting piece 1 at 02-DEC-14channel ORA_DISK_1: finished piece 1 at 02-DEC-14piece handle=/DBBackup/Phycal/full_0app4pqb_1_1.bak tag=TAG20141202T062515 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: deleting archived log(s)archived log file name=/DBData/fast_recovery_area/WOO12C/archivelog/2014_12_02/o1_mf_1_63_b7stpbxz_.arc RECID=16 STAMP=865232715Finished backup at 02-DEC-14Starting Control File and SPFILE Autobackup at 02-DEC-14piece handle=/DBData/fast_recovery_area/WOO12C/autobackup/2014_12_02/o1_mf_s_865232716_b7stpfto_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 02-DEC-14
4. Upload and decompress the 12.1.0.2 installation media and decompress it.
[oracle@db01 ~]$ ll p17694377_121020*-rw-r--r-- 1 oracle oinstall 1673517582 Dec 2 05:38 p17694377_121020_Linux-x86-64_1of8.zip-rw-r--r-- 1 oracle oinstall 1014527110 Nov 28 02:44 p17694377_121020_Linux-x86-64_2of8.zip[oracle@db01 ~]$ unzip p17694377_121020_Linux-x86-64_1of8.zip[oracle@db01 ~]$ unzip p17694377_121020_Linux-x86-64_2of8.zip
5. Create a software directory where the user installs 12.1.0.2
[oracle@db01 ~]$ cd /DBSoft/Product/[oracle@db01 Product]$ ls12.1.0[oracle@db01 Product]$ mkdir -p 12.1.0.2/db_1[oracle@db01 Product]$ lltotal 8drwxr-xr-x 3 oracle oinstall 4096 Nov 20 05:39 12.1.0drwxr-xr-x 3 oracle oinstall 4096 Dec 2 07:57 12.1.0.2
6. Start installation:
6.1 Go To The unzipped installation package and run./runInstall to start the new version of Database Installation
6.2 click Next to go to the Next step
6.3 select the Upgrade an existing database Upgrade option and click Next to go to the Next step.
6.4 select all languages and click Next to go to the Next step
6.5 click Next to go to the Next step
6.6 specify the newly created installation directory of Oracle 12.1.0.2. If the environment configuration is correct, it will be automatically selected. Click Next to go to the Next step.
6.7 create an Oracle user group and click Next to proceed
6.8 check all components. We can see that there is no problem. Click Next to go to the Next step.
6.9 summary. If there is no problem, click Install to start installation.
6.10 Software Installation Process
6.11 prompt to execute the root. sh script
7. Execute the root. sh script after the software is installed.
[root@db01 ~]# /DBSoft/Product/12.1.0.2/db_1/root.shPerforming root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /DBSoft/Product/12.1.0.2/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]:The contents of "dbhome" have not changed. No need to overwrite.The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)[n]: y Copying oraenv to /usr/local/bin ...The contents of "coraenv" have not changed. No need to overwrite. Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.[root@db01 ~]#
6.12 The Listener Configuration pops up and click Next to go to the Next step.
6.13 configure the listener name and click Next to go to the Next step.
6.14 select the protocol used by the listener. Generally, TCP is enough. Click Next to Next.
6.15 select the default port number and click Next.
6.16 select No and do not configure other listeners. Click Next to go to the Next step.
6.17 click Next to go to the Next step
6.18 select No and click Next to go to the Next step
6.19 Click Finish to complete the Listener Configuration.
6.20 The Upgrade Database page is displayed. Click the first option, and then click Next to go to the Next step.
6.21 select the database to be upgraded and click Next to go to the Next step.
6.23 list the Pluggable database and click Next to go to the Next step.
6.24 check before upgrade. Click Next to go to the Next step.
6.25 configure the upgrade options. Click Next to go to the Next step.
6.26 select the port used by EM and click Next to go to the Next step.
6.27 you do not need to make any choice when you click this page. Click Next to go to the Next step.
6.28 select a Database Listener and click Next to go to the Next step.
6.29 perform RMAN backup before the upgrade is executed. select backup and click Next to go to the Next step.
6.30 check the database information to be upgraded. If there is no problem, click Finish to start the upgrade.
6.31 upgrading is in progress. Wait about 4 hours.
6.32 The upgrade has been completed. Click Cancel to close the upgrade window.
8. Now the upgrade and installation are complete.
9. Check the database version after completion:
SQL> set line 300SQL> set pagesize 1000SQL> r 1* select * from v$versionBANNER CON_ID-------------------------------------------------------------------------------- ----------Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 0PL/SQL Release 12.1.0.2.0 - Production 0CORE 12.1.0.2.0 Production 0TNS for Linux: Version 12.1.0.2.0 - Production 0NLSRTL Version 12.1.0.2.0 - Production 0
10. Check the version of each component:
SQL> select comp_name,version,control,status from dba_server_registry;COMP_NAME VERSION CONTROL STATUS---------------------------------------- ------------- -------- ---------------Oracle Database Vault 12.1.0.2.0 SYS VALIDOracle Application Express 4.2.5.00.08 SYS VALIDOracle Label Security 12.1.0.2.0 SYS VALIDSpatial 12.1.0.2.0 SYS VALIDOracle Multimedia 12.1.0.2.0 SYS VALIDOracle Text 12.1.0.2.0 SYS VALIDOracle Workspace Manager 12.1.0.2.0 SYS VALIDOracle XML Database 12.1.0.2.0 SYS VALIDOracle Database Catalog Views 12.1.0.2.0 SYS VALIDOracle Database Packages and Types 12.1.0.2.0 SYS VALIDJServer JAVA Virtual Machine 12.1.0.2.0 SYS VALIDOracle XDK 12.1.0.2.0 SYS VALIDOracle Database Java Packages 12.1.0.2.0 SYS VALIDOLAP Analytic Workspace 12.1.0.2.0 SYS VALIDOracle OLAP API 12.1.0.2.0 SYS VALIDOracle Real Application Clusters 12.1.0.2.0 SYS OPTION OFF16 rows selected.
11. Check that the database has no invalid objects. If so, run utlrcmp. SQL to re-compile the database.
SQL> select owner, object_name, object_type, status from dba_objects where status=\'INVALID\' order by 1, 2,3;no rows selectedSQL>
12. open all PDBs and view the PDBs status
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 MOUNTED 4 WOO_ORA11G MOUNTEDSQL> alter pluggable database all open;Pluggable database altered.SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 READ WRITE NO 4 WOO_ORA11G READ WRITE NO