oracle upgrade
DESCRIPTION
OracleTRANSCRIPT
SAP BASIS R&D
VOLKAN CELİK – SAP CERTIFIED NW/ORACLE SYSTEM ADMINISTRATOR
HOME ABOUT ME
MAY 11 20121 COMMENT
ORACLE
UPGRADE TO ORACLE DATABASE 11G
RELEASE 2 (11.2): UNIX FOR SAP
Hello,
In this post, I will share my Oracle Upgrade experience from 10g to 11g release 2 version on Sap
Systems.
My reference guide is available at : http://service.sap.com > Release & Upgrade Info > Installation and
Upgrade Guides > Database Upgrades > Oracle > Upgrade to Oracle Database 11g Release 2
(11.2): UNIX
This documentation explains how to upgrade the Oracle database for the SAP system on the UNIX.
operating system:
From Oracle 9.2.0.8, Oracle Database 10g Release 2
(10.2.0.4 or 10.2.0.5), Oracle Database 11g Release
2 (11.2.0.1), or higher
To Oracle Database 11g Release 2 (11.2) (11.2.0.2 or
higher)
You have to use this guide or related guides suitable for your system landscape if you intend to
upgrade your oracle db which running under a Sap system. The oracle upgrade guides available on
metalink will not cover all the aspects releated to sap application. Therefore you have take referance
only documents available on service.sap.com
Note that Oracle 11g is released only with SAP products based on kernel 640 (640_EX2) or higher.
For OS version and compatabilty, check the note 169706.1 from https://support.oracle.com
Download the Oracle Db 11.2.0.2 software from
https://service.sap.com/oracle-download
Now I downloaded and extracted the software to the under $ORACLE_STAGE/11202/ directory with
the ora<dbsid>:dba user and 755 permission. Create 11202 directory under $ORACLE_STAGE if you
haven’t yet.
Before the extraction remove any files from stage directory for fresh instalation.
$ORACLE_STAGE : This is an Oracle user environment variable but I used in this post with root user
cause it differs to the cases. So please replace $ORACLE_STAGE with your stage directory. Normaly
it is “/oracle/stage”.
I used vnc server program to connect to my aix server.
First I checked my db server, if vnc rpm packages is installed or not;
root@dbhost:/> which vncserver
which: 0652-141 There is no vncserver in /home….
I must install the vnc packages first;
root@dbhost:/ >rpm -Uvh vnc-3.3.3r2-6.aix5.1.ppc.rpm
root@dbhost:/> which vncserver
/usr/bin/X11/vncserver
Yes. the vncserver is installed. Now I make a connection to the dbserver console :
root@dbhost:/> vncserver
You will require a password to access your desktops.
Password:
Verify:
New ‘X’ desktop is dbhost:1
Creating default startup script //.vnc/xstartup
Starting applications specified in //.vnc/xstartup
Log file is //.vnc/dbhost:1.log
Using the VNC Viewer program, I connect to the console.
vncserver is really big advantage because even your client (the server or pc where you run vnc)
rebooted , the vnc prosess will remain and you can easily connect again without loosing any work.
root@dbhost:/ > xhost +
root@dbhost:/ > cd $ORACLE_STAGE/11202/database
root@dbhost:/ > ./rootpre.sh
root@dbhost:/> su -ora<dbsid>
I am checking the authorization of user ora<dbsid> to $ORACLE_BASE directory
echo $ORACLE_BASE
cd $ORACLE_BASE
touch $ORACLE_BASE/write_test
rm $ORACLE_BASE/write_test
the test must be successful. if not, do the following with root user;
chgrp dba $ORACLE_BASE
chmod 775 $ORACLE_BASE
Now, with ora<dbsid> user;
umask 022
setenv DISPLAY dbhost:1
setenv ORACLE_STAGE /oracle/stage (this depends on your case)
cd $ORACLE_HOME
mkdir 11202
mkdir 112_64
cd $ORACLE_STAGE/11202/database/SAP
./ RUNINSTALLER_CHECK
There is two missing rmp package in my
dbserver but when I checked the oracle note 169706.1
“Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) “
these two rpm packages is required when upgrading on RAC system. I ignore this step, since I work
on single instance oracle db.
Updating the Installation Scripts
1. Download the file 11ginstall_<release>_<rev>.zip, which is attached to SAP Note 1524205.
The zip file contains the current version of the installation scripts.
2. Copy the file to the database directory in the Oracle software stage directory.
3. Rename the existing SAP directory as follows so that you have a saved copy of the previous
version:
mv SAP SAP.SAVE
4. Extract the zip file:
unzip 11ginstall_<release>_<rev>.zip
ORACLE INVENTORY
There is an inventory directory “oraInventory” usually located under /oracle.
oracle inventory directory is used to keep information about installation prosess. This directory should
be empty for fresh installation or upgrade. this directory is pointed in Orainst.loc file which located
under /etc. Check it if it points to the correct orainventory location. create it under /etc, if it is not exist.
Permission is root:system and 666
root@dbhost:/> more oraInst.loc
inventory_loc=/oracle/oraInventory
inst_group=dba
SETTING ENVIRONMET VARIABLES
Setenv ORACLE_HOME_SRC /oracle/<DBSID>/102_64
Setenv ORACLE_HOME_TGT /oracle/<DBSID>/11202
Setenv LIBPATH $ORACLE_HOME/lib:$LIBPATH
check the results with command “env”
Install the current patch set, as described in SAP Note 1431799. In my case my db version is
10.2.0.4 , so I will not apply any patchset.
Installing Software
Before working with dbua (database upgrade assistant), the new software (11.2.0.2) must be installed
to new
ORACLE_HOME. My new ORACLE_HOME is /oracle/<DBSID>/11202
cd $ORACLE_STAGE/11202/database/SAP
./RUNINSTALLER
Now, the installation finished successfuly.
Copying and Adapting the SQL*Net Files
If you use the dbua.sap.sh wrapper to perform the database upgrade with DBUA, the SQL*Net
files are automatically copied from the source Oracle Home to the target Oracle Home.
Running the Pre-Upgrade Scripts
if you can’t find scripts under your oracle home, download it from SAP Note 1431793 and copy under
the oracle home.
cd /oracle/<DBSID>/112_64/sap/ora_upgrade/pre_upgrade
sqlplus / as sysdba
SQL> spool pre_upgrade_tasks.log
SQL> @pre_upgrade_tasks.sql
SQL> spool off
Now, check the results;
SQL> @pre_upgrade_status.sql
there should not be any invalid db objects. Run the pre_upgrade_tasks.sql scripts again and again
untill all the invalid object compiled.
C A U T I O N
Make the changes listed in the log file, otherwise you might have problems during the upgrade.
However, you must ignore the warning regarding the database parameter
remote_os_authent, which is reported as DEPRECATED.
Do not touch this parameter. The post-upgrade script sets it to TRUE again after the database
upgrade. This parameter must be set to TRUE for the SAP logon mechanism to work correctly after
the database upgrade.
Checking the Sap System Prerequities
3. If your SAP system uses SAP Kernel 711, you need to use DBSL (dboraslib.so) patch level 81 or
higher.
For more information, see SAP Note 1456323.
Now, stop listener and SAP Instance. DB must be open.
add the line below to the /etc/oratab
<DBSID>:<old_ORACLE_HOME>:N
DFS:/oracle/DFS/102_64:N
DB UPGRADE ASSISTANT
cd $ORACLE_HOME_TGT/sap/ora_upgrade/post_upgrade
3. Run this script in query mode initially to verify that the environment is correct:
./dbua.sap.sh –q
./dbua.sap.sh
POST STEPS
su – oradfs
cd /oracle/DFS
dbenv_unibwdv.sh 102_64 >> 112_64
.dbenv.sh 102_64 >> 112_64
.cshrc
.dbenv_unibwdv.csh
.dbenv.csh
Update ORACLE_HOME in this profile files.
Old : /oracle/DFS/102_64
New : /oracle/DFS/112_64
brconnect -u / -c -f stats -t system_stats – noworkload option
brconnect -u / -c -f stats -t oradict_stats
Check the Oracle database parameters against SAP Note 1431798 and adjust them if necessary.
You can find an automated script in SAP Note 1171650 to help you check whether your SAP system
complies with the database parameter recommendations at any given point in time.
You need to create this link so that BR*Tools (which is linked to the Oracle 10.2 client) can use the
newer Oracle 11.2 clients.
cd $ORACLE_HOME/lib
ln -s libnnz11.so libnnz10.so
mv <old_oracle_home>/bin <old_oracle_home>/bin-old
update environments of dfsadm (sidadm user)
cd /home/dfsadm
update profile files. check ORACLE_HOME value.
Updating the Oracle Instant Client
You need to ensure that the SAP system runs with at least Instant Client release 10.2.0.4 Version 5
(V5)
or Oracle 11.2.0.2.
N O T E
This step also applies to SAP systems running the 640_REL kernel with the Oracle 9.2.0.8 database.
The Instant Client 10.2.0.4 or 11.2.0.2 is used immediately after the kernel switch to 640_EX2 or
higher (including SAP 7.XX kernels).
Procedure
Update the Oracle Database Instant Client for UNIX as described in SAP Note 1431794.
Note :Add the following entry to the tnsnames.ora file that is used by the <sapsid>adm user:
LISTENER_<DBSSID>.WORLD = (ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL =
TCP)(HOST
= <hostname>)(PORT = <listener_port>))
The upgrade is completely and successfuly finished.
Thank you for reading this post. If you have any questions, please don’t hesitate to contact me.
Volkan Çelik
Sap Basis Specialist
Oracle Certified Associate
About these ads
Share this:
Like this:
One thought on “Upgrade to Oracle Database 11g Release 2 (11.2): UNIX for SAP”
1. Basis newbie says:
May 30, 2013 at 9:14 am
my company will upgrade from oracle 10 g to 11 g soon.
Thank you for share this post.
Reply
Leave a Reply
RECENT POSTS
Change SAP System Time Zone Upgrade to Oracle Database 11g Release 2 (11.2): UNIX for SAP Sap System Architecture Activation of Table Logging
ARCHIVES
October 2012 May 2012 January 2012
CATEGORIES
BASIS ORACLE
META
Register Log in Entries RSS Comments RSS Blog at WordPress.com .
Blog at WordPress.com. | Theme: Chunk by Automattic.
Follow
Follow “SAP BASIS R&D”
Get every new post delivered to your Inbox.