Oracle 12c Upgrade
This document describes the process of executing Oracle 12c Database upgrades, from the source 11g.
In addition, this manual provides information about compatibility, upgrading applications, and important changes in the new Oracle Database release.
1 Preparations/Prerequisites Step’s
The following activities can be executed with the system up and running.
- The software Packages can be placed at a specific location as per your understanding. Like we have kept at the following location /net/hnfssap/sap/infra/install/ORACLE12
- Oracle Stage /net/hnfssap/sap/infra/install/ORACLE12/stage_12
- Oracle Client 12c à /net/hnfssap/sap/infra/install/ORACLE12/instantclient_12
- DBA Tools 7.40 (pl17) à /net/hnfssap/sap/infra/install/ORACLE12/brtools
- MOPatch à /net/hnfssap/sap/infra/install/ORACLE12/MOPatch
- OPatch à /net/hnfssap/sap/infra/install/ORACLE12/OPatch
2. Request Unix team to create additional Logical Volume
- 15 GB
3. Create directory /etc/oracle and make it 777. It will avoid the issue faced during the oracle upgrade later on.
4. Check the free space in our HNFS stage. Minimum free space 10GB
- #df -h |grep hnfssap:/sap/infra/Install
5. Backup of current oracle_home and oraInventory (position to the proper source location)
a. #tar -cvf /net/hnfssap/sap/infra/install/ORACLE12/oraInventory.tar oraInventory
b. #tar -cvf /net/hnfssap/sap/infra/install/ORACLE12/11204.tar 11204
6. Create SPFILE for backup
- @sqlplus /as sysdba
- #create pfile from spfile;
- Save the new spfile: cp init<SID>.ora init<SID>.ora.orig
7. Check the patch inventory, and save the extract to a txt file.
- #./opatch lsinventory
8. Check the oraInst.loc file. Outcome expected is the correct oraInventory Location
- #more /etc/oraInst.loc
9. Prepare the export display. Open two sessions, one will be used with the Oracle 11g variables and the second one with the 12c Variables:
- Open exceed X11
- #sudo su – ora<sid>
- #export DISPLAY=<your_ip>:0.0
- #xclock (to check if it works)
10. Set the 12c Variables
a. export ORACLE_HOME=/opt/oracle/<SID>/product/12102
b. export ORACLE_HOME_SRC=/opt/oracle/<SID>/product/11204
c. export ORACLE_HOME_TGT=/opt/oracle/<SID>/product/12102
11. Link the new stage located in HNFS. The Oracle 12c Stage contains the latest scripts for the RUNINSTALLER (Patch Level 059 – 02062015). Check OSS note 1915301 in case a new script is available
- #cd /oracle
- # ln –s /net/hnfssap/sap/infra/install/ORACLE12/stage_12 stage
12. Launch the RunInstaller Check
- #cd /net/hnfssap/sap/infra/install/ORACLE12/stage_12/database/SAP
- #RUNINSTALLER –check
- Request Unix to fix the warning and install the missing packages
2 Installation of new Oracle_Home 188.8.131.52
- With the 12c Variables, launch the RUNINSTALLER
Select Install Database software, then click Next
Select Single instance database installation, then click Next
Select English — Click Next
Select the Database Edition then Click Next
Hidden the <SID>
Select the correct Oracle Base and Oracle_Home locations, then click Next
Ignore the WARNING and click YES
If already checked with Unix and the warning are still there, click Ignore All then click Next
Check and then click Install
Run the script as suggested
Click on Close
3. Install the Sap Bundle Patch (still with variables 12c)
- a. Upgrade the MOPatch and OPatch executables
- b. Position the zip file in the MOPatch directory
- c. #./ mopatch.sh -v -s SAP12102P_1511-20012300.zip
Link script “./link.hostname.sh” executed successfully
4. Launch the pre_upgrade script from the new Oracle_Home 12c
a. sqlplus / as sysdba @pre_upgrade_status.sql
5. Launch the dbua.sh –q and check the warning (in this case, the display variables were not properly set)
User is — ora<SID>
6. Launch the upgrade script dbua.sh
Check if the DB is up and running, then click Next
Select Upgrade Oracle Instance, then click Next
Prerequisite Checks will run automatically
Click Next, hidden the <SID>
Un-check and then click Next
Un-check and then click Next, hidden the <SID>
click Next, hidden the <SID>
Select the own backup strategy then click Next, hidden the <SID>
Check the details then click Finish
Hostname:/etc # ll |grep oracle
Drwxrwxrwx 2 root root 4096 oracle
Refer to this link, if required-:
1. Update the SQL*Net configuration files:
a. Copy the listener.ora, sqlnet.ora and tnsnames.ora from the Oracle 11 to the 12c $ORACLE_HOME/network/admin
b. Adjust the files with the new oracle12 locations
2. Check the symbolic link for the runtime Oracle home.
a. # cd /oracle/<SID>
b. # ln -s /oracle/DBSID/12102 121
3. Adapt the environment of the <sid>adm user.
a. Log on as user adm and adapt the variables listed below in the .dbenv* files.
b. Set the ORACLE_HOME environment variable to new Oracle home
4. Adapt the environment of the ora user.
5. Edit the /etc/oratab file including the following line:
6. Start the database and listener process as <ora>sid user.
7. Perform post-upgrade checks. Refer Note : SAP Note 1915315
8. Perform post-upgrade tasks
a. $brconnect -u / -c -f stats -t system_stats
b. $ brconnect -u / -c -f stats -t oradict_stats
c. $ brconnect -u / -c -f stats -t all -f collect -p 4
9. Update the Oracle Instant Client.
a. Copy the oracle client from the HNFS location
b. #cd /oracle/client/12x
c. #ln -s instantclient_12102 instantclient
10. Update BR*Tools.
a. Copy the executables from the HNFS location
11. Backup the database.
12. Unistall the old Oracle_Home 11g
a. # ./runinstaller -deinstall -home <path_of_Oracle_home_to_be_deinstalled>
End of Document