Ora db upgr_win_121__00

51
Database Upgrade Guide Document version: 1.00 – 2015-03-31 Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows CUSTOMER

Transcript of Ora db upgr_win_121__00

Page 1: Ora db upgr_win_121__00

Database Upgrade GuideDocument version: 1.00 – 2015-03-31

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows

CUSTOMER

Page 2: Ora db upgr_win_121__00

Typographic Conventions

Table 1

Example Description

<Example> Angle brackets indicate that you replace these words or characters with appropriate entries to make entries in the system, for example, “Enter your <User Name>”.

Example Example Arrows separating the parts of a navigation path, for example, menu options

Example Emphasized words or expressions

Example Words or characters that you enter in the system exactly as they appear in the documentation

www.sap.com Textual cross-references to an internet address

/example Quicklinks added to the internet address of a homepage to enable quick access to specific content on the Web

123456 Hyperlink to an SAP Note, for example, SAP Note 123456

Example ● Words or characters quoted from the screen. These include field labels, screen titles, pushbutton labels, menu names, and menu options.

● Cross-references to other documentation or published works

Example ● Output on the screen following a user action, for example, messages

● Source code or syntax quoted directly from a program

● File and directory names and their paths, names of variables and parameters, and names of installation, upgrade, and database tools

EXAMPLE Technical names of system objects. These include report names, program names, transaction codes, database table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE

EXAMPLE Keys on the keyboard

2

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsTypographic Conventions

Page 3: Ora db upgr_win_121__00

Document History

CautionBefore you start the implementation, make sure you have the latest version of this document that is available on the SAP Service Marketplace at service.sap.com/instguides.

The following table provides an overview on the most important document changes:

Table 2

Version Date Description

1.00 2015-03-31 Initial version for Oracle Database 12c

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsDocument History

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 3

Page 4: Ora db upgr_win_121__00

Content

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2 SAP Notes for the Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.3 More Information on SAP Service Marketplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 Checking the Original Version of Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Checking Hardware and Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3 Using Multiple Oracle Homes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 Upgrade Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.1 Creating an Oracle Installation User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2 Downloading the Software for the Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3 Configuring Secure Storage in File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.4 MSCS Only: Upgrading to OFS 4.1x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.5 MSCS Only: Installing the Latest Oracle Fail Safe Patch Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.6 MSCS Only: Removing Old Oracle Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.7 MSCS Only: Removing the Database from the Cluster Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Oracle Database Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.1 Installation of the Oracle Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Installing the Oracle 12c Server Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Installing Required Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Running the Pre-Upgrade Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.2 Moving and Adapting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.3 Backing Up the Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.4 Changing the Environment for User <sapsid>adm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.5 Performing the Database Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5 Post-Upgrade Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.1 Changing Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.2 Performing Post-Upgrade Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.3 MSCS Only: Setting Up a Shared Database Directory in Oracle Home . . . . . . . . . . . . . . . . . . . . . . . . 315.4 Changing the Registry Value of Oracle Autostart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.5 Checking the Startup Type of the Oracle Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.6 Performing Post-Upgrade Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.7 MSCS Only: Adding the Database to the Cluster Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.8 Updating the Oracle Instant Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.9 Updating BR*Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.10 Backing Up the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.11 Updating the SAP Executables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.12 Configuring the New Features for Oracle Database 12c Release 1 (12.1) . . . . . . . . . . . . . . . . . . . . . . 385.13 Uninstalling the Old Oracle Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsContent

Page 5: Ora db upgr_win_121__00

6 Common Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.1 Starting and Stopping the Database in an MSCS Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.2 Starting and Stopping Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.3 Moving Groups or Services and Applications for MSCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436.4 Starting and Stopping the SAP System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

A Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47A.1 Using PowerShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsContent

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 5

Page 6: Ora db upgr_win_121__00

6

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved. Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows

Page 7: Ora db upgr_win_121__00

1 Introduction

This documentation explains how to upgrade the Oracle database for the SAP system on the Windows operating system:

● From source release Oracle Database 10g Release 2 (10.2.0.5) or Oracle Database 11g Release 2 (11.2.0.3 or 11.2.0.4)

● To target release Oracle Database 12c Release 1 (12.1.0.2)

If you are running another Oracle database release, a direct upgrade to 12.1.0.2 is not supported. For more information, see docs.oracle.com/database/121/UPGRD/preup.htm#UPGRD12358.

To see the support status of Oracle Database 10g Release 2, see SAP notes 1110995 and 1654734. This guide is suitable for both major release upgrades (for example, from Oracle 10.2.0.5 to Oracle 12.1.0.2).

NoteThis guide does not describe upgrades of Oracle databases with Real Application Clusters (RAC), Automatic Storage Management (ASM), or Oracle Engineered Systems. For more information on these upgrade types, see SAP Note 2064206.

CautionOracle Database 12c Release 1 (12.1) is only released and certified for SAP products running with SAP BASIS 7.00 and above, and SAP kernel release 7.21 EXT and above.

CautionUser Account Control on Windows: As of Windows Server 2008, the Windows standard security settings only grant administrative privileges to an account that is a member of the local administrators group, if the process was started with elevated privileges, that is, using “Run as Administrator”. This means that during the installation and upgrade process of an Oracle database software, most of the statements must be executed with administrative privileges. Therefore, when you are asked to open a command prompt (cmd.exe) or a Powershell prompt (powershell.exe), or other tools like the Oracle Failsafe Manager, you have to do so in elevated mode (right-click on cmd.exe, and choose Run as Administrator). For more information about User Account Control (UAC), see the Windows documentation.

Implementation Considerations

● For more information about implementation considerations, including the most important SAP Notes for the upgrade, see Planning [page 11].

● Be sure to read the relevant SAP Notes before beginning the upgrade. These notes contain the most recent information about the upgrade, as well as corrections to the documentation. You can find the most recent version of the SAP Notes at service.sap.com/notes

● You use the tools Oracle Universal Installer (OUI), Opatch, Oracle SQL*Plus, and Oracle Database Upgrade Assistant (DBUA) to perform the upgrade.

● MSCS only: If your system is configured to run with Microsoft Failover Clustering, you have to perform additional steps. These are necessary to include the additional cluster nodes of the system in the upgrade

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsIntroduction

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 7

Page 8: Ora db upgr_win_121__00

procedure and to deal with cluster-specific features. Steps that must be performed for a high-availability configuration are marked with MSCS only in this documentation.

The cluster nodes that a particular step has to be executed on can be the:

○ First node, which is the primary node where the database server is located

○ Additional node for any secondary cluster node

● The database server and database client must be in the same Windows domain. For information on permitted domain names see SAP Note 314671.

Terminology and Naming Conventions

● We use <DBSID> for the database instance identifier and <SAPSID> for the SAP system identifier. These can be different if your SAP system uses Multiple Components in One Database (MCOD).

● To have a common documentation layout for UNIX and Windows in this documentation, we use / (slash) in SQL commands. Do not use / (slash) in command prompts for path separation.

● We use the terms “central instance” and “dialog instance” in this document. As of SAP NetWeaver 7.1, these terms have been replaced by “primary application server instance” and “additional application server instance”.

● MSCS only: Sections marked with this abbreviation refer to content that is only valid if you are installing a high-availability (HA) system with Windows Failover Clustering. The Windows Server Failover Clustering feature was previously called Microsoft Cluster Service (MSCS). For practical reason we are continuing to use the abbreviation MSCS in some sections of this guide.

Note the following terminology changes for a cluster configuration as of Windows Server 2008:

○ The cluster feature is now called Failover Clustering. For practical reasons we are continuing to use the previous terminology Microsoft Cluster Service and abbreviation MSCS in this guide.

○ Cluster groups are now called services and applications.

In some sections that are also valid for Windows Server 2008 (R2) in a high-availability environment we are continuing to use only the old term. In this case, “cluster group” also means “service and application”.

○ The Cluster Administrator is now called Failover Cluster Manager.

● <new_Oracle_home> refers to the Oracle home from which the database is running after the upgrade.

1.1 New Features

For the complete list of new features of the Oracle Database 12c Release 1 (12.1), see the New Features documentation from Oracle at docs.oracle.com/database/121/NEWFT/toc.htm and SAP Note 1914631.

You can access the complete Oracle documentation at docs.oracle.com or www.oracle.com/pls/db121/homepage.

More Information

Configuring the New Features for Oracle Database 12c Release 1 (12.1) [page 38]

8

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsIntroduction

Page 9: Ora db upgr_win_121__00

1.2 SAP Notes for the Upgrade

Make sure that you read the following SAP Notes:

Table 3

Number Title Remarks

1914631 Central Technical Note for Oracle Database 12c Release 1 (12.1)

Provides a starting point for information about Oracle 12c with multiple links to notes on Oracle 12c.

2086029 Oracle 12c: Additional Info / Corrections to Oracle 12c (12.1.0.2) Upgrade

Contains important late-breaking information on the upgrade

1915315 Database Upgrade Scripts for 12.1.0.2 Describes the shell and SQL upgrade scripts for 12c

1888485 Database Parameters for 12.1.0.2 Provides information about Oracle initialization parameters that need to be reset to their default values or that need to be removed

1915299 Troubleshooting Software Installation for 12.1.0.2

Describes software installation problems and solutions or workarounds

1915313 Current Patch Set for Oracle Database 12c Release 1 (12.1)

Describes the current Oracle patch set

1915316 Database: Patches for 12.1.0.2 Lists the status of Oracle patches and bundle patches for 12.1.0.2

998004 Update the Oracle Instant Client on Windows

Required for upgrading Oracle client software to Oracle 12c Release 2 (11.2)

850306 Oracle Critical Patch Update Program Describes the current Oracle security fixes

839182 Oracle patch installation with OPatch Describes how to use OPatch with Oracle

2087004 BR*Tools Support for Oracle 12c Describes the support offered by BR*Tools for Oracle 12c

1777021 J2EE: Introducing Support for Oracle 12 Describes the required patch levels for Oracle 12c

1.3 More Information on SAP Service Marketplace

You can find more information as following on SAP Service Marketplace:

Table 4

Description Internet Address Title

SAP Notes service.sap.com/notes None

Oracle Database Administration

scn.sap.com/community/

oracle SAP ON ORACLE

KNOWLEDGE CENTER SAP

Documentation

SAP Database Guide: Oracle

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsIntroduction

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 9

Page 10: Ora db upgr_win_121__00

Description Internet Address Title

SAP Software Distribution Center

support.sap.com/swdc None

Oracle Database Upgrade Guide

– that is, the guide you are now reading

service.sap.com/instguides

Database Upgrades Oracle

Upgrade to Oracle Database <Version>: Windows

SAP support portal for Oracle database software, including patches

support.sap.com/software/

databases.html Oracle

SAP Support Portal for Oracle Database Software

Oracle database with SAP system

scn.sap.com/community/oracle SAP on Oracle

10

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsIntroduction

Page 11: Ora db upgr_win_121__00

2 Planning

RecommendationBefore the production upgrade, make sure that you perform a test upgrade on your backup system.

1. You check the original version of your database [page 11].

2. You check the hardware and software requirements [page 11].

3. You decide whether you want to use multiple Oracle homes [page 12].

4. You use the Oracle upgrade checklist for production use [page 12].

2.1 Checking the Original Version of Your Database

You can check the original version of the database you want to upgrade and, if necessary, obtain more information. The database version is also checked later during the pre-upgrade phase.

Prerequisites

To upgrade directly to Oracle Database Release 12c, your source release must be Oracle Database 10g Release 2 (10.2.0.5) or Oracle Database 11g Release 2 (11.2.0.2, 11.2.0.3, or 11.2.0.4) If you are running another Oracle database release, a direct upgrade to 12.1.0.2 is not supported. For more information, see docs.oracle.com/database/121/UPGRD/preup.htm#UPGRD12358.

Process

To check the original version of your database, enter these commands from the environment of the source database as the appropriate database user:

SQL> select version from v$instance;

2.2 Checking Hardware and Software Requirements

You need to check that you meet the hardware and software requirements for running the new Oracle release, including the kernel parameters and shell limits.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPlanning

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 11

Page 12: Ora db upgr_win_121__00

Procedure

1. Check the complete list of hardware and software requirements for every platform included in the Oracle documentation, which you can find in chapter Installation Checklist in the Oracle Database Installation Guide 12c for your platform, available at docs.oracle.com/database/121/nav/portal_11.htm.

The hardware and software requirements are also checked in detail during the software installation phase.

You can access the complete Oracle documentation as a member of the Oracle Technology Network (OTN).

2. Check the Oracle-recommended kernel parameters and shell limits for your operating system with Oracle Database 12c Release 1 (12.1). The kernel parameters and shell limits are also checked in detail during the software installation phase.

These are only recommendations from Oracle for optimizing the system performance in production environments. If the recommended settings are not suitable for your system you must tune the kernel parameters accordingly.

You can obtain the recommended shell limits and kernel parameters from the relevant Oracle database installation guide for your operating system, available at:

www.oracle.com/technology/documentation

Select the appropriate documentation for Oracle Database 12c Release 1 (12.1).

2.3 Using Multiple Oracle Homes

Before the upgrade or migration, you need to decide whether you want to set up multiple Oracle Homes as this influences the procedure.

Oracle allows multiple Oracle Homes for specific database versions. This means that more than one version of the database software can exist in different Oracle Home directories on the same host.

NoteMSCS only:

Multiple Oracle Homes are not supported in a MSCS configuration. During the upgrade or migration there are temporarily two Oracle Homes. However, the old Oracle Home is deleted at the end of the migration or upgrade procedure. Note however that the Oracle Fail Safe software is installed in its own Oracle Home.

Multiple Oracle Homes are necessary:

● If two different databases are installed on the same computer and use different Oracle releases

● Temporarily, while a migration or an upgrade to Oracle 12c is being performed. The new Oracle software must be installed in a new Oracle Home directory.

2.4 Upgrade Checklist

You need to check the following items before starting the SAP system for production use of your upgraded system.

12

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPlanning

Page 13: Ora db upgr_win_121__00

Procedure

RecommendationTo reduce the complexity of the database upgrade and to reduce database downtime to a minimum, we strongly recommend you to perform the steps below where indicated before starting the actual Oracle Database Upgrade [page 20].

1. Install the Oracle database software version 12.1.0.2, including the recommended patches.

For more information, see Installation of the Oracle Database Software [page 20].

2. If your Oracle instant client is lower than 11.2.0.4, install the version of the Oracle instant client that is currently recommended for Oracle 12c, which you can find in SAP Note 819829.

For more information, see Updating the Oracle Instant Client [page 36]. If you update the Oracle instant client, make sure that you also update the SAP kernel, as described below.

When upgrading from Oracle 11g to 12c, you can perform this step before starting the actual database upgrade.

3. Update BR*Tools to the version recommended for Oracle 12c, which is BR*Tools 7.40.

For more information, see Updating BR*Tools [page 36].

When upgrading from Oracle 11g to 12c, you can perform this step before starting the actual database upgrade.

4. Make sure that you have installed the SAP kernel supported with Oracle 12.1.0.2 and that you have a supported version of your operating system. In addition, make sure that you have installed the required support packages for the SAP kernel supported for Oracle 12c. For AS Java or AS ABAP+Java, see also SAP Note 1777021

For more information, check the SAP requirements for your application or product in the Product Availability Matrix (PAM) at support.sap.com/pam.

Oracle Database 12c Release 1 (12.1) is only released and certified for SAP products running with SAP BASIS 7.00 and above, and SAP kernel release 7.21 EXT and above. Oracle 12.1 is only released and certified for Oracle client software version 11.2.0.4 or higher.

When upgrading from Oracle 11g to 12c, you can perform this step before starting the actual database upgrade.

5. Configure secure storage in file system (SSFS) for ABAP, otherwise the SAP System cannot start because it cannot connect to the database. In addition, consider the dependencies on the SAP kernel version.

For more information, see Configuring Secure Storage in File System [page 15].

When upgrading from Oracle 11g to 12c, you can perform this step before starting the actual database upgrade.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPlanning

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 13

Page 14: Ora db upgr_win_121__00

3 Preparation

You have to complete the following preparations:

1. You create an Oracle installation user [page 14].

2. You download the software required for the upgrade [page 15].

3. You configure Secure Storage in File System (SSFS) [page 15].

4. You have to complete the following preparations for a high-availability system with Microsoft Failover Clustering:

Only valid for: HA (MSCS) |

1. MSCS only: You upgrade to Oracle Fail Safe 4.1x [page 15].

2. MSCS only: You install the latest OFS patch set [page 18].

3. MSCS only: You remove the old Oracle Listeners [page 18].

4. MSCS only: You remove the database from the cluster group [page 19].

End of: HA (MSCS) |

3.1 Creating an Oracle Installation User

On Windows, the user installing the Oracle software must have a Windows administrator account. This user is similar to the Oracle software owner in UNIX environments.

Procedure

Create a dedicated Windows administrator account solely to install, patch, and maintain Oracle database software.

We also recommend that you do not use the SAP administrator <DOMAIN>\<sapsid>adm as the Oracle installation user.

For MSCS or domains, create this user as a domain user that is a member of the local administrator group. For more information, see SAP Note 1915302.

ExampleTo create a local Oracle installation user called Oracle, you enter the following commands:

net user /add Oracle Welcome1 /fullname:"Oracle Installation User" /comment:"Administrator for Oracle Software Installation and Patching"net localgroup administrators Oracle /add

14

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

Page 15: Ora db upgr_win_121__00

3.2 Downloading the Software for the Upgrade

You need to download various software to perform the upgrade.

Procedure

1. Download the Oracle Database 12c Release 1 (12.1) software, required patches, and Oracle 12.1 Instant Client software from:

support.sap.com/software/databases.html Oracle .

2. Download the latest version of the DBATOOLS (BR*Tools) to be used immediately after the database upgrade from:

support.sap.com/swdc

BR*Tools supports the Oracle Database 12c Release 2 (12.1), as of release 7.20 (patch level 40).or Release 7.40 (patch level 1) . For more information, see SAP Note 2087004.

3.3 Configuring Secure Storage in File System

For an ABAP or dual-stack (ABAP+Java) system running on Oracle 12c, you must configure Secure Storage in File System (SSFS), otherwise the SAP system cannot start. If you are currently running Oracle version 10g or 11g, you can configure SSFS in advance to avoid extra effort during the database upgrade.

Prerequisites

For SSFS, you require at least SAP kernel 7.20 patch 210 (non-Unicode) or patch 98 and DBSL patch 102 or higher. However, for Oracle 12c, you require a higher minimum SAP kernel, as described in Upgrade Checklist for Production Use [page 12].

Procedure

1. Follow the procedure described in SAP Notes 1639578 and 1622837, which describe the configuration of SSFS in detail

2. Check that the environment variables from SSFS have been changed in the environment of <sid>adm.

3.4 MSCS Only: Upgrading to OFS 4.1x

If the MSCS configuration is still running with Oracle Fail Safe Software (OFS) version lower than 4.1x, you must upgrade to version 4.1x with the latest OFS patch.

To do this, you first have to deinstall the old Oracle Fail Safe software on all cluster nodes and then install the Oracle Fail Safe 4.1x software on a local disk on all nodes.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 15

Page 16: Ora db upgr_win_121__00

CautionMake sure that you install the Oracle Fail Safe 4.1x software in the same Oracle Home on all cluster nodes.

Prerequisites

● You are logged on as administrator or as an Oracle installation user, such as oracle.

● The Cluster Service is started on all cluster nodes.

For more information, see Starting and Stopping Services for MSCS [page 42].

Procedure

Deinstalling the Old Oracle Fail Safe Software

1. Make sure that the Oracle Fail Safe Manager is closed.

2. Uninstall the old OFS software on all cluster nodes, as follows:

NoteWhile you are uninstalling the software on a particular cluster node, do not reboot the other node.

1. Start the Oracle Universal Installer in one of the following ways:

○ From the Oracle RDBMS DVD:

○ To use the Start menu, double-click the following file:

<DVD_drive>:\OFS3.4.2\SAP\sapofs.cmd○ To use a PowerShell [page 47] script, enter the following command:

<DVD_drive>:\OFS3.4.2\SAP\sapofs.ps1○ With the Start menu on your system.

2. On the Welcome screen, choose Installed Products.

3. In the Inventory window, expand <Fail_Safe_home> and select Oracle Fail Safe <version_lower_than_4.1>.

4. Choose Remove.

5. In the Confirmation dialog box, confirm that you wish to delete the selected products.

6. Click Exit to close the Oracle Universal Installer.

Installing the Oracle Fail Safe Software

1. In the Cluster Administrator, make sure that the:

○ Other cluster nodes are not set to Pause.

○ SAP group is offline on the node where you are installing.

2. Make sure that the Cluster Server service is started on all cluster nodes.

3. Start the Oracle Universal Installer from the Oracle RDBMS DVD as described in SAP Note 1865953.

○ If you use the Start menu, double-click the following file:

<DVD_drive>:\<OFS version>\SAP\sapofs.cmd○ If you use a PowerShell [page 47] script, enter the following command:

16

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

Page 17: Ora db upgr_win_121__00

<DVD_drive>:\<OFS version>\SAP\sapofs.ps1The installer opens and guides you through the installation process.

NoteIf the installer aborts and an error is displayed in an Application Error window with the text The exception unknown software exception ..., check the TMP and TEMP variables. In the user environment of <SAPSID>adm, make sure that these refer to existing files. If not, reset them.

Table 5

Screen Entry

Welcome Choose Next.

Select Installation Type Choose Typical, and then Next.

Specify Home Details For Name:

Enter the name of the Oracle home for the Oracle Fail Safe software. Make sure you use the same Oracle home name on all cluster nodes.

The Fail Safe software must be installed in a separate Oracle home directory, for example, OFS41

For Path:

Enter the path of the Oracle Home directory for the Oracle Fail Safe software. It must be on a local disk and should have the same name on all cluster nodes, for example:

C:\Oracle\OFS41

Reboot Needed After Installation Choose Next.

Summary View the information and choose Install.

Install Wait while the software is installed.

Configuration Tools In the dialog box Oracle Fail Safe Account/Password, enter the account and password under which the Oracle Fail Safe software is to run.

The account has to be a member of the local administrators and the ora_<dbsid>_dba or ora_dba groups on both cluster nodes.

Although the <SAPSID>adm user fulfills these requirements, we do not

recommend using this user for the following reason:

If you choose to use <SAPSID>adm, you have to update the account information

for the Oracle Services for MSCS Service after every password change of the <SAPSID>adm user.

You can change the user and password for Oracle Services for MSCS Service as follows:

● Windows Server 2012 (R2):

To do this, press Ctrl + Esc , and then Ctrl + Tab . Choose group

Oracle - <OFS_Home_Name> Set Credentials .

You can also open a PowerShell in elevated mode, and enter the following command:

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 17

Page 18: Ora db upgr_win_121__00

Screen Entry

<ORACLE_OFS_home>\FailSafe\Server\Oracle.FailSafe.ServerConfig.exe SetCredentials

● Windows Server 2008 (R2):

To do this, choose Start All Programs Oracle OFS for MSCS Security

Setup Oracle Service on all cluster nodes.

End of Installation Click Exit to leave the installer.

3.5 MSCS Only: Installing the Latest Oracle Fail Safe Patch Set

For more information on the latest note Oracle Fail Safe patch set, see SAP Note 1972760.

You have to perform the following procedure on all cluster nodes.

Procedure

1. Download the OFS patch set from support.sap.com/software/databases.html OracleDatabase PatchesORACLE PATCHESORACLE PATCHES MISCELLANEOUS.

2. Install the patch set as described in SAP Note 1865953.

3.6 MSCS Only: Removing Old Oracle Listeners

You use the Oracle Net Configuration Assistant from the old <Oracle_home> to delete old or unused Oracle listeners. Usually the listener with name LISTENER can be removed so that Oracle Fail Safe reuses the name LISTENER when removing the database from the fail safe group ORACLE_<DBSID>, as described in Removing the Database from the Cluster Group [page 19].

Procedure

1. Choose Start All Programs <Old_Oracle_Home> Configuration and Migration Tools Net Configuration Assistant .

On Windows 2012, press Ctrl Esc and Ctrl Tab , and then choose Oracle - <DBSID><old_release> Net Configuration Assistant

2. On the Welcome screen, choose Listener Configuration and then Next.

3. Choose Delete listener and select the listener you want to delete from the drop-down list (normally this is the listener with the name LISTENER).

18

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

Page 19: Ora db upgr_win_121__00

3.7 MSCS Only: Removing the Database from the Cluster Group

In a high-availability configuration with Microsoft failover clustering, you have to remove the SAP database from the Oracle cluster group before you begin the upgrade.

Prerequisites

● Make sure that you use the latest OFS version.

● Make sure the generic patch containing the Powershell scripts is installed as described in SAP Note 1976879.

● Check whether unused listeners can be deleted following the procedure described in Removing Old Oracle Listeners [page 18].

● Perform the steps on the first cluster node only. The database must be located on the first cluster node.

Procedure

On Windows 2008 R2 or higher, it is best to run the Windows Powershell script RemoveOracleDbFromOracleClusterGroup.ps1 (installed with the Oracle generic patch) instead of following the GUI-based procedure below.

If you want to use the GUI-based procedure, do the following:

1. Log on as administrator.

2. Stop all application servers connecting to the database.

3. In the Failover Cluster Manager, take the SAP <SAPSID><no.> instances in the SAP <SAPSID> resource group offline.

4. In the Failover Cluster Manager, move all groups to the first cluster node.

5. Start the Oracle Fail Safe Manager as the <dbsid>adm user.

6. Choose Oracle<DBSID> Oracle Resources and right-click <DBSID>.<default_domain>.

NoteSometimes the name of cluster resource is <DBSID> only.

7. Choose Remove from Group.

8. In the dialog box Confirm Remove Database from Group, choose Yes.

The Clusterwide operation window displays the steps that are executed to remove the database from the cluster group. The last line informs you that The clusterwide operation completed successfully.

9. In the Clusterwide operation window, choose Close.

10. Exit the Oracle Fail Safe Manager.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPreparation

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 19

Page 20: Ora db upgr_win_121__00

4 Oracle Database Upgrade

This section describes how to upgrade the Oracle database.

1. You install the Oracle 12.1 software [page 20].

2. You move and adapt files [page 25].

3. You run the pre-upgrade scripts as described in SAP Note 1915313.

4. You back up the Oracle database [page 26].

5. You change the environment for user <sapsid>adm [page 26].

6. You upgrade the Oracle database [page 27].

NoteIf you have problems during the upgrade, see SAP Note 2086029.

4.1 Installation of the Oracle Database Software

The following sections describe how to install the Oracle server software and run the pre-upgrade scripts. It also includes information about the current patches to install.

4.1.1 Installing the Oracle 12c Server Software

This section describes the installation of the Oracle 12c server software and patches.

For more information about identifying and installing the correct Oracle database software version, see SAP Note 1915313.

For information about the installation of Oracle Database 12c software on Windows, see SAP note 1915302.

Prerequisites

● You have stopped the SAP system (not the database instance) with the SAP MMC. For more information, see Starting and Stopping the SAP System [page 44].

CautionIf you copy the files from the RDBMS medium to a local disk, do not use directory names containing blanks.

● You need 5-10 GB disk space for the Oracle server software.

● Make sure that you have enough space for the Oracle inventory and that you have full access to the directories (inventory, installation location, temp directory). Otherwise, the Oracle Universal Installer cannot perform installation prerequisite checks.

20

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

Page 21: Ora db upgr_win_121__00

● Only valid for: HA (MSCS) |

You have to install the Oracle database server software on all failover cluster nodes.End of: HA (MSCS) |

Procedure

1. Log on as Administrator or Oracle installation user, such as Oracle.

For more information on the Oracle users, see SAP Note 1915302.

2. Oracle Database 12c supports the use of an Oracle home user such as oraclehome01, which must be specified at installation time. A Windows local user as Oracle home user can be created during the Oracle software installation. A Windows domain user as Oracle home user must exist before starting the Oracle software installation.

MSCS or domain installation only: The Oracle home user must be a domain user that you have to create before starting the software installation.

3. On the database server, make the Oracle RDBMS medium available, and change to the directory:

<media_DRIVE>:\database\SAP\4. Start the Oracle Universal Installer (OUI) with the PowerShell script sapserver.ps1.

Note○ It is recommended to use the PowerShell script sapserver.ps1, which you can also use with UNC

paths to start the OUI. To run the script, right-click and select Run with Powershell. When running the script the first time, confirm that you want to change the execution policy.

For more information about PowerShell, see Using PowerShell [page 47].

○ For support reasons, do not use the setup.exe file in the directory <media_DRIVE>:\database\. Using sapserver.ps1 guarantees a unique setup of the ORACLE_HOME that is common to SAP systems.

○ Windows Server 2008 (R2) and Windows Server 2012 (R2) with activated UAC:

If you have drive letters that were created in unelevated mode, you cannot access them in elevated mode. Therefore, if you want to double-click sapserver.cmd, you have to copy the Oracle RDBMS medium to a local disk. If you want to invoke sapserver.cmd from within a command prompt or PowerShell window, you have to elevate (run as administrator) the command prompt or PowerShell window before you create the network drive.

Note that there is no UAC in Server Core for Windows Server 2012 (R2).

When the Powershell command window appears, respond to the prompts of the script. For a Windows domain user, enter <domain>\<Oracle_home_user>. For a Windows local user, you only need to enter the name of the local <Oracle_home_user>. For more information, see SAP Note 1915302.

5. In the Oracle Universal Installer, enter the information as shown in the following table:

Table 6: Installing the Oracle 12.1.0.2 Database Software

Window Task

Configure Security Updates Do not select the check box I wish to receive security updates via My Oracle Support.

Choose Next.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 21

Page 22: Ora db upgr_win_121__00

Window Task

The installer issues a warning.

Choose Yes.

Installation Option Confirm the default selection Install database software only and then choose Next.

Grid Installation Options Confirm the default selection Single instance database installation and then choose Next.

Product Languages Confirm the default option English and then choose Next.

Database Edition Confirm the default option Enterprise Edition and then choose Next.

Oracle Home User Selection Select Create New Windows User and enter the User Name and Password, or if you want to use an existing user, choose Use existing Windows User. Then choose Next.

NoteAs of 12c, you can specify an Oracle home user when you install a new Oracle home. For enhanced security, Oracle recommends that you use a standard Windows user account (instead of a Windows built-in account) as the Oracle home user, such as oraclehome01.

MSCS or domain installation only: select Use existing Windows User and enter the Oracle home user <domain>\<Oracle_home_user> that you

created before starting the software installation.

For more information, see SAP Note 1915302.

Installation Location Set these fields as follows, depending on whether you have a standard Windows account (recommended) or a Windows built-in account, and then choose Next:

● Standard Windows account (recommended)

Software location (that is, Oracle home): <drive>:\oracle\<Oracle_home_user>\<DBSID>\<Release>Oracle base : <drive>:\oracle\<Oracle_home_user>

ExampleSoftware location (that is, Oracle home): D:\oracle\oraclehome01\OQ1\12102Oracle base: D:\oracle\oraclehome01

● Windows built-in account

Oracle home: <drive>:\oracle\<DBSID>\<Release>Oracle base: <drive>:\oracle

ExampleOracle home: D:\oracle\OQ1\12102Oracle base: D:\oracle

22

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

Page 23: Ora db upgr_win_121__00

Window Task

For more information, see SAP Note 1915302.

Prerequisite Checks This window checks if all the required system prerequisites for the installation of the database software have been met. If some of the checks are displayed as Failed, you can fix these problems and run the check again by choosing Check Again.

RecommendationWe strongly recommend you to make sure that there are no failed checks before starting the software installation.

Summary Review the information displayed in this window and choose Finish or Install.

Install Product This window shows the progress of the installation.

You can monitor the installation progress details in an additional window.

Close After the installation has finished successfully, choose Close to close the Oracle Universal Installer.

6. Add the Oracle home user from the dialog Oracle Home User Selection to the local and domain groups ora_<DBSID>_dba and ora_<DBSID>_OPER, as below:

For MSCS, perform these steps on all cluster nodes.

1. Log on as domain administrator.

2. Enter the following commands:

1. Add the Oracle home user to the local groups:

net localgroup ORA_<DBSID>_DBA <Oracle_home_user> /addnet localgroup ORA_<DBSID>_OPER <Oracle_home_user> /add

2. If you have domain groups, add the Oracle home user to the domain groups:

net group ORA_<DBSID>_DBA <Oracle_home_user>/add /domainnet group ORA_<DBSID>_OPER <Oracle_home_user>/add /domain

7. After the installation of the Oracle 12.1 software, remove the <new_Oracle_home> from the system environment variable PATH as follows:

1. Start the Oracle Universal Installer with Start All Programs Oracle -<home_name> Oracle Installation Products Universal Installer .

2. On the Welcome screen, choose Installed Products.

3. On the Inventory screen, choose the Environment tab.

4. Deselect the <new_Oracle_home> component and choose Apply.

8. Check the PATH variable in the window you already have open. If PATH contains <new_Oracle_home>, log on again.

9. Install the required Oracle patches [page 24] (if available). For more information, see SAP Note 1915316.Only valid for: HA (MSCS) |

NoteYou have to install the Oracle patches (if available) on all failover cluster nodes.

End of: HA (MSCS) |

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 23

Page 24: Ora db upgr_win_121__00

10. Check that the PATH variable in the environment of <sapsid>adm contains <old_Oracle_home>\bin.

4.1.2 Installing Required Patches

After the database software installation, you need to install all required Oracle database patches, which on Windows include one patch collection and one or more additional (generic) patch.

Check SAP Note 1915316 for the Oracle 12.1.0.2 patches to be installed.

You can download the patches from support.sap.com/software/databases.html Oracle Oracle 12.1 Software .

Prerequisites

Use an up-to-date version of OPatch to install the patches. Check SAP Note 839182 for instructions on how to use OPatch.

Procedure

1. Log on as administrator or the Oracle installation user.

2. Install the generic patch containing the upgrade scripts to the <new_Oracle_home> following the description in SAP Note 1915315, section Installation of Database Upgrade Scripts for 12.1.0.2.

3. Install the patches, following the instructions in the relevant README file.

Note○ The patch collection README file uses the term “bundle patch” instead of “patch collection”.

○ Only valid for: HA (MSCS) |

You have to install the patches on all cluster nodes.End of: HA (MSCS) |

4.1.3 Running the Pre-Upgrade Scripts

You run the Oracle pre-upgrade scripts, which automatically perform various tasks and checks on your database. See SAP Note 1915315.

The scripts do the following on your pre-upgrade database:

● Provide information on the database

● Suggest any changes that you need to make to the database before you start the upgrade

● Perform some of the pre-upgrade tasks on the database

You can run the pre-upgrade scripts as often as necessary.

24

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

Page 25: Ora db upgr_win_121__00

NoteYou always execute these scripts as the current Oracle database administrator <ora_dba>, which connects to the database as sysdba in the pre-upgrade environment of the database to be upgraded.

Prerequisites

● The directory where the upgrade scripts are installed is called ora_upgrade.

● The scripts are installed as part of the SAP bundle patch into the following directory of the new Oracle home:<new_Oracle_home>\sap\ora_upgrade.

● The database is running.

Procedure

1. Check that the environment variables ORACLE_HOME and ORACLE_SID are set. Make sure that ORACLE_HOME is set to the value of the current Oracle home, <old_Oracle_home>.

2. Change to the correct directory by entering the relevant command:

cd <drive>:\oracle\<Oracle_home_user>\<DBSID>\12102\sap\ora_upgrade\pre_upgrade3. Execute the following commands to perform pre-upgrade tasks, which can improve the performance of the

upgrade process:

sqlplus / as sysdbaSQL> @pre_upgrade_tasks.sql

4. Execute the following commands to check the pre-upgrade status of your database:

sqlplus / as sysdbaSQL> @pre_upgrade_checks_sap.sqlSQL> @pre_upgrade_checks_ora.sql

Result

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

4.2 Moving and Adapting Files

After the database software installation, you must move the profiles of SAP BR*Tools.

Procedure

1. Log on as administrator or Oracle installation user.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 25

Page 26: Ora db upgr_win_121__00

2. Copy the profiles of SAP BR*Tools:

Copy <old_Oracle_home>\database\init<SID>.sap to <new_Oracle_home>\database\init<SID>.sapIf it exists, copy <old_Oracle_home>\database\init<SID>.utl to <new_Oracle_home>\database\init<SID>.utl.

4.3 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 and operating system backup, and back up any archive logs from your database.

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.

4.4 Changing the Environment for User <sapsid>adm

This section describes how to change the environment for user <sapsid>adm

You only need to perform this procedure if you use <sapsid>adm as the Windows administrator account to perform the database upgrade. If you use a dedicated Windows administrator account – that is, the one that installed the Oracle software – where no Oracle-specific environment variables like TNS_ADMIN or ORACLE_HOME are set, you can skip this chapter.

Prerequisites

● You have stopped the SAP system.

● Make sure that the database and the listener are running.

Procedure

1. In the user environment of <sapsid>adm, rename the following variables:

○ ORACLE_HOME○ TNS_ADMIN (if it exists)

ExampleRename ORACLE_HOME into ORACLE_HOME_before_upgrade, and TNS_ADMIN to TNS_ADMIN_before_upgrade.

26

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

Page 27: Ora db upgr_win_121__00

NoteMSCS only: rename the variables on all nodes.

2. Multiple Oracle homes only: Remove from the system environment variable PATH all parts referring to the Oracle executables (%ORACLE_HOME%\bin) as follows:

1. Start the Oracle Universal Installer with Start All Programs Oracle - <Home_Name> Oracle Installation Products Universal Installer .

2. On the Welcome screen, choose Installed Products.

3. On the Inventory screen, choose the Environment tab.

4. Deselect all components and choose Apply.

3. Multiple Oracle homes only: Update or, if not available, create the user environment PATH of all users using the Oracle software to refer to the correct %ORACLE_HOME% as follows:

1. Choose My Computer Properties Advanced Environment Variables .

2. If the environment variable PATH already exists, append <Old_ORACLE_HOME>\bin to the existing value.

3. If the environment variable PATH does not exist, set the value for PATH to <Old_ORACLE_HOME>\bin.

4. Log off and log on again to activate the changes.

4.5 Performing the Database Upgrade

To upgrade the database, use the Oracle Database Upgrade Assistant (DBUA).

NoteWhenever you decide to use the BACK button in the DBUA, we recommend stopping the DBUA and restarting it again. Otherwise, the DBUA might lose some context information (for example, upgrade time zone).

Prerequisites

● If not yet stopped, stop the SAP system.

Do not stop the database instance and the listener. The database instance and the listener must be running in the current (old) environment.

● For Oracle Fail Safe Software (OFS), change the registry entry of ORA_<DBSID>_AUTOSTART by entering the command:

<new_Oracle_home>\bin\oradim -edit -sid <dbsid> -startmode manual● Only valid for: HA (MSCS) |

Follow the instructions on the first cluster node only, where the database is located.

In the Cluster Administrator or Failover Cluster Manager make sure that the database disks are online on the first cluster node.End of: HA (MSCS) |

● Make a copy of the directory <old_Oracle_home>\network\admin, for example, under <old_Oracle_home>\network\admin_before_dbua.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 27

Page 28: Ora db upgr_win_121__00

Procedure

1. Log on as <sapsid>adm user.

2. If you want to run DBUA in English, choose Start Control Panel Clock, Language and Region Regionand change to English (united states) in the format field.

3. Start the Oracle DBUA as follows:

○ On Windows 2012, press Ctrl Esc and Ctrl Tab , and then choose Oracle - <DBSID> 12102Database Upgrade Assistant .

○ On Windows 2008, choose Start All Programs Oracle - <new_Oracle_home> Configuration and Migration Tools Database Upgrade Assistant .

NoteYou do not automatically run the SAP-specific DBUA upgrade scripts. You can run them manually or you can enter them in the appropriate dialog of DBUA

4. Proceed as shown in the following table:

Table 7

Screen Input

Select Operation Choose Upgrade Oracle Database and choose Next.

Select Database 1. Select the database that you want to upgrade.

2. Enter the password for the Oracle home user.

3. Choose Next.

The DBUA analyzes the database to be upgraded and performs pre-upgrade checks.

If DBUA reports that the database contains INVALID objects prior to upgrade, fix these before the upgrade. See SAP Note 1915315, section Running SAP-Specific Pre-Upgrade Scripts.

Upgrade Options On tab Upgrade Options, the following options are available:

● Recompile Invalid Objects During Post Upgrade

Leave this selection unchanged.

The option lets you choose whether the DBUA has to automatically recompile all PL/SQL modules after the upgrade. If the database server has multiple CPUs, the DBUA automatically proposes the number of parallel processes to be used for the recompilation.

● Upgrade Timezone Data

Select this option.

● Gather Statistics Before Upgrade

Do not select this option. You should have already completed this during the upgrade preparations.

● Set User Tablespaces to Read Only During the Upgrade

Select this option.

On tab Custom SQL Scripts, select the required post-upgrade scripts for DBUA to run. These are <new_Oracle_home>/sap/ora_upgrade/post_upgrade/

28

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

Page 29: Ora db upgr_win_121__00

Screen Input

post_upgrade_tasks.sql and <new_Oracle_home>/sap/ora_upgrade/post_upgrade/set_compatible.sql.

For more information, see SAP Note 1915315.

Choose Next.

Management Options Deselect Configure Enterprise Manager (EM) Database Express and choose Next.

Move Database Files Leave the default settings (that is, nothing is selected) on this screen and choose Next.

Network Configuration Select the listener and choose Next..

Recovery Options Select your preferred database recovery option and choose Next.

Summary Review the summary of changes to be made.

This includes the warnings that you ignored or did not fix, components to be upgraded, parameters to be added, removed, and changed after the upgrade.

Choose Back to make any final adjustments, if required. Otherwise, leave the default settings and choose Finish to start the upgrade.

Progress The upgrade process itself runs for some time, depending mainly on the size of the database and the capacity of the hardware.

You can ignore the following warnings if they appear:

● ORA-32004 obsolete or deprecated parameter(s) specified for RDBMS instance

● ORA-32006 REMOTE_OS_AUTHENT initialization parameter has been deprecated

When the DBUA has completed successfully, the results of the upgrade are displayed. Review the changes made and close the DBUA.

5. if you did not select the scripts from within DBUA as custom scripts to run after the upgrade (that is, under the control of DBUA), run these SAP-specific post-upgrade scripts manually after the upgrade, as described in SAP Note 1915315.

6. If you cancelled DBUA, check the files listener.ora, tnsnames.ora, and sqlnet.ora files before restarting DBUA.

If the DBUA has already changed the files, copy the files listener.ora, sqlnet.ora, and tnsnames.ora from the saved network\admin directory to <old_Oracle_home>\network\admin, for example, <old_Oracle_home>\network\admin_saved to <old_Oracle_home>\network\admin.

7. When upgrading an SAP 7.0X or 7.1x system with Java components, add the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 to SQLNET.ora (independent of the Oracle database software owner) in directories $ORACLE_HOME and $TNS_ADMIN, which is per default <drive>:\oracle\<Oracle_home_user>\<SID>\12102 and <drive>:\usr\sap\<SID>\SYS\profile\oracle.

To check the values via regedit, see HKEY_LOCAL_MACHINE SOFTWARE ORACLEKEY_<DBSID>12102 and HKEY_LOCAL_MACHINE SOFTWARE SAP <SID> Environment .

Without this entry in SQLNET.ora, the following error occurs:

ORA-28040: No Matching authentication.8. Restart the listener and the listener service.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsOracle Database Upgrade

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 29

Page 30: Ora db upgr_win_121__00

5 Post-Upgrade Steps

After the Oracle database upgrade, you need to perform the steps described here.

1. You set the user environment variables [page 30].

2. You perform post-upgrade checks [page 31].

3. MSCS only: You set up a shared database directory in the Oracle home [page 31].

4. You change the registry value of Oracle Autostart [page 33].

5. You check the startup type of the Oracle services [page 33].

6. You perform post-upgrade tasks [page 34].

7. MSCS only: You add the database to the cluster group [page 34].

8. You update the Oracle Instant Client [page 36].

9. You update BR*Tools [page 36].

10. You back up the database [page 37].

11. If required and not yet done, update the SAP executables [page 38].

12. If not yet done, configure the Secure Storage in the File System (SSFS) [page 15].

13. You can now start the SAP system.

14. You configure the new features for Oracle Database 12c Release 1 (12.1) [page 38].

15. You uninstall the old Oracle software [page 39].

16. You make sure that you have installed the required support packages for the SAP kernel supported for Oracle 12c. For AS Java or AS ABAP+Java, see also SAP Note 1777021.

5.1 Changing Environment Variables

Procedure

Only valid for: HA (MSCS) |

NoteEdit the variables on all cluster nodes.

End of: HA (MSCS) |

1. In the user environment and system environment of <sapsid>adm, check the PATH variable:

1. If required, remove all parts referring to Oracle home from the PATH variable of the system environment.

2. Check that the PATH variable in the user environment points to the <new_Oracle_home>\bin. If you are running Oracle client version 11.2.0.4, add <new_Oracle_home>\bin before the existing entry.

CautionWhen you modify the user environment, you must be logged on as the corresponding <sapsid>adm user.

30

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 31: Ora db upgr_win_121__00

2. In the user environment of <sapsid>adm, rename the ORACLE_HOME_before_upgrade variable to ORACLE_HOME and set the ORACLE_HOME variable to the correct value for Oracle 12c, for example to:

<DRIVE>:\ORACLE\<Oracle_home_user>\<DBSID>\12102.

3. If you have two or more Oracle homes, make sure that the user environment variable PATH of the <sapsid>adm user points to the corresponding %Oracle_Home%\bin directory.

4. Rename the user environment variable TNS_ADMIN_before_upgrade back to TNS_Admin and check that it points to the directory \\<sapglobalhost>\sapmnt\<DBSID>\SYS\profile\oracle.

NoteSet TNS_ADMIN on all ABAP application servers.

5. If your system has any other environment variables referring to old_Oracle_home, adapt these too, so that they now point to new_Oracle_home.

6. Log off and log on again to activate the environment changes in your user session.

5.2 Performing Post-Upgrade Checks

Procedure

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

2. Start the database and listener with the new environment.

3. Open a command prompt and change to the directory <drive>:\<new_Oracle_home>\sap\ora_upgrade\post_ugprade.

4. From the same directory, start sqlplus.exe and enter the following commands to run the post-upgrade scripts, referring to SAP Note 1915315:

sqlplus / as sysdbaSQL> @?\rdbms\admin\utlu121s.sqlSQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)

SQL> @post_upgrade_checks.sqlThis provides an overview of the status of the upgraded database.

5.3 MSCS Only: Setting Up a Shared Database Directory in Oracle Home

The following describes how to set up a shared Oracle home\database-directory with a link or junction if your database is configured for using a spfile

A central Oracle home\database-directory has the following advantages:

● You can also use sqlplus remotely to make changes to your profile parameters

● You have to make the changes in the parameter files only once in the shared Oracle home\database-directory.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 31

Page 32: Ora db upgr_win_121__00

If your database is not configured for using a spfile, you have to apply all changes in the init<DBSID>.ora file in the Oracle home\database-directories on all cluster nodes.

NoteOracle Fail Safe does not support the direct use of an spfile. Therefore, you have to create a Fail Safe-specific init<DBSID>_OFS.ora file, and specify it when adding the database to the cluster resource group [page 34].

Procedure

1. Stop the Oracle database and the Oracle service.

2. Change to directory <shared_disk>:\oracle\<DBSID>\sapdata1.

3. If there is already an existing database directory, rename it to database.<release>, for example database.11204.

4. In the sapdata1 directory, create the directory database.12102.

The sapdata1 directory is located on a shared disk in the cluster.

5. On the first cluster node, change to the Oracle home directory, and enter the following command:

○ If you use a command prompt, enter:

move /y database\* <path_To_sapdata1>\database.12102○ If you use a Powershell, enter:

move -force database\* <path_To_sapdata1>\database.121026. Delete the Oracle home\database directory with the command:

rd /q /s database

NoteYou can also use the Windows Explorer to delete the directory.

7. Create the link as follows:

○ If you use a command prompt, enter:

mklink /d %oracle_home%\database <complete_path_To_sapdata1>\database.12102○ If you use a Powershell script, enter:

cmd.exe "/c" mklink "/d" $env:oracle_home\database <complete_path_To_sapdata1>\database.12102

ExampleThe following example shows how to create links with a Powershell:

C:\oracle\oraclehome01\xxi\12102> cmd.exe "/c" mklink "/d" c:\oracle\XXI\12102\database G:\oracle\XXI\sapdata1\database.12102The junction created for c:\oracle\oraclehome01\XXI\12102\database is G:\oracle\XXI\sapdata1\database.12102

8. Repeat steps 6 and 7 on the other cluster nodes.

9. Edit or create the file init<DBSID>_OFS.ora in the database directory, and enter the following line:

spfile = <path_To_new_Oracle_home>\database\spfile<DBSID>.ora

32

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 33: Ora db upgr_win_121__00

10. Start the Oracle service and Oracle database.

5.4 Changing the Registry Value of Oracle Autostart

Procedure

Change the registry value of ORA_<DBSID>_AUTOSTART in one of the following ways:

● Open a command prompt and enter the following command:

<new_Oracle_Home>\bin\oradim -edit -sid <dbsid> -startmode manualIgnore the error message Unable to start service, OS Error 1056.

● Use regedit.exe to change the registry key to value FALSE. The registry key is available at HKLM:\Sofware\Oracle\KEY_<DBSID>12102.

5.5 Checking the Startup Type of the Oracle Services

Procedure

1. Start the Oracle services (Database and Listener) if not yet started.

2. Start the Distributed Transaction Coordinator service.

3. Check the startup type of services, depending on whether you have a high-availability MSCS configuration:

○ Normal configuration (non-HA):

1. Make sure that the startup type of service OracleService<DBSID> is automatic.

2. Make sure that the startup type of service Oracle<ORACLE_HOME_NAME>TNSListener is automatic.

For more information about how to start services, see Starting or Stopping Services [page 42]

This ensures that the services are automatically restarted when you reboot.

○ High-availability configuration (MSCS) :

1. Make sure that the startup type of service OracleService<DBSID> is manual.

2. Make sure that the startup type of service Oracle<ORACLE_HOME_NAME>TNSListener is manual.

This ensures that the services are not automatically restarted when you reboot.

More Information

For more information about how to start services, see Starting or Stopping Services [page 42].

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 33

Page 34: Ora db upgr_win_121__00

5.6 Performing Post-Upgrade Tasks

You need to perform certain post-upgrade tasks as <sapsid>adm.

Procedure

NoteWhen you use SecureStore for the BR*Tools, replace the -u / in the brconnect commands below with -u //.

For example, use brconnect -u // -c -f stats -t system_stats instead of brconnect -u / -c -f stats -t system_stats

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

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

NoteYou can perform this step later if required.

2. Check the Oracle database parameters against SAP Note 1888485 and adjust them if necessary.

Check SAP Note 1171650 to see whether an automated script for Oracle 12c is already available. This helps you check whether your SAP system complies with the database parameter recommendations at any given point in time.

3. Update the Oracle database statistics with BRCONNECT as follows:

brconnect -u / -c -f stats -t all -f collect -p 4For more information about update statistics, see the documentation SAP Database Guide: Oracle at:

scn.sap.com/community/oracle SAP ON ORACLE KNOWLEDGE CENTER SAP Documentation

NoteYou can perform this step later if required.

5.7 MSCS Only: Adding the Database to the Cluster Group

To enable a database to fail over with all the resources it requires, you must add it to the cluster group.

Prerequisites

The Cluster Service and the Distributed Transaction Coordinator are running on all cluster nodes.

34

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 35: Ora db upgr_win_121__00

Procedure

1. Start the Failover Cluster Manager and bring the Oracle Services for MSCS resource online.

2. Start the Oracle services.

3. Start the database.

4. Add the database to the cluster group using either the PowerShell or in dialog mode:

○ With the PowerShell:

1. Copy the sqlnet.ora file from the directory <Oracle_home>\network\admin on the first cluster node to the same directory on the additional cluster nodes.

2. Change to the directory <Oracle_home>\sap\mscs_scripts.

If you installed the generic patch 18304304 in <old_Oracle_home>, you can run the script from this directory or you can copy the scripts to <Oracle_home>.

3. Right-click the script AddOracleDbToOracleClusterGroup.ps1 and choose Run with PowerShell.

4. Enter the required parameters:

1. Enter the <DBSID> of your Oracle database.

2. Enter the path and file name of your Oracle parameter file on the shared cluster disk: <shared_disk>:\ORACLE\<DBSID>\SAPDATA1\DATABASE.<release>\INIT<DBSID>_OFS.ORA

○ In dialog mode:

1. Start the Oracle Fail Safe Manager as follows:

○ On Windows 2008, Start All Programs Oracle - <Fail_Safe_home> Oracle Fail Safe Manager .

○ On Windows 2012, press Ctrl Esc and Ctrl Tab , and then choose Oracle - <Fail_Safe_home>

2. If the Welcome dialog box appears, choose Verify Cluster. Otherwise, right-click the cluster and choose Verify Cluster.

NoteAll cluster nodes must be up and running for this step.

The window Verifying Cluster shows the steps that are executed to verify the cluster. When you are informed that the operation has completed successfully, close the window.

3. Add the SAP database to the cluster group Oracle<DBSID>.

1. In the tree on the left, choose Oracle Resources.

2. Right-click the database <DBSID>.<default_domain>3. Choose Add Resource.

4. In the dialog box Add Resource to Group, confirm the name of the group to which you want to add this resource Oracle<DBSID>.

5. Choose Next.

6. In Database Parameters, enter the name of the initialization parameter file <shared_drive>:\oracle\<DBSID>\sapdata1\database.12102\init<DBSID>_OFS.ora.

7. In Oracle Home User Password, enter the password and choose Next.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 35

Page 36: Ora db upgr_win_121__00

8. Choose Finish.

5. Configure the local_listener with the following SQL commands, referring to SAP Note 1915325 as required:

1. In init<DBSID>_OFS.ora check the value of the local_listener entry.

2. Set this value in the spfile with sqlplus as follows:

SQL> alter system set local_listener=’(ADDRESS=(PROTOCOL=TCP)(HOST=<IP_Address>)(PORT=<Port_Number>))’ scope=spfile;

6. Delete the local_listener entry from init<DBSID>_OFS.ora:

local_listener=’(ADDRESS=(PROTOCOL=TCP)(HOST=<IP_Address>)(PORT=<Port_Number>))’7. Restart the database.

5.8 Updating the Oracle Instant Client

After the upgrade to Oracle 12.1.0.2, it is strongly recommended to install the recommended Oracle instant client software for Oracle 12c. If it is not possible to run Oracle client 12.1.0.2, you need at least Oracle client 11.2.0.4.

For more information, see the Product Availability Matrix (PAM) at support.sap.com/pam and SAP Note 819829 for the recommended version. For the installation of the client, see SAP Note 998004. A mixture of Oracle client 12.1.0.2 and Oracle client 11.2.0.4 on different application servers is supported.

Procedure

1. Stop the central instance and dialog instance (if available)

2. Apply SAP Note 998004 on the central instance and dialog instance host.

3. Do not restart the central instance and dialog instance (if available) except if you are performing the Oracle client installation independently of the database upgrade.

5.9 Updating BR*Tools

You update BR*Tools to the latest release, with the latest patch level. For more information, see SAP Notes 2087004 and 12741.

NoteYou can also update BR*Tools as described here during the preparation phase.

Procedure

After extracting the latest BR*Tools release, you need to update the SAPDBA role using the script sapdba_role.sql, as described below. This is essential so that the new release of BR*Tools works correctly. The script is automatically extracted when you extract BR*Tools.

36

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 37: Ora db upgr_win_121__00

1. Download the most current version of BR*Tools from:

support.sap.com/swdc Software Downloads Support Packages and Patches Browse Download Catalog Additional Components SAP Kernel SAP KERNEL <platform> SAP KERNEL <version>Windows on <platform> ORACLE DBATLxxxx.SAR

2. Unpack BR*Tools to the DIR_CT_RUN directory.

NoteMSCS only: Install BR*Tools in the following directories:

○ DIR_CT_RUN on one MSCS node only

○ %windir%\SapCluster on all MSCS nodes

3. Update the SAPDBA role as <sapsid>adm user as follows:

1. Go to the %ORACLE_HOME%\database directory:

cd %ORACLE_HOME%\database2. Copy sapdba_role.sql from the DIR_CT_RUN directory to the %ORACLE_HOME%\database directory.

3. Determine the SAPSCHEMA_ID by entering the following commands:

sqlplus /nologSQL> connect / as sysdbaSQL> select username from dba_users where username like 'SAP%';For the schema, you have to use the names beginning with “SAP”, for example:

SAPW41SAPSR3SAPSR4SAPSR3DB (Java)

In these examples, the SAPSCHEMA_ID that is required for sapdba_role.sql is W41, SR3, SR4, or SR3 without the leading SAP.

Close sqlplus with this command:

SQL>exit4. Execute the following SQL commands for all existing SAP schemas in the database:

○ AS Java:

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>○ AS ABAP and AS ABAP+Java:

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>DB

5.10 Backing Up the Database

You need to back up your upgraded Oracle Database 12c database.

We also recommend perform a full operating system backup.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 37

Page 38: Ora db upgr_win_121__00

CautionYou risk losing data if you do not back up your database.

Procedure

Perform a full database and operating system backup.

ExampleYou can enter a command like the following to perform a full database backup:

brbackup –u / –type offline –mode all –device disk –compress yes –language E

5.11 Updating the SAP Executables

If you are not running a SAP kernel supported for Oracle 12c yet, you need to update the SAP executables to the latest SAP kernel supported for Oracle 12c. This is a task for the <sapsid>adm.

Procedure

For supported SAP kernels 7.21EXT, see the procedure in SAP Note 1716826. For supported SAP 7.41 downward-compatible kernels (DCK), see the procedure in SAP Note 1994690.

CautionIn an MCOD system, you have to update the executables of all SAP systems connecting to the database.

5.12 Configuring the New Features for Oracle Database 12c Release 1 (12.1)

You can configure the new Oracle Database 12c Release 1 (12.1) features.

Procedure

For more information about new features with Oracle Database 12c Release 1 (12.1), see SAP Note 1914631. This note provides links to other SAP notes that describe how to configure or activate each new feature.

38

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 39: Ora db upgr_win_121__00

5.13 Uninstalling the Old Oracle Software

Before you uninstall the old Oracle software, you can perform a backup of your database [page 37]. For more information on how to remove the different Oracle Software versions, see SAP Note 1915314.

● To uninstall the Oracle 10.2 software, you use the Oracle Universal Installer (OUI).

For more information, see download.oracle.com/docs/cd/B19306_01/em.102/b16227/oui5_product_install.htm#i1006215.

● To uninstall the Oracle 11.2 software, you use the deinstallation tool.

For more information, see:

○ SAP Note 1591580

○ The Oracle® Database Installation Guide 11g Release 2 (11.2) for Microsoft Windows, which is available at download.oracle.com/docs/cd/E11882_01/install.112/e16773/deinstall.htm#CIHDGGJJ.

CautionDo not delete the old software if it still has to be accessed by another database instance running with this version.

Procedure

1. MSCS only: Remove the link or junction from <old_Oracle_home>\database pointing to <Shared_Disk>:\oracle\<SID>\sapdata1\database.

2. MSCS only: Set the Oracle Services for MSCS offline.

3. MSCS only: Stop the Cluster Service on all cluster nodes.

4. Stop the service Distributed Transaction Coordinator.

5. Stop the services of the old Oracle home.

6. Oracle 10g: Start the Oracle Universal Installer (OUI) from your Start menu as follows:

○ If you find the Universal Installer under Start All Programs <new_Oracle_home> Oracle Installation Products Universal Installer , you must start it from this path.

○ Otherwise, start it from Start All Programs Oracle Installation Products Universal Installer .

7. Oracle 11g: To check, run the command: <old_Oracle_home>\deinstall\deinstall.bat -checkonly.

To deinstall, run the command: <old_Oracle_home>\deinstall\deinstall.batFor more information, see SAP Note 1591580.

8. Follow the instructions for the Oracle home you want to remove.

1. On the Welcome screen, choose Deinstall Products.

2. On the Content tab of the Inventory dialog box, check the node representing your old Oracle home and press the Remove button.

3. Confirm the removal of the products in the popup that appears

NoteIt is not possible to delete all old Oracle products. These are deleted in the following steps.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 39

Page 40: Ora db upgr_win_121__00

9. If available, delete the services in which the name contains the old Oracle home name.

To delete a service, open a command prompt and enter:

h

sc delete <service_name>

ExampleC:\Windows\system32> sc delete OracleJobSchedulerXXL [SC] DeleteService SUCCESS

Note○ Make sure that you do not delete the Oracle services.

○ Multiple Oracle homes only: On a database server with multiple Oracle homes, do not delete the service OracleService<DBSID>. If more than one listener is configured, do not delete these services either.

10. In the Windows Explorer, delete the old Oracle home directory to prevent an Oracle process starting again from the old Oracle home.

11. Delete the entry Oracle – <old_Oracle_home>if it exists in the Windows Start menu, as follows:

1. Choose Start All Programs .

2. Right-click Oracle – <old_Oracle_home> and choose Delete.

CautionOnly delete the registry key for the old Oracle version – for example: HKEY_LOCAL_MACHINESOFTWARE ORACLE KEY_<old_Oracle_home> – if there is only one Oracle client installed. Otherwise, do not delete it.

40

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsPost-Upgrade Steps

Page 41: Ora db upgr_win_121__00

6 Common Administration Tasks

The following sections provide information on common administration tasks that have to be performed repeatedly during the upgrade procedure. Some of these tasks are standard tasks, others are only relevant for a Microsoft Cluster Service (MSCS) configuration.

● Starting and Stopping the Database in an MSCS Configuration [page 41]

● Starting and stopping services [page 42]

● Moving groups for MSCS [page 43]

● Starting and stopping the SAP system [page 44]

6.1 Starting and Stopping the Database in an MSCS Configuration

This section describes how to start or stop the database in an MSCS configuration.

You have the following options

● You use sqlplus

You use this option if:

○ The database disks are online and the OracleService<DBSID> is started.

○ You start the database in a certain mode, for example you use the commands startup upgrade or startup migrate during an upgrade or a migration.

NoteIf want to start the database in a certain mode (for example, you use the commands startup migrate, startup upgrade, startup nomount) or if you have installed a patch set or patch collection, perform the following steps:

1. In the Oracle Fail Safe Manager, right-click the database <DBSID>.world in the cluster group ORACLE<DBSID>.

2. Choose Place offline.

3. Choose the specific modus.

4. On the node where the Oracle group is partially online, start the service OracleService<DBSID>5. Perform administrative tasks including start up or shutdown

6. In the Oracle Fail Safe Manager, take the cluster resource <DBSID>.world online.

● You use the Oracle Fail Safe Manager

You use this option, if the database is under control of the Oracle Fail Safe Manager.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 41

Page 42: Ora db upgr_win_121__00

CautionIf the Oracle database resource is online, you must use the Oracle Fail Safe Manager to stop the database. If you do not use the Oracle Fail Safe Manager, the cluster functionality automatically attempts to restart the database.

Prerequisites

You are logged on as user <SAPSID>adm.

Procedure

The following procedure describes how to start and stop the database with the Oracle Fail Safe Manager.

● Starting the database

1. In the Oracle Fail Safe Manager, right-click the database <DBSID>.world in the cluster group ORACLE<DBSID>.

2. Choose Place online.

● Stopping the database

1. In the Oracle Fail Safe Manager, right-click the database resource <DBSID>.world in the cluster group ORACLE<DBSID>

2. Choose Take offline.

NoteIf a pop-up appears, asking you how to take the database offline, choose Immediate.

6.2 Starting and Stopping Services

This section describes how to stop services in a standard configuration and in an MSCS configuration.

Procedure

Starting and Stopping Services in a Standard Configuration

1. Right-click on My Computer and choose Manage.

2. Double-click on Services and Applications and select Services.

3. Right-click on the service you want to start or stop.

4. Choose Start or Stop as required.

Starting and Stopping Services in an MSCS Configuration

● Starting or Stopping the Cluster Service with the Failover Cluster Manager (Windows Server 2008 (R2))

42

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

Page 43: Ora db upgr_win_121__00

1. Start the Failover Cluster Manager (Windows Server 2008 (R2)).

2. Select the node where you want to start or stop the Cluster Service.

3. To stop the cluster service, choose File Stop Cluster Service.

4. To start the service, choose File Start Cluster Service

● Starting and Stopping Services with the Failover Cluster Manager (Windows Server 2008 (R2)), or Fail Safe Manager

You can start or stop the services listed in the table below with the Failover Cluster Manager (Windows Server 2008 (R2)), or Fail Safe Manager.

To start a resource, set it online. To stop a resource set it offline.

CautionIf during the migration process the Cluster Service is stopped, you cannot use the Fail Safe Manager or Failover Cluster Manager (Windows Server 2008 (R2)) to stop services. In this case, you have to stop them as described above under Starting and Stopping Services in a Standard Configuration.

However, when the Cluster Service is running, you must use the Failover Cluster Manager (Windows Server 2008 (R2)), or Fail Safe Manager, otherwise the cluster functionality automatically attempts to restart the services you have stopped.

The following table shows how to start the services.

Table 8

Service Resource

SAP<SAPSID>_<Instance_No.> Set the SAP cluster resource to online. The SAP system is started.

OracleService<DBSID> Choose one of the following:

● Set the resource <DBSID>.world in the group

ORACLE<DBSID> to online.

● In the Oracle Fail Safe Manager, set the Fail Safe Database <DBSID>.world to online.

Oracle<Oracle_home>TNSListener<Listener_Name> Set the corresponding resource in the group ORACLE<DBSID> to online.

OracleMSCSServices / Oracle Fail Safe Set the resource Oracle Services for MSCS or Oracle Fail Safe in the Cluster group to online.

6.3 Moving Groups or Services and Applications for MSCS

To move the database, SAP, or disk cluster groups from one MSCS node to the other, you can use the Failover Cluster Manager (Windows Server 2008 (R2)) or the Fail Safe Manager. This section describes the procedure for all of them.

NoteAs of Windows Server 2008 (R2) there are the following terminology changes:

● Cluster groups are now called services and applications.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 43

Page 44: Ora db upgr_win_121__00

We do not always use both names in this section.

● The Cluster Administrator is now called Failover Cluster Manager.

Procedure

Windows Server 2008 (R2): Moving Services and Applications with the Failover Cluster Manager

You use the Failover Cluster Manager for groups that do not belong to the database groups.

1. Start the Failover Cluster Manager with Start Administrative Tools Failover Cluster Manager .

2. In the Failover Cluster Manager, right click the service and application you want to move.

3. Choose Move this service or application to another node Move to <relevant node> .

4. Repeat the previous step for each service and application that you want to move.

NoteYou can only move disks that are assigned to Services and Applications.

The disks that are added to the cluster are automatically added to a group named Available Storage. Although the groups Available Storage and Cluster Group exist in an MSCS cluster on Windows Server 2008 (R2), they are not visible under Services and Applications. Therefore you cannot move these groups with the Failover Cluster Manager.

● To move Cluster Group, open a command prompt and enter:

cluster group “cluster group” /move● To move Available Storage, open a command prompt and enter:

cluster group “Available Storage” /move

Moving Groups with the Fail Safe Manager

Use the Fail Safe Manager to move the Oracle resources, for example, the database group Oracle<DBSID>:

1. Start the Fail Safe Manager 3.4.2 with Start All Programs Oracle <home_name_fail safe> Oracle Fail Safe Manager

2. On the left-hand pane, select the group you want to move.

3. Press the right mouse button and click Move to a Different Node on the context menu.

The group is now moved to another cluster node.

6.4 Starting and Stopping the SAP System

This section describes how to start or stop an SAP system in a:

● Standard Configuration

● Microsoft Cluster Service (MSCS) Configuration

44

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

Page 45: Ora db upgr_win_121__00

Procedure

Starting and Stopping the SAP System in a Standard Configuration

For a standard configuration, you use the SAP Microsoft Management Console (SAP MMC) to start or stop your SAP system. With a newly installed MMC you can start or stop installed SAP instances locally on the host that you are logged on to. If the MMC is configured for central system administration, you can start the entire system from a single host. To stop the system, you first have to stop all dialog instances before you can stop the other instances. For more information on the start or stop order of an SAP system, see SAP Note 897933.

NoteWhen you boot the Windows operating system in a standard configuration, the SAP Service SAP<SAPSID>_<Instance_number> (for example SAPPRD_00) is always started automatically.

Perform the following steps:

1. Start the SAP MMC on the SAP system host by choosing Start All Programs SAP Management Console.

2. Right-click the SAP system node and choose Start or Stop.

All instances listed under the system node, will start or stop in the correct order.

3. If the SAP system is installed on multiple hosts (distributed system), you have the following options to start or stop your system:

○ You start or stop the SAP instances using the SAP MMC on each host.

○ You add the remote instances to the MMC configuration to start or stop all instances from a single MMC.

To do so, do one of the following:

○ You configure the SAP MMC manually. For more information, see Changing the Configuration of the MMC in the MMC documentation.

○ You use the automatic LDAP registration. For more information, see Configuring MMC for Active Directory Service in the MMC documentation.

Starting and Stopping the SAP System in an MSCS Configuration

If you use MSCS, you start or stop your SAP system with one of the following tools:

Table 9

Tool Description

Oracle Fail Safe Manager You use the Oracle Fail Safe Manager to start or stop the database instance.

To start or stop the database instance in the Oracle Fail Safe Manager, right-click the database <DBSID>.world in the Fail Safe group ORACLE<DBSID> and choose Place online or Take offline.

SAP Microsoft Management Console (SAP MMC)

To start or stop your SAP system with the SAP MMC, see above.

Failover Cluster Manager (Windows Server 2008 (R2))

NoteWith the Failover Cluster Manager you can only start or stop clustered instances such as the (A)SCS instance. For all other non-clustered instances, such as dialog instances or the central instance, you must use the SAP MMC (see above).

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 45

Page 46: Ora db upgr_win_121__00

Tool Description

To start or stop the clustered instance of the SAP system with the Failover Cluster Manager (Windows Server 2008 (R2)), select the relevant service and application SAP <SAPSID>.

In the right-hand pane, under Other Resources, right-click the resource SAP <SAPSID><instance_no> Instance and choose Bring this resource online or

Take this resource offline.

46

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsCommon Administration Tasks

Page 47: Ora db upgr_win_121__00

A Appendix

A.1 Using PowerShell

As of the Oracle 11.2 upgrade, SAP uses the Windows PowerShell.

For Windows Server 2012 (R2), SAP only uses Windows PowerShell to run and describe Windows commands.

Windows PowerShell is a powerful tool integrated in the Windows operating system. It uses object-oriented methodology, which allows fast and stable script development.

In this upgrade procedure, the use of Windows PowerShell is optional, although it saves you some manual upgrade steps.

For more information about the Windows PowerShell, see:

technet.microsoft.com/en-us/scriptcenter/dd742419.aspx

There you can find links to the online help, online documentation, scripting repository, downloads, and blogs.

If you want to use the PowerShell feature, note the following:

● Windows Server 2012 R2

Windows Server 2012 R2 contains PowerShell 4.0.

● Windows Server 2012

Windows Server 2012 contains PowerShell 3.0.

You can update to PowerShell 4.0 (search the internet for Windows Management Framework 4.0).

● Windows Server 2008 R2

Windows Server 2008 R2 contains PowerShell 2.0.

For more information about PowerShell 2.0, see support.microsoft.com/kb/968929.

You can update to PowerShell 3.0 or 4.0 (search the internet for Windows Management Framework 3.0 or Windows Management Framework 4.0).

● Windows Server 2008

Windows Server 2008 contains PowerShell 1.0, which is sufficient for the scripts delivered with the Oracle Upgrade.

You have to activate the PowerShell feature with Start Administrative Tools Server ManagerFeatures .

On Windows Server 2008, you can update to PowerShell 3.0 (search the internet for Windows Management Framework 3.0).

How to Start PowerShell

CautionMake sure that you start the PowerShell in administrator mode.

● Windows Server 2012 (R2)

Open the command prompt and enter the command:

powershell.exe

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsAppendix

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 47

Page 48: Ora db upgr_win_121__00

To start PowerShell on Windows Server 2008 (R2), you have the following options:

● From the command prompt, by entering the command:

powershell.exe● From the Start Menu:

○ PowerShell 1.0:

Choose Start All Programs Windows PowerShell 1.0 Windows PowerShell .

○ PowerShell 2.0:

Choose Start All Programs Windows PowerShell Windows PowerShell .

How to Work with PowerShell

Most commands that are used in cmd.exe are also available in the PowerShell (defined as aliases).

You can use well-known commands, such as cd, type, copy, move, mkdir, delete, rmdir. There is also online help available, which you can access by typing the command: help (or help <command>).

This is a list of differences between PowerShell and cmd.exe:

● Before you can run PowerShells scripts (text files with the file extension .ps1 that contain PowerShell statements), you might have to change the default security setting to allow the execution of non-signed scripts as follows:

set-executionpolicy ("unrestricted")● By default, when double-clicking PowerShell scripts (.PS1 files) in the Windows explorer, this does not

execute the script as is the default for .cmd files, but opens the script in an editor. If you want to activate automatic script execution after a double-click, you have to change the value HKEY_CLASSES_ROOT\Microsoft.Powershellscript.1\Shell\Open\Command from notepad.exe to the full path of the PowerShell executable.

● The output of PIPE commands is not just a stream of characters (strings) but a stream of objects. You can easily access the properties and methods for these objects (see the process list DLL example below).

● The current working directory is not part of the directory search path that the PowerShell looks at for scripts and programs. The PowerShell only searches directories listed in the environment variable path. Therefore, you might have to run a local program with ./sapcontrol.exe or specify its full path.

● You can use the UNIX-like directory delimiters, such as cd /usr/sap/C11.

● You can have your current working directory in a UNC path (cd \\sapglobalhost\sapmnt).

● The shell distinguishes between environment variables and shell variables:

○ Use of shell variables:

Definition: $x="hello"Reference: write-host $x

○ Use of an environment variable:

Definition: $env:x="hello"Reference: write-host $env:x

● The PowerShell has an interesting container concept called ps-drives. Within ps-drives you can navigate in other objects, such as the registry or shell internal lists in the same way as you typically navigate in a file system (cd, dir, del, and so on).

dir env: to get a list of environment variables

dir variable: to get the list of shell variables

48

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved.

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsAppendix

Page 49: Ora db upgr_win_121__00

dir HKLM: to get a list of registry keys in HKEY_LOCAL_MACHINE

get-psdrive to get a list of available ps-drives

● Windows PowerShell has full access to the .NET runtime. You can directly access missing functions in the PowerShell via .NET.

● With Windows PowerShell, you can create GUI-class user interfaces using Windows forms.

PowerShell Commands

The following table lists some PowerShell commands that are available on Windows Server 2012 (R2):

Table 10

Command Explanation

stop-service sap* Stops all Windows services with service name starting with “SAP”

stop-service oracle* Stops all Windows services with service name starting with “Oracle”

get-process Lists currently started processes on your system

get-process | sort starttime | select -last 1

Lists the last started process on your computer

get-process | sort starttime | select -last 1 | format-list -proper *

Lists all properties of the last started process

get-process | sort starttime | select -last 1 | get-member

Lists all process class members (properties and methods) of the last started process

get-process | %{$_.name;"-----------";$_.modules}

Lists all processes, and the executables and DLLs the processes loaded

$processes = (get-process | sort starttime)

Defines a shell variable $processes, which contains an

array of process objects

$processes.length The number of processes in the array (is equivalent to the number of processes on your computer)

$processes[$processes.length-1].kill() Invokes the kill method (terminate process) of the last started process

(dir a.txt).set_attributes("readonly") Sets the file a.txt to “read-only”

Upgrade to Oracle Database 12c Release 1 (12.1.0.2): WindowsAppendix

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.

All rights reserved. 49

Page 50: Ora db upgr_win_121__00

50

CUSTOMER© Copyright 2015 SAP SE or an SAP affiliate company.All rights reserved. Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows

Page 51: Ora db upgr_win_121__00

www.sap.com

© Copyright 2015 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE's or its affiliated companies' strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.