Top Banner
Database Upgrade to 11.2.0.2 Author Version Issue Date Page No Muh. Asfan Amin Draft Page 1 of 26 Upgrade to Oracle 11.2.0.2
26

Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Feb 12, 2018

Download

Documents

lamquynh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 1 of 26

Upgrade to Oracle 11.2.0.2

Page 2: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 2 of 26

Table of Contents

1. REFERENCE DOCUMENTS ................................................................................................................... 3

1.1 UPGRADE OVERVIEW .................................................................................. 3

2. PREPARATION .................................................................................................................................... 4

2.1 INSTALLATION FILES PREPARATION ......................................................... 4

2.1.1 Patch Collections for Windows .......................................................................................... 4

2.1.2 Opatch ............................................................................................................................... 4

2.1.3 Preparation for installation ................................................. Error! Bookmark not defined.

3. PATCH SET 10.2.0.4 INSTALLATION .................................................................................................... 5

3.1 ISSUE 1 DURING INSTALLATIONS: . ERROR! BOOKMARK NOT DEFINED.

4. UPGRADE POST-PROCESSING .......................................................................................................... 13

5. INSTALL ORACLE PATCH COLLECTION ............................................... ERROR! BOOKMARK NOT DEFINED.

5.1 INSTALLATION .................................. ERROR! BOOKMARK NOT DEFINED.

5.2 POST-PROCESSING ......................... ERROR! BOOKMARK NOT DEFINED.

5.2.1 Stat up Oracle database .................................................... Error! Bookmark not defined. 5.2.2 Recompiling Views in the Database .................................. Error! Bookmark not defined. 5.2.3 Run recompilation script .................................................... Error! Bookmark not defined.

6. UPDATE ORACLE INSTANT CLIENT IN WINDOWS ................................. ERROR! BOOKMARK NOT DEFINED.

7. APPENDIX ......................................................................................... ERROR! BOOKMARK NOT DEFINED.

Page 3: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 3 of 26

1. REFERENCE DOCUMENTS

Referred Documents:

No Title

1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows

Based on Oracle Patch Set Release 11.2.0.2

2

3

4

1.1 Upgrade Overview

This document describes the technical procedures of “how-to” upgrade Oracle Patch Set from 10.2.0.4 to 11.2.0.2 with latest SAP-Oracle Interim patch. Upgrades and DB patches should be extensively tested on Development before proceeding to QAS/PRD. Before starting the upgrade procedure be sure you have if applicable the following resources: - Oracle patch software & related notes (available in http://service.sap.com ) - Oracle opatch latest version (available in http://service.sap.com ) - Oracle latest bugfixes (available in http://service.sap.com ) - Review bugfixes & prerequisites according to readme file. - Oracle client latest version if needed (available in http://service.sap.com ) - SAP notes related to the patch (available in http://service.sap.com ) - Check latest Critical Oracle related bugs (available in http://metalink.oracle.com )

Page 4: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 4 of 26

2. PREPARATION

2.1 Installation files Preparation

Download the necessary files from SAP Marketplace http://service.sap.com/SWCENTER-3PMAIN

• 11202_Patch04_MSWIN-x86-64.zip • 51041033_Oracle RDBMS 11.2.0.2 Windows x64 • 51038966 Oracle Client 11.2 • OPatch_11201_Generic_v5.zip • mopatch-2_1_10.zip

Copy into server \\cbtcnbsapl1\SOURCE\SAP_Download

2.1.1 Patch Collections for Windows

This section lists the last two (most recent) Oracle patch collections that were released by SAP for each Windows platform. To use Oracle Release 11.2.0.2 with SAP on Windows platforms, you require at least Oracle patch collection 5. In general, use the most recent patch collection. Patch collection for platform MS Windows x86-64 (64-bit) 11202_Patch04_MSWIN-x86-64.zip Unzip the patch

2.1.2 Opatch

You must use the OPatch utility release 11.2.0.1

Page 5: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 5 of 26

Unzip the downloaded OPatch file.

2.2 Checking SAP System Prerequisites

3. ORACLE 11.2.0.2 INSTALLATION

Go to H:\SOURCE\SAP_Download\51041033_Oracle_RDBMS_11.2_Winx64\database\SAP, and start Oracle Universal Installer by click on sapserver.cmd

Page 6: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 6 of 26

Do not select the check box, click “Next”.

Just click “Yes”

Click “Next”

Page 7: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 7 of 26

Choose “Install database software only” and click “Next”

Choose “Single instance database installation” and click “Next”

Page 8: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 8 of 26

Choose “English” and click “Next”

Choose “Enterprise Edition” and click “Next”

Page 9: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 9 of 26

Specify directory location and click “Next”

Some checks are failed.

Page 10: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 10 of 26

Choose “Ignore All” and click “Next”

Click “Install”

Page 11: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 11 of 26

Click “Close”

3.1 Installing New OPatch

Current version:

Page 12: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 12 of 26

Backup the original OPatch into E:\oracle\LDB\11202\OPatch.ORIG Copy new OPatch from H:\SOURCE\SAP_Download\OPatch_11.2.0.1_v5\OPatch_11201_Generic_v5\OPatch

3.2 Installing Required Patches

Set environment ORACLE_HOME: set ORACLE_HOME=E:\oracle\LDB\11202 Install patch number 11896292 from H:\SOURCE\SAP_Download\Oracle_11.2.0.2_Patch04 With command: H:\SOURCE\SAP_Download\Oracle_11.2.0.2_Patch04\11896292>E:\oracle\LDB\11202\OPatch\opatch.bat apply

3.3 Copying and Adapting the SQL*Net Files

Copy files from E:\oracle\LDB\102\NETWORK\ADMIN into E:\oracle\LDB\11202\NETWORK\ADMIN Edit file listener.ora: Change parameter ORACLE_HOME into E:\oracle\LDB\11202 Add parameter ADR_BASE_LISTENER = G:\oracle\LDB\saptrace

3.4 Update Oracle 11.2.0.2 Client Software

See SAP note 998004 • Define the following parameter in transaction AL11

Page 13: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 13 of 26

DIR_CT_RUNG:\usr\sap\EPX\SYS\exe\uc\NTAMD64 DIR_EXECUTABLE G:\usr\sap\EPX\JC07\exe

• Delete current Oracle Instant Client

Download deldbclient.vbs, which is included in the deldbclient.zip file attached to SAP 998004 Stop all application servers and central instance (database is running still) On Central Instance, open command prompt and go to directory DIR_CT_RUN: Run cscript.exe //nologo deldbclient.vbs

• Unpack newest Oracle Instant Client

Open a command prompt on the host where DIR_CT_RUN is located. Change the working directory to DIR_CT_RUN. Unpack the Oracle Instance Client to this directory. *Backup kernel directory first before you unpack. J:\51038966_Oracle_Client_11.2\OCL_WINDOWS_X86_64\OCL11264.SAR

• Start your SAP application servers

The Oracle Instant Client is automatically distributed to the instance-specific DIR_EXECUTABLE directories

3.5 Backup Oracle Database & Oracle Software

Backup EPX database using BR*Tools. Backup EPX oracle software using NTBACKUP.

3.6 Changing & Checking Environment for user epxadm

From System Properties, remove the Environment Variables ORACLE_HOME & TNS_ADMIN From Path, remove G:\oracle\EPX\11202\bin, keep old G:\oracle\EPX\102\bin Logoff and re-login

4. UPGRADE PROCESSING

Stop SAP system. Change registry entry of ORA_EPX_AUTOSTART

Start the Oracle Database Upgrade Assistant (DBUA) from Start menu � Oracle – EPX11202 � Configuration and Migration Tools

Page 14: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 14 of 26

Password = S4Padmin

Page 15: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 15 of 26

Page 16: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 16 of 26

Page 17: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 17 of 26

Page 18: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 18 of 26

Page 19: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 19 of 26

5. POST UPGRADE STEPS

5.1 Changing Environment Variables

Create new variable ORACLE_HOME=G:\oracle\EPX\11202 Add variable Path value G:\oracle\EPX\11202\bin, remove old value G:\oracle\EPX\102\bin Create new variable TNS_ADMIN=G:\usr\sap\EPX\SYS\profile\oracle Copy file tnsnames.ora & sqlnet.ora from G:\oracle\EPX\11202\NETWORK\ADMIN into G:\usr\sap\EPX\SYS\profile\oracle Re-login server

5.2 Post Upgrade Script

See SAP note 1431793. Apply patch 9584028 to download the script.

Page 20: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 20 of 26

Checking the upgraded database:

See file G:\oracle\EPX\11202\sap\ora_upgrade\post_upgrade\post_upgrade_status.log Running post-upgrade script:

Set database parameter:

5.3 Creating new Oracle TNSListener Service

Stop old listener service from services.msc Open command prompt & enter command:

Page 21: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 21 of 26

Set service “OracleEPX11202TNSListener” startup type into “Automatic”

5.4 Changing registry value of Oracle Autostart

5.5 Updating SAP Kernel and BR*Tools

Backup old kernel. Take kernel from J:\51041560_NW73_InstMaster_Kernel\DATA_UNITS\K_720_U_WINDOWS_X86_64 Update kernel into G:\usr\sap\EPX\SYS\exe\uc\NTAMD64 G:\usr\sap\EPX\SCS08\exe G:\usr\sap\EPX\JC07\exe Copy initEPX.sap from G:\oracle\EPX\102\database into G:\oracle\EPX\11202\database Update SAPDBA roles: Copy file sapdba_role.sql and sapconn_role.sql from J:\sapdba-role into G:\oracle\EPX\11202\database

Page 22: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 22 of 26

Run command: sqlplus /nolog @sapdba_role SR3DB

Run command: sqlplus /nolog @sapconn_role

5.6 Perform Post-Upgrade Tasks

Gather Oracle optimizer statistics: brconnect -u / -c -f stats -t system_stats

Page 23: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 23 of 26

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

Check Oracle database parameter: Run script paramcheck_112.sql from SAP Note 1171650.

Update Oracle database statistics: brconnect -u / -c -f stats -t all -f collect -p 10

Page 24: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 24 of 26

Ended with error. See SAP Note 1498109. Change command into : brconnect -u / -c -f stats -t all -f collect -p 10 -NRO

5.7 Deleting old Oracle 10.2 Software

Stop database.

Stop service “Distributed Transaction Coordinator”

Stop old Oracle services

Start Oracle Universal Installer from Start menu � Oracle – EPX11202 � Oracle Installation Products

Page 25: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 25 of 26

Choose “Deinstall Products”

Page 26: Upgrade to Oracle 11.2.0 - · PDF file1 Upgrade to Oracle Database 11 Release 2 (11.2): Windows Based on Oracle Patch Set Release 11.2.0.2 2 ... 5.2 Post Upgrade Script See SAP note

Database Upgrade to 11.2.0.2

Author Version Issue Date Page No

Muh. Asfan Amin Draft Page 26 of 26

Start service “Distributed Transaction Coordinator” And start database.

5.8 Backup Database

Backup using BR*Tools and NTBACKUP