Académique Documents
Professionnel Documents
Culture Documents
2. Preparation
2.1 Checking and Setting the DISPLAY Environment Variable
2.2 Checking UNIX Users, Groups, and Authorizations
2.3 Checking the Directory Structure
2.4 Checking the Software Installation Prerequisites
2.5 Installation of Oracle Database Software
2.5.1 Checking and Setting the Environment Variables
2.5.2 Backing Up the Central Oracle Inventory
2.5.3 Installing the Oracle Database Software
2.5.4 Installing the Required SAP Bundle Patch
2.6 Running the Pre-Upgrade Scripts
3. Database upgrade
3.1 Backing Up the Oracle Database
3.2 Shutting Down the SAP System and Oracle Listener Process
3.3 Database Structure Upgrade
3.4 Copying and Adapting the SQL*Net Files
3.1 Backing Up the Oracle Database
3.2 Shutting Down the SAP System and Oracle Listener Process
3.3 Database Structure Upgrade
3.3.1 Starting the Database Upgrade Assistant
3.4 Copying and Adapting the SQL*Net Files
1 PLANNING
1.1 Checking the Original Version of Your Database
To check the original version of your database, do one of the following from the environment of the source database:
Enter the following command:
sqlplus version I
Enter the following commands:
sqlplus / as sysdba
SQL> select version from v$instance;
Photo
lation phase.
2. Preparation
2.1 Checking and Setting the DISPLAY Environment Variable
You need to check and, if necessary, set the DISPLAY environment variable of the Oracle database software owner, user
<ora_sw_owner>.
Remark
Do not make the changes to the environment permanent while the old database is still running. You make them permanent
in the database structure upgrade. We recommend you to back up the old environment files before making the changes
permanent.
You need to check that the Oracle database software owner, user <ora_sw_owner>, has write authorization for the $ORACLE_BASE directory, since you perform the database installation as this user.
Enter the following commands:
echo $ORACLE_BASE
touch $ORACLE_BASE/write_test
rm $ORACLE_BASE/write_test
If the Oracle database software owner, user ora<dbsid>, does not have write authorization, log on to your system with the
user root and enter the command:
chgrp dba $ORACLE_BASEc
hmod 775 $ORACLE_BASE
2.3 Checking the Directory Structure
You need to verify the availability and correctness of the following Oracle directories:
Oracle software stage directory
Oracle inventory directory
Check the Oracle stage directory, usually called /oracle/stage.
Ensure that the stage directories contain enough freespace prior to extraction of the SAR files. For the database upgrade,
only the software contained within the component database is used.
If there is not enough space, you can delete previous stage directories.
When the RDBMS CDs have been mounted, use the SAP tool SAPCAR to extract all the RDBMS CDs to /oracle/
stage/11204 as user <ora_sw_owner>.
SAPCAR xvf OR111264.SAR
SAPCAR xvf OR211264.SAR
After you have finished the extraction of all the RDBMS CDs, the following subdirectories exist under /oracle/stage/11204.
database
client
grid
examples
gateways
Deinstall
2.4 Checking the Software Installation Prerequisites
You must check the prerequisites for the Oracle Universal Installer (OUI).
Prerequisites
Make sure that the DISPLAY environment variable is set correctly, as described in Checking and Setting the DISPLAY Environment Variable.
Procedure
1. Log on as the Oracle database software owner, user <ora_sw_owner>.
2. Change directory:cd /oracle/stage/11204/database
3. On AIX, call the script rootpre.sh as user root:
./rootpre.sh
4. Execute the following commands to check operating system requirements (release, patches, kernel parameters):
cd SAP
./RUNINSTALLER check
5. Apply missing OS patches and OS packages and set OS kernel parameters as recommended by the OUI.
1. Make sure that the following environment variables are set as described.
* ORACLE_BASE
Value for Oracle base.
The SAP default for single-instance installations is /oracle
* ORACLE_SID
<DBSID>
* ORACLE_HOME
Make sure that it is set to the value of the current runtime Oracle home
* LIBPATH
$ORACLE_HOME/lib:$LIBPATH
* PATH
PATH includes $ORACLE_HOME/bin of the current active ORACLE_HOME. This means that you have to adapt PATH
when ORACLE_HOME is changed. PATH can only include one $ORACLE_HOME/bin.
2. Check if the temporary directory (usually /tmp) has at least 1024 MB of free space. If not, set up the TEMP or TMPDIR
environment variables to specify a temporary directory on the filesystem.
photo
Photo
You can check the results of the pre-upgrade scripts by looking at the following log files:
pre_upgrade_status.log
pre_upgrade_tasks.log
Photo
Photo
3 Database Upgrade
3.1 Backing Up the Oracle Database
You must have a complete and usable database backup otherwise you might lose data if the upgrade fails.
Procedure
1. Create a complete database backup.
2. Check that the backup is usable. If for any reason you have problems during the upgrade you must be able to restore the
database from this backup.
3.2 Shutting Down the SAP System and Oracle Listener Process
You need to shut down the SAP system. If there is an Oracle listener process running in the current ORACLE_HOME, shut
it down.
Procedure
1.Stop the SAP application instances by entering the following command as user <sapsid>adm:
stopsap r3
You can also stop the SAP application server with the sapcontrol tool.
2. Stop the Oracle listener by entering the following command as the Oracle database software owner, user
<ora_sw_owner>:
lsnrctl stop
Procedure
Start the DBUA.dbua.sap.sh is a wrapper script to automate most of the post-upgrade tasks.
1. Set ORACLE_HOME_SRC and ORACLE_HOME_TGT.
Enter these commands to upgrade from 10.2.0.x to 11.2.0.4:
setenv ORACLE_HOME_SRC /oracle/<DBSID>/102_64
setenv ORACLE_HOME_TGT /oracle/<DBSID>/11204
2. Change to the correct directory:
cd $ORACLE_HOME_TGT/sap/ora_upgrade/post_upgrade
3.Run this script in query mode initially to verify that the environment for the upgrade is correct:
./dbua.sap.sh -q
4. Run this script as follows to perform the upgrade
For interactive mode, enter the following command:
./dbua.sap.sh
5. Respond appropriately to the DBUA dialogs:
The DBUA automatically removes the database initialization parameters that are now obsolete in Oracle Database 11g Release 2 (11.2).
The upgrade process itself runs for some time, depending mainly on the size of the database and the capacity of the hardware.
When the DBUA has completed successfully the results of the upgrade are displayed.
Photo1 , 2
Photo3
4 Post-Upgrade Steps
4.1Finalizing the Environment of the ora<dbsid> User
You need to make sure that the changes you made to the Oracle user environment are permanently stored in the profiles
(.cshrc, .dbenv_<hostname>.csh, .dbenv_<hostname>.sh, dbenv.sh, .dbenv.csh).
Procedure
Check the values for the environment variables as below
# env
Make sure that the environment does not contain any variables that still refer to the old database release. In particular, make
sure that ORACLE_HOME is set to the runtime Oracle home:/oracle/<DBSID>/112_64.
4.2 Checking the Upgraded Database
You need to check the upgraded database
Procedure
Check that the database is now running with Oracle Database 11g Release 2 (11.2) software in an Oracle Database 11g Release 2 (11.2) environment by entering the following commands:
1. Log on to the database as the ora<sid> user.
2. Change to the correct directory:
cd $ORACLE_HOME/sap/ora_upgrade/post_upgrade
3. Enter the following command to start SQL*Plus:
sqlplus / as sysdba
4. Run post_upgrade_status.sql:
SQL> @post_upgrade_status.sql
Check the log post_upgrade_status.log.
SQL>@post_upgrade_status.sql
This provides an overview of the status of the upgraded database.
SAP kernel