Uploaded by vp07278

Oracle upgrade 12c

advertisement
Upgrade Guide
CUSTOMER
Document Version: 1.1 – 2017-02-24
Upgrade to Oracle Database 12c Release 1 (12.1.0.2):
Windows
Content
1
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1
New Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2
SAP Notes for the Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
1.3
More Information on SAP Service Marketplace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
2
Planning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1
Checking the Original Version of Your Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2
Checking Hardware and Software Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3
Using Multiple Oracle Homes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4
Upgrade Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3
Preparation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1
Creating an Oracle Installation User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2
Downloading the Software for the Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3
Configuring Secure Storage in File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4
MSCS Only: Upgrading to OFS 4.1x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5
MSCS Only: Installing the Latest Oracle Fail Safe Patch Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6
MSCS Only: Removing Old Oracle Listeners. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7
MSCS Only: Removing the Database from the Cluster Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4
Oracle Database Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1
Installation of the Oracle Database Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Installing the Oracle 12c Server Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Installing Required Patches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Running the Pre-Upgrade Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2
Backing Up the Oracle Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3
Changing the Environment for User <sapsid>adm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4
Performing the Database Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5
Post-Upgrade Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
5.1
Changing Environment Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.2
Performing SAP Bundle Patch Post-Installation Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
5.3
Performing Post-Upgrade Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.4
MSCS Only: Setting Up a Shared Database Directory in Oracle Home. . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.5
Changing the Registry Value of Oracle Autostart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6
Checking the Startup Type of the Oracle Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
5.7
Performing Post-Upgrade Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8
MSCS Only: Adding the Database to the Cluster Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Content
5.9
Updating the Oracle Instant Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
5.10
Updating BR*Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11
Backing Up the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.12
Updating the SAP Executables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.13
Configuring the New Features for Oracle Database 12c Release 1 (12.1). . . . . . . . . . . . . . . . . . . . . . . . . 41
5.14
Uninstalling the Old Oracle Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6
Common Administration Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.1
Starting and Stopping the Database in an MSCS Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.2
Starting and Stopping Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.3
Moving Groups or Services and Applications for MSCS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.4
Starting and Stopping the SAP System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A
Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.1
Using PowerShell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Content
CUSTOMER
3
Document History
Note
Before you start the implementation, make sure you have the latest version of this document, which is available
at https://support.sap.com/sltoolset
System Provisioning .
The following table provides an overview on the most important document changes:
Table 1:
Version
Date
Description
1.1
2017-02-24
Updated version
1.0
2015-03-31
Initial version for Oracle Database 12c
4
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Document History
1
Introduction
This documentation explains how to upgrade the Oracle database for the SAP system on the Windows operating
system to Oracle Database 12c Release 1 (12.1).
If you are currently running 10.2.0.5, 11.2.0.2, 11.2.0.3, or 11.2.0.4, you can upgrade directly to 12.1.0.2, as
described in SAP Note 1915315 .
If you are running an Oracle database release earlier than 10.2.0.5 or 11.2.0.1, a direct upgrade to 12.1.0.2 is not
supported. For more information, see http://docs.oracle.com/database/121/UPGRD/preup.htm#UPGRD12358
.
For details on the support status of Oracle Database 10g Release 2, see SAP Notes 1110995
For details on the support status of Oracle Database 11g Release 2, see SAP Notes 1431799
2098258 .
and 1654734
, 1174136
.
, and
Note
This 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 .
Caution
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.
Caution
User 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 9].
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Introduction
CUSTOMER
5
● 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://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
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 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”.
● 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.
6
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Introduction
1.1
New Features
Use
For the complete list of new features of the Oracle Database 12c Release 1 (12.1), see the New Features
documentation from Oracle at http://docs.oracle.com/database/121/NEWFT/toc.htm
and SAP Note 1914631
.
You can access the complete Oracle documentation at http://docs.oracle.com
www.oracle.com/pls/db121/homepage .
or http://
More Information
Configuring the New Features for Oracle Database 12c Release 1 (12.1) [page 41]
1.2
SAP Notes for the Upgrade
Make sure that you read the following SAP Notes:
Table 2:
Number
1914631
2086029
Title
Remarks
Central Technical Note for Oracle Data­
Provides a starting point for information about Oracle 12c with
base 12c Release 1 (12.1)
multiple links to notes on Oracle 12c.
Oracle 12c: Additional Info / Corrections
Contains important late-breaking information on the upgrade
to Oracle 12c (12.1.0.2) Upgrade
1915315
Database Upgrade Scripts for 12.1.0.2
1888485
Database Parameters for 12.1.0.2
Describes the shell and SQL upgrade scripts for 12c
Provides information about Oracle initialization parameters that
need to be reset to their default values or that need to be re­
moved
1915299
1915313
Troubleshooting Software Installation for Describes software installation problems and solutions or work­
12.1.0.2
arounds
Current Patch Set for Oracle Database
Describes the current Oracle patch set
12c Release 1 (12.1)
1915316
Database: Patches for 12.1.0.2
Lists the status of Oracle patches and bundle patches for
12.1.0.2
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Introduction
CUSTOMER
7
Number
Title
Remarks
998004
Update the Oracle Instant Client on Win­
Required for upgrading Oracle client software to Oracle 12c Re­
dows
lease 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 3:
Description
Internet Address
Title
SAP Notes
http://service.sap.com/notes
None
Oracle Database Administra­ http://scn.sap.com/community/
tion
oracle
SAP Database Guide: Oracle
SAP ON ORACLE
KNOWLEDGE CENTER
SAP
Documentation
SAP Software Distribution
http://support.sap.com/swdc
None
http://service.sap.com/instguides
Upgrade to Oracle Database <Version>: Windows
Center
Oracle Database Upgrade
Guide
Database Upgrades
– that is, the guide you are
Oracle
now reading
SAP support portal for
http://support.sap.com/software/
Oracle database software,
databases.html
SAP Support Portal for Oracle Database Software
Oracle
including patches
Oracle database with SAP
http://scn.sap.com/community/
system
oracle
8
CUSTOMER
SAP on Oracle
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Introduction
2
Planning
Recommendation
Before 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 9].
2. You check the hardware and software requirements [page 10].
3. You decide whether you want to use multiple Oracle homes [page 10].
4. You use the Oracle upgrade checklist for production use [page 11].
2.1
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. 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 http://
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;
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Planning
CUSTOMER
9
2.2
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
12c for your platform, available at http://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:
http://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.
Note
MSCS 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.
10
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Planning
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
Use
You need to check the following items before starting the SAP system for production use of your upgraded
system.
Prerequisites
For release 12.1.0.2, SAP supports the user concepts SAP Classic and Oracle Standard, as described in SAP Note
1915323 . You need to decide which user concept you want to deploy.
Procedure
Recommendation
To 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 version 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 38]. 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 38].
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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Planning
CUSTOMER
11
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 http://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 14].
When upgrading from Oracle 11g to 12c, you can perform this step before starting the actual database
upgrade.
12
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Planning
3
Preparation
You have to complete the following preparations:
1. You create an Oracle installation user [page 13].
2. You download the software required for the upgrade [page 14].
3. You configure Secure Storage in File System (SSFS) [page 14].
4. You have to complete the following preparations for a high-availability system with Microsoft Failover
Clustering:
3.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.
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 .
Example
To 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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
CUSTOMER
13
3.2
Downloading the Software for the Upgrade
Use
You need to download various software packages 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:
https://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:
http://support.sap.com/swdc
BR*Tools supports the Oracle Database 12c Release 1 (12.1), as of release 7.40 (patch level 14). For more
information, see SAP Note 2087004 .
3.3
Configuring Secure Storage in File System
Use
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 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 12c, you require a higher minimum SAP kernel, as described in Upgrade Checklist for
Production Use [page 11].
Procedure
1. Follow the procedure described in SAP Notes 1639578
of SSFS in detail
14
CUSTOMER
and 1622837
, which describe the configuration
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
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
Use
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.
Caution
Make 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 45].
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:
Note
While 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 50] 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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
CUSTOMER
15
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 50] script, enter the following command:
<DVD_drive>:\<OFS version>\SAP\sapofs.ps1
The installer opens and guides you through the installation process.
Note
If 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 4:
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, 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
16
Reboot Needed After Installation
Choose Next.
Summary
View the information and choose Install.
Install
Wait while the software is installed.
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
Screen
Configuration Tools
Entry
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 fol­
lows:
○
Windows Server 2012 (R2):
To do this, press Ctrl + Esc , and then Ctrl + Tab . Choose group
- <OFS_Home_Name>
Set Credentials
Oracle
.
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
○
Windows Server 2008 (R2):
To do this, choose
Setup
End of Installation
3.5
Start
Oracle Service
All Programs
Oracle OFS for MSCS Security
on all cluster nodes.
Click Exit to leave the installer.
MSCS Only: Installing the Latest Oracle Fail Safe Patch
Set
Use
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 https://support.sap.com/software/databases.html
PatchesORACLE PATCHESORACLE PATCHES MISCELLANEOUS.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
OracleDatabase
CUSTOMER
17
2. Install the patch set as described in SAP Note 1865953
3.6
.
MSCS Only: Removing Old Oracle Listeners
Use
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 18].
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).
3.7
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 that you use the latest OFS version.
● Make sure the generic patch containing the Powershell scripts is installed as described in SAP Note 1976879
.
18
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Preparation
● 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.
● Check SAP Note 2147828
Oracle cluster group”.
“Oracle Fail Safe 4.1.0.x: Missing group after removing Oracle database from
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>.
Note
Sometimes 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): Windows
Preparation
CUSTOMER
19
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 run the pre-upgrade scripts as described in SAP Note 1915313
.
3. You back up the Oracle database [page 26].
4. You change the environment for user <sapsid>adm [page 26].
5. You upgrade the Oracle database [page 27].
Note
If 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
Use
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 48].
Caution
If you copy the files from the RDBMS medium to a local disk, do not use directory names containing blanks.
20
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
● 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.
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 50].
○ 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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
.
CUSTOMER
21
5. In the Oracle Universal Installer, enter the information as shown in the following table:
Table 5: 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.
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.
Note
As 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 en­
ter the Oracle home user <domain>\<Oracle_home_user> that you created
before starting the software installation.
For more information, see SAP Note 1915302
22
CUSTOMER
.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
Window
Task
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>
Example
Software location (that is, Oracle home): D:\oracle
\oraclehome01\OQ1\12102
Oracle base: D:\oracle\oraclehome01
○
Windows built-in account
Oracle home: <drive>:\oracle\<DBSID>\<Release>
Oracle base: <drive>:\oracle
Example
Oracle home: D:\oracle\OQ1\12102
Oracle base: D:\oracle
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.
Recommendation
We strongly recommend you to make sure that there are no failed checks be­
fore 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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
CUSTOMER
23
2. Enter the following commands:
1. Add the Oracle home user to the local groups:
net localgroup ORA_<DBSID>_DBA <Oracle_home_user> /add
net 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 /domain
net 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
Installation Products
Start
All Programs
Oracle -<home_name>
Oracle
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
.
10. Check that the PATH variable in the environment of <sapsid>adm contains <old_Oracle_home>\bin.
4.1.2 Installing Required Patches
Use
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:
http://support.sap.com/software/databases.html
Oracle
ORACLE PATCHES
ORACLE PATCHES
12.1.0.2
Prerequisites
Use an up-to-date version of OPatch to install the patches. Check SAP Note 839182
use OPatch.
for instructions on how to
Procedure
1. Log on as administrator or the Oracle installation user.
24
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
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”.
4.1.3 Running the Pre-Upgrade Scripts
Use
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.
Note
You 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_upgrade
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
CUSTOMER
25
3. Execute the following commands to perform pre-upgrade tasks, which can improve the performance of the
upgrade process:
sqlplus / as sysdba
SQL> @pre_upgrade_tasks.sql
4. Execute the following commands to check the pre-upgrade status of your database:
sqlplus / as sysdba
SQL> @pre_upgrade_checks_sap.sql
SQL> @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
Backing Up the Oracle Database
Use
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.3
Changing the Environment for User <sapsid>adm
Use
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.
26
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
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)
Example
Rename ORACLE_HOME into ORACLE_HOME_before_upgrade, and TNS_ADMIN to
TNS_ADMIN_before_upgrade.
Note
MSCS 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
Installation Products
Start
All Programs
Oracle - <Home_Name>
Oracle
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.4
Performing the Database Upgrade
Use
To upgrade the database, use the Oracle Database Upgrade Assistant (DBUA).
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
CUSTOMER
27
Note
Whenever 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
● Make a copy of the directory <old_Oracle_home>\network\admin, for example, under
<old_Oracle_home>\network\admin_before_dbua.
Procedure
1. Log on as <sapsid>adm user.
2. If you want to run DBUA in English, choose Start Control Panel
and change to English (united states) in the format field.
Clock, Language and Region
Region
3. Start the Oracle DBUA as follows:
○ On Windows 2012, press Ctrl Esc and Ctrl Tab , and then choose
Oracle - <DBSID> 12102
Database Upgrade Assistant .
○ On Windows 2008, choose
Migration Tools
Start
All Programs
Oracle - <new_Oracle_home>
Configuration and
Database Upgrade Assistant .
Note
You 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 6:
28
Screen
Input
Select Operation
Choose Upgrade Oracle Database and choose Next.
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
Screen
Select Database
Input
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-Spe­
cific 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 up­
grade 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/
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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
CUSTOMER
29
Screen
Input
Progress
The upgrade process itself runs for some time, depending mainly on the size of the da­
tabase 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
KEY_<DBSID>12102
and
HKEY_LOCAL_MACHINE
HKEY_LOCAL_MACHINE
SOFTWARE
SOFTWARE
SAP
ORACLE
<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.
30
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Oracle Database Upgrade
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 31].
2. You perform the post-installation steps for the SAP bundle patch [page 32].
3. You perform post-upgrade checks [page 32].
4. MSCS only: You set up a shared database directory in the Oracle home [page 33].
5. You change the registry value of Oracle Autostart [page 34].
6. You check the startup type of the Oracle services [page 35].
7. You perform post-upgrade tasks [page 35].
8. MSCS only: You add the database to the cluster group [page 36].
9. You update the Oracle Instant Client [page 38].
10. You update BR*Tools [page 38].
11. You back up the database [page 40].
12. If required and not yet done, update the SAP executables [page 41].
13. If not yet done, configure the Secure Storage in the File System (SSFS) [page 14].
14. You can now start the SAP system.
15. You configure the new features for Oracle Database 12c Release 1 (12.1) [page 41].
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 42].
18. 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
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.
Caution
When you modify the user environment, you must be logged on as the corresponding <sapsid>adm user.
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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
31
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.
Note
Set 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 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 corresponding SBP README.
5.3
Performing Post-Upgrade Checks
Use
You run the SAP-specific database post-upgrade check scripts.
Note
You always execute these post-upgrade scripts as Oracle database administrator <ora_dba>. It is
recommended to use ora<dbsid> or sapsid<adm> as 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 1915315
32
CUSTOMER
.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
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 sysdba
:
SQL> @?/rdbms/admin/utlu121s.sql
SQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)
SQL> @post_upgrade_checks.sql
This provides an overview of the status of the upgraded database.
5.4
MSCS Only: Setting Up a Shared Database Directory in
Oracle Home
Use
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\databasedirectory.
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.
Note
Oracle 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
36].
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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
33
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.12102
6. Delete the Oracle home\database directory with the command:
rd /q /s database
Note
You 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
Example
The 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.12102
The 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
10. Start the Oracle service and Oracle database.
5.5
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 manual
Ignore 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.
34
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
5.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 45]
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 45].
5.7
Performing Post-Upgrade Tasks
Use
You need to perform certain post-upgrade tasks as <sapsid>adm.
Procedure
Note
When 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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
35
1. Gather Oracle optimizer statistics by executing the following commands as the <sapsid>adm user:
brconnect -u / -c -f stats -t system_stats
brconnect -u / -c -f stats -t oradict_stats
Note
You can perform this step later if required.
2. Check the Oracle database parameters against SAP Note 1888485
and adjust them if necessary.
to see whether an automated script for Oracle 12c is already available. This helps
Check SAP Note 1171650
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 4
For 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
Note
You can perform this step later if required.
5.8
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.
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.
36
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
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.
Note
All 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.
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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
37
5.9
Updating the Oracle Instant Client
Use
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 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 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.10 Updating BR*Tools
Use
You update BR*Tools to the latest release, with the latest patch level. For more information, see SAP Notes
and 12741 .
2087004
Note
You can also update BR*Tools as described here during the preparation phase.
Prerequisites
The configuration of BR*Tools for Oracle database 12c Release 1 (non-RAC databases) has changed in
comparison to earlier Oracle versions. The BR*Tools profile is located in the %SAPDATA_HOME%\sapprof
directory.
For more information, see SAP Notes 2087004
and 1914631
.
You should therefore configure the BR*Tools according to the new BR*Tools configuration default.
38
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
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
Downloads
Kernel
Support Packages and Patches
SAP KERNEL <platform>
Browse Download Catalog
SAP KERNEL <version>
Software
Additional Components
Windows on <platform>
DBATLxxxx.SAR , following the descriptions in SAP Notes 2087004
permissions as described in SAP Note 1598594 .
and 12741
SAP
ORACLE
and adapt the
2. Unpack BR*Tools to the DIR_CT_RUN directory.
Note
MSCS only: Install BR*Tools in the following directories:
○ DIR_CT_RUN on one MSCS node only
○ %windir%\SapCluster on all MSCS nodes
3.
Caution
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.
Update the SAPDBA role as <sapsid>adm user as follows:
1. Go to the %ORACLE_HOME%\database directory:
cd %ORACLE_HOME%\database
2. 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 /nolog
SQL> connect / as sysdba
SQL> select username from dba_users where username like 'SAP%';
For the schema, you have to use the names beginning with “SAP”, for example:
SAPW41
SAPSR3
SAPSR4
SAPSR3DB (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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
39
4. 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
4. Create the sapprof directory in %SAPDATA_HOME%:
C:\ mkdir %SAPDATA_HOME%\sapprof
5. Copy the files init<DBSID>.sap, init<DBSID>.utl, and init<DBSID>.ora 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.
Example
spfile = %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).
Example
Replace %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.
Caution
If %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.
5.11
Backing Up the Database
Use
You need to back up your upgraded Oracle Database 12c database.
We also recommend perform a full operating system backup.
Caution
You risk losing data if you do not back up your database.
40
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
Procedure
Perform a full database and operating system backup.
Example
You 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.12 Updating the SAP Executables
Use
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 .
Caution
In an MCOD system, you have to update the executables of all SAP systems connecting to the database.
5.13 Configuring the New Features for Oracle Database 12c
Release 1 (12.1)
Use
You can configure the new Oracle Database 12c Release 1 (12.1) features.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
41
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.
.
5.14 Uninstalling the Old Oracle Software
Use
Before you uninstall the old Oracle software, you can perform a backup of your database [page 40]. 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 http://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
http://download.oracle.com/docs/cd/E11882_01/install.112/e16773/deinstall.htm#CIHDGGJJ .
Caution
Do 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
Installation Products
Start
All Programs
<new_Oracle_home>
Oracle
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.bat
For more information, see SAP Note 1591580
42
CUSTOMER
.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
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
Note
It is not possible to delete all old Oracle products. These are deleted in the following steps.
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>
Example
C:\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.
Caution
Only delete the registry key for the old Oracle version – for example:
SOFTWARE
ORACLE
KEY_<old_Oracle_home>
HKEY_LOCAL_MACHINE
– if there is only one Oracle client installed.
Otherwise, do not delete it.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Post-Upgrade Steps
CUSTOMER
43
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 44]
● Starting and stopping services [page 45]
● Moving groups for MSCS [page 47]
● Starting and stopping the SAP system [page 48]
6.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 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.
Note
If 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.
44
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
Caution
If 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.
Note
If a pop-up appears, asking you how to take the database offline, choose Immediate.
6.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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
CUSTOMER
45
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))
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
4. To start the service, choose
File
File
Stop Cluster Service.
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.
Caution
If 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 7:
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.
46
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
6.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.
Note
As 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.
Note
You 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
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
CUSTOMER
47
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
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 .
Note
When 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
48
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
If you use MSCS, you start or stop your SAP system with one of the following tools:
Table 8:
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, rightclick the database <DBSID>.world in the Fail Safe group ORACLE<DBSID> and
choose Place online or Take offline.
SAP Microsoft Management Console (SAP
To start or stop your SAP system with the SAP MMC, see above.
MMC)
Failover Cluster Manager (Windows Server
2008 (R2))
Note
With the Failover Cluster Manager you can only start or stop clustered in­
stances 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).
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.
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Common Administration Tasks
CUSTOMER
49
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:
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 2016
Windows Server 2016 contains PowerShell 5.0
You can update to PowerShell 5.0 (search the internet for Windows Management Framework 5.0).
● 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 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 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 Manager
Features .
On Windows Server 2008, you can update to PowerShell 3.0 (search the internet for Windows Management
Framework 3.0).
50
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Appendix
How to Start PowerShell
Caution
Make sure that you start the PowerShell in administrator mode.
● Windows Server 2012 (R2) and higher
Open 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
All Programs
Windows PowerShell
Windows PowerShell .
○ PowerShell 2.0:
Choose
Start
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"
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Appendix
CUSTOMER
51
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
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) and higher:
Table 9:
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 -
Lists the last started process on your computer
last 1
get-process | sort starttime | select -
Lists all properties of the last started process
last 1 | format-list -proper *
get-process | sort starttime | select -
Lists all process class members (properties and methods) of
last 1 | get-member
the last started process
get-process | %{$_.name;"-----------";
Lists all processes, and the executables and DLLs the proc­
$_.modules}
esses loaded
$processes = (get-process | sort
Defines a shell variable $processes, which contains an array
starttime)
of process objects
52
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Appendix
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")
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Appendix
Sets the file a.txt to “read-only”
CUSTOMER
53
Important Disclaimers and Legal Information
Coding Samples
Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system
environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and
completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP
intentionally or by SAP's gross negligence.
Accessibility
The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a
binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does
not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.
Gender-Neutral Language
As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales
person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not
exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.
Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not
warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages
caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency
(see: http://help.sap.com/disclaimer).
54
CUSTOMER
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Important Disclaimers and Legal Information
Upgrade to Oracle Database 12c Release 1 (12.1.0.2): Windows
Important Disclaimers and Legal Information
CUSTOMER
55
go.sap.com/registration/
contact.html
© 2017 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 http://www.sap.com/corporate-en/legal/copyright/
index.epx for additional trademark information and notices.
Download