SAP – Oracle Upgrade to 12c

Based on:

 

Now you can decide to use the standard Oracle user “oracle” or “ora<sid>”. We choose SAP Classic ora<sid>, then no migration user is needed.

Oracle 12.1 is only released and certified for Oracle client software version 11.2.0.4 or higher

 

SAP must be 7.00 and above.

Check OS kernel required.

 

Check:

uname -r

2.6.32-431.el6.x86_64

 

 

Check the necessary on the link:
http://docs.oracle.com/database/121/nav/portal_11.htm

 

Check Original Version (must be 10.2.0.5 or higher):

Checking Hardware and Software

 

 

Check in chapter Installation Checklist in the Oracle Database Installation Guide:
https://help.sap.com/viewer/disclaimer-for-links?q=http://docs.oracle.com/database/121/nav/portal_11.htm

 

yum install -y oracle-database-server-12cR2-preinstall.x86_64

Update BR*Tools (7.40 recommended)

 


brtools –version

 

Update Kernel (must be 7.21 EXT or above)

check PAM for what Kernel is possible you tu update.

Configuring Secure Storage in File System

require at least SAP kernel 7.20 patch 210 (non-Unicode)


how to:

Follow notes 1639578 and 1622837

 

After configured SSFS according to the notes. Testing with command “R3trans –d”:

 

 

Kernel 748 and higher requires compat-sap-c++:

Note: 2195019 - Linux: Using SAP kernel 748 and higher or SAPinst 749 and higher on RHEL 6, OL6 and SLES 11

 

Solution:

 


12 Preparation

Download:

 

Extracting Software

mkdir -p /oracle/stage/12102

chmod 755 /oracle/stage/121022

 

./SAPCAR_LINUX.exe -xvf ORACLE_DATABASE/ORACLE_LINUX/VERSION_12102/51047708/OR112164.SAR /oracle/stage/12102/

./SAPCAR_LINUX.exe -xvf ORACLE_DATABASE/ORACLE_LINUX/VERSION_12102/51047708/OR212164.SAR /oracle/stage/12102/

./SAPCAR_LINUX.exe -xvf ORACLE_DATABASE/ORACLE_LINUX/VERSION_12102/51047708/OR312164.SAR /oracle/stage/12102/

 

Backup Oracle Inventory

16

Check local for OraInventory:

 

Backup:

zip –r /oracle/oraInventory.zip /oracle/oraInventory

Update RUNINSTALLER

Download the latest RUNINSTALLER from note 1915301

 

Installing


xhost +
su – oraSID

 

cd /oracle/stage/12102/database/SAP

./RUNINSTALLER

 


Default options.

 

Installing the Current SAP Bundle Patch Use

Check note 1915316, download Bundle Patch and install following README file.

Download:

 

Move:


/oracle/SLR/12102/bin/unzip -qd /oracle/SLR/12102/sapbundle SAP12102P_1702-20012300.zip 'SBP_12102170117_201702/OPatch/*'

/oracle/SLR/12102/bin/unzip -qd /oracle/SLR/12102/sapbundle SAP12102P_1702-20012300.zip 'SBP_12102170117_201702/MOPatch/*'

mv /oracle/SLR/12102/OPatch /oracle/SLR/12102/OPatch-pre-SBP_12102170117_201702

mv /oracle/SLR/12102/sapbundle/SBP_12102170117_201702/OPatch /oracle/SLR/12102/OPatch

test -d /oracle/SLR/12102/MOPatch && mv /oracle/SLR/12102/MOPatch /oracle/SLR/12102/MOPatch-pre-SBP_12102170117_201702

mv /oracle/SLR/12102/sapbundle/SBP_12102170117_201702/MOPatch /oracle/SLR/12102/MOPatch

 

Stop SAP, Instance DB and Listener.

 

set IHRDBMS=/oracle/SLR/12102

 

# go to ZIP directory
env ORACLE_HOME=$IHRDBMS $IHRDBMS/MOPatch/mopatch.sh -v -s SAP12102P_1702-20012300.zip

 

The README of the SAP BUNDLE INSTALLATION ends here, for a while.

Running the Pre-Upgrade Scripts

1. Log on as the Oracle database administrator <ora_dba>.
startup DB.


2. Change to the correct directory by entering the relevant command:
cd /oracle/<DBSID>/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.sqlResult

 

Follow the recommendations and instructions. However, you can safely ignore warnings about the setting of database parameter remote_os_authent=TRUE.

Oracle Database Upgrade

 

  • Backup DATABASE

  • Shutdown SAP System

 

Upgrading the Database Structure with the Database Upgrade Assistant

​​ Added on /etc/oratab:
<SID>:/oracle/<SID>/112_64:N

 

Make sure database and listener are running.

 

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

cp –r <old_Oracle_home>/network/admin <old_Oracle_home>/network/admin.SAVE

 

Set ORACLE_HOME_SRC and ORACLE_HOME_TGT:

(bash executed before)
bash

export ORACLE_HOME_SRC=/oracle/<DBSID>/112_64

export ORACLE_HOME_TGT=/oracle/<DBSID>/12102

export ORACLE_BASE=/oracle/<DBSID>

 

Change to the correct directory:

cd $ORACLE_HOME_TGT/sap/ora_upgrade/post_upgrade

 

Run this script in query mode initially to verify that the environment for the upgrade is correct:

./dbua.sap.sh –q

 

If everything is ok, run:

./dbua.sap.sh

 

 ​​ ​​ ​​​​ 

 

​​  ​​ ​​​​ 

 

 ​​ ​​​​ 

 

 ​​ ​​​​ 

 

 ​​ ​​ ​​​​ 

 

Make sure the database stopped after finish.

 

 

Post-Upgrade Steps

Updating oratab

 

Ex: <DBSID>:/oracle/<DBSID>/121:N

 

 

 

Updating the SQL*Net Config Files

Check if the entries are ok in tnsnames:

/oracle/<SID>/12102/network/admin

/sapmnt/<SID>/profile/oracle ​​ ($TNS_ADMIN of SIDadm user)

 

 

Check that the following parameters are configured in listener.ora:

-> SID_LIST_<LISTENER_NAME>
-> ADR_BASE_<LISTENER_NAME>

If they are missing, copy them from the listener.ora from the source Oracle home <OLD_ORACLE_HOME> and check that Oracle home in listener.ora is set to <NEW_ORACLE_HOME>.

 

[root@vml-03 admin]# pwd

/oracle/SLR/11203/network/admin

[root@vml-03 admin]# cp listener.ora /oracle/SLR/12102/network/admin

 

Changed:

 

Checking the Symbolic Link for Runtime Oracle Home

It is already been create by the RUNTINSTALLER by default.

 

Check:

[root@vml-03 admin]# cd /oracle/SLR/

[root@vml-03 SLR]# ls -l /oracle/SLR/121

lrwxrwxrwx 1 oraslr dba 5 Mar 10 11:09 /oracle/SLR/121 -> 12102

Adapting the Environment of the <sapsid>adm user


1.Log on as user <sapsid>adm and adapt the variables listed below in the .dbenv* files.

 

2.Set the ORACLE_HOME environment variable to new Oracle home, for example:

/oracle/<DBSID>/121

 

3.Set ORACLE_BASE to the new Oracle base /oracle/<DBSID>.

 

4.Adapt the PATH variable so that it no longer contains references to the old Oracle home.

 

5.Check the environment with:

 

$ env | grep ORACLE_HOME

$ env | grep ORACLE_BASE

$ env | grep PATH (this should no longer contain a reference to 112_64)

 

Adapting the Environment of the ora<dbsid> User

1.Log on as user ora<dbsid> and adapt the variables listed below in the .dbenv* files.

2.Set the ORACLE_HOME environment variable to the new Oracle home, for example:

/oracle/<DBSID>/121.

3.Set ORACLE_BASE to the new Oracle base oracle/<DBSID>.

4.Change the PATH variable so that it no longer contains references to the old Oracle home.

5.After you have made these changes, log on as ora<dbsid> and verify the environment by entering the following commands:

$ env | grep ORACLE_HOME
$ env | grep ORACLE_BASE
$ env | grep PATH (this should no longer contain a reference to 112_64).

Start Listener and DB

Su - oraSID
lsnrctl start

 

sqlplus / as sysdba
SQL> startup

Run the SBP post-installation instructions as described in the corresponding SBP README



env ORACLE_HOME=$OHRDBMS $OHRDBMS/sapbundle/catsbp

Performing Post-Upgrade Checks

Log on as oraSID

cd ​​ <new_Oracle_home>/sap/ora_upgrade/post_ugprade.

 

Sqlplus / as sysdba

 

sqlplus / as sysdba

SQL> @?/rdbms/admin/utlu121s.sql
SQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)
SQL> @post_upgrade_checks.sql

Performing Post-Upgrade Tasks

Gather Oracle optimizer statistics by executing the following commands as the administration user <sapsid>adm:

brconnect -u / -c -f stats -t system_stats
brconnect -u / -c -f stats -t oradict_stats

Ajustar parametros


Nota 1888485: mostra parametros que devem ser usados.
Nota 1171650: script para verificar os parâmetros.


brconnect -u / -c -f stats -t all -f collect -p 4

Updating the Oracle Instant Client


su - SIDadm


1.Create the new client directory:

mkdir -p /oracle/client/12x

2.Change to the new client directory:

cd /oracle/client/12x

3.Mount the Oracle client DVD 12.1.0.2 and unpack the client software:

SAPCAR -xvf <Oracle client DVD>/OCL<your OS>/OCL12164.SAR

 

4.Check and create the symbolic links:

cd /oracle/client/12x
ln -s instantclient_12102 instantclient

 

 

5.Create the symbolic link for BR*Tools 7.40:

 ​​ ​​ ​​ ​​​​ 1.Enter this command to change directory:
 ​​ ​​ ​​ ​​ ​​​​ cd /oracle/client

 ​​ ​​ ​​ ​​​​ 2. If the link or directory 11x_64 already exists, rename it, as in this example:
 ​​ ​​ ​​ ​​​​ mv 11x_64 11x_64_save

 ​​ ​​ ​​ ​​​​ 3.Create the symbolic link:
 ​​ ​​ ​​ ​​ ​​​​ ln -s /oracle/client/12x /oracle/client/11x_64

 

Update environment (.dbenv*)

 

 

Updating the JDBC Driver References

Only for: Dual Stack (ABAP+Java), Java

 

If your SAP software is version 7.1 or higher, change the reference to the JDBC driver in the instance profile as described below.


pg 40

Deinstalling the Old Oracle Home

 

cd /oracle/SID/11203/deinstall
./deinstall

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *