You are on page 1of 189

SMP Oracle Upgrade from 11g to 12c

Document Information:

Project Name: Denbury Resources


Team: SAP Infrastructure Services
Document ID: SMP Oracle Upgrade from 11g to 12c

Status of the document

Status Name / Created Validated Version


Narendar Nagabelli

SMP Oracle Upgrade from 11g to 12c

Page 1
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 2
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 3
SMP Oracle Upgrade from 11g to 12c

Checking the Original Version of Your Database


To upgrade directly to Oracle Database Release 12c, your source release must be Oracle
Database 10g Release 2 (10.2.0.5) or Oracle Database 11g Release 2 (11.2.0.2, 11.2.0.3, or
11.2.0.4).
To check the original version of your database, enter these commands from the environment of
the source database as the appropriate database user
SQL> select version from v$instance;

SMP Oracle Upgrade from 11g to 12c

Page 4
SMP Oracle Upgrade from 11g to 12c

Extracting Oracle Software


Software downloaded to “/sapbackup1/SOFTWARES/ORACLE12C/CD/51047705”

To upgrade a single instance database on the file system, we only need to extract the database
software that is contained in the 2 SAR files “OR112164.SAR” and “OR212164.SAR”.

Note : I already did this in GRS and copied the required software to
/sapbackup1/SOFTWARES/ORACLE12C/ 12cSTAGE, so this step is not required in any
system, just copy this software to /oracle/stage directory.

3.4Process Flow for Software Installation


1.Back up the central Oracle inventory
2.Update the SAP RUNINSTALLER installation scripts
3.Check the software installation prerequisites
4.Install the new Oracle database 12c software
5.Install the current SAP bundle patch
SMP Oracle Upgrade from 11g to 12c

Page 5
SMP Oracle Upgrade from 11g to 12c

3.4.1Backing Up the Central Oracle Inventory


Make a backup of your existing Oracle inventory before we start the Oracle Database 12c

software installation

3.4.2Updating the SAP RUNINSTALLER Scripts


The SAP-specific installation scripts RUNINSTALLER and 12cinstall.sh are located in directory
SAP in the Oracle database software stage (that is, /oracle/stage/12102/database/SAP).
We need to check the patch level of the RUNINSTALLER and check in SAP Note 1915301
whether a higher version is available. If a higher version is available, we recommend that you
update the Oracle installation scripts, which are attached to SAP Note 1915301. After we have
extracted the Oracle software to the staging area, we need to update the installation scripts.
Check RUNINSTALLER version with the below command . downloaded higher patch level (59) from
SAP Note 1915301.

SMP Oracle Upgrade from 11g to 12c

Page 6
SMP Oracle Upgrade from 11g to 12c

3.4.3Checking the Software Installation Prerequisites


Set Display variables
Command : setenv DISPLAY capflwddev:1.0

SMP Oracle Upgrade from 11g to 12c

Page 7
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 8
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 9
SMP Oracle Upgrade from 11g to 12c

Login as root and go to /oracle/stage/12102/database and execute rootpre.sh script

SMP Oracle Upgrade from 11g to 12c

Page 10
SMP Oracle Upgrade from 11g to 12c

Now open previous session and enter “y” to proceed

SMP Oracle Upgrade from 11g to 12c

Page 11
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 12
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 13
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 14
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 15
SMP Oracle Upgrade from 11g to 12c

Click on close button

Completed successfully.
Check log “/oracle/SMP/12cinstall_12102.log” and make sure we don’t have any errors in that.
SMP Oracle Upgrade from 11g to 12c

Page 16
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 17
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 18
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 19
SMP Oracle Upgrade from 11g to 12c

No Errors found in log.

3.4.4Installing the New Oracle Database 12c Software


Procedure
1.Log on as the Oracle database software owner (orasmp)
2.Change to the stage directory:cd /oracle/stage/12102/database/SAP
3.Make sure that the DISPLAY (for dialog mode) and DB_SID variables are set in the
environment.
4.Start the OUI with the Oracle database software owner, user orasmp, as
follows:./RUNINSTALLER

SMP Oracle Upgrade from 11g to 12c

Page 20
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 21
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 22
SMP Oracle Upgrade from 11g to 12c

Login as root, change directory to /oracle/stage/12102/database and run “rootpre.sh” script

Now go back to the RUNINSTALLER screen and enter “y” to continue.

SMP Oracle Upgrade from 11g to 12c

Page 23
SMP Oracle Upgrade from 11g to 12c

It will ask the E-mail ID to register to send oracle updates but leave it empty and click on Next

SMP Oracle Upgrade from 11g to 12c

Page 24
SMP Oracle Upgrade from 11g to 12c

Click Yes

SMP Oracle Upgrade from 11g to 12c

Page 25
SMP Oracle Upgrade from 11g to 12c

Select Install database software only and click Next

SMP Oracle Upgrade from 11g to 12c

Page 26
SMP Oracle Upgrade from 11g to 12c

Select Single instance database installation and click Next

SMP Oracle Upgrade from 11g to 12c

Page 27
SMP Oracle Upgrade from 11g to 12c

Click Next

SMP Oracle Upgrade from 11g to 12c

Page 28
SMP Oracle Upgrade from 11g to 12c

Select Enterprise Edition and click Next

SMP Oracle Upgrade from 11g to 12c

Page 29
SMP Oracle Upgrade from 11g to 12c

Click Next

SMP Oracle Upgrade from 11g to 12c

Page 30
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 31
SMP Oracle Upgrade from 11g to 12c

Click Yes to continue

SMP Oracle Upgrade from 11g to 12c

Page 32
SMP Oracle Upgrade from 11g to 12c

Click Next to continue

SMP Oracle Upgrade from 11g to 12c

Page 33
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 34
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 35
SMP Oracle Upgrade from 11g to 12c

IV42025: CHOWN -R FAILS WITH EOVERFLOW ERROR APPLIES TO AIX 7100-00


IV41380: CHOWN -R FAILS WITH EOVERFLOW ERROR APPLIES TO AIX 7100-01
IV42024: CHMOD -R FAILS WITH EOVERFLOW ERROR APPLIES TO AIX 7100-00
IV37790: CHMOD -R FAILS WITH EOVERFLOW ERROR APPLIES TO AIX 7100-01
All the above OS patches for old AIX release, we are on AIX TL 7100-03, so we can ignore
these warnings.

Select ignore all and click next

SMP Oracle Upgrade from 11g to 12c

Page 36
SMP Oracle Upgrade from 11g to 12c

Click next

SMP Oracle Upgrade from 11g to 12c

Page 37
SMP Oracle Upgrade from 11g to 12c

Click on YES to continue

SMP Oracle Upgrade from 11g to 12c

Page 38
SMP Oracle Upgrade from 11g to 12c

Click Install to start installation.

SMP Oracle Upgrade from 11g to 12c

Page 39
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 40
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 41
SMP Oracle Upgrade from 11g to 12c

Login as root and go to /oracle/SMP/12102 and execute root.sh script

SMP Oracle Upgrade from 11g to 12c

Page 42
SMP Oracle Upgrade from 11g to 12c

Go to previous session and click ok

SMP Oracle Upgrade from 11g to 12c

Page 43
SMP Oracle Upgrade from 11g to 12c

Click on ok

Oracle 12c installation completed successfully.

3.4.5Installing the Current SAP Bundle Patch


After the installation of the Oracle Database patch set, we need to install the current (or latest)
SMP Oracle Upgrade from 11g to 12c

Page 44
SMP Oracle Upgrade from 11g to 12c

SAP bundle patch (SBP) into the new Oracle home.


The SBP also delivers a set of upgrade scripts that automate most of the pre-upgrade and postupgrade
tasks.
Set the below environment variables
setenv ORACLE_HOME /oracle/SMP/12102
setenv OHRDBMS /oracle/SMP/121
setenv IHRDBMS /oracle/SMP/12102
setenv LIBPATH
/usr/sap/SMP/SYS/exe/run:/usr/sap/SMP/SYS/exe/uc/rs6000_64:/oracle/SMP/12102/lib
setenv PATH
/oracle/SMP/12102/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb

SMP Oracle Upgrade from 11g to 12c

Page 45
SMP Oracle Upgrade from 11g to 12c

SAP Bundle Patch 12.1.0.2.160119 – 201602 is the latest SBP which is released on
2016/02/23.
Downloaded this patch to “/sapbackup/SOFTWARES/ORACLE12C/SBP”

Go to new Oracle home (/oracle/SMP/12102) and rename existing Opatch

SMP Oracle Upgrade from 11g to 12c

Page 46
SMP Oracle Upgrade from 11g to 12c

Copy OPatch and MOPatch directories to /oracle/SMP/12102

SMP Oracle Upgrade from 11g to 12c

Page 47
SMP Oracle Upgrade from 11g to 12c

Make sure that icop0 changed to Available from Defined before executing mopatch otherwise
you will get error “RDBMS version not found”
lsdev |grep iocp command output should be ‘Available’

Command: ./mopatch.sh –v –s
/sapbackup/SOFTWARES/ORACLE12C/SBP/SAP12102P_1602-20012297.ZIP

SMP Oracle Upgrade from 11g to 12c

Page 48
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 49
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 50
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 51
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 52
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 53
SMP Oracle Upgrade from 11g to 12c

MOPatch applied successfully.


Check bundle patch version as shown in the below screen.

SMP Oracle Upgrade from 11g to 12c

Page 54
SMP Oracle Upgrade from 11g to 12c

3.5Running the Pre-Upgrade Scripts


1.Log on as the Oracle database administrator orasmp.
2.Change to the correct directory by entering the relevant command:
cd /oracle/SMP/12102/sap/ora_upgrade/pre_upgrade
3.Execute the following commands to perform pre-upgrade tasks, which can improve the
performance of the upgrade process:
sqlplus / as sysdba
SQL> @pre_upgrade_tasks.sql
4.Execute the following commands to check the pre-upgrade status of your database
sqlplus / as sysdba
SQL> @pre_upgrade_checks.sql

SMP Oracle Upgrade from 11g to 12c

Page 55
SMP Oracle Upgrade from 11g to 12c

Please open new session to run below scripts

SMP Oracle Upgrade from 11g to 12c

Page 56
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 57
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 58
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 59
SMP Oracle Upgrade from 11g to 12c

Make sure that we didn’t get any error during Pre-upgrade task.
Execute the following commands to check the pre-upgrade status of your database

SMP Oracle Upgrade from 11g to 12c

Page 60
SMP Oracle Upgrade from 11g to 12c

sqlplus / as sysdba
SQL> @pre_upgrade_checks.sql

SMP Oracle Upgrade from 11g to 12c

Page 61
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 62
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 63
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 64
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 65
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 66
SMP Oracle Upgrade from 11g to 12c

We didn’t get any error during Pre-upgrade checks also.


SMP Oracle Upgrade from 11g to 12c

Page 67
SMP Oracle Upgrade from 11g to 12c

Check the logs.

SMP Oracle Upgrade from 11g to 12c

Page 68
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 69
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 70
SMP Oracle Upgrade from 11g to 12c

More /oracle/cfgtoollogs/SMP/preupgrade/preupgrade_fixups.sql

SMP Oracle Upgrade from 11g to 12c

Page 71
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 72
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 73
SMP Oracle Upgrade from 11g to 12c

/oracle/cfgtoollogs/SMP/preupgrade/postupgrade_fixups.sql

SMP Oracle Upgrade from 11g to 12c

Page 74
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 75
SMP Oracle Upgrade from 11g to 12c

No issues found in logs also, so we can Upgrade Oracle 11g Database to 12c.

4Oracle Database Upgrade


1.Back up the Oracle database
2.Shut down the SAP system
3.Upgrade the database structure
If you have problems during the upgrade, see SAP Note 2086029.
4.1Backing Up the Oracle Database
We must have a complete and usable database backup otherwise you might lose data if the
upgrade fails.
SMP Oracle Upgrade from 11g to 12c

Page 76
SMP Oracle Upgrade from 11g to 12c

We already took offline snap backup before starting this activity, so we are good on this.
4.2Shutting Down the SAP System

We need to shut down the SAP system.


Stop the SAP application instances by entering the following command as user
<sapsid>adm:stopsap r3
Also stop the SAP application server with the sapcontrol tool:sapcontrol -nr
<SAP_instance_number> -function Stop Note
Make sure that processes that log on to the database, such as CRON jobs, are not active during
the upgrade. Make sure that you reschedule these processes when the upgrade has finished.
4.3Upgrading the Database Structure with the Database Upgrade Assistant
To upgrade the database structure, you need to start the Oracle Database Upgrade Assistant
(DBUA). The DBUA is a graphical tool that leads you step-by-step through the upgrade.
Prerequisites
1. We should have installed the database software.
2.Make sure that the DISPLAY environment variable is correctly set, as described in Checking
and Setting the DISPLAY Environment Variable
3. Make sure that the database and the Oracle Listener are both running.

Procedure
1.Log on as Oracle software owner (oragrs)
2. Make sure that oratab contains the entry <DBSID>:<Oracle_home>:N

SMP Oracle Upgrade from 11g to 12c

Page 77
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 78
SMP Oracle Upgrade from 11g to 12c

2.Make a backup of directory <Oracle_home>/network/admin as follows:

To run the upgrade with this script, you have to set the environment variables
ORACLE_HOME_SRC and ORACLE_HOME_TGT, DB_SID, and ORACLE_BASE:
setenv ORACLE_HOME_SRC /oracle/SMP/11204
setenv ORACLE_HOME_TGT /oracle/SMP/12102
setenv DB_SID SMP
setenv ORACLE_BASE /oracle/SMP

SMP Oracle Upgrade from 11g to 12c

Page 79
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 80
SMP Oracle Upgrade from 11g to 12c

2.Change to the correct directory:cd $ORACLE_HOME_TGT/sap/ora_upgrade/post_upgrade

SMP Oracle Upgrade from 11g to 12c

Page 81
SMP Oracle Upgrade from 11g to 12c

3.Run this script in query mode initially to verify that the environment for the upgrade is
correct:./dbua.sap.sh –q

SMP Oracle Upgrade from 11g to 12c

Page 82
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 83
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 84
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 85
SMP Oracle Upgrade from 11g to 12c

4. Run this script as follows to perform the upgrade:


For interactive mode, enter the following command:./dbua.sap.sh

SMP Oracle Upgrade from 11g to 12c

Page 86
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 87
SMP Oracle Upgrade from 11g to 12c

Click on next

SMP Oracle Upgrade from 11g to 12c

Page 88
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 89
SMP Oracle Upgrade from 11g to 12c

DB state shown as down even though DB is up and running.


Solution : As per the below wiki, I re-created entry in oratab and set ORACLE_HOME env same
as per oratab.

SMP Oracle Upgrade from 11g to 12c

Page 90
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 91
SMP Oracle Upgrade from 11g to 12c

setenv ORACLE_HOME_SRC /oracle/SMP/11204

setenv ORACLE_HOME_TGT /oracle/SMP/12102

setenv DB_SID SMP

setenv ORACLE_BASE /oracle/SMP

setenv ORACLE_HOME /oracle/SMP/11204

SMP Oracle Upgrade from 11g to 12c

Page 92
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 93
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 94
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 95
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 96
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 97
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 98
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 99
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 100
SMP Oracle Upgrade from 11g to 12c

Click Next

SMP Oracle Upgrade from 11g to 12c

Page 101
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 102
SMP Oracle Upgrade from 11g to 12c

We already took Offline snap backup, so select as above and click Next

SMP Oracle Upgrade from 11g to 12c

Page 103
SMP Oracle Upgrade from 11g to 12c

Click Finish to start Upgrade.

SMP Oracle Upgrade from 11g to 12c

Page 104
SMP Oracle Upgrade from 11g to 12c

This can be safely ignored.

SMP Oracle Upgrade from 11g to 12c

Page 105
SMP Oracle Upgrade from 11g to 12c

Click on Upgrade results to check logs

SMP Oracle Upgrade from 11g to 12c

Page 106
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 107
SMP Oracle Upgrade from 11g to 12c

Click Close to close dbua.

SMP Oracle Upgrade from 11g to 12c

Page 108
SMP Oracle Upgrade from 11g to 12c

5Post-Upgrade Steps
5.1Updating oratab
After the database upgrade, change the entry <DBSID>:/oracle/<DBSID>/12102:N in /etc/oratab

SMP Oracle Upgrade from 11g to 12c

Page 109
SMP Oracle Upgrade from 11g to 12c

5.2Updating the SQL*Net Configuration Files


Copy sqlnet.ora, tnsnames.ora from /oracle/SMP/12102/network/admin to
/usr/sap/SMP/SYS/profile/oracle

SMP Oracle Upgrade from 11g to 12c

Page 110
SMP Oracle Upgrade from 11g to 12c

5.3Checking the Symbolic Link for Runtime Oracle Home


For upgrades from 11.2 to 12.1.0.2, the symbolic link /oracle/<DBSID>/121 has already been
created by RUNINSTALLER.
Check that the following symbolic link exists:ls -l /oracle/<DBSID>/121

Soft link already exists, so no need to create again.

5.4Adapting the Environment of the <sapsid>adm user


We have to change the environment of user <sapsid>adm for SAP application servers that are
installed on the Oracle database server. We need to make sure that the changes we made to
the Oracle user environment are permanently stored in the profiles .cshrc,
.dbenv_hostname.csh and .dbenv.csh.
Take backup of .dbenv_hostname.csh and .dbenv.csh files before making any changes.

SMP Oracle Upgrade from 11g to 12c

Page 111
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 112
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 113
SMP Oracle Upgrade from 11g to 12c

Change environment vaiables for <SID>adm user also. Make sure to take backup of old files
before changing anything.

SMP Oracle Upgrade from 11g to 12c

Page 114
SMP Oracle Upgrade from 11g to 12c

5.5Performing SAP Bundle Patch Post-Installation Steps


We have installed an SAP bundle patch (SBP) before we upgrade to the new Oracle Release.
Now we need to run the SBP post-installation steps.
Run the SBP post-installation instructions as described in the corresponding SBP README.
Take backup of pfile and initGRS.sap files before starting post bundle patch activities

SMP Oracle Upgrade from 11g to 12c

Page 115
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 116
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 117
SMP Oracle Upgrade from 11g to 12c

ALTER VIEW S$KEWMRMGMV COMPILE;

SMP Oracle Upgrade from 11g to 12c

Page 118
SMP Oracle Upgrade from 11g to 12c

SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

ALTER SYNONYM X$DNFS_CHANNELS COMPILE;

As per SAP suggestion, implemented SAP notes 2199300 and 706927 and issue fixed.

SMP Oracle Upgrade from 11g to 12c

Page 119
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 120
SMP Oracle Upgrade from 11g to 12c

After setting parameters restart Database.

Validation

set linesize 100


set pagesize 999
col version format A30
col patch format A15
col description format A50
select version || ' ' || id "Version", bundle_series "Patch", comments "Description" from
SMP Oracle Upgrade from 11g to 12c

Page 121
SMP Oracle Upgrade from 11g to 12c

dba_registry_history order by action_time desc ;

Check logs $ORACLE_HOME/OPatch/opatch lsinventory -all | more

SMP Oracle Upgrade from 11g to 12c

Page 122
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 123
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 124
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 125
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 126
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 127
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 128
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 129
SMP Oracle Upgrade from 11g to 12c

5.6Performing Post-Upgrade Checks


Log on as the Oracle database administrator (orasmp) and change to the directory
/oracle/SMP/12102/sap/ora_upgrade/post_ugprade. From the same directory, start sqlplus.exe and enter
the
following commands to run the post-upgrade scripts, please check SAP Note 1915315 for more details.
sqlplus / as sysdba
SQL> @?\rdbms\admin\utlu121s.sql
SQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)

SMP Oracle Upgrade from 11g to 12c

Page 130
SMP Oracle Upgrade from 11g to 12c

SQL> @post_upgrade_checks.sql
This provides an overview of the status of the upgraded database.

Run the script from rdbms/admin

SMP Oracle Upgrade from 11g to 12c

Page 131
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 132
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 133
SMP Oracle Upgrade from 11g to 12c

Oracle Database 12.1 Post-Upgrade Invalid Objects Tool


Purpose: list invalid objects that were not invalid prior to upgrade

@?/rdbms/admin/utluiobj.sql

SMP Oracle Upgrade from 11g to 12c

Page 134
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 135
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 136
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 137
SMP Oracle Upgrade from 11g to 12c

5.7Run SAP specific post-upgrade scripts


Recompile invalid objects
SQL> @?/rdbms/admin/utlrp.sql

SMP Oracle Upgrade from 11g to 12c

Page 138
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 139
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 140
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 141
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 142
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 143
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 144
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 145
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 146
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 147
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 148
SMP Oracle Upgrade from 11g to 12c

5.8Run post-upgrade checks


cd /oracle/SMP/12102/sap/ora_upgrade/post_upgrade
SQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)
SQL> @post_upgrade_checks.sql
SQL> @post_upgrade_checks.sql

SMP Oracle Upgrade from 11g to 12c

Page 149
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 150
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 151
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 152
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 153
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 154
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 155
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 156
SMP Oracle Upgrade from 11g to 12c

Recompile invalid objects


SQL> @?/rdbms/admin/utlrp.sql
Run post-upgrade checks
SQL> @post_upgrade_checks.sql

SMP Oracle Upgrade from 11g to 12c

Page 157
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 158
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 159
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 160
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 161
SMP Oracle Upgrade from 11g to 12c

5.9Updating the Oracle Instant Client

Installation of Oracle 12c Client

Create a directory 12x in /oracle/client with adm:sapsys authorizations

SMP Oracle Upgrade from 11g to 12c

Page 162
SMP Oracle Upgrade from 11g to 12c

Extract Oracle12 client to new 12x directory as below

SMP Oracle Upgrade from 11g to 12c

Page 163
SMP Oracle Upgrade from 11g to 12c

Create soft link with the below command ln -s instantclient_12102 instantclient

Rename old client directories

We need to update new client in adm user’s environment variables

SMP Oracle Upgrade from 11g to 12c

Page 164
SMP Oracle Upgrade from 11g to 12c

Take backup of “.dbenv.sh” before making any changes

SMP Oracle Upgrade from 11g to 12c

Page 165
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 166
SMP Oracle Upgrade from 11g to 12c

After change logout and re login check the same.

SMP Oracle Upgrade from 11g to 12c

Page 167
SMP Oracle Upgrade from 11g to 12c

Ensure that parameter 'compatible' is set to '12.1.0.2.0' or '12.1.0.2':

SQL> show parameter compatible

SQL> select value "compatible" from v$parameter where name = 'compatible';

If compatible has a lower value, you have to run 'set_compatible.sql' as described above.

SMP Oracle Upgrade from 11g to 12c

Page 168
SMP Oracle Upgrade from 11g to 12c

5.10Starting the SAP System Log on as adm, SAP installations with an ABAP application server, enter
this command to check whether R3trans can connect to the database:

R3trans -d

So Database connection is successful, now start SAP with startsap command.

SMP Oracle Upgrade from 11g to 12c

Page 169
SMP Oracle Upgrade from 11g to 12c

Check Oracle version

SMP Oracle Upgrade from 11g to 12c

Page 170
SMP Oracle Upgrade from 11g to 12c

Check alert log if we have any errors

SMP Oracle Upgrade from 11g to 12c

Page 171
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 172
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 173
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 174
SMP Oracle Upgrade from 11g to 12c

We are facing issue like Java system is unable to run using new oracle client (12x)

1777021 - J2EE: Introducing Support for Oracle 12

Changing the Location of the JDBC Driver

SMP Oracle Upgrade from 11g to 12c

Page 175
SMP Oracle Upgrade from 11g to 12c

If we have an SAP system with Java components, we might have to change the location of the JDBC
driver after we have upgraded the database server or client software. Otherwise the J2EE Engine cannot
start because the location of the JDBC driver might still point to the path of the old Oracle server or client
software home.

For more information, please refer oracle upgrade guide page# 42.

1)
For dual stack system:
From SMPadm user goto /usr/sap/SMP/DVEBMGS21/j2ee/configtool
Edit the file config.properties and change the entry of rdbms.driverLocation from
/oracle/client/11x_64/instantclient/ojdbc14.jar to /oracle/client/12x/instantclient/ojdbc14.jar
And save the file.

For single stack systems, edit the config.properties file from


/usr/sap/SMP/JC<instance_number>/j2ee/configtool directory.

2)

SMP Oracle Upgrade from 11g to 12c

Page 176
SMP Oracle Upgrade from 11g to 12c

In the same directory as in the first step, start the J2EE Engine - ConfigTool by double-clicking the
configtool.sh file. Change to Configuration Editor mode.

Use the Edit mode to replace the driver location in the following property sheets that contain the string
rdbms.driverLocation= followed by the driver location:

cluster_data/Propertysheet instance.properties.IDXXXXXXX/IDXXXXXXX.JavaParameters
where XXXXXXX is the instance number

NOTE
Make sure that you change all occurrences. There might be several IDXXXXXX.JavaParameters
properties in the property sheet.

cluster_data/dispatcher/IDXXXX/kernel/propertysheet ConfigurationManager

cluster_data/server/IDXXXX/kernel/propertysheet ConfigurationManager
where XXXX is the instance number

NOTE
If you have more than one server or dispatcher you must modify all relevant property sheets.

SMP Oracle Upgrade from 11g to 12c

Page 177
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 178
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 179
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 180
SMP Oracle Upgrade from 11g to 12c

Right click on highlighted and select change mode

But no rdbms.driverLocation found under ID217589600.JavaParameters

SMP Oracle Upgrade from 11g to 12c

Page 181
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 182
SMP Oracle Upgrade from 11g to 12c

Please follow as per below steps.

SMP Oracle Upgrade from 11g to 12c

Page 183
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 184
SMP Oracle Upgrade from 11g to 12c

Close the J2ee engine – config tool.

SMP Oracle Upgrade from 11g to 12c

Page 185
SMP Oracle Upgrade from 11g to 12c

3)

SMP Oracle Upgrade from 11g to 12c

Page 186
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 187
SMP Oracle Upgrade from 11g to 12c

SMP Oracle Upgrade from 11g to 12c

Page 188
SMP Oracle Upgrade from 11g to 12c

***

SMP Oracle Upgrade from 11g to 12c

Page 189

You might also like