Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member182657
Active Contributor
17,902

ORACLE UPGRADE STEPS FROM 11g TO 12c FOR SAP SYSTEMS ON LINUX- PART II


Document creation date :   10th OCT 2015 | 09:30 AM INDIA

Document Part                :   2nd

Document Author            :   Gaurav Rana

Referred SAP Guide        Database Upgrade Guide to Oracle database 12c Release 1 (12.1.0.2 ) UNIX

Referred SAP NOTES      :  1. NOTE : 1914631 - Starting point for info about oracle 12c .

                                           2. NOTE :  1915317-Migrating Software owner to 'oracle' 

                                           3. NOTE : 1915323 - OS User Concept for database release 12c.

                                           4.NOTE  : 819829 - Oracle Instant Client Installation and Configuration on Unix


Document in continuation : SAP ORACLE UPGRADE STEPS FROM 11g TO 12c FOR SAP SYSTEMS ON LINUX


Select Upgrade Oracle Database & proceed further.


During the Pre - upgrade activities i got warning related with invalid objects exists.

Troubleshooting for the issue (INVALID OBJECTS EXISTS :


You can find the invalid objects, package body by execution of script pre_upgrade_checks.sql or with SQL query SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';


Resolution : To recompile invalid objects use SAP Transaction SE14 to reactive the views into database.In addition consider SAP Note 648203 - Database objects with status INVALID & suggests to consider SAP Note 1598594 - Br*Tools configurations for Oracle Installation using user "oracle" for successful generation of stats before the procedure at OS level.


You can Gather stats by opting Gather stats before upgrade,but recommends to check the proper database connectives,executions of database tools without any issue through new database software owner 'oracle' (Consider SAP Note 1598594 - Br*Tools configurations for Oracle Installation using user "oracle" ) & re verify the BR*tools configurations before the upgrade.


Deselect the EM database express from the Management Options


Do not select any options under Move database files.


Opt to migrate the LISTENER from source Oracle Home.


Recommends to have complete backup of the system for which we're going to perform the upgrade to avoid any type of issues during the upgrade in case of failures.I've my own backup strategy to choose.




POST UPGRADE STEPS


1.SQL*Net Configuration Files Update


Check for the following entries under tnsnames.ora file at <ORACLE_HOME>/network/admin or copy the tnsnames.ora,listener.ora files from the old ORACLE_HOME to verify or amend as per below if required.(If changes are already reflected with old tnsnames.ora & listener.ora files,then no need to amend.)


TNSNAMES.ORA File entries :



LISTENER.ORA file entries : Check for parameters SID_LIST_LISTENER & ADR_BASE_LISTENER are maintained under the file .



NOTE : ORACLE_HOME should be set for <NEW_ORACLE_HOME> (/oracle/<SID>/12102)



SYMBOLIC LINK FOR RUNTIME ORACLE HOME


STEPS :


1.Change to the directory cd /oracle/<DBSID>

2.Check for symbolic link with command  ls -l /oracle/<DBSID>/121

3.If links not exists issue command ln -s /oracle/<DBSID>/12102  /oracle/<DBSID>/121


ENVIRONMENT OF <sapsid>adm  & ora<dbsid> USER


We need to make environment variables permanent changes under profiles .dbenv_hostname.csh,.dbenv_hostname.sh & .dbenv.csh or .dbenv.shwith updated values of parameters ORACLE_HOME,ORACLE_BASE,PATH & oracle client.


You could check the variable values by following commands


env | grep ORACLE_HOME Result for the command should be ORACLE_HOME=/oracle/<SID>/12102


env | grep ORACLE_BASE  Result for the command ORACLE_BASE=/oracle/<SID>


env | grep PATH                  Result for the command 


PATH=/oracle/<SID>/12102/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/sap/<SID>/SYS/exe/uc/linuxx86_64:/usr/sap/<SID>/SYS/exe/run:/home/<sapsid>adm:.

MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles

RSEC_SSFS_DATAPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/data

RSEC_SSFS_KEYPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/key

LD_LIBRARY_PATH=/usr/sap/<SID>/SYS/exe/run:/usr/sap/<SID>/SYS/exe/uc/linuxx86_64:/oracle/client/12x/instantclient


NOTE : PATH should not contain any reference to 112_64


STARTING THE DATABASE LISTENER & DATABASE


1.Logon with new database software owner 'oracle' & start the listener with command lsnrctl start .

2.After successful startup of listener start the database with SQL command 'startup'


POST UPGRADE CHECKS

Refer SAP Note  : 1915315  to execute the scripts utlu121s.sql, post_upgrade_tasks.sql & post_upgrade_checks.sql from the location <new_oracle_home>/sap/ora_upgrade/post_upgrade


POST UPGRADE TASKS

1.Gathering of Oracle optimizer stats as admin user <sapsid>adm :

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

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




2.Update database stats


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


UPDATE OF ORACLE INSTANT CLIENT


After upgrade to 12c,recommends to install oracle client supported for Oracle 12c. Refer SAP Note 819829 - Oracle Instant Client Installation and Configuration on Unix or best to follow steps from Upgrade Guide to 12c .


Steps :


1.# mkdir -p /oracle/client/12x


2.# cd /oracle/client/12x


3.# Mount Oracle client DVD 12.1.0.2 and unzip the client software :


SAPCAR -xvf <client DVD>/OCL<AS per OS>/OCL12164.SAR

4.Create symbolic links


cd /oracle/client/12x

ln -s instantclient_12102  instantclient


5.Symbolic link for BR*Tools 7.40

# cd /oracle/client

# mv 11x_64 11x_64_save

6.Create symbolic link

# ln -s /oracle/client/12x  /oracle/client/11x_64


UPDATE OF SAP KERNEL

Refer SAP Note 1716826 for supported SAP Kernel 7.21EXT  & for SAP 7.41 downward compatible kernel refer Note 1994690 .


STARTING OF SAP


After completion of the upgrade steps it's time to start the SAP System


Steps to start the SAP

1.Logon with admin user <sapsid>adm


su - <sid>adm

> R3tarns -d


NOTE : If any issue persists refer trans.log file from the system to rectify (Sometimes issue could be as of non supported kernel usage with 12c.


On successful startup of sap (with command startsap r3) you could check the upgrade status from SAP System Status.



Thanks folks for referring the document & i hope the document will be helpful for other SCN members.Request experts to help me to make this document more responsive for up gradation of database from 11g to 12c.



Best Regards,

Gaurav Rana




























15 Comments
willi_eimler
Contributor
0 Kudos

314 views and no rating??? Gave you 5 stars. Good work dude!

I got problems with the listener, because it was up. Next upgrade I shutdown the listener first.

Best regards

Willi Eimler

former_member182657
Active Contributor
0 Kudos

Hi Willi,

Thanks for such a nice comment and for visiting the SCN document.

Regards,

Gaurav

0 Kudos

Hi Gaurav,

Thank you for share this great guide.

Best regards.

Pablo

former_member182657
Active Contributor
0 Kudos

Hi Pablo,

You're welcome .

Regards,

Gaurav

former_member186895
Participant
0 Kudos

Hello Gurav,

Excellent document.

Thank you

former_member182657
Active Contributor
0 Kudos

Thanks Ramesh.

Regards,

Former Member
0 Kudos

This is a nice post. I have done my 12c Up gradation. But now listener not starting. Do we need to change the tnsnames.ora and listener.ora files ? I am getting  below error. lsnrctl start LSNRCTL for HPUX: Version 12.1.0.2.0 - Production on 30-JUN-2016 10:33:27 Copyright (c) 1991, 2014, Oracle.  All rights reserved. Starting /oracle/BRX/12102/bin/tnslsnr: please wait... TNSLSNR for HPUX: Version 12.1.0.2.0 - Production System parameter file is /oracle/BRX/12102/network/admin/listener.ora Log messages written to /oracle/diag/tnslsnr/erpbangsbx/listener/alert/log.xml Error listening on: (ADDRESS=(PROTOCOL=IPC)(KEY=BRX.WORLD)) TNS-12555: TNS:permission denied TNS-12560: TNS:protocol adapter error   TNS-00525: Insufficient privilege for operation   HPUX Error: 1: Not owner Listener failed to start. See the error message(s) above...

Former Member
0 Kudos
Hi Gaurav,

Nice to see u.I faced issue failed sap bundle patch apply .aprreciate  your advice.thanks

Processing patch "SAP12102P_1602-20012297.ZIP!22620323"...(10 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!22620323"...failed.

Reason: Cannot apply patch.

Processing patch "SAP12102P_1602-20012297.ZIP!22238460"...(11 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!22238460"...failed.

Reason: Cannot apply patch.

Processing patch "SAP12102P_1602-20012297.ZIP!21972664"...(12 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!21972664"...failed.

Reason: Cannot apply patch.

Processing patch "SAP12102P_1602-20012297.ZIP!21930149"...(13 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!21930149"...failed.

Reason: Cannot apply patch.

Processing patch "SAP12102P_1602-20012297.ZIP!21282605"...(15 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!21282605"...done.

Processing patch "SAP12102P_1602-20012297.ZIP!21231656"...(16 of 27)

Processing patch "SAP12102P_1602-20012297.ZIP!21231656"...done
former_member182657
Active Contributor
0 Kudos
Hi Arul,

Apologies for delayed response on your query,for the issue happening on at your end i would suggest you to follow steps under latest SAP bundle patch read me file "README12102V2P_1611-20012300"  for successful application of patches.

If still issue persists please let me know.

Regards,

Gaurav

 
Former Member
0 Kudos
Hi Gaurav,

thanks for replied.readme only give prepration and apply does not mentioned solution in case failed bundle patch.can you provide your email adres.we comunicate there.
former_member182657
Active Contributor
0 Kudos
Hi Arul,
readme only give prepration and apply does not mentioned solution in case failed bundle patch.

In case of bundle patch failure,you can try to deinstall the failed one by following the same read me file.If still issue persists you can communicate by following profile of mine.

Regards,

Gaurav
Former Member
Thanks reply i solved issue a weeks ago the patch need 25GB space for update .many thanks
0 Kudos
Gaurav, Superb Document with detailed steps...
0 Kudos
Dear Gaurav

First of all, many thanks for an excellent blog. I have upgraded many systems using your document.

Can you please advise what more steps to be taken in case of production system DB upgrade where oracle data guard is also configured. What activities we need to perform on standby host so that the DR site is also upgraded with the primary site ?

 

Please advise
former_member732856
Discoverer
0 Kudos
This was very Helpful. Thank you