upgrade to oracle database 19c windows

44
PUBLIC Document Version: 1.0 – 2020-03-02 Upgrade to Oracle Database 19c Windows © 2020 SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN

Upload: others

Post on 05-Dec-2021

45 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Upgrade to Oracle Database 19c Windows

PUBLICDocument Version: 1.0 – 2020-03-02

Upgrade to Oracle Database 19c Windows

© 2

020

SAP

SE o

r an

SAP affi

liate

com

pany

. All r

ight

s re

serv

ed.

THE BEST RUN

Page 2: Upgrade to Oracle Database 19c Windows

Content

1 Document History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1 SAP Notes for the Oracle Database Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 More Support Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Planning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.1 Identifying the Supported Upgrade Path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Checking the Original Version of Your Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 Checking Hardware and Software Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 Using Multiple Oracle Homes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93.5 SAP Specific Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Preparation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.1 Creating an Oracle Installation User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.2 Configuring Secure Storage in File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134.3 Downloading the Software for the Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.4 MSCS Only: Removing the Database from the Cluster Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.5 Installation of the Oracle Database Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Installing the New Oracle Database Server Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Installing Required Patches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.6 MSCS Only: Installing OFS 4.2.1 or Higher. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17MSCS Only: Installing the Latest Oracle Fail Safe Patch Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Oracle Database Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6 Post-Upgrade Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226.1 Changing Environment Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226.2 Performing SAP Bundle Patch Post-Installation Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.3 Performing Post-Upgrade Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236.4 MSCS Only: Setting Up a Shared Database Directory in Oracle Home for OFS 4.2.1. . . . . . . . . . . . . . 246.5 MSCS Only: Changing the Registry Value of Oracle Autostart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.6 Checking the Startup Type of the Oracle Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.7 MSCS Only: Adding the Database to the Cluster Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266.8 Checking and Updating the Database Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.9 Updating the Oracle Instant Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.10 Updating BR*Tools Executables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.11 Updating Database Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30

2 PUBLICUpgrade to Oracle Database 19c Windows

Content

Page 3: Upgrade to Oracle Database 19c Windows

6.12 Backing Up the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.13 Updating the SAP Executables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.14 Uninstalling the Old Oracle Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

7 Common Administration Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337.1 Starting and Stopping the Database in an MSCS Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . 337.2 Starting and Stopping Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347.3 Moving Groups or Services and Applications for MSCS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367.4 Starting and Stopping the SAP System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

A Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39A.1 Using PowerShell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Upgrade to Oracle Database 19c WindowsContent PUBLIC 3

Page 4: Upgrade to Oracle Database 19c Windows

1 Document History

NoteBefore you start the implementation, make sure you have the latest version of this document, which is available at https://help.sap.com/viewer/ora_upgr_win_19c.

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

Version Date Description

2.0 2020-03-02 Updated Version OFS for 19c

1.0 2019-12-19 Initial Version for 19c

4 PUBLICUpgrade to Oracle Database 19c Windows

Document History

Page 5: Upgrade to Oracle Database 19c Windows

2 Introduction

This documentation explains how to upgrade the Oracle database for the SAP system on the Windows operating system to Oracle Database 19c.

The upgrade path depends on your current Oracle database version:

● If you are currently running 11.2.0.4,12.1.0.2, or 12.2.0.1, you can upgrade directly to 19c.● If you are running an Oracle database release 11.2.0.3 or earlier, a direct upgrade to 19c is not supported.

Oracle supports the manual database upgrade and the upgrade with the Database Upgrade Assistant (DBUA). In this document only, the recommended upgrade procedure with DBUA is described.

CautionSAP products running with SAP BASIS 7.00 and above, and SAP kernel release 7.21 EXT and above, are certified for Oracle Database 19c.

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 8].

● 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 http://support.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.

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

Upgrade to Oracle Database 19c WindowsIntroduction PUBLIC 5

Page 6: Upgrade to Oracle Database 19c Windows

Terminology and Naming Conventions

● We use <DBSID> for the database name and <SAPSID> for the SAP system name.● 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”.

● <New_Oracle_Home> refers to the new Oracle home path of the new database release.● <Old_Oracle_Home> refers to the old Oracle home path before the upgrade.

2.1 SAP Notes for the Oracle Database Upgrade

Make sure that you read the following SAP Notes:

Number Title

2817074 Oracle Database 19c: Integration in SAP environment

2799920 Patches for 19c: Database

2800001 Upgrading to Oracle Database 19c

279900 Central Technical Note for Oracle Database 19c

2660018 Oracle Database 19c Installation on Windows

2599248 Oracle 19c: No unzip utility delivered in $ORACLE_HOME/bin

2540847 SAP Guides for Oracle Database Upgrade

2470718 Oracle Database Parameters (12.2)

2087004 BR*Tools support for Oracle 12c

1598594 BR*Tools Configuration for Oracle installation using user "oracle"

998004 Update the Oracle Instant Client on Windows

839182 Oracle patch installation with OPatch

6 PUBLICUpgrade to Oracle Database 19c Windows

Introduction

Page 7: Upgrade to Oracle Database 19c Windows

2.2 More Support Information

You can find more information as follows:

Description Internet Address

Oracle database software, including patches

- at SAP Support Portal

https://launchpad.support.sap.com/#/softwarecenter/databaseOracle

SAP Notes

- at SAP Support Portal

http://support.sap.com/notes

Resources for SAP systems on the Oracle database

- at SAP on Oracle Community

https://www.sap.com/community/topic/oracle.html

SAP Software Distribution Center

- at SAP Support Portal

http://support.sap.com/swdc

SAP Database Administration for Oracle Databases

- at SAP on Oracle Community

https://www.sap.com/community/topic/oracle.html Oracle

DBA Overview Getting Started SAP Database Guide: Oracle

Upgrade to Oracle Database 19c WindowsIntroduction PUBLIC 7

Page 8: Upgrade to Oracle Database 19c Windows

3 Planning

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

1. You identify the supported upgrade path [page 8].2. You check the original version of your database [page 8].3. You check the hardware and software requirements [page 9].4. You decide whether you want to use multiple Oracle homes [page 9].5. You use the Oracle upgrade checklist for production use [page 10].

3.1 Identifying the Supported Upgrade Path

To upgrade directly to Oracle Database 19c, your source release must be Oracle Database 11g Release 2 (11.2.0.4), Oracle Database 12c Release 1 (12.1.0.2) or Oracle Database 18c Release 2 (12.2.0.1).

If you are running another Oracle database release, a direct upgrade to 19c is not supported.

For more information, see SAP Note 2800001 .

3.2 Checking the Original Version of Your Database

Use

You can check the original version of the database you want to upgrade and, if necessary, obtain more information.

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;

8 PUBLICUpgrade to Oracle Database 19c Windows

Planning

Page 9: Upgrade to Oracle Database 19c Windows

3.3 Checking Hardware and Software Requirements

Use

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.

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 19c for your platform, available athttps://docs.oracle.com/en/database/oracle/oracle-database/19/install-and-upgrade.html .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 19c. 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 at:https://docs.oracle.com/en/database/oracle/oracle-database/19/install-and-upgrade.html

3.4 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.

Upgrade to Oracle Database 19c WindowsPlanning PUBLIC 9

Page 10: Upgrade to Oracle Database 19c Windows

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 19c is being performed. The new Oracle software

must be installed in a new Oracle Home directory.

3.5 SAP Specific Prerequisites

Use

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

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 21].

1. Install the Oracle database software of the new release, including the recommended patches.For more information, see Installation of the Oracle Database Software [page 14].

2. Install the version of the Oracle instant client that is currently recommended for Oracle 19c, which you can find in SAP Note 819829 .For more information, see Updating the Oracle Instant Client [page 27]. If you update the Oracle instant client, make sure that you also update the SAP kernel, as described below.

3. Update BR*Tools to the version recommended for Oracle Database 19c, which is BR*Tools 7.40.For more information, see Updating BR*Tools [page 27].When upgrading from Oracle 11g to 19c, you can perform this step before starting the actual database upgrade.

4. Make sure that you have installed the appropriate SAP kernel 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 Database 19c. For AS Java or AS ABAP+Java, see also SAP Note 2632000For more information, check the SAP requirements for your application or product in the Product Availability Matrix (PAM) at http://support.sap.com/pam .SAP products running with SAP BASIS 7.00 and above, and SAP kernel release 7.21 EXT and above, are certified for Oracle Database 19c.SAP products running on Oracle Database 19c must use Oracle clients of version 12.1.0.2 V3 or higher, 12.2.0.1 or 19c.

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 13].

10 PUBLICUpgrade to Oracle Database 19c Windows

Planning

Page 11: Upgrade to Oracle Database 19c Windows

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

Upgrade to Oracle Database 19c WindowsPlanning PUBLIC 11

Page 12: Upgrade to Oracle Database 19c Windows

4 Preparation

You must complete the following preparations:

1. You create an Oracle installation user [page 12].2. You configure Secure Storage in File System (SSFS) [page 13].3. You download the software required for the upgrade [page 13].4. You must complete the following preparations for a high-availability system with Microsoft Failover

Clustering:

4.1 Creating an Oracle Installation User

Use

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.

If you have already created such a user, you can skip this step.

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 <Password> /fullname:"Oracle Installation User" /comment:"Administrator for Oracle Software Installation and Patching"

net localgroup administrators Oracle /add

12 PUBLICUpgrade to Oracle Database 19c Windows

Preparation

Page 13: Upgrade to Oracle Database 19c Windows

4.2 Configuring Secure Storage in File System

Use

For an ABAP or dual-stack (ABAP+Java) system running on Oracle 19c, you must configure Secure Storage in File System (SSFS), otherwise the SAP system cannot start. If you are currently running Oracle version 11g, you can configure SSFS in advance to avoid extra effort during or after 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 19c, you require a higher minimum SAP kernel, as described in Upgrade Checklist for Production Use [page 10].

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.

4.3 Downloading the Software for the Upgrade

Use

You need to download various software packages to perform the upgrade.

Procedure

1. Download the new Oracle Database software including server software, client software and required patches from:https://launchpad.support.sap.com/#/softwarecenter/database Database and Database PatchesOracle .

2. Download the latest version of the DBATOOLS (BR*Tools) at:http://support.sap.com/swdcBR*Tools supports Oracle Database Release 19c, as of release 7.40 (Patch Level 35 or higher).

Upgrade to Oracle Database 19c WindowsPreparation PUBLIC 13

Page 14: Upgrade to Oracle Database 19c Windows

For more information, see SAP Note 2763733 .

4.4 MSCS Only: Removing the Database from the Cluster Group

Use

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 the generic patch containing the Powershell scripts is installed as described in SAP Note 1976879 .

● Perform the steps on the first cluster node only. The database must be located on the first cluster node.● Check SAP Note 2147828 Oracle Fail Safe 4.1.0.x: Missing group after removing Oracle database from

Oracle cluster group.

Procedure

Run the Windows Powershell script RemoveOracleDbFromOracleClusterGroup.ps1 (installed with the Oracle generic patch) as follows:

1. Stop all application servers connecting to the database.2. Make a backup of <ORACLE_HOME>\network\admin3. Log on as administrator.4. Open Powershell in elevated mode5. Change to directory <ORACLE_HOME>\sap\ora-mscs6. .\RemoveOracleDbFromOracleClusterGroup.ps1

4.5 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.

14 PUBLICUpgrade to Oracle Database 19c Windows

Preparation

Page 15: Upgrade to Oracle Database 19c Windows

4.5.1 Installing the New Oracle Database Server Software

Proceed as described in this section to install the new Oracle database software.

Prerequisites

● Starting with Oracle Database 19c, the Oracle Database software is available as an image file (zip file). In order to extract the Oracle home image file with the built-in Windows Powershell capability, you must have Powershell 5.0 or higher installed on your system.If you do not meet this requirement to extract the Oracle home image file (for example: winzip, winrar, unzip, ...), you receive the warning WARNING: Powershell version is too old. In this case you should upgrade your Windows Powershell to a higher version.If you cannot upgrade Powershell, you can manually extract the Oracle home image file as described in SAP Note 2660018 .

Context

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

For information about the installation of Oracle Database 19c software on Windows, see SAP Note 2660018 .

Procedure

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

Oracle Database 12c and higher supports the use of an Oracle home user, 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.

2. On the database server, make the Oracle RDBMS Software medium available, and change to the directory:<media>\WINDOWS_X86_64\db_home\SAP\

3. Installing a new Oracle home start the Oracle Universal Installer (OUI) with the PowerShell script.

To install the new Oracle home in one step (extract and register), run the following command in a powershell window in elevated mode (right click on Powershell symbol and select 'Run as Administrator'): .\sapserver.ps1 [options]. This command will extract the Oracle home image file into the new Oracle home and then register the new Oracle home.

For more information, see SAP Note 2800001 .

Upgrade to Oracle Database 19c WindowsPreparation PUBLIC 15

Page 16: Upgrade to Oracle Database 19c Windows

4. For MSCS, perform these steps on all cluster nodes.

a. Log on as domain administrator.b. 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

5. After the installation of the Oracle database software you must install the current Bundle Patch. The bundle patch contains important functional fixes and security fixes. For more information which patches are available, see SAP Note 2799900 .

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

4.5.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. For more information, see SAP Note 2799920.

Prerequisites

1. Changing the Oracle Home○ With OPatch, you install the Bundle Patch into the Oracle Home. This updates the Oracle home

software to the new Bundle Patch○ You must perform this step before (!) you create or upgrade the database.

2. Changing the Database○ The database must be adapted to the new Bundle Patch by performing certain post-installation tasks

and by adapting database parameters.○ The step must be done after the database has been upgraded. For detailed instructions see SBP

README file.

You must install a Bundle Patch in your Oracle database to ensure that the database is working properly. From a security and functional perspective, you should always install the latest Bundle Patch (best practice) which contains the most current security fixes for the Oracle database and functional patches for an SAP Oracle database. Generic Oracle database patches must be installed in addition to the Bundle patch.

Procedure

1. Download the required patches.

16 PUBLICUpgrade to Oracle Database 19c Windows

Preparation

Page 17: Upgrade to Oracle Database 19c Windows

2. Log on the Oracle installation user.3. To install the bundle patch with OPatch follow the instructions of the Bundle Patch README.

4. To install the generic patch(es) with OPatch follow the instructions in SAP Note 2799900 .5. Note: You do not need to stop any Oracle services, databases or listeners. The patches are installed in

<New_Oracle_Home> from which no database instance is currently running.

4.6 MSCS Only: Installing OFS 4.2.1 or Higher

Use

Oracle Database 19c requires Oracle Fail Safe 4.2.1 or higher.

If the MSCS configuration is still running with Oracle Fail Safe Software (OFS) version lower than 4.2.1, you must upgrade to a newer version.

To do this, you first must deinstall the old Oracle Fail Safe software on all cluster nodes and then install the new Oracle Fail Safe software version on a local disk on all nodes.

CautionMake sure that you install the new Oracle Fail Safe 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 34].

Procedure

Deinstalling the Old Oracle Fail Safe Software Lower than Version 4.2.1

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:○ With the Start menu on your system or from the Oracle RDBMS Media:

<Media_Drive>:\<OFS>\SAP\sapofs.ps1

Upgrade to Oracle Database 19c WindowsPreparation PUBLIC 17

Page 18: Upgrade to Oracle Database 19c Windows

2. On the Welcome screen, choose Installed Products.3. In the Inventory window, expand <Fail_Safe_Home> and select the Oracle Fail Safe

<Version_That_You_Want_To_Deinstall>.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 New 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 Media with:

<Media_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.

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 ex­ample, OFS421

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\OFS421

Reboot Needed After Installation Choose Next.

Summary View the information and choose Install.

Install Wait while the software is installed.

18 PUBLICUpgrade to Oracle Database 19c Windows

Preparation

Page 19: Upgrade to Oracle Database 19c Windows

Screen Entry

Configuration Tools In the dialog box Oracle Fail Safe Account/Password, enter the account and pass­word 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 fol­lows:

○ Windows Server 2012 (R2) and higher: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 com­mand:<ORACLE_OFS_Home>\FailSafe\Server\Oracle.FailSafe.ServerConfig.exe SetCredentials

On all cluster nodes

End of Installation Click Exit to leave the installer.

To initialize OFS start the newly installed OFS on all nodes.

1. Install the latest OFS Patch which is normally available on the Oracle medium. For more information, see MSCS Only: Installing the Latest Oracle Fail Safe Patch Set [page 19].

2. If OFS and the OFS Patch has been installed on all cluster nodes start Oracle Fail Safe Manager, click on the cluster name and validate the cluster.

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

Note

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

Upgrade to Oracle Database 19c WindowsPreparation PUBLIC 19

Page 20: Upgrade to Oracle Database 19c Windows

Procedure

You must perform the following procedure on all cluster nodes:

Do one of the following:

• If the OFS patch set is available on the Oracle medium, open a powershell Window in elevated mode and enter the following command:

<Media_Drive>:\<OFS_Path Set>\SAP\sapofs.ps1

Install the Patch Set using the same Oracle Home Name as you used during the Oracle Fail Safe Software installation.

• Otherwise, download the OFS patch set from https://support.sap.com/software/databases.html OracleDatabase PatchesORACLE PATCHESORACLE PATCHES MISCELLANEOUS and install it as described in SAP Note 1865953 .

20 PUBLICUpgrade to Oracle Database 19c Windows

Preparation

Page 21: Upgrade to Oracle Database 19c Windows

5 Oracle Database Upgrade

For the Oracle database upgrade, see the Upgrading to Oracle Database 19c SAP Note 2800001 .

Upgrade to Oracle Database 19c WindowsOracle Database Upgrade PUBLIC 21

Page 22: Upgrade to Oracle Database 19c Windows

6 Post-Upgrade Steps

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

1. You set the user environment variables [page 22].2. You perform the post-installation steps for the SAP bundle patch [page 23].3. MSCS only: You set up a shared database directory in the Oracle home [page 24].4. You change the registry value of Oracle Autostart [page 25].5. You check the startup type of the Oracle services [page 25].6. You perform post-upgrade tasks [page 30].7. You check the database parameters [page 27].8. MSCS only: You add the database to the cluster group [page 26].9. You update the Oracle Instant Client [page 27].10. You update BR*Tools executables [page 27].11. You Updating Database Statistics [page 30].12. You back up the database [page 30].13. If required and not yet done, update the SAP executables [page 31].14. If not yet done, configure the Secure Storage in the File System (SSFS) [page 13].15. You can now start the SAP system.16. You follow the instructions in SAP Note 2157904 . Otherwise you might run into Oracle error ORA-39726

(Unsupported add / drop column operation on compressed tables) when adding additional fields to a table. This might occur when you import Support Packages or when you manually add fields in transaction SE11.

17. You uninstall the old Oracle software [page 31].18. You make sure that you have installed the required support packages for the SAP kernel supported for

Oracle 19c. For AS Java or AS ABAP+Java, see also SAP Note 2632000 .

6.1 Changing Environment Variables

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 12.1.0.2, 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.

2. 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.

22 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 23: Upgrade to Oracle Database 19c Windows

3. 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.

4. 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>.

5. Log off and log on again to activate the environment changes in your user session.6. Restart Listener, listener Service and the database.

6.2 Performing SAP Bundle Patch Post-Installation Steps

Use

You have installed an SAP bundle patch (SBP) before you upgraded to the new Oracle Release. Now you need to run the SBP post-installation steps.

Procedure

1. Run the SBP post-installation instructions as described in the README of the SBP that is installed in the new Oracle home.

6.3 Performing Post-Upgrade Checks

Use

You run the SAP-specific database post-upgrade check scripts.

NoteYou always execute these post-upgrade scripts as Oracle database administrator <ora_dba>. We recommend that you use <sapsid>adm since for these users the Oracle environment is already set. If you use Oracle software owner oracle for this task, you must first set the environment, as described in SAP Note 2800001 .

Upgrade to Oracle Database 19c WindowsPost-Upgrade Steps PUBLIC 23

Page 24: Upgrade to Oracle Database 19c Windows

Procedure

1. Run the Post-Upgrade Status Tool, the post-upgrade scripts and to check the compatible parameter. For more information, see SAP Database Upgrade Steps (3) in SAP Note 2800001 .

6.4 MSCS Only: Setting Up a Shared Database Directory in Oracle Home for OFS 4.2.1

Use

The following describes how to set up a shared Oracle home\database-directory:

Procedure

1. Stop the Oracle database using sqlplus.2. Stop the Oracle Service OracleService<DBSID> and the listener service Oracle<Oracle

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

3. In the sapdata1 directory on the shared disk, rename the existing database directory to database.<Release> e.g. database.12102

4. In the sapdata1 directory on the shared disk in the cluster, create the directory database:<Shared_Disk>:\oracle\<DBSID>\sapdata1\database

5. On the first cluster node, change to the local <Oracle_Home>\database directory, and enter the following command in the command prompt:move * <Shared_Disk>:\oracle\<DBSID>\sapdata1\database

6. In the local <Oracle_Home>\database directory create a new file init<DBSID>.ora and insert the following line:spfile = <Shared_Disk:>\oracle\<DBSID>\sapdata1\database\SPFILE<DBSID>.oraRepeat this step on all additional cluster nodes.

7. In the shared database directory, create file init<DBSID>_OFS.ora and insert the following line:spfile = <Shared_Disk>:\oracle\<DBSID>\sapdata1\database\SPFILE<DBSID>.ora

8. For the <Shared_Disk>:\oracle\<DBSID>\sapdata1\database directory, add the domain Oracle Home user to the security settings.

9. Compare the new created listener.ora in %ORACLE_HOME%\network\admin with the listener<timestamp>.ora or the saved listener.ora to add the SID_LIST entry for SID_LIST_Fsl<Hostname>

10. Delete older versions init<DBSID>.<n>.ora and hc_<DBSID>.dat in the <Shared_Disk>:\oracle\<DBSID>\sapdata1\database directory.

24 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 25: Upgrade to Oracle Database 19c Windows

6.5 MSCS Only: Changing the Registry Value of Oracle Autostart

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:\Software\Oracle\KEY_OraDB19Home1.

6.6 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 34]

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 34].

Upgrade to Oracle Database 19c WindowsPost-Upgrade Steps PUBLIC 25

Page 26: Upgrade to Oracle Database 19c Windows

6.7 MSCS Only: Adding the Database to the Cluster Group

Use

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.

Check and adapt the Oracle Failsafe account that you entered during the OFS Installation. The account must be a member of the local adminstrators and the ora_<dbsid>_dba or ora_dba group on both cluster notes.

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. 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.5. Save the <Oracle_Home>\network\admin directory on all cluster nodes.6. On the first cluster node, edit the <Oracle_Home>\network\admin\listener.ora file and exchange

the DBHostname with the name of the first cluster node for the non failsafe listener.7. In the <Old Oracle Home>\network\admin directory rename the existing listener.ora file to

another name <Release>listener.ora e.g. 12102listener.ora8. Open a Powershell window in elevated mode and change to the directory <Oracle_Home>\sap

\ora_mscs.run . .\AddOracleDbToOracleClusterGroup.ps1Enter the <DBSID> of your Oracle database.Enter the path and file name of your Oracle parameter file on the shared cluster disk:<Shared_Disk>:\oracle\<DBSID>\SAPDATA1\DATABASE\INIT<DBSID>_OFS.ORA

9. Copy tnsnames.ora from %ORACLE_HOME%\network\admin to <sapglobalhost>\sapmnt\SAPSID\SYS\profile\oracle.

10. Check the services for the listeners. Stop the service for the listener if it is still running. Only the Fail Safe Listener should run.

11. Configure the local_listener with the following SQL commands, referring to SAP Note 1915325 as required:In init<DBSID>_OFS.ora check the value of the local_listener entry.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;

26 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 27: Upgrade to Oracle Database 19c Windows

○ Delete the local_listener entry from init<DBSID>_OFS.ora:local_listener=’(ADDRESS=(PROTOCOL=TCP)(HOST=<IP_Address>)(PORT=<Port_Number>))’Restart the database.

6.8 Checking and Updating the Database Parameters

After the database upgrade, you need to check and set the database parameters, as described in SAP Note 2470718 . You might need to change the settings of existing parameters, delete parameters, or add new parameters. Check SAP Note 1171650 to see whether an automated script for Oracle 19c is already available. This helps you check whether your SAP system complies with the database parameter recommendations at any given point in time.

6.9 Updating the Oracle Instant Client

Use

After the upgrade to the new release, we strongly recommend to install the recommended Oracle instant client software.

For more information, see the Product Availability Matrix (PAM) at http://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 different Oracle client versions 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.

6.10 Updating BR*Tools Executables

Use

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

Upgrade to Oracle Database 19c WindowsPost-Upgrade Steps PUBLIC 27

Page 28: Upgrade to Oracle Database 19c Windows

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

Prerequisites

As of Oracle Database 12c Release 1, the configuration of BR*Tools has changed in comparison to earlier Oracle versions. The BR*Tools profile is now located in the %SAPDATA_HOME%\sapprof directory.

For more information, see SAP Notes 2763733 and 2799900 .

You should therefore configure the BR*Tools according to the new BR*Tools configuration default.

The new sapprof directory in %SAPDATA_HOME% contains the following files:

• init<DBSID>.sap: BR*Tools profile

• init<DBSID>.utl: backup utility parameter file (backint profile, if it exists)

• init<DBSID>.ora: transparent copy of Oracle database profile

Procedure

1. Download the most current version of BR*Tools from http://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> ORACLEDBATLxxxx.SAR , following the descriptions in SAP Notes 2087004 and 12741 and adapt the permissions as described in SAP Note 1598594 .

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. CautionAfter 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.

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.

28 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 29: Upgrade to Oracle Database 19c Windows

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>exit

4. Execute the following SQL commands for all existing SAP schemas in the database:○ AS ABAP:

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

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>DB4. Create the sapprof directory in %SAPDATA_HOME%:

C:\ mkdir %SAPDATA_HOME%\sapprof5. Copy the files init<DBSID>.sap and if it exists init<DBSID>.utl(from <OLD_ORACLE_HOME>), and

init<DBSID>.ora (from <NEW_ORACLE_HOME>) to the sapprof directory.6. Replace the file init<DBSID>.ora in the %ORACLE_HOME%\database directory with a profile that

contains only the spfile parameter.

Examplespfile = %ORACLE_HOME%\database\spfile<DBSID>.ora

7. Delete the files init<DBSID>.sap and init<DBSID>.utl (if they exist) from directory %ORACLE_HOME%\database.

8. Update the parameters util_par_file / util_par_file_arch in init<DBSID>.sap, if necessary (that is, if they refer to path %ORACLE_HOME%\database).

ExampleReplace %ORACLE_HOME%\database\init<DBSID>.utl with

util_par_file = %SAPDATA_HOME%\sapprof\init<DBSID>.utl.

For non-ASM installations, the spfile spfile<DBSID>.ora remains in the directory %ORACLE_HOME%\database by default whereas in ASM installations, it is located on an ASM disk.

CautionIf %ORACLE_HOME%\database already contains an init<DBSID>.ora that contains only the parameter spfile, create an empty init<DBSID>.ora in the sapprof directory with the relevant authorizations. This file is automatically updated by an upcoming operation with an SAP BR*Tools program.

Upgrade to Oracle Database 19c WindowsPost-Upgrade Steps PUBLIC 29

Page 30: Upgrade to Oracle Database 19c Windows

6.11 Updating Database Statistics

Use

You need to perform this task 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. 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:http://scn.sap.com/community/oracle SAP ON ORACLE KNOWLEDGE CENTER SAP Documentation

NoteYou can perform this step later if required.

6.12 Backing Up the Database

Use

After the upgrade, you need to back up your Oracle database.

We also recommend that you perform a full operating system backup.

30 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 31: Upgrade to Oracle Database 19c Windows

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

6.13 Updating the SAP Executables

Use

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

Procedure

For supported SAP kernels 7.21 EXT, 722_EXT, 749 and 753 see the procedure in SAP Note 2083594 .

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

6.14 Uninstalling the Old Oracle Software

Use

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

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

Upgrade to Oracle Database 19c WindowsPost-Upgrade Steps PUBLIC 31

Page 32: Upgrade to Oracle Database 19c Windows

For more information, see SAP Note 1591580 .● To uninstall Oracle 12.1 software, use the deinstallation tool. For more information see SAP Note 1915314

.

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\<DBSID>\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. To check, run the command: <Old_Oracle_Home>\deinstall\deinstall.bat -checkonly.

To deinstall, run the command: <Old_Oracle_Home>\deinstall\deinstall.bat

32 PUBLICUpgrade to Oracle Database 19c Windows

Post-Upgrade Steps

Page 33: Upgrade to Oracle Database 19c Windows

7 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 33]● Starting and stopping services [page 34]● Moving groups for MSCS [page 36]● Starting and stopping the SAP system [page 37]

7.1 Starting and Stopping the Database in an MSCS Configuration

Use

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

You have the following options

● You use sqlplusYou 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 shutdown6. In the Oracle Fail Safe Manager, take the cluster resource <DBSID>.world online.

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

Upgrade to Oracle Database 19c WindowsCommon Administration Tasks PUBLIC 33

Page 34: Upgrade to Oracle Database 19c Windows

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 database1. In the Oracle Fail Safe Manager, right-click the database <DBSID>.world in the cluster group

ORACLE<DBSID>.2. Choose Place online.

● Stopping the database1. 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.

7.2 Starting and Stopping Services

Use

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 the service you want to start or stop.

34 PUBLICUpgrade to Oracle Database 19c Windows

Common Administration Tasks

Page 35: Upgrade to Oracle Database 19c Windows

2. 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))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 ManagerYou 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.

Service Resource

SAP<SAPSID>_<Instance_Number> 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.

Upgrade to Oracle Database 19c WindowsCommon Administration Tasks PUBLIC 35

Page 36: Upgrade to Oracle Database 19c Windows

7.3 Moving Groups or Services and Applications for MSCS

Use

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.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

36 PUBLICUpgrade to Oracle Database 19c Windows

Common Administration Tasks

Page 37: Upgrade to Oracle Database 19c Windows

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.

7.4 Starting and Stopping the SAP System

Use

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

● Standard Configuration● Microsoft Cluster Service (MSCS) Configuration

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.

Upgrade to Oracle Database 19c WindowsCommon Administration Tasks PUBLIC 37

Page 38: Upgrade to Oracle Database 19c Windows

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:

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 in­stances such as the (A)SCS instance. For all other non-clustered instan­ces, such as dialog instances or the central instance, you must use the SAP MMC (see above).

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_Number> Instance and choose Bring this resource online or Take this resource offline.

38 PUBLICUpgrade to Oracle Database 19c Windows

Common Administration Tasks

Page 39: Upgrade to Oracle Database 19c Windows

A Appendix

A.1 Using PowerShell

SAP uses Windows PowerShell to run and describe Windows commands.

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

For Windows Server 2012 (R2) and higher, 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:

http://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 2016Windows Server 2016 contains PowerShell 5.0You can update to PowerShell 5.0 (search the internet for Windows Management Framework 5.0).

● Windows Server 2012 R2Windows Server 2012 R2 contains PowerShell 4.0.

● Windows Server 2012Windows 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 R2Windows Server 2008 R2 contains PowerShell 2.0.For more information about PowerShell 2.0, see http://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 2008Windows 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).

Upgrade to Oracle Database 19c WindowsAppendix PUBLIC 39

Page 40: Upgrade to Oracle Database 19c Windows

How to Start PowerShell

CautionMake sure that you start the PowerShell in administrator mode.

● Windows Server 2012 (R2) and higherOpen the command prompt and enter the command:powershell.exe

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"

40 PUBLICUpgrade to Oracle Database 19c Windows

Appendix

Page 41: Upgrade to Oracle Database 19c Windows

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 variablesdir variable: to get the list of shell variablesdir HKLM: to get a list of registry keys in HKEY_LOCAL_MACHINEget-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) and higher:

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 proc­esses loaded

$processes = (get-process | sort starttime)

Defines a shell variable $processes, which contains an ar­ray of process objects

Upgrade to Oracle Database 19c WindowsAppendix PUBLIC 41

Page 42: Upgrade to Oracle Database 19c Windows

Command Explanation

$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”

42 PUBLICUpgrade to Oracle Database 19c Windows

Appendix

Page 43: Upgrade to Oracle Database 19c Windows

Important Disclaimers and Legal Information

HyperlinksSome links are classified by an icon and/or a mouseover text. These links provide additional information.About the icons:

● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your agreements with SAP) to this:

● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any

damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.

● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this information.

Videos Hosted on External PlatformsSome videos may point to third-party video hosting platforms. SAP cannot guarantee the future availability of videos stored on these platforms. Furthermore, any advertisements or other content hosted on these platforms (for example, suggested videos or by navigating to other videos hosted on the same site), are not within the control or responsibility of SAP.

Beta and Other Experimental FeaturesExperimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use the experimental features in a live operating environment or with data that has not been sufficiently backed up.The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

Example CodeAny software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of example code unless damages have been caused by SAP's gross negligence or willful misconduct.

Gender-Related LanguageWe try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.

Upgrade to Oracle Database 19c WindowsImportant Disclaimers and Legal Information PUBLIC 43

Page 44: Upgrade to Oracle Database 19c Windows

www.sap.com/contactsap

© 2020 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. The information contained herein may be changed without prior notice.

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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP 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.

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. All other product and service names mentioned are the trademarks of their respective companies.

Please see https://www.sap.com/about/legal/trademark.html for additional trademark information and notices.

THE BEST RUN