100% found this document useful (1 vote)
644 views248 pages

Oracle Database 19c Workshop Guide

The document is a student guide for the Oracle Database 19c: Deploy, Patch, and Upgrade Workshop, detailing the course structure and content. It covers installation, patching, and upgrading of Oracle Database and Grid Infrastructure, aimed at developers, sysadmins, and database administrators. The guide includes objectives, planning, installation procedures, and post-upgrade tasks, emphasizing the importance of feedback for continuous improvement.

Uploaded by

MWANAHAWA BAKARI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
644 views248 pages

Oracle Database 19c Workshop Guide

The document is a student guide for the Oracle Database 19c: Deploy, Patch, and Upgrade Workshop, detailing the course structure and content. It covers installation, patching, and upgrading of Oracle Database and Grid Infrastructure, aimed at developers, sysadmins, and database administrators. The guide includes objectives, planning, installation procedures, and post-upgrade tasks, emphasizing the importance of feedback for continuous improvement.

Uploaded by

MWANAHAWA BAKARI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch,


and Upgrade Workshop

Student Guide
D1106095GC10

Learn more from Oracle University at [Link]


Copyright © 2023, Oracle and/or its affiliates.
Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws.
The document may not be modified or altered in any way. Except where your use constitutes "fair use" under
copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license,
post, transmit, or distribute this document in whole or in part without the express authorization of Oracle.

The information contained in this document is subject to change without notice and is not warranted to be error-
free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of
the United States Government, the following notice is applicable:

Oracle Internal and Oracle Academy Use Only


U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any
programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle
computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are
"commercial computer software" or "commercial computer software documentation" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction,
duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle
programs (including any operating system, integrated software, any programs embedded, installed or activated on
delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other
Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The
terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such
services. No other rights are granted to the U.S. Government.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.

Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used
under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD
logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The
Open Group.

Third-Party Content, Products, and Services Disclaimer

This documentation may provide access to or information about content, products, and services from third parties.
Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with
respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between
you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred
due to your access to or use of third-party content, products, or services, except as set forth in an applicable
agreement between you and Oracle.

1012042023
Contents

I Oracle Database 19c: Deploy, Patch, and Upgrade


Running Auto Data Placement Advisor I-3
Course Outline I-4
Feedback I-5

Oracle Internal and Oracle Academy Use Only


1 Installation Overview
Objectives 1-2
Planning Your Installation 1-3
Oracle Software Installation Decisions 1-5
Oracle Grid Infrastructure Software Groups 1-6
Oracle Database Software Groups 1-7
Oracle Extended Database Groups 1-8
Accounts and Group Assignments: Example 1-9
Oracle Software Installation Decisions 1-10
Method for Root Privilege Access 1-11
Oracle Software Installation Decisions 1-12
Preparing the Operating System for Oracle Software 1-13
Oracle Software Installation Decisions 1-14
Oracle Database Instance Configurations 1-15
Oracle Software Installation Decisions 1-16
Storage Options: File Systems 1-17
Storage Options: Automatic Storage Management 1-18
Methods for Disks Ownership, Naming, and Persistence 1-19
Summary 1-21

2 Preparing to Install Oracle Software


Objectives 2-2
Check Server Hardware and Memory Configuration 2-3
Update the Oracle Linux Operating System 2-4
Create Groups for Job Role Separation 2-5
Modify and Create Users 2-6
View and Adjust Pluggable Authentication Module (PAM) Limits 2-7
Create Initial Installation Directories 2-8
Summary 2-9

iii
3 Installing Oracle Grid Infrastructure for a Stand-Alone Server
Objectives 3-2
Overview of Oracle Grid Infrastructure 3-3
Configuring Storage for Oracle Automatic Storage Management 3-4
Oracle Grid Infrastructure Installation: System Requirements for
Linux x86-64 Systems 3-5
Installation Option 3-6
Create ASM Disk Group 3-7

Oracle Internal and Oracle Academy Use Only


ASM Password 3-8
Management Options 3-9
Operating System Groups 3-10
Installation Location 3-11
Create Inventory 3-12
Root Script Execution 3-13
Prerequisite Checks 3-14
Summary 3-15
Install Product 3-16
Finish 3-17
Oracle ASMCA: Home 3-18
Oracle ASMCA: Create Disk Group 3-19
Summary 3-20

4 Installing Oracle Database Software


Objectives 4-2
Oracle Database Software Installation: System Requirements 4-3
Configure Security Updates 4-4
Select Installation Option 4-5
Select Database Installation Option 4-6
Select Database Edition 4-7
Specify Installation Location 4-8
Privileged Operating System Groups 4-9
Perform Prerequisite Checks 4-10
Summary 4-11
Install Product 4-12
Finish 4-13
Summary 4-14

5 Creating an Oracle Database Using Oracle DBCA


Objectives 5-2
Planning the Database 5-3

iv
Database Operation 5-4
Database Creation Mode 5-5
Database Deployment Type 5-6
Database Identification 5-7
Database Storage Option 5-8
Fast Recovery Option 5-9
Network Configuration 5-10
Oracle Data Vault Config Option 5-11
Configuration Options 5-12

Oracle Internal and Oracle Academy Use Only


Management Options 5-13
Database User Credentials 5-14
Database Creation Options 5-15
Summary 5-16
Progress Page 5-17
Finish 5-18
Summary 5-19

6 Patching Oracle Grid Infrastructure and Oracle Database


Objectives 6-2
Overview of the Patch Process 6-3
Oracle Patches Maintenance 6-4
Oracle Patches Prior to 19.17.0 6-5
Oracle Patches 19.17.0 and Forward 6-6
Proactive Maintenance with RUs and MRPs 6-7
Oracle Database Server Risk Matrix 6-9
Oracle Patching Tools: 6-11
Oracle Patching Tools: OPatch 6-12
Oracle Patching Tools: opatchauto 6-17
Oracle Patching Tools: opatchauto -binary 6-20
Minimizing Downtimes: Rolling Patching 6-21
Minimizing Downtimes: Standby-First Patching 6-22
Minimizing Downtimes: Patching a Cloned Home 6-23
Summary 6-24

7 Oracle Restart
Objectives 7-2
Oracle Restart Process Startup 7-5
Oracle Restart Configuration & Management 7-6
Oracle Restart Configuration 7-7
Managing Oracle Restart 7-9
Server Control Utility (SRVCTL) 7-11

v
Using the SRVCTL Utility 7-12
Choosing the Correct SRVCTL Utility 7-13
Obtaining Help for the SRVCTL Utility 7-15
Starting Components Using the SRVCTL Utility 7-16
Stopping Components Using the SRVCTL Utility 7-17
Viewing Component Status 7-18
Displaying the Oracle Restart Configuration for a Component 7-19
Manually Adding Components to the Oracle Restart Configuration 7-20
Oracle Restart Maintenance Operations 7-21

Oracle Internal and Oracle Academy Use Only


Stopping and Restarting Restart for Maintenance Operations 7-23
Stopping and Restarting Restart Example 7-24
Stopping and Restarting Restart: Example 7-26
Summary 7-27

8 Upgrading to Oracle Grid Infrastructure 19c


Objectives 8-2
Upgrading Oracle Grid Infrastructure: Restrictions and Guidelines 8-3
Checklist for Upgrading Oracle Grid Infrastructure 8-4
Install the Oracle Preinstallation RPM 8-5
Create a Copy of the Preinstallation Configuration File for the Grid User 8-6
Configuration Option 8-7
Management Options 8-8
Operating System Groups 8-9
Installation Location 8-10
Root Script Execution 8-11
Prerequisite Checks 8-12
Summary 8-13
Install Product 8-14
Finish 8-15
Summary 8-16

9 Before Upgrading to Oracle Database 19c


Objectives 9-2
Defining Upgrade and Data Migration 9-3
Upgrade Methods 9-4
AutoUpgrade Utility: Advantages and Disadvantages 9-5
Database Upgrade Assistant: Advantages and Disadvantages 9-6
Manual Upgrade: Advantages and Disadvantages 9-7
Upgrade Paths 9-8
Upgrade Method Limitations 9-9
Upgrading to a New Release of Oracle Database 9-10

vi
Migration Methods 9-11
Defining Upgrade and Data Migration 9-12
Summary 9-13

10 Upgrading to Oracle Database 19c


Objectives 10-2
Preparing to Upgrade 10-3
Planning the Upgrade 10-4
Developing a Test Plan 10-5

Oracle Internal and Oracle Academy Use Only


Performance Testing 10-6
Requirements for Databases Using Oracle Label Security or Oracle
Database Vault 10-7
Installing Oracle Database 19c Software Using OUI 10-8
Configuration Option 10-9
Database Installation Option 10-10
Database Edition 10-11
Installation Location 10-12
Operating System Groups 10-13
Root Script Execution Configuration 10-14
Perform Prerequisite Checks 10-15
Perform Prerequisite Checks Results (For Errors) 10-16
Summary 10-17
Install Product 10-18
Finish 10-20
AutoUpgrade Utility System Checks 10-21
Running AutoUpgrade Fixups 10-22
Configuration File to Run AutoUpgrade Prechecks 10-23
Backing Up the Database 10-24
Upgrading Using the AutoUpgrade Utility 10-25
AutoUpgrade with Source and Target Database Homes on Same Server 10-26
AutoUpgrade with Source and Target Database Homes on Different Servers 10-27
Overview of AutoUpgrade Job Stages 10-28
AutoUpgrade Command-Line Parameters and Options 10-30
AutoUpgrade Command-Line Syntax 10-33
AutoUpgrade Configuration File 10-34
Upgrading Using the Oracle Database Upgrade Assistant (DBUA) 10-35
Select Database 10-36
Pluggable Databases 10-37
Prerequisite Checks 10-38
Select Upgrade Options 10-39
Select Recovery Options 10-40

vii
Configure Network 10-41
Configure Management 10-42
Summary 10-43
Progress 10-44
Results 10-45
Manually Upgrading to Oracle Database 19c 10-46
Summary 10-48

11 Performing Postupgrade Tasks

Oracle Internal and Oracle Academy Use Only


Objectives 11-2
Required Tasks After Database Upgrade 11-3
Recommended Tasks After Database Upgrade 11-5
Summary 11-6

12 Migrating Data Using Oracle Data Pump


Objectives 12-2
Oracle Data Pump: Overview 12-3
Data Pump Export and Import Clients: Overview 12-4
Data Pump Utility: Interfaces and Modes 12-5
Migrating Using Oracle Data Pump 12-6
Importing Using a Network Link 12-7
Creating a Container Database by Using Oracle DBCA 12-8
Creating an Empty New PDB from PDB$SEED 12-9
Exporting from a Non-CDB and Importing into a PDB 12-10
Summary 12-11

viii
Oracle Database 19c: Deploy, Patch,
and Upgrade
Overview

Oracle Internal and Oracle Academy Use Only


Welcome to the Oracle Database 19c: Deploy, Patch, and Upgrade course.
Course Intended For

Developers
Sysadmin
Database
Administrators

Oracle Internal and Oracle Academy Use Only


This course is designed for:
• Developers responsible for maintaining their own development environments
• Sysadmins maintaining departmental databases
• Database Administrators (DBA) maintaining company environments

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop I - 2


Running Auto Data Placement Advisor

Target audience: Beginning to Intermediate

Oracle Internal and Oracle Academy Use Only


Basic knowledge of computers and databases

This course is designed for the beginning to intermediate level. No prior knowledge of (or experience in)
managing an Oracle database is required, however a basic understand is beneficial.

Attendees need to have at least a basic knowledge of computers and databases.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop I - 3


Course Outline

Deploying
Grid
Infrastructure Patch Both Grid
and Database and Database
Software Software

Oracle Internal and Oracle Academy Use Only


Upgrading
Both Grid and
Database Software

There are three major topic categories, each containing several subtopics.
• Deploying a Grid Infrastructure and Oracle Database Software
• Overview of the overall deploying process:
– OS Users and Groups
– DB Architecture
– Storage
• Prepare to install the software
• Installing the Grid Infrastructure and Database Software
• Creating an Oracle Database

Patching a Grid Infrastructure and Oracle Database Software


• Overview of the patching process
• Types of patches
• Tools and options for patching
• Managing components with Oracle Restart

Upgrading a Grid Infrastructure and Oracle Database Software:


• Upgrade the Grid Infrastructure
• Prepare and select the Oracle Database Method
• Upgrade the Oracle Database
• Performing Postupgrade task
• Migrating data using Data Pump utility

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop I - 4


Feedback

Reviewed by key personnel

Part of continuous improvement

Oracle Internal and Oracle Academy Use Only


After this course, please complete the feedback.

Your feedback is used by key personnel as part of our continuous improvement efforts.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop I - 5


Oracle Internal and Oracle Academy Use Only
Installation Overview
Lesson Subtitle (Optional)

Oracle Internal and Oracle Academy Use Only


Objectives
Plan for the installation of Oracle software

Describe the different decisions needed to perform an installation

Compare and contrast single owner compared to job role separation

Oracle Internal and Oracle Academy Use Only


Describe different instance to database configurations

Compare and contrast file system storage to Oracle ASM

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 2


Planning Your Installation

1 What Oracle software are you installing?

Does the hardware and software involved meet the


2
minimum required specifications?

Oracle Internal and Oracle Academy Use Only


Is there a recommended order of installation when
3
multiple products are involved?

Are there prerequisite steps that must be


4
performed by someone other than the DBA?

Before you begin installing Oracle software you should ask yourself the following questions to help you
plan your installation:
• What Oracle software are you installing?
Perform an installation of Oracle Grid Infrastructure to install the components required for Oracle
Automatic Storage Management (ASM) as well as Oracle Restart.
• Does the hardware involved meet the minimum required specifications?
Identify all hardware that will be involved in the installation process and ensure that the minimum
suggested specifications are met.
• Is there a recommended order of installation when multiple products are involved?
Whenever possible it is recommended that the Oracle Grid Infrastructure software be installed
before the Oracle Database software. Performing the installation in this order means that a newly
created database can be configured to use Oracle ASM disk groups and this database is
automatically registered with Oracle Restart. If Oracle Grid Infrastructure is installed after Oracle
Database, then manual configuration steps are required to register the database with Oracle
Restart. Migration steps are required if you want this existing database to use Oracle ASM disk
groups for storage.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 3


• Are there prerequisite steps that must be performed by someone other than the DBA?
Following recommended separation of duty guidelines, the DBA is probably not responsible for
configuring the hardware and storage devices that are to be used for your installation. Before
installing Oracle Grid Infrastructure, there are required configuration steps that a Storage
Administrator would perform to configure the required disk partitions. For more information, see
the Oracle Database Installation Guide appropriate to your operating system.
In addition, if this is the first time Oracle software is installed on your system, specific operating
system groups and users may need to be created. Additional information about the operating
system groups and users is provided in later lessons.

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 4


Oracle Software Installation Decisions

Software owner(s)

Oracle Internal and Oracle Academy Use Only


When installing Oracle software, many installation decisions are required to be made. Each prompt being
presented for a decision has more than one valid response. If there was only one acceptable response,
then there would be no reason to ask for input from the user performing the installation. Consider the
philosophy of this concept when following a prepared installation guide that provides typical responses
for each installation prompt.

To master the installation process, you should understand the questions or prompts being asked from
the installation program, understand the range of acceptable answers that can be provided, and be able
to justify the decision that you make. Almost all decisions can be changed after the install but some will
require significant work to change after the install has been completed. There is not a single answer that
is always correct for each environment. What works best for one situation may be the wrong decision in
another situation. Some of the major decisions required during installation of Oracle software include:
• Single software owner vs. job role separation
• Method for root privilege access: Manual vs. automatic direct access vs. automatic Linux sudo
access
• Operating system preparation: Oracle Preinstallation RPM vs. manual setup
• Single instance vs. Oracle Real Application Clusters (RAC)
• Oracle Automatic Storage Management (ASM) vs. file system storage
– Number of Oracle ASM disk groups desired
– Oracle ASMLib vs. Udev vs. Oracle ASMFD

These decisions will be covered in the slides that follow.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 5


Oracle Grid Infrastructure Software Groups

Group OS Group Purpose


Users have Oracle installation owner system privileges, also known as
Install oinstall
the oraInventory group.
Users are granted the SYSASM privilege access to Oracle ASM
dba or
OSASM instances for administrative functions, such as instance startup and
asmadmin
shutdown, along with mounting and dismounting of disk groups.

Oracle Internal and Oracle Academy Use Only


Users are granted read and write access to files managed by Oracle
dba or
OSDBA ASM. All Oracle database software owners must be a member of this
asmdba
group.
Users are granted the SYSOPER privilege access to Oracle ASM
dba or
OSOPER instances providing a limited subset of administrator functions such as
asmoper
starting and stopping Oracle ASM instances.

Each Oracle software owner must be a member of the same central inventory group. Oracle recommends
that you do not have more than one central inventory for Oracle installations. If an Oracle software owner
has a different central inventory group, then you may corrupt the central inventory. In Oracle
documentation, this group is represented as oinstall in code examples.

The OSASM group for Oracle ASM Administration (typically, asmadmin) is used if you want to have
separate administration privileges groups for Oracle ASM and Oracle Database administrators. Members
of this group are granted the SYSASM system privileges to administer Oracle ASM. Members of the
OSASM group can use SQL to connect to an Oracle ASM instance as SYSASM using operating system
authentication. The SYSASM privileges permit mounting and dismounting of disk groups, and other
storage administration tasks. SYSASM privileges provide no access privileges on an RDBMS instance.

The OSOPER group for Oracle ASM (typically, asmoper) is used if you want a separate group of operating
system users to have a limited set of Oracle instance administrative privileges (the SYSOPER for Oracle
ASM privilege), including starting up and stopping the Oracle ASM instance. By default, members of the
OSASM group also have all privileges granted by the SYSOPER for Oracle ASM privilege.

The OSDBA group for Oracle ASM (typically, asmdba) can be the same group used as the OSDBA group
for the database, or you can create a separate OSDBA group for Oracle ASM to provide administrative
access to Oracle ASM instances. Membership in the OSDBA group enables access to the files managed by
Oracle ASM.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 6


Oracle Database Software Groups

Group OS Group Purpose


Users have Oracle installation owner system privileges, also known
Install oinstall
as the oraInventory group.
Users are granted the SYSDBA database administrator privilege
OSDBA dba allowing access to all user data, startup/shutdown, create/drop
database, backup/recovery, and open/mount functions.

Oracle Internal and Oracle Academy Use Only


Users are granted the SYSOPER privilege providing a limited subset
dba or of administrator functions without access to user data. It allows
OSOPER
oper startup/shutdown, open/mount, backup, and only complete
recovery operations as compared to partial or limited recovery.

Each Oracle software owner must be a member of the same central inventory group. Oracle recommends
that you do not have more than one central inventory for Oracle installations. If an Oracle software owner
has a different central inventory group, then you may corrupt the central inventory. In Oracle
documentation, this group is represented as oinstall in code examples.

The OSDBA group (typically, dba) identifies operating system user accounts that have database
administrative privileges (the SYSDBA privilege). The privilege SYSDBA allows an account that has been
authenticated to the operating system to connect to an Oracle database without supplying an additional
password and has access to all data stored in the database.

The OSOPER group for Oracle Database (typically, oper) is an optional group. Create this group if you
want a separate group of operating system users to have a limited set of database administrative
privileges for starting up and shutting down the database (the SYSOPER privilege). This group cannot
directly connect as SYSOPER, unless explicitly granted. However, they have the privileges granted by the
SYSOPER privilege. By default, members of the OSDBA group have all privileges granted by the SYSOPER
privilege.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 7


Oracle Extended Database Groups

Group OS Group Purpose


OSBACKUPDBA dba or Users are granted the SYSBACKUP privilege for backup and
backupdba recovery-related functions.
OSDGDBA dba or dgdba Users are granted the SYSDG privilege to administer and
monitor Oracle Data Guard.
OSKMDBA dba or kmdba Users are granted the SYSKM privilege for encryption key

Oracle Internal and Oracle Academy Use Only


management such as Oracle Wallet Manager.
OSRACDBA dba or racdba Users are granted the SYSRAC privilege used by the Oracle
Real Application Clusters (RAC) Clusterware agent.

In addition to the OSOPER privilege to start and shut down the database, you can create new
administrative privileges that are more task-specific and less privileged than the OSDBA/SYSDBA system
privileges to support specific administrative privileges tasks required for everyday database operation.
Users granted these system privileges are also authenticated through operating system group
membership.

You do not have to create these specific group names, but during installation you are prompted to
provide operating system groups whose members are granted access to these system privileges. You can
assign the same group to provide authentication for these privileges, but Oracle recommends that you
provide a unique group to designate each privilege.

The OSBACKUPDBA group for Oracle Database (typically, backupdba) is used if you want a separate
group of operating system users to have a limited set of database backup and recovery-related
administrative privileges (the SYSBACKUP privilege).

The OSDGDBA group for Oracle Data Guard (typically, dgdba) is used if you want a separate group of
operating system users to have a limited set of privileges to administer and monitor Oracle Data Guard
(the SYSDG privilege).

The OSKMDBA group for encryption key management (typically, kmdba) is used if you want a separate
group of operating system users to have a limited set of privileges for encryption key management such
as Oracle Wallet Manager management (the SYSKM privilege).

Note: The Oracle software installation owner must be a member of all extended database groups.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 8


Accounts and Group Assignments: Example

Single Owner Single Owner Job Role


Group
1-Group 2-Groups Separation › A single account and single group
oracle oracle grid
(oracle & oinstall) can be used for
Storage Owner
all software.
Install oinstall oinstall oinstall

OSASM oinstall dba asmdba


› Oracle recommends a minimum of two
groups (oinstall & dba).
OSOPER oinstall dba asmoper

Database Owner oracle oracle oracle


› Additional operating system users can
be created with specific, limited

Oracle Internal and Oracle Academy Use Only


OSDBA oinstall dba dba privileges such as:
OSOPER oinstall dba oper – User sean in the dgdba group only
OSBACKUPDBA oinstall dba backupdba
– User roy in the racdba group only
OSDGDBA oinstall dba dgdba

OSKMDBA oinstall dba kmdba

OSRACDBA oinstall dba racdba

The chart above shows three typical group configurations. If you prefer to allocate operating system user
privileges so that you can use one administrative user and one group for operating system authentication
for all administrative privileges, then you can use the oracle user as the installation owner, and use one
group as the primary group for any user requiring administrative privileges for Oracle ASM, and Oracle
Database administration. This group must also be the Oracle Inventory group. To simplify using the
defaults for Oracle tools the group name should be oinstall. The column labelled Single Owner 1-
Group implements this configuration.

If you use Oracle Preinstallation RPM to provision your Linux operating system for an Oracle Grid
Infrastructure or Oracle Database installation, then it configures an Oracle database installation owner
(oracle), an Oracle Inventory group (oinstall), and an Oracle administrative privileges group
(dba).The column labelled Single Owner 2-Groups implements this configuration.

Oracle recommends that you create one software owner to own each Oracle software installation. To
create separate Oracle software owners and separate operating system privileges groups for different
Oracle software installations, note that each of these users must have the Oracle central inventory group
(oraInventory) as their primary group. A job role separation configuration uses distinct group names
for each of the extended database and storage groups. The column labelled Job Role Separation
implements this configuration.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 9


Oracle Software Installation Decisions

Software owner(s)

Method of root privilege access

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 10


Method for Root Privilege Access

Oracle Internal and Oracle Academy Use Only


The installation of Oracle software products will require access to the operating system root privilege.
This privilege is needed to run one or two scripts that are mandatory. The scripts are typically named
[Link] and [Link]. The [Link] script will be skipped by the installer if the
installer detects that it has already been run on the server in the past.

In some organizations, the Oracle database administrator may not have access to the root operating
system account. There are three methods that can be used for root privilege access when performing the
install. The first method is to allow the installer to prompt and pause when it is time to run the scripts.
This method is typically used when the Oracle database administrator does not know the root password.
It gives the root user an opportunity to log in to a separate terminal and run the indicated scripts. After
the scripts have been run, the installation can be resumed. The second method is to supply the root
password to the installation program. This method is often used when the person performing the
installation, typically the Oracle database administrator, knows the root password. The installer will
generate a dialog window that will indicate when the scripts are being run but will not supply the names
of the scripts. The installer automatically runs them. The third method is to use a different account name
and password that has been configured with Linux SUDO privileges. As with the second method, the
installer will generate a dialog window that will indicate when the scripts are being run but will not supply
the names of the scripts. The installer automatically runs them.

One of the three methods must be used during the installation of Oracle software.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 11


Oracle Software Installation Decisions

Software owner(s)

Method of root privilege access

OS Preparation

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 12


Preparing the Operating System for Oracle Software

Manual Method Oracle Preinstallation RPM

⏵ Perform the manual tasks using the ⏵ Cause the download of all required,
missing packages with dependencies.
instructions in the installation guide.
⏵ Create the oracle user.
⏵ Create the oinstall and dba groups.
⏵ Change ownership of home directories.

Oracle Internal and Oracle Academy Use Only


⏵ Modify kernel parameters.
⏵ Set hard and soft user shell resource
limits.
⏵ Modify boot parameters to turn off
NUMA and transparent hugepages.
⏵ Create backup of changes made and
log results in /var/log

Oracle recommends the use of an Oracle Preinstallation RPM that will perform almost all of the
installation prerequisite steps required to install Oracle software without errors. This package is used for
both the Oracle Grid Infrastructure and Oracle database software. The name of the package depends on
the version of the Oracle software being installed and the version of Oracle Linux being used. The
repoquery command can be used to list all of the individual files that are part of the package.
For example:
# repoquery --list oracle-database-server-12cR2-preinstall
/etc/rc.d/init.d/oracle-database-server-12cR2-preinstall-firstboot
/etc/security/limits.d/[Link]
/etc/sysconfig/oracle-database-server-12cR2-preinstall
/etc/sysconfig/oracle-database-server-12cR2-preinstall/oracle-database-server-
12cR2-preinstall-verify
/etc/sysconfig/oracle-database-server-12cR2-preinstall/oracle-database-server-
[Link]
/usr/bin/oracle-database-server-12cR2-preinstall-verify
/var/log/oracle-database-server-12cR2-preinstall
/var/log/oracle-database-server-12cR2-preinstall/results

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 13


Oracle Software Installation Decisions

Software owner(s)

Method of root privilege access

OS Preparation

Oracle Internal and Oracle Academy Use Only


Instance configuration

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 14


Oracle Database Instance Configurations

Single Instance Real Application Clusters (RAC)


1 instance : 1 database Many instances : 1 database

prod prod1 prod2 prod3

Oracle Internal and Oracle Academy Use Only


prod prod

Local Storage Shared Storage

Each database instance is associated with only one physical database when not using a multitenant
architecture. If there are multiple databases on the same server, then there is a separate and distinct
database instance for each physical database. A database instance cannot be shared. This configuration
has one instance to one database ratio.

A Real Applications Cluster (RAC) database usually has multiple instances on separate servers for the
same shared database. In this model, the same database is associated with each RAC instance, which
meets the requirement that only one database is associated with an instance. This configuration has
multiple instances to one database ratio.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 15


Oracle Software Installation Decisions

Software owner(s)

Method of root privilege access

OS Preparation

Oracle Internal and Oracle Academy Use Only


Instance configuration

Storage options

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 16


Storage Options: File Systems

Physical Disks LVM or RAID NFS

⏵ A file system on a disk that ⏵ A file system on a logical ⏵ A network file system (NFS)
is physically attached to the volume manager (LVM) or a mounted from a certified
system RAID device network-attached storage
(NAS) device
⏵ Organized using the ⏵ Using stripe and mirror
⏵ Using operating system

Oracle Internal and Oracle Academy Use Only


Optimal Flexible everything (SAME)
Architecture (OFA) kernel NFS client
methodology

⏵ Distributed over many ⏵ Using Oracle internal Direct


⏵ Using a single mount point
NFS client
disks/mount points for if desired
performance and high
availability

If you use the file system option, then Oracle Database Configuration Assistant creates the database files
in a directory on a file system mounted on the computer. Oracle recommends that the file system be
separate from the file systems used by the operating system or the Oracle software. The file system can
be any of the following:
• A file system on a disk that is physically attached to the system
• A file system on a logical volume manager (LVM) volume or a RAID device
• A network file system (NFS) mounted from a certified network-attached storage (NAS) device

If you are creating a database on basic disks that are not logical volumes or RAID devices, then Oracle
recommends that you follow the Optimal Flexible Architecture (OFA) recommendations and distribute the
database files over many disks. If you are using multiple disks in an LVM or RAID configuration, then
Oracle recommends that you use the stripe and mirror everything (SAME) methodology to increase
performance and reliability. Using this methodology, you do not have to specify multiple file system
mount points for the database storage. You also have the option to use Direct NFS Client, which simplifies
the administration of NFS configurations and also improves performance.

If you use the Advanced database creation option, then you can also use the Oracle Managed Files
feature with the new database. If you use this feature, then you must specify only the database object
name instead of file names when creating or deleting database files.

Note: If you decide to enable recovery during the database installation, the Oracle Universal Installer
(OUI) provides you with an option to configure the fast recovery area location. For Oracle ASM, this option
allows you only to use the same disk group for both Oracle Database files and recovery files.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 17


Storage Options:
Automatic Storage Management
Oracle
Application
Database
▪ Is a portable and high-performance
cluster file system
ASM Cluster File
System ▪ Manages Oracle database files
ASM Files for
Oracle Database ▪ Manages application files with
ASM Dynamic Oracle ASM Cluster File System (ACFS)

Oracle Internal and Oracle Academy Use Only


Volume
Manager
▪ Spreads data across disks to balance load
Automatic Storage Management
▪ Protects against failures by mirroring data
Operating system ▪ Solves storage management challenges

Oracle Automatic Storage Management (ASM) provides vertical integration of the file system and the
volume manager for Oracle database files. Oracle ASM can provide management for single symmetric
multiprocessing (SMP) machines or across multiple nodes of a cluster for Oracle Real Application Clusters
(RAC) support.

Oracle ASM Cluster File System (ACFS) is a multi-platform, scalable file system, and storage management
technology that extends Oracle ASM functionality to support application files outside of the Oracle
Database such as executables, reports, BFILEs, video, audio, text, images, and other general-purpose
application file data.

Oracle ASM distributes input/output (I/O) load across all available resources to optimize performance
while removing the need for manual I/O tuning. Oracle ASM helps database administrators (DBAs)
manage a dynamic database environment by enabling them to increase the database size without having
to shut down the database to adjust storage allocation.

Oracle ASM can maintain redundant copies of data to provide fault tolerance, or it can be built on top of
vendor-supplied storage mechanisms. Data management is done by selecting the desired reliability and
performance characteristics for classes of data rather than with human interaction on a per-file basis.

Oracle ASM capabilities save the DBA’s time by automating manual storage and thereby increasing the
administrator’s ability to manage more and larger databases with increased efficiency.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 18


Methods for Disks Ownership, Naming, and Persistence

Udev Rules ASMLib ASMFD

⏵ Uses Linux scsi_id to obtain ⏵ Requires up to three ⏵ Is integrated into Oracle


unique device identifiers additional packages to be Grid Infrastructure software
installed depending on OS
⏵ Requires setup to configure ⏵ Rejects I/O requests that
SCSI devices as trusted ⏵ Standardizes disk naming, are not issued by Oracle
software to prevent

Oracle Internal and Oracle Academy Use Only


devices (whitelisted) persistence, and
corruption
permissions for different
⏵ Requires udev rules file to OS’s
set ownership, permissions,
and optional aliases ⏵ Provides enhancements to
the IO interface

By default, the device file naming scheme udev dynamically creates device file names when the server is
started and assigns ownership of them to root. If udev applies default settings, then it changes Oracle
device file names and owners for the disks, making the disks inaccessible when the server is restarted.
Custom udev configuration settings and custom udev rules can be used to change the ownership and
set permissions persistently for each reboot to values that the Oracle software can use. The Linux
command scsi_id is often used as part of this process. Note that the specific options and the location
of this command change with different releases of the operating system. The syntax for the custom udev
rules must be changed accordingly.

An alternative to using operating system udev rules is to use the Oracle ASM Library (ASMLib). Oracle
ASMLib has several advantages. It provides a good asynchronous I/O interface for the database. The
entire I/O interface is based on an optimal ASYNC model for performance. It provides a single file
descriptor per Oracle process, not one per device or data file per process reducing the overhead for the
number of open file handles. It has device scanning and labeling built-in so you do not have to worry
about messing with udev or devlabel permissions, which can be very complex and error prone. With
the introduction of Oracle Linux's Unbreakable Enterprise Kernel, Oracle ASMLib was enhanced to
provide all the features in the Linux kernel to checksum a data block, send it to the storage adapter, which
can then validate that block and checksum in firmware before it sends it over the wire to the storage
array, which can then do another checksum and to the actual DISK which does a final validation before
writing the block to the physical media. Oracle ASMLib provides the ability of the Oracle RDBMS, a
userspace application, to write a block which has a checksum and validation all the way down to the disk
(Application to disk).

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 19


During Oracle Grid Infrastructure installation, you can choose to install and configure Oracle Automatic
Storage Management Filter Driver (Oracle ASMFD). Oracle ASMFD helps prevent corruption in Oracle
ASM disks and files within the disk group. In contrast, Oracle ASMLib sets ownership of the Oracle ASM
disks as the operating system user that owns the Oracle Grid Infrastructure software. This user and any
user that belongs to the OSASM group can read and write to Oracle ASM disk. Corruption of Oracle ASM
disks can occur by user error with operating system commands such as strings, dd, echo, cat, and so
on.

Oracle ASMFD is a kernel module that resides in the I/O path of the Oracle ASM disks. Oracle ASMFD
rejects write I/O requests that are not issued by Oracle software. This write filter helps to prevent users
with administrative privileges from inadvertently overwriting Oracle ASM disks, thus preventing
corruption in Oracle ASM disks and files within the disk group. For disk partitions, the area protected is
the area on the disk managed by Oracle ASMFD, assuming the partition table is left untouched by the

Oracle Internal and Oracle Academy Use Only


user.

Oracle ASMFD simplifies the configuration and management of disk devices by eliminating the need to
rebind disk devices used with Oracle ASM each time the system is restarted.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 20


Summary
Plan for the installation of Oracle software

Describe the different decisions needed to perform an installation

Compare and contrast single owner compared to job role separation

Oracle Internal and Oracle Academy Use Only


Describe different instance to database configurations

Compare and contrast file system storage to Oracle ASM

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 1 - 21


Oracle Internal and Oracle Academy Use Only
Preparing to Install Oracle Software
Lesson Subtitle (Optional)

Oracle Internal and Oracle Academy Use Only


Optional Presenter’s Name (or remove block)
Presenter’s Title
Organization, Division, or Business Unit
Month 00, 2022
Objectives

Check server hardware and memory configuration

Update the Oracle Linux operating system

Configure job role separation accounts and groups

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 2


Check Server Hardware and Memory Configuration

› Determining the size of the physical RAM and configured swap space:
# grep MemTotal /proc/meminfo # grep SwapTotal /proc/meminfo

› Determining the amount of space in the /tmp directory:


# df –h /tmp

› Determining the amount of free RAM and disk swap space:

Oracle Internal and Oracle Academy Use Only


# free

› Determining the system architecture:


# uname -m

› Verifying the shared memory is mounted with sufficient size:


# df –h /dev/shm

Your system must meet a set of minimum requirements in the areas of physical RAM size, swap space
size, free space in the /tmp directory, system architecture, and shared memory. If the size of the physical
RAM installed in the system is less than the required size, then you must install more memory before
continuing. If necessary, see your operating system documentation for information about how to
configure additional swap space. If the free space available in the /tmp directory is less than what is
required, then complete one of the following steps:
• Delete unnecessary files the /tmp directory to meet the disk space requirement.
• When you set the Oracle user's environment, also set the TMP and TMPDIR environment variables
to the directory you want to use instead of /tmp.

Verify that the processor architecture matches the Oracle software release to install. Verify that shared
memory (/dev/shm) is mounted properly with sufficient size. The df-h command displays the file
system on which /dev/shm is mounted, and also displays in GB the total size and free size of shared
memory.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 3


Update the Oracle Linux Operating System

› Update (upgrade) all operating system packages:


# yum –y update # yum –y upgrade

› Reboot the machine to load the new kernel (if updated):


# reboot

› Install the Oracle Preinstallation RPM (Select required version):

Oracle Internal and Oracle Academy Use Only


# yum –y install oracle-database-server-12cR2-preinstall
# yum –y install oracle-database-preinstall-19c

It is strongly recommended that you update your operating system to address security advisories,
Common Vulnerabilities and Exposures (CVEs), bug fixes, and potential enhancements. This can be
performed with the command yum –y update. Alternate syntax includes yum –y upgrade. The
upgrade option is the same as the update command with the –obsoletes flag set. This is the Oracle
Linux default as defined in the /etc/[Link] configuration file. Therefore, the two commands are
identical on most systems unless the default configuration has been changed.

Installation of Oracle software starts with examining the operating system. A minimal installation option
can be performed when installing Oracle Linux. Having a reduced number of installed packages enhances
performance and security because every package installed can become a source of security vulnerabilities
and require updates.

A minimal installation lacks many RPMs required for Oracle software installation. Oracle Preinstallation
RPM will install a minimal set of additional packages required to perform Oracle software installations.

The Oracle Preinstallation RPM installs the X11 client libraries, but it does not install the X Window System
server packages if they were already missing. To use graphical user interfaces such as OUI, configuration
assistants, and Oracle Enterprise Manager, set the display to a remote system that has the X Window
System server packages installed.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 4


Create Groups for Job Role Separation

› Creating Oracle Grid Infrastructure groups:


# groupadd -g 54327 asmdba
# groupadd -g 54328 asmoper
# groupadd -g 54329 asmadmin

› Creating Oracle Database groups:


# groupadd -g 54323 oper

Oracle Internal and Oracle Academy Use Only


# groupadd -g 54324 backupdba
# groupadd -g 54325 dgdba
# groupadd -g 54326 kmdba
# groupadd -g 54330 racdba

The slide shows the commands to create the additional operating system groups for Oracle Grid
Infrastructure software and Oracle database software for use in a job role separation environment. These
groups are optional and not necessary if the environment uses a single owner and single group. The
group identification numbers are the numbers used in the documentation. Any numbers can be used so
long as they are unique to the server where the software is being installed. If the server is part of a larger
cluster, then ensure that the group identification numbers are consistent across the cluster. Not shown on
this slide are the dba and oinstall groups. These two groups were created by the Oracle Preinstallation
RPM.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 5


Modify and Create Users

› Change the password for the oracle account:


# passwd oracle

› Modify the oracle account to add the extended groups:


# usermod –a –G asmdba,backupdba,dgdba,kmdba,racdba oracle

› Create the grid account:

Oracle Internal and Oracle Academy Use Only


# useradd –u 54323 –g oinstall –G asmadmin,asmdba,asmoper,dba grid
› Change the password for the grid account:
# passwd grid

The Oracle Preinstallation RPM created the oracle account but did not set a password. The only groups
that are assigned to the oracle account are oinstall as the primary group and dba as the only
secondary group. You need to set the password for the oracle account to a known value that meets the
security requirements in your organization.

If you are performing a job role separation of duties installation, then modify the oracle account so that
it is a member of the additional required groups. You will need to create the grid account and define the
required groups for that account. After the grid account is created, set its password to a known value
that meets the security requirements in your organization. Security best practices imply that the
passwords should not be the same for multiple accounts.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 6


View and Adjust Pluggable Authentication Module (PAM) Limits

› View the Linux PAM configuration limits for the oracle account:
# cat /etc/security/limits.d/[Link]

› Create a limits configuration file for the grid account.


– Create a copy of the file that the oracle account uses.
– Change the user oracle to the grid user.
– Use the same settings that the oracle account uses.

Oracle Internal and Oracle Academy Use Only


# cat /etc/security/limits.d/[Link] |
sed 's/oracle/grid /g' > /etc/security/limits.d/oracle-grid-user-
[Link]

The Oracle Preinstallation RPM configured the pam_limits module for Linux Pluggable Authentication
Module (PAM). The pam_limits PAM module sets limits on the system resources that can be obtained
in a user-session. Default limits are defined in the configuration file /etc/security/[Link].
Additional configuration limits can be set in multiple individual files located in the
/etc/security/limits.d directory. Depending on your operating system version and the version of
the Oracle Preinstallation RPM installed, limits for the oracle account can be defined in either the default
file or as an individual file.

When performing a job role separation of duties installation, limits for the grid account need to be
defined. These limits can be a copy of the limits set for the oracle account. You can edit the file
containing the limits for the oracle account and add a new entry for each limit defined. You can also
create a separate individual file that defines the limits for only the grid account. This is in addition to the
file for the oracle account. Creating a separate file can be done with a single command that dumps the
contents of the file for oracle and changing all occurrences of "oracle" to "grid". It is important that
the replacement match the word oracle followed by a space. The output can then be saved to another
file. The slide shows an example command that can perform this action.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 7


Create Initial Installation Directories
› Create the Oracle base and Oracle inventory directories:
# mkdir –p /u01/app/grid
# mkdir –p /u01/app/oraInventory
# chown –R grid:oinstall /u01/app/grid
# chown –R grid:oinstall /u01/app/oraInventory
# chmod –R 775 /u01/app

Oracle Internal and Oracle Academy Use Only


Identify storage areas for database files.
– Oracle ASM diskgroup (+DATA) and corresponding Oracle ASM disks
– File system location example: /u01/app/oracle/oradata
› Identify storage areas for recovery files.
– Oracle ASM diskgroup (+FRA) and corresponding Oracle ASM disks
– File system location example: /u02/app/oracle/fast_recovery_area

Create the initial installation directories for the Oracle software installation. These initial installation
directories are the same location for both Oracle Grid Infrastructure and Oracle database software. With
job role separation, the ownership will be different. The example on the slide is for job role separation of
duties, where the example in the documentation is for a single user.

For a database that will be created on a file system, you should also create the directories to store the
database files and the recovery area files. Oracle recommends that you keep the fast recovery area on a
separate physical disk than that of the database file directory. This method enables you to use the fast
recovery area to retrieve data if the disk containing oradata is unusable for any reason. This course is
focused on using Oracle Automatic Storage Management for storage instead of using file systems. Oracle
recommends creating two disk groups for the same reasons that it is recommended to create two areas
of file systems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 8


Summary

Check server hardware and memory configuration

Update the Oracle Linux operating system

Oracle Internal and Oracle Academy Use Only


Configure job role separation accounts and groups

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 2 - 9


Oracle Internal and Oracle Academy Use Only
Installing Oracle Grid Infrastructure for a
Stand-Alone Server
Lesson Subtitle (Optional)

Oracle Internal and Oracle Academy Use Only


Optional Presenter’s Name (or remove block)
Presenter’s Title
Organization, Division, or Business Unit
Month 00, 2022
Objectives

Install Oracle Grid Infrastructure for a stand-alone server

Create recovery Oracle ASM disk group using Oracle ASMCA

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 2


Overview of
Oracle Grid Infrastructure
Oracle Grid
Infrastructure
▪ Improved availability of Oracle Database in
case of a hardware or software failure

▪ A single set of binaries installed into an Oracle


Grid Infrastructure home
Oracle Restart Oracle
(Stand-alone Clusterware ▪ Install before you install and create a database

Oracle Internal and Oracle Academy Use Only


Server) (Clustered Env)

Oracle Automatic
Storage Management

The Oracle Grid Infrastructure home includes Oracle Restart and Oracle Automatic Storage Management
(Oracle ASM) software.

When you install Oracle Grid Infrastructure for a stand-alone server, the Oracle Universal Installer (OUI)
configures a single-node version of Oracle Cluster Synchronization Services (CSS). CSS is a daemon
process that enables synchronization between an Oracle ASM instance and the database instances that
rely on it for database file storage. The CSS daemon is installed in and runs from the Oracle Grid
Infrastructure home.

The Oracle Grid Infrastructure for a stand-alone server is installed on the same server as the Oracle
Database software. You should install Oracle Grid Infrastructure for a stand-alone server before you
install and create the Oracle database. Otherwise, you will need to manually register the database with
Oracle Restart.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 3


Configuring Storage for Oracle
Automatic Storage Management

▪ Determine the number of devices and the


…… amount of free disk space that you require.

▪ Create a storage resource that Oracle ASM


can use.
Disk Partition
ASMLib ▪ Configure storage device path persistence

Oracle Internal and Oracle Academy Use Only


Logical Volume by some means.
ASMFD
Logical Unit Number
Udev Rules
Network File System

To identify the storage requirements for using Oracle ASM, you must determine the number of devices
and the amount of free disk space that you require. You need to determine whether you want to use
Oracle ASM for Oracle Database files (data files, control files, and redo log files), recovery files, or both.
You need to choose the Oracle ASM redundancy level to use for each Oracle ASM disk group that you
create. The redundancy level determines how Oracle ASM mirrors files in the disk group and determines
the number of disks and amount of disk space that is required.

You can create an Oracle ASM disk group using one of the following storage resources: Disk Partition,
Logical Unit Number (LUN), Logical Volume, or Network File System (NFS). Oracle does not recommend
using logical volume managers for mirroring because Oracle ASM provides mirroring. An Oracle ASM disk
group can be created from NFS files, including Oracle Direct NFS (dNFS). The NFS files that are
provisioned to a disk group may be from multiple NFS servers to provide better load balancing and
flexible capacity planning.

You can maintain storage file path persistence by using Oracle ASMLib, Oracle ASMFD, or creating a rules
file. Refer to the Automatic Storage Management Administrator's Guide for detailed information about
these configuration tasks.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 4


Oracle Grid Infrastructure Installation:
System Requirements for Linux x86-64 Systems

Grid Infrastructure 12.2 Grid Infrastructure 19c


At least 8 GB RAM for the Oracle ASM instance and Oracle Restart At least 8 GB RAM for the Oracle ASM instance and Oracle Restart
Swap space: Swap space:
• 8 GB – 16 GB RAM, swap space = RAM • 8 GB – 16 GB RAM, swap space = RAM
• 16 GB+ RAM, swap space = 16 GB • 16 GB+ RAM, swap space = 16 GB

At least 8.6 GB disk space At least 12 GB disk space

At least 1 GB of disk space in the /tmp directory At least 1 GB of disk space in the /tmp directory

Oracle Internal and Oracle Academy Use Only


Operating system: Operating system:
• Oracle Linux 7 with the Unbreakable Enterprise kernel 3 & 4 • Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6
• Oracle Linux 7 with the Unbreakable Enterprise kernel 2,3, & 4 • Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4
• Red Hat Enterprise Linux 7: 3.10.0-123.el7.x86_64 or later • Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later
• Red Hat Enterprise Linux 6.4: 2.6.32-358.el6.x86_64 or later • Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later
• SUSE Linux Enterprise Server 12 SP1: 3.12.49-11.1 or later • SUSE Linux Enterprise Server 15: 4.12.14-23-default or later
• SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later
Oracle Preinstallation RPM for required packages: Oracle Preinstallation RPM for required packages:
• oracle-database-server-12cR2-preinstall • oracle-database-preinstall-19c
At least 1024 x 768 display resolution for Oracle Universal Installer At least 1024 x 768 display resolution for Oracle Universal Installer

The Oracle Grid Infrastructure for Standalone Server installation requires a minimum amount of RAM to
install and function. For version 12.2 and 19c, the minimum requirement is 4 GB RAM.

The amount of swap space required is dependent on the amount of RAM:


• Less than or equal to 16 GB RAM: Swap space should be equal to the size of the RAM
• More than 16 GB RAM: Swap space should be 16 GB

The /tmp directory should have sufficient free space for the installation. The minimum space required is
1 GB of free space.

The installation directory (ORACLE_HOME) should have sufficient space for the software binaries. At least
8.6 GB of disk space is required for version 12.2. For version 19c, the space requirement increases to 12 GB.

For more information about the supported operating system kernels, required packages for each OS
version, and other system requirements, refer to the Database Installation Guide for Linux.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 5


Installation Option

Step 1:
‒ Defaults to cluster installation
‒ Change to stand-alone server
installation

Oracle Internal and Oracle Academy Use Only


The above image depicts the first window, which is the Installation Options window, of the Oracle
Universal Installer (OUI) for Oracle Grid Infrastructure Release 12.2. OUI provides the following installation
options for Oracle Grid Infrastructure:
• Configure Oracle Grid Infrastructure for a New Cluster: Use this option to install Oracle
Clusterware and Oracle ASM or Oracle Real Application Clusters (Oracle RAC) to create a
multicluster environment.
• Configure Oracle Grid Infrastructure for a Standalone Server: Use this option to install Oracle
Grid Infrastructure for a single server and use Oracle ASM and Oracle Restart features.
• Upgrade Oracle Grid Infrastructure or Oracle Automatic Storage Management: Use this option
to upgrade an existing Oracle Grid Infrastructure or Oracle ASM installation.
• Set Up Software Only: Use this option to only install Oracle Grid Infrastructure software binaries,
without any configuration. Advanced users can use this option to manually configure and enable
the software.

The default option is Configure Oracle Grid Infrastructure for a New Cluster. In this course, we are
installing Oracle Grid Infrastructure for a stand-alone server.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 6


Create ASM Disk Group

Step 2:
‒ Defaults to Normal redundancy
‒ Select the redundancy level and
the allocation unit size.
‒ Select the Oracle ASM disks to
include in the data disk group.

Oracle Internal and Oracle Academy Use Only


‒ Optionally, configure Oracle ASM
Filter Driver.

The above image depicts the Create ASM Disk Group window of the OUI, which provides options to create
an Oracle ASM disk group to use for storing Oracle Grid Infrastructure data. The first field on the window
is to enter a disk group name, which defaults to DATA.
You can then select a redundancy level for your disk group. The available redundancy levels are:
• High: Uses three-way mirroring of disk group contents and requires at least three disks. The
effective disk space in a high redundancy disk group is one-third the sum of the disk space in all
of its devices.
• Normal: Uses two-way mirroring of disk group contents and requires at least two disks
• External: Does not mirror the disks. You can select this if the disks used by the disk group are
mirrored at the storage level.
You can also update the allocation unit size, which defaults to 4 MB. The available options for allocation
unit size are 1, 2, 4, 8, 16, 32, and 64 MB. Every Oracle ASM disk is divided into allocation units. Larger
allocation unit size can provide performance advantages.
Note: You must carefully evaluate the allocation unit size option as you cannot change it after creating an
Oracle ASM disk group.
The Add Disks section of the screen shows Candidate Disks and All Disks options for sorting or
displaying the disks. Here you can select multiple disks to include in the DATA disk group. If the disks are
not showing in the list of Candidate Disks or All Disks, then you can change the disk discovery path using
the Change Discovery Path option.
If you want to use Oracle ASM Filter Driver (Oracle ASMFD) to manage your Oracle ASM disk devices, then
select Configure Oracle ASM Filter Driver on the Create ASM Disk Group screen.
For more information about Oracle ASM redundancy levels, allocation unit size, and other options, see
Automatic Storage Management Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 7


ASM Password

Step 3:
‒ Defaults to use different
passwords for SYS and
ASMSNMP accounts
‒ Type the password for the SYS
and ASMSNMP accounts if using

Oracle Internal and Oracle Academy Use Only


the option for same passwords.
‒ Password rules have changed in
Oracle Grid Infrastructure 12.2.

The above image depicts the Oracle ASM Password window of the OUI where you can define passwords
for SYS and ASMSNMP users. Oracle ASM requires the SYS user for ASM administration and the ASMSNMP
user for ASM instance monitoring.

This window has two options to set the password:


• Use different passwords for these accounts, where you can use separate passwords for SYS and
ASMSNMP accounts to create role-based system privileges.
• Use same passwords for these accounts, where you can use the same password for both the
accounts.

The characteristics for SYS and ASMSNMP passwords for Oracle Grid Infrastructure are:
• Must be between 8 and 30 characters long
• Must not start with a number
• Must not be Oracle-reserved words, like database
• Must not be a dictionary word
• Must not be change_on_install for SYSASM account or if you use the same password for both the
accounts
• Should contain at least one alphabetic, one numeric, and one of the following three punctuation
mark characters: hyphens (-), underscores (_), or number sign (#)

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 8


Management Options

Step 4:
‒ Register the product with
Enterprise Manager (EM) cloud
control to monitor and manage
it from a single console
(Optional).

Oracle Internal and Oracle Academy Use Only


The above image depicts the management options for Oracle Grid Infrastructure and Oracle ASM
instance. You can configure this instance to be managed by Enterprise Manager Cloud Control. This is an
optional configuration.

If you want to register, then select the Register with Enterprise Manager (EM) Cloud Control check box
and enter the following details:
• OMS host: Host name of the server where the management repository is running
• OMS port: Port number of Oracle Enterprise Manager to receive requests from the Management
Service
• EM Admin User Name: Enterprise manager administrator username
• EM Admin Password: Enterprise manager administrator account password

For more information about Enterprise Manager Cloud Control, see Enterprise Manager Cloud Control
Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 9


Operating System Groups

Step 5:
‒ Select the appropriate groups
for Oracle ASM administrator,
Oracle ASM DBA, and Oracle
ASM operator.
‒ You created these groups

Oracle Internal and Oracle Academy Use Only


while preparing the system for
installation.

The above image depicts the Operating System Groups window of the OUI where you can select the
groups that you want to use for operating system authentication to Oracle ASM. These groups are used
to implement job role separation of duties. If you are not using job role separation of duties, then set all of
the groups to the same operating system group which is typically dba.

The available options for group selection are:


• Oracle ASM Administrator (OSASM) Group: Members of this group have full administrative
access to Oracle ASM and can configure and manage Oracle ASM instances. If your system has a
group named asmadmin, then the installer uses it as default OASM group.
• Oracle ASM DBA (OSDBA for ASM) Group: Members of this group have read and write access to
the Oracle ASM managed files. The Oracle Grid Infrastructure installation owner must be a
member of this group. If your system has a group named asmdba, then the installer uses it as
default OSDBA for ASM group.
• Oracle ASM Operator (OSOPER for ASM) Group (Optional): Members of this group have access
to a subset of the Oracle ASM administrative privileges and can start and stop the storage tier. If
your system has a group named asmoper, then the installer uses it as default OSOPER for ASM
group.

You created these groups and assigned them as secondary groups to the user account performing the
installation while preparing your operating system for Oracle Grid Infrastructure installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 10


Installation Location

Step 6:
‒ Defaults to
/u01/app/<username> for
Oracle base and
/u01/app/<username>/prod
uct/12.2.0/grid for
software location

Oracle Internal and Oracle Academy Use Only


‒ Click “Browse” to select a
different directory for Oracle
base and software location

The above image depicts the Installation Location window of the OUI where you can specify an Oracle
base location and software location. On this screen, you need to specify two locations:
• Oracle base: Designate the Oracle base directory to store Oracle software and configuration-
related files. It is owned by the installation user and each distinct operating system user should
use their own location. You can either select a location that contains an existing configuration or
that is empty.
If the operating system ORACLE_BASE environment variable is not defined, as directed by the
installation manual, then the default will be /u01/app/<username> where <username> is the
operating system account name performing the installation, typically oracle or grid.
• Software location: Designate the Oracle Grid Infrastructure home directory to store Oracle
software files separate from the configuration files in the Oracle base.

The installer selects a default location if Oracle base and Grid home exist. You can click Browse to change
the default location.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 11


Create Inventory

Step 7:
‒ Steps changed because
oraInventory does not exist
on the host
‒ Defaults to
/u01/app/inventory

Oracle Internal and Oracle Academy Use Only


‒ Click “Browse” to select a
different location for Oracle
Inventory.
‒ Make sure the selected location
is writable by the Grid
installation user.

The above image depicts the Create Inventory window of the OUI. For the first installation on a particular
host, you need to specify an inventory directory for installation metadata files, such as install log files. The
installer automatically selects a location, based on the Oracle base path provided during installation or
ORACLE_BASE environment variable setting to create inventory directory, but you can select a different
directory using Browse button.
• If you have set the ORACLE_BASE environment variable for the Oracle Grid Infrastructure
installation user or provided an Oracle base path during installation, the OUI creates the
oraInventory directory in the path ORACLE_BASE/../oraInventory, such as
/u01/app/oraInventory.
• If you have not set the ORACLE_BASE environment variable for the Oracle Grid Infrastructure
installation user or have not provided an Oracle base path during installation, then oraInventory is
placed in home directory of the Oracle Grid Infrastructure installation user, such as
/home/oracle/oraInventory. This can cause permission errors for other installations with
different software installation owners.

Note: The oraInventory is shared by all Oracle software installations, so you should not place it as
subdirectories following the ORACLE_BASE. It should be in a directory parallel to the ORACLE_BASE, for
example, if ORACLE_BASE is in the /u01/app directory, then the oraInventory, should also be in the
same directory.

It also shows the operating system group name for the directory and only the members of that operating
system group will have write permissions to the inventory directory. The group cannot be changed on this
window. It is automatically set to be the primary operating system group of the user that is performing
the installation. The group name oinstall is suggested by the Oracle Database Installation Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 12


Root Script Execution

Step 8:
‒ Defaults to run configuration
scripts manually
‒ Select the “Automatically run
configuration scripts” check box
to automatically run

Oracle Internal and Oracle Academy Use Only


configuration scripts (Optional).
‒ Select method and enter
password to run root scripts.

The above image depicts the Root script execution window of the OUI. For the installation process to
complete, certain operations need to be preformed as a root user. OUI gives you an option to
automatically run the configuration scripts by selecting Automatically run configuration scripts option
on this screen. The OUI provides you the following two options to automatically run the scripts:
• Use the root user credentials: Provide the root user password.
• Use sudo: Sudo is a Linux and UNIX utility that enables members of the sudoers list privileges to
run individual commands as root. Provide the username and password of an operating system
user that is a member of sudoers, and is authorized to run sudo. System administrators can
configure a user to be member of the sudoers list.
In this option, you need to provide Sudo program path, username of the user that is member of
sudoers list, and password for that user.

If you want to run scripts manually during the installation, then you can skip this step. A dialog box will
then appear during the installation to manually run the scripts that require the root privilege. The dialog
box will indicate the name and path of each script that is required to be run.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 13


Prerequisite Checks

Step 9:
‒ Checks if the system meets
minimum installation and
configuration requirements for
Oracle Grid Infrastructure 12.2
‒ No inputs required on this

Oracle Internal and Oracle Academy Use Only


window unless OUI detects
errors

The above image depicts the Prerequisite Checks window of the OUI. The installer verifies that the target
environment meets minimum installation and configuration requirements for Oracle Grid Infrastructure
installation.

If installer detects any issues, it lists them as verification results with Failed or Warning status. You can
find more details about a failed check and click Check Again to run a prerequisites check again if you
have corrected any errors.

The OUI includes fix-up scripts to fix many configuration issues. If an issue is fixable by the installer, then
it shows them in Fixable column. You can select a fixable issue and click Fix and Check Again. Not all
errors can be corrected by the installer, such as configuration change that might require a reboot of the
server.

If you want to proceed with the Oracle Grid Infrastructure Installation without fixing the prerequisite
issues, you can click Ignore All. You are not advised to ignore the issues because the installation may
abort or it can cause performance and stability problems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 14


Summary

Step 10:
‒ Shows a summary of all the
options you have selected for
the installation
‒ Click “Edit” to modify a
particular setting or option.

Oracle Internal and Oracle Academy Use Only


‒ Click “Save Response File” to
store the input options for use
in feature installs (Optional).

The above image depicts the Summary window of the OUI, where it shows configuration information and
settings you chose on the previous installer screens. The summary has the following four sections:
• Global settings, which include disk space, install option, Oracle base path, Grid home path, source
location, operating system groups, and root script execution configuration
• Inventory information, which includes inventory directory path and inventory group
• Management information, which includes a management method such as Oracle Enterprise
Manager Cloud Control
• Grid Infrastructure Settings, which include Oracle ASM disk group, storage redundancy, and
disks selected for Oracle ASM disk group

You can edit the configuration information and settings on this page, if you have selected a wrong option
or simply want to change any selection.

This screen also gives you an option to save a response file using the Save Response File button. You
can use the response file to perform future unattended installation on multiple servers using the same
options and settings.

After you verify or edit the information this page, click Install to start the Oracle Grid Infrastructure 12.2
installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 15


Install Product

Step 11:
‒ Installs the product with
selected options
‒ Dialog box to confirm root
script execution as the
root user

Oracle Internal and Oracle Academy Use Only


The above image depicts the Install Product window of the OUI. Here you can check the progress of the
installation process in the progress bar and the current object being installed, below the progress bar. The
installer also shows the status of various installation activities, in the status section, such as:
• Install Oracle Grid Infrastructure and Automatic Storage Management for a Standalone Server
– Prepare
– Copy files
– Link binaries
– Setup
• Setup Oracle Base
• Update Inventory
• Execute Root Scripts
• Install and Configure Oracle Grid Infrastructure for a Standalone Server

The installer also has a Details button to show more information about the current installation and
configuration action or task. If any installation step fails, then you can fix the problem and click Retry.

Before the installer automatically executes the root scripts if that option was selected, it shows a dialog
box with a message that reads “Configuration scripts generated by the installer need to be run as a
privileged user (root). Installer will run these scripts using the privileged user credentials provided earlier.
Are you sure you want to continue?” Click Yes to execute the scripts automatically and continue with the
installation process.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 16


Finish

Step 12:
‒ The installation
completed successfully.

Oracle Internal and Oracle Academy Use Only


The above image depicts the Finish window of the OUI which shows that the installation of Oracle Grid
Infrastructure for a Standalone Server was successful. The Oracle Grid Infrastructure is installed on your
system with the configuration information you provided during the installation.

You can quit the installer now using the Close button on the bottom-right corner of the window.

Review the Grid Infrastructure Installation and Upgrade Guide for any postinstallation tasks. Some of the
most important postinstallation tasks include:
• Downloading and installing patch updates
• Creating a backup of the [Link] script
• Downloading and installing the ORAchk health check tool

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 17


Oracle ASMCA: Home

• Oracle ASM Configuration


Assistant (ASMCA) Disk
Groups window
• Shows existing disk groups
• Creates a new Oracle ASM disk
group to store recovery files

Oracle Internal and Oracle Academy Use Only


The above image depicts the Disk Groups tab of the Oracle ASMCA home window, which lists all the
Oracle ASM disk groups. Here you can create a new disk group or add disks to an existing disk group. It
provides the following information about every disk group:
• Disk group name
• Total size in GB
• Free size in GB
• Usable size in GB
• Redundancy level
• State as mounted or unmounted

You can mount all disk groups using the Mount All option and unmount all disk groups using the
Unmount All option.

Click Create to create a new disk group for storing recovery files. Oracle recommends you create at least
two disk groups, one for data and one for recovery information. If you do not create a new disk group for
the recovery files, then all the recovery files will be written on the data disk group, and you will not be able
to use the files for recovery if data disk group fails.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 18


Oracle ASMCA: Create Disk Group

• Oracle ASMCA Create Disk Group


window
• Similar to the Create ASM Disk Group
step of Oracle Grid Infrastructure
Installer
• Defaults to Normal redundancy

Oracle Internal and Oracle Academy Use Only


• Provide name for the recovery disk
group, select the disks you want to
include in the disk group, and update
allocation unit size
• Define Oracle ASM and database
compatibility settings

The above image depicts options to create an Oracle ASM disk group using Oracle ASMCA for storing
Oracle Grid Infrastructure recovery files. The first field on the screen is to enter a disk group name.

You can then select a redundancy level for your disk group. The available redundancy levels are High,
Normal, and External.
• High: Uses three-way mirroring of disk group contents and requires at least three disks. The
effective disk space in a high redundancy disk group is one-third the sum of the disk space in all
of its devices.
• Normal: Uses two-way mirroring of disk group contents and requires at least two disks
• External: Does not mirror the disks. You can select this if the disks used by the disk group are
mirrored at storage level.

You can also update the allocation unit size, which defaults to 4 MB. The available options for allocation
unit size are 1, 2, 4, 8, 16, 32, and 64 MB. Every Oracle ASM disk is divided into allocation units. A larger
allocation unit size can provide performance advantages.

Note: You must carefully evaluate the allocation unit size option as you cannot change it after creating an
Oracle ASM disk group.

The Add Disks section of the screen shows the Candidate Disks and All Disks options for sorting or
displaying the disks. Here you can select multiple disks to include in the FRA disk group. If the disks are
not showing in the list of Candidate Disks or All Disks, then you can change the disk discovery path using
the Change Discovery Path option.

For more information, see Automatic Storage Management Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 19


Summary

Install Oracle Grid Infrastructure for a stand-alone server

Create FRA Oracle ASM disk group to store recovery files


using Oracle ASMCA

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 3 - 20


Installing Oracle Database Software
Lesson Subtitle (Optional)

Oracle Internal and Oracle Academy Use Only


Optional Presenter’s Name (or remove block)
Presenter’s Title
Organization, Division, or Business Unit
Month 00, 2022
Objectives

Describe operating system groups and users required


for Oracle Database software installation

Install Oracle Database software

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 2


Oracle Database Software Installation: System Requirements

Oracle Database 12.2 Oracle Database 19c


At least 1 GB RAM for Oracle Database installation At least 1 GB RAM for Oracle Database installation. 2 GB RAM recommended
Swap space: Swap space:
• 1 GB – 2 GB RAM, swap space = 1.5 times of RAM size • 1 GB – 2 GB RAM, swap space = 1.5 times of RAM size
• 2 GB – 16 GB RAM, swap space = RAM • 2 GB – 16 GB RAM, swap space = RAM
• 16 GB+ RAM, swap space = 16 GB • 16 GB+ RAM, swap space = 16 GB
Disk space: Disk space:
• Enterprise Edition- 7.5 GB minimum • Enterprise Edition- 7.5 GB minimum
• Standard Edition 2- 7.5 GB minimum • Standard Edition 2- 7.5 GB minimum
At least 1 GB of disk space in the /tmp directory At least 1 GB of disk space in the /tmp directory

Oracle Internal and Oracle Academy Use Only


Operating system: Operating system:
• Oracle Linux 7 with the Unbreakable Enterprise kernel 3 & 4 • Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6
• Oracle Linux 6 with the Unbreakable Enterprise kernel 2,3, & 4 • Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4 & 5
• Red Hat Enterprise Linux 7: 3.10.0-123.el7.x86_64 or later • Oracle Linux 7.7 with the Unbreakable Enterprise Kernel 6
• Red Hat Enterprise Linux 6.4: 2.6.32-358.el6.x86_64 or later • Oracle Linux 7.5 with the Red Hat Compatible Kernel
• SUSE Linux Enterprise Server 12 SP1: 3.12.49-11.1 or later • Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later
• Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later
• SUSE Linux Enterprise Server 15: 4.12.14-23-default or later
• SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later
Oracle Preinstallation RPM for required packages: Oracle Preinstallation RPM for required packages:
• oracle-database-server-12cR2-preinstall • oracle-database-preinstall-19c
At least 1024 x 768 display resolution for Oracle Universal Installer At least 1024 x 768 display resolution for Oracle Universal Installer

The Oracle Database software installation requires a minimum amount of RAM to install and function. For
version 12.2 and 19c the minimum is 1 GB RAM.
The amount of swap space required is dependent on the amount of RAM:
• Less than or equal to 2 GB RAM: Swap space should be 1.5 times the size of the
• RAM Between 2 GB and 16 GB RAM: Swap space should be equal to the size of RAM.
• More than 16 GB RAM: Swap space should be equal to 16 GB.
The /tmp directory should have sufficient free space for the installation. The minimum space required is
1 GB of free space.
The installation directory (ORACLE_HOME) should have sufficient space for the software binaries. At least
7.5 GB of disk space is required for Enterprise Edition and Standard and Standard Edition 2.

For more information about the supported operating system kernels, required packages for each OS
version, and other system requirements, refer to Oracle Database Installation Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 3


Configure Security Updates

Step 1:
‒ Defaults to receive security
updates via My Oracle Support
‒ Provide My Oracle Support
email address and password to
receive critical security

Oracle Internal and Oracle Academy Use Only


updates.

The above image depicts the first window, Configure Security Updates, of the Oracle Universal Installer
(OUI) for the Oracle Database installation. Here you can provide either of the following details:
• Email address to receive all Oracle Database security updates. If you choose this option, then
Oracle Support will not have your configuration information and will provide you general security
updates.
• My Oracle Support account details, email, and password, to receive security updates specific to
your Oracle Database configuration. If you choose this option, then Security Updates gathers
configuration information of your installed Oracle products and sends it to Oracle Support
systems. You can check the information it gathers using your My Oracle Support account and
review the health check recommendations, patch recommendations, and other recommendations
for your system in addition to the security alerts.

You can also skip this step, if you do not want to receive security updates, and click Next. Oracle
recommends that you sign up for receiving the security updates to safeguard your database against any
security threats.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 4


Select Installation Option

Step 2:
‒ Defaults to create and
configure a database with
the software installation
‒ Change to install database
software only

Oracle Internal and Oracle Academy Use Only


The above image depicts the Select Installation Option window of the OUI. This window provides the
following installation options for Oracle Database:
• Create and configure a database: Use this option to install Oracle Database software and create
and configure a new database with the OUI. With this option, you do not get some advanced
options, such as selecting a recovery disk group.
• Install database software only: Use this option to only install Oracle Database software binaries,
without any configuration. After you set up the software using this option, you can use Oracle
Database Configuration Assistant (DBCA) to create and configure a new database.
• Upgrade an existing database: Use this option to upgrade an existing Oracle Database software
installation, along with the Oracle database.

The default option is Create and configure a database. In this course, we are installing the Oracle
Database software only. In the lesson "Creating an Oracle Database using Oracle DBCA", we will show how
to create and configure a new database using the software only installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 5


Select Database Installation Option

Step 3:
‒ Defaults to single instance
database installation
‒ Provides options to create a
database for clustered
environment

Oracle Internal and Oracle Academy Use Only


The above image depicts the Grid Installation Options window of the OUI, where you can specify the type
of database installation you want to perform. OUI provides you the following options:
• Single instance database installation: Use this option to create a single instance database. You
can configure this database with Oracle Grid Infrastructure to use Oracle Restart capabilities.
• Oracle Real Application Clusters database installation: Use this option to create a new database
as part of the Real Application Clusters and use it with Oracle Grid Infrastructure.
• Oracle RAC One Node database installation: Use this option to create a new Oracle RAC One
node database.

The default option is Single instance database installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 6


Select Database Edition

Step 4:
‒ Defaults to enterprise edition
(7.5 GB)
‒ Other editions are not available
when Oracle Database is
installed with Oracle Grid

Oracle Internal and Oracle Academy Use Only


Infrastructure

The above image depicts the Select Database Edition window of the OUI where you can select the
database edition you want to install. Oracle Database software has the following two editions:
• Enterprise Edition (7.5 GB): This edition requires 7.5 GB of disk space and is designed for
enterprise-level applications to store mission-critical data. It is a scalable database edition that
provides high-availability, security, and performance features and is suitable for data warehousing
and high-security online transaction processing (OLTP) environments. All separately licensed
enterprise edition options are automatically installed with this edition.
• Standard Edition 2 (7.5 GB): This edition requires 7.5 GB of disk space and is designed for small
and medium-sized businesses requiring a robust database system without the advanced features
in Oracle Database Enterprise Edition. It is a cost-effective version of Oracle's enterprise-grade
database management system.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 7


Specify Installation Location

Step 5:
‒ Defaults to
/u01/app/<username> for
Oracle base and
/u01/app/<username>/produc
t/12.2.0/dbhome_1 for
software location

Oracle Internal and Oracle Academy Use Only


‒ Oracle base value is taken either
from environment variable setting
or from an existing Oracle base.
‒ Click Browse to select a different
directory for Oracle base and
software location.

The above image depicts the Specify Installation Location window of the OUI where you can specify an
Oracle base location and software location for Oracle Database software. On this screen, you need to
specify two locations:
• Oracle base: Designate the Oracle base directory to store Oracle software and configuration-
related files. It is owned by the installation user and each distinct operating system user should
use their own location. You can either select a location that contains an existing configuration or
that is empty.
If the operating system ORACLE_BASE environment variable is not defined, as directed by the
installation manual, then the default will be /u01/app/<username> where <username> is the
operating system account name performing the installation, typically oracle or grid.
• Software location: Designate the Oracle Database home directory to store Oracle database
software files separate from the configuration files in the Oracle base.

The installer selects default location if Oracle base and Oracle home exist. You can click Browse to change
the default location.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 8


Privileged Operating System Groups

Step 6:
‒ Select the appropriate groups
for Database administrator,
Database operator, Database
backup and recovery, data guard
administrative, and encryption
key management administrative.

Oracle Internal and Oracle Academy Use Only


‒ You created these groups while
preparing the system for
installation.

The above image depicts the Privileged Operating System Groups window of the OUI where you can
select the groups that you want to use for SYS privileges. These groups are used to implement job role
separation of duties. If you are not using job role separation of duties, then set all of the groups to the
same operating system group which is typically dba.

The available options for group selection are:


• OSDBA: Members of this group have full database administrative privileges. If your system has a
group named dba, then the installer uses it as default OSDBA group.
• SOPER: Members of this group have limited administrative privileges. If your system has a group
named oper, then the installer uses it as default OSOPER group. This is an optional group.
• OSBACKUPDBA: Members of this group have limited set of database backup and
recovery−related administrative privileges. If your system has a group named backupdba, then
the installer uses it as default OSBACKUPDBA group.
• OSDGDBA: Members of this group have limited set of Oracle Data Guard administrative and
monitoring privileges. If your system has a group named dgdba, then the installer uses it as
default OSDGDBA group.
• OSKMDBA: Members of this group have limited set of encryption key management privileges,
such as Oracle Wallet Manager management, privileges. If your system has a group named kmdba,
then the installer uses it as default OSKMDBA group.

You created these groups and assigned them as secondary groups to the user account performing the
installation while preparing your operating system for Oracle Database software installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 9


Perform Prerequisite Checks

Step 7:
‒ Checks if the system meets
minimum installation and
configuration requirements for
Oracle Database 12.2
‒ No input required on this step

Oracle Internal and Oracle Academy Use Only


unless errors are detected

The above image depicts the Perform Prerequisite Checks window of the OUI. The installer verifies that
the target environment meets minimum installation and configuration requirements for Oracle Database
software installation.

If installer detects any issues, it lists them as verification results with Failed or Warning status. You can
find more details about a failed check and click Check Again to run a prerequisites check again if you
have corrected any errors.

The OUI includes fix-up scripts to fix many configuration issues. If an issue is fixable by the installer, then
it shows them in Fixable column. You can select a fixable issue and click Fix and Check Again. Not all
errors can be corrected by the installer, such as configuration change that might require a reboot of the
server.

If you want to proceed with the Oracle Database software installation without fixing the prerequisite
issues, you can click Ignore All. You are not advised to ignore the issues because the installation may
abort, or it can cause performance and stability problems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 10


Summary

Step 8:
‒ Shows a summary of all the
options you have selected for
the installation
‒ Click Edit to modify a particular
setting or option.

Oracle Internal and Oracle Academy Use Only


‒ Click Save Response File to
store the input options for use
in future installs (Optional).

The above image depicts Summary window of the OUI where it shows configuration information and
settings you chose on the previous installer screens. The summary includes the following global settings:
• Disk space: Required disk space and available disk space
• Source location: Directory where you unzip the Oracle Database software installation files
• Database edition: Selected database edition and setup information
• Oracle base: Directory selected for the Oracle base for database software installation
• Software location: Directory where Oracle database software files are stored
• Privileged Operating System groups: Groups selected for operating system authentication for
SYS privileges

You can edit the settings on this page, if you have selected a wrong option or simply want to change any
selection.

This screen also gives you an option to save a response file using the Save Response File button. You
can use the response file to perform future unattended installation on multiple servers using the same
options and settings.

After you verify or edit the information on this page, click Install to start the Oracle Database Software
12.1 installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 11


Install Product

Step 9:
‒ Installs the product with
selected options
‒ Execute root script from the
specified location as the
root user to complete the

Oracle Internal and Oracle Academy Use Only


installation.

The above image depicts the Install Product window of the OUI. Here you can check the progress of the
installation process in the progress bar and the current object being installed, below the progress bar. The
installer also shows the status of various installation activities, in the status section, such as:
• Oracle Database installation
– Prepare
– Copy files
– Link binaries
– Setup
• Set up Oracle Base
• Execute Root Scripts

The installer also has a Details button to see more information about the current installation and
configuration action or task. If any installation step fails, then you can fix the problem and click Retry.

You need to run some configuration scripts manually for the Oracle Database installation to complete.
The Execute Configuration Scripts dialog box shows the script location. Steps to run a configuration script
are as follows:
• Open a new terminal window and log in as root.
• Go the script location specified in the Execute Configuration Scripts dialog box and run the script.
• Return to the installer window and click OK to continue with the installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 12


Finish

Step 10:
‒ The installation completed
successfully.

Oracle Internal and Oracle Academy Use Only


The above image depicts the Finish window of the OUI which shows that the installation of Oracle
Database software was successful. The Oracle Database software is installed on your system with the
configuration information you provided during the installation.

You can quit the installer now using Close button on the bottom-right corner of the screen.

Review the Oracle Database Installation Guide for any post-installation tasks.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 13


Summary

Describe operating system groups and users required for Oracle


Database software installation

Install Oracle Database software

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 4 - 14


Lesson Subtitle (Optional)

Creating an Oracle Database


Using Oracle DBCA

Oracle Internal and Oracle Academy Use Only


Optional Presenter’s Name (or remove block)
Presenter’s Title
Organization, Division, or Business Unit
Month 00, 2022
Objectives
Create an Oracle Database

Configure Oracle Database options

Delete an Oracle Database

Oracle Internal and Oracle Academy Use Only


Manage Oracle Database templates

Manage pluggable database

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 2


Planning the Database
As a DBA, you must plan:
• The logical storage structure of the database and its
physical implementation:
– How many disk drives do you have? What type of
storage is being used?
– How many data files will you need? (Plan for
growth.)

Oracle Internal and Oracle Academy Use Only


– How many tablespaces will you use?
– What types of information will be stored?
– Are there any special storage requirements
due to type or size?
• Overall database design
• Database backup strategy

It is important to plan how the logical storage structure of the database will affect system performance
and various database management operations. For example, before creating any tablespaces for your
database, you should know how many data files will make up the tablespace, what type of information will
be stored in each tablespace, and on which disk drives the data files will be physically stored. Information
such as the availability of network attached storage (NAS) and the bandwidth for the private storage
network are important. If storage area networks (SAN) are going to be used, knowing how the logical
volumes are configured and the stripe size is useful.

When planning the overall logical storage of the database structure, take into account the effects that this
structure will have when the database is actually created and running. You may have database objects
that have special storage requirements due to type or size.

In distributed database environments, this planning stage is extremely important. The physical location of
frequently accessed data dramatically affects application performance.

During the planning stage, develop a backup strategy for the database. You can alter the logical storage
structure or design of the database to improve backup efficiency.
Database Operation

Step 1 of 15
‒ Defaults to Create Database
‒ Provides options to configure
database options, delete
existing databases, manage
database templates, and

Oracle Internal and Oracle Academy Use Only


manage pluggable databases

The above image depicts the first window, Database Operation, of the Oracle DBCA GUI. Here you can
select any of the following options:
• Create Database: Use this option to create a new database or a database template.
• Configure an existing Database: Use this option to update database configuration, such as
modifying the connection mode or configuring any options that has not been previously
configured.
• Delete Database: Use this option to delete an existing database and all the data files associated
with it.
• Manage Templates: Use this option to create a new database template or modify an existing
database template. Database templates enable you to save your database definition to an XML file
and use it to create a database.
• Manage Pluggable Databases: Use this option to create a new pluggable database, delete an
existing pluggable database, unplug a pluggable database, and configure pluggable database
options.

Some of the above options, such as Configure Database Options, Delete Database, and Manage
Pluggable Databases, will not be available if you do not have an existing database on the server.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 4


Database Creation Mode

Step 2 of 15
‒ Defaults to create a database
with default configuration that
requires minimal user inputs
‒ Select “Advanced Mode” for
more features and

Oracle Internal and Oracle Academy Use Only


configuration options.

The above image depicts the Creation Mode window of the Oracle DBCA GUI. Here you can select either
of the following options:
• Typical Mode: Use this option to create a database using default configuration options with
minimal user inputs. You need to provide the following information to create a database with this
option:
– Global Database Name: Name of the database
– Storage Type: Storage type from file system or Oracle ASM
– Database Files Location: Storage location for database files
– Fast Recovery Area: Storage location for fast recovery area
– Database Character Set: Character set to store and process character data in the database
– Administrative Password and Confirm Password: Password for administrator account
– Pluggable Database Name: Pluggable database name to add a pluggable database to the
container database
• Advanced Mode: Use this option to customize database options for advanced installation. You
can modify configuration options, such as storage location, initialization parameters, database
type, management options, different password for administrative accounts, and enforcing
database vault option. You need to select a template that supports consolidated database creation
to create a consolidated database in advanced mode.

In this course, we will use the Advanced Mode to configure additional database options.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 5


Database Deployment Type

Step 3 of 15
‒ Defaults to “General Purpose
or Transaction Processing”
template
‒ Select other options as per
your requirements.

Oracle Internal and Oracle Academy Use Only


The above image depicts the Database Template window of the Oracle DBCA GUI where you can select a
preconfigured template to create a database. You can select any of the following database templates:
• Custom Database: Use this template to create a custom database to cater your specific business
needs. You need to make several administrator-level decisions while using this database type.
• General Purpose or Transaction Processing: Use this template to create a preconfigured
database suitable for a wide range of uses, from basic transactions run simultaneously by multiple
users to complex query processing. This database type is ideally suitable for the following uses:
– High data recoverability
– High performance and high availability
– Data processing on decision support systems
– Concurrent and quick query processing for multiple users
• Data Warehouse: Use this template to create a preconfigured database suitable for running
complex scientific queries on large amount of data. Data warehouse databases store historical
data that is required to make business decisions related to customer orders, patterns, support
calls, and sales prospects. This database type is ideally suitable for the following uses:
– Processing data for analytical results and live tracking
– Quick access and query execution on large amounts of data to make business-critical
decisions
• If you have created database templates, then Oracle DBCA will list them on this window. These
templates can be used to quickly create a database with specified configuration for your
organization.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 6


Database Identification

Step 4 of 15
‒ Provide global database name
and Oracle System Identifier for
the database.
‒ Select the “Create As Container
Database” check box to create

Oracle Internal and Oracle Academy Use Only


the database as a container.
‒ You can leave the container
empty to add a database later
or add a pluggable database to
it now.

The above image depicts the Database Identification window of the Oracle DBCA GUI where you can
create unique identification for your database using a global database name and a system identifier (SID).
Enter the following details on this page:
• Global Database Name: It uniquely identifies the database from any other databases on the
server. Global database name is in <database_name>.<database_domain> form, for example
[Link]. The database name part is simply the name of your database and domain
part indicates the domain in which the database is located. Global database name has the
following characteristics:
– The database name part should not be longer than 8 characters and should contain only
alphabetic and numeric characters.
– The domain name part should not be longer than 128 characters and should contain only
alphabetic, numeric, and period (.) character.
• SID: It uniquely identifies a specific instance of the database. Every database has at least one
instance that references the database. You can use any name for SID that is not already in use on
this system. An SID can be up to 8 characters in length and can contain only alphabetic and
numeric characters.
• Create as a Container Database: This option enables you to create the database as a container
database that can support multiple pluggable databases. You can create more pluggable
databases later using Oracle DBCA.
• PDB Name: It uniquely identifies the pluggable database and must follow the database naming
conventions.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 7


Database Storage Option

Step 5 of 15
‒ Defaults to use File System
for Database file storage
‒ Use Oracle ASM for Database
file storage and specify disk
groups for file location and

Oracle Internal and Oracle Academy Use Only


fast recovery area.

The above image depicts the Storage Location window of the Oracle DBCA GUI where you can specify the
storage mechanism and location for database and recovery files. Database files include data, log, and
control files. You get the following file storage options for Single-Instance database:
• File System: Stores and maintains the database files in a file system directory. Oracle DBCA saves
the files using Optimal Flexible Architecture (OFA) and follows standard naming conventions and
placement practices. Oracle DBCA gives you an option to modify these settings using Database
Configuration feature.
• Oracle ASM: Provides simplified administration of database files and offers high-performance
and stability. With Oracle ASM, you manage only a small number of disk groups, instead of
managing several database files. Oracle ASM disk group is a set of storage devices that it manages
as a single logical unit.
Oracle Automatic Storage Management Configuration Assistant (ASMCA) enables you to create,
configure, and manage disk groups. You can also manage Oracle ASM instances using Oracle EM.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 8


Fast Recovery Option

Step 6 of 15
‒ Defaults to use File System
‒ Use Oracle ASM and specify
disk groups for file location
and fast recovery area.
‒ Enable archiving.

Oracle Internal and Oracle Academy Use Only


You configure recovery and enable archiving on this window:
• Specify Fast Recovery Area: Oracle recommends that you configure a Fast Recovery Area (FRA)
to recover your data in case of a system failure. The FRA is an Oracle-managed file system
directory or Oracle ASM disk group that enables you to backup and recover files. You should
specify the FRA outside the data file directory or disk group.
• Enable Archiving: Oracle database archives the redo logs when you enable the archiving. You can
use redo logs to recover a database, check database history information, and update a standby
database.
Archived redo log files, along with the database backup in FRA, guarantees complete data recoverability
in the event of disk failure or operating system malfunction.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 9


Network Configuration

Step 7 of 15
‒ Defaults to use listener on
port 1521 from Oracle Grid
Infrastructure home
‒ Allows you to create a new
listener for Oracle Database

Oracle Internal and Oracle Academy Use Only


home

The above image depicts the Network Configuration window of the Oracle DBCA GUI where you can
either select an existing listener or create a new listener for the database. The listener is a server process
that receives incoming client connection requests and manages traffic of these requests to the server.

If you want to use an existing listener from Oracle Grid Infrastructure home or Oracle Database home, you
can select from the list. The list has following information about every listener:
• Name: Name of the listener
• Port: Port on which it is accepting connection requests
• Oracle Home: Oracle home in which the listener configuration file, [Link], is stored
• Status: Status of the listener; you must select a listener for the database with status Up. If the
listener is not up and running, you must manually start it.

If you want to create a separate listener for Oracle Database, then you can select Create a New Listener
check box and enter Listener Name and Listener Port details.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 10


Oracle Data Vault Config Option

Step 8 of 15
‒ Select Configure Database Vault.
‒ Select Configure Label Security
if appropriate for your
installation.

Oracle Internal and Oracle Academy Use Only


You can configure Oracle Database Vault or choose not to configure Oracle Database Vault.

Perform the following steps to install Oracle Database Vault using Oracle Database Configuration
Assistant (Oracle DBCA):
1. Select Oracle Label Security and Oracle Database Vault.
2. Provide the required Oracle Database Vault user IDs and passwords to proceed with configuration.
To enable a separate Oracle Database Vault administrator, choose to configure the DV_ACCTMGR
user.
3. After you have finished, restart each database instance to finish the software configuration.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 11


Configuration Options

Step 9 of 15
‒ Defaults to use typical settings for
memory based on the system
configuration
‒ Specify memory size and use
automatic memory management.
‒ Configure block size in “Sizing” tab.

Oracle Internal and Oracle Academy Use Only


‒ Select a character set from
“Character Sets” tab based on your
language requirements.
‒ Specify database connection mode
as either dedicate server or shared
server in the “Connection Mode” tab.

The above image depicts the Initialization Parameters window of the Oracle DBCA GUI, which has the
following four tabs:

Memory: Use this tab to set initialization parameters for database memory management. You can select
any of the following two memory management approaches:
• Typical: It requires minimal user inputs or configuration and is sufficient for most environments
and for DBAs who are inexperienced with advanced database creation procedures. You can adjust
the slider to allocate Memory Size (SGA and PGA) from a continuous range of values. The
minimum value of memory that must be allotted is 250 MB.
The Percentage field shows the percentage of your total available system memory allocated to the
Oracle Database. Based on this, the Oracle DBCA automatically allocates the most efficient
amount of memory to the database memory structures. You can select Use Automatic Memory
Management option to allow Oracle instance to automatically manage SGA and PGA size. The
values of SGA and PGA size are dynamic, which you can change anytime.
• Custom: It requires more configuration but provides more control over how database uses the
available system memory. You can allocate specific amount of memory to the SGA and PGA using
Automatic Shared Memory Management as Memory Management option. To control how the
memory is distributed among the SGA memory substructures, select Manual Shared Memory
Management as Memory Management option, and enter values for each SGA subcomponent.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 12


Management Options

Step 10 of 15
‒ Defaults to configure Enterprise
Manager (EM) Database Express
‒ Register the product with EM
Database Express or Enterprise
Manager cloud control to

Oracle Internal and Oracle Academy Use Only


monitor and manage it from a
single console (Optional).

The above image depicts the Management Options window of the Oracle DBCA GUI. You can configure
this instance to be managed by Enterprise Manager Database Express and Enterprise Manager Cloud
Control. This is an optional configuration.

If you want to configure EM Database Express, then provide the EM Database Express port. The default
port is 5500.

If you want to register with EM Cloud Control, then select the Register with Enterprise Manager (EM)
Cloud Control check box and enter the following details:
• OMS host: Host name of the server where the management repository is running
• OMS port: Port number of Oracle Enterprise Manager to receive requests from the Management
Service
• EM Admin User Name: Enterprise manager administrator username
• EM Admin Password: Enterprise manager administrator account password

For more information about Enterprise Manager Cloud Control, see Enterprise Manager Cloud Control
Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 13


Database User Credentials

Step 11 of 15
‒ Defaults to use different
passwords for SYS, SYSTEM,
and PDBADMIN accounts
‒ Type password for the SYS,
SYSTEM, and PDBAMDIN

Oracle Internal and Oracle Academy Use Only


accounts.

The above image depicts the Database Credentials window of the Oracle DBCA GUI where you can define
passwords for the following user accounts:
• SYS: Owns all base tables and user-accessible views of the data dictionary
• SYSTEM: Creates additional tables and views to display administrative information, and internal
tables and views for Oracle tools and options
• PDBADMIN: Connects to the pluggable database

This window has two options to set the password:


• Use different passwords for these accounts where you can use separate passwords for SYS,
SYSTEM, and PDBADMIN accounts to create role-based system privileges
• Use same passwords for these accounts where you can use the same password for all the
accounts

The characteristics for SYS, SYSTEM, and PDBADMIN passwords are:


• Must be between 8 and 30 characters long
• Must not start with a number
• Must not be Oracle reserved words, such as database
• Must not be a dictionary word
• Must not be change_on_install if you use the same password for all the accounts
• Should contain at least 1 alphabetic, 1 numeric, and 1 of the following three punctuation mark
characters: hyphens (-), underscores (_), or number sign (#)

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 14


Database Creation Options

Step 11 of 15
‒ Defaults to Create Database
‒ Enables you to save a database
template
‒ Select the “Generate Database
Creation Scripts” check box to

Oracle Internal and Oracle Academy Use Only


generate database creation
scripts and choose a storage
location.

The above image depicts the Creation Options window of the Oracle DBCA GUI, which provides the
following options:
• Create Database: Select this check box to create a new database with the configuration and
parameters selected in previous steps. You can see more information about the database creation
parameters on the Summary window before you start the database creation process.
• Save as a Database Template: Select this check box to save database configuration and
parameters as a template. Oracle DBCA will automatically add the template to the list of templates,
which you can later use to create a database. You need to provide a template name and
description, in which you can define the important configuration and parameter details.
• Generate Database Creation Scripts: Select this check box to generate database creation scripts
for the selected template. You can use these scripts to create a new database with all the
configurations and parameters you have selected in previous steps. These scripts enable you to
create a database without using Oracle DBCA. Specify a storage location for the scripts.
• Customize Storage Locations: Click this button to modify storage locations for the data files,
control files, and redo log groups. You can also specify the maximum number of data files,
instances, log history, redo log files, and log members allowed for this database.

In case you do not want to create a database, but just save the database template and generate database
creation scripts, you can deselect the Create Database option and click Next. This operation will simply
create a database template and save the database creation scripts at the specified storage location.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 15


Summary

Step 13 of 15
‒ Shows a summary of all the
options you have selected for
the database creation
‒ Check the values in summary
table and go to the respective

Oracle Internal and Oracle Academy Use Only


step if you want to update any
option.

The above image depicts Summary window of the Oracle DBCA GUI where it shows configuration and
parameter information you chose in the previous steps. The summary has the following information
about the database:
• Database Configuration Summary, which includes global database name, configuration type, SID,
storage type, and template name
• Database Components, which include Oracle JVM, Oracle Multimedia, Oracle Label Security,
Oracle Application Express, and Oracle Database Vault
• Initialization Parameters, which include database block size, database name, FRA destination,
memory target, and processes
• Character Sets, which include values for database character set and national character set.
• Data Files, which include information about data file names, tablespaces they are using, and their
size
• Redo Group Logs, which include the group numbers and their sizes

If you want to update any information, you can go back to the respective step and change it.

After you verify or edit the information in this window, click Finish to start the Oracle Database creation
process.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 16


Progress Page

Step 14 of 15
‒ Creates Oracle Database with
the selected options
‒ Shows overall progress in the
progress bar and status of
each step

Oracle Internal and Oracle Academy Use Only


‒ Check activity log and alert
log for more information.

The above image depicts the Progress Page window of the Oracle DBCA GUI. Here you can check the
progress of the database creation process in the progress bar and the current step, above the progress
bar.

The Oracle DBCA also shows the status of various activities, in the status section, such as:
• Registering database with Oracle Restart
• Copying database files
• Creating and starting Oracle instance
• Completing Database Creation
• Creating Pluggable Databases
• Executing Post Configuration Actions

The installer also has Activity Log and Alert Log buttons to show more information about the current
task.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 17


Finish

Step 15 of 15
‒ The Oracle Database is
created successfully.
‒ Click Close to exit the
installer.

Oracle Internal and Oracle Academy Use Only


The above image depicts the Finish window of the Oracle DBCA GUI, which shows that the Oracle
Database creation was successful. The Oracle Database is created on your system with the configuration
and parameters you provided in previous steps. This window provides the following information about
the database:
• Location of the database creation script
• Location of the log files
• Global database name and SID
• Server parameter file name
• EM Database Express URL

When database creation is complete, all database accounts except SYS and SYSTEM are locked. You can
use the Password Management button to see a complete list of locked accounts and manage the
accounts.

You can quit the installer now using the Close button in the bottom-right corner of the window.

Review the Oracle Database Installation Guide for any postinstallation tasks.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 18


Summary
Create an Oracle
Advanced Database
database configuration

Configure Oracle Database options

Delete an Oracle Database

Oracle Internal and Oracle Academy Use Only


Manage Oracle Database templates

Manage pluggable database

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 5 - 19


Oracle Internal and Oracle Academy Use Only
Lesson Subtitle (Optional)

Patching Oracle Grid Infrastructure and


Oracle Database

Oracle Internal and Oracle Academy Use Only


Optional Presenter’s Name (or remove block)
Presenter’s Title
Organization, Division, or Business Unit
Month 00, 2022
Objectives

Understand the Oracle patch process

Describe Oracle patches

Learn about Oracle patching tools

Oracle Internal and Oracle Academy Use Only


Discuss Oracle patching techniques

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 2


Overview of the Patch Process

1 2 3
Identify Download Back up the
patches patches Oracle Home

6 5 4
Create or Apply on test Identify
update scripts system targets

Oracle Internal and Oracle Academy Use Only


8
7 Conflicts Yes File service
detected? request

No
9 10
Test Deploy
the patch the patch

Regardless of your environment’s patching requirements, the basic patching methodology is the same.
1. Identify the patches needed: You may find out about required patches from blogs, Oracle
Technology Network (OTN), Service Requests, Knowledge Articles, Oracle documentation, or any
number of other sources. However, the single source of truth for patching is the Oracle Support
Website—My Oracle Support (MOS).
2. Download the patches needed: The patches can be sources from Oracle Support Services, My
Oracle Support, and Oracle Technology Network (OTN) depending on the patch. You will need to
download the latest OPatch utility as well in most cases.
3. Back up the Oracle Home that is being patched: It is also advisable to back up the Oracle
Database because most patches contain SQL scripts that need to be run against the database.
4. Identify the targets that need to be patched in the enterprise.
5. Apply the patch on a test system.
6. Create or update scripts to apply the patches. This step is optional.
7. Determine if any patch conflicts are detected.
8. If Yes, then step 8 is to file a service request with Oracle Support for conflict resolution.
If no conflicts were detected in step 7 or conflicts were resolved in step 8, then go to the next step.
9. Test the patch in a QA environment determined by business needs.
10. Finally, deploy the patch in production and verify the patch application.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 3


Oracle Patches Maintenance

Duties of a DBA

Maintain database software by patching

Oracle Internal and Oracle Academy Use Only


Maintenance strategies

› Reactive patches AKA One-Off


› Proactive patches

One of the duties of a DBA is to maintain the Oracle Database software. There are two maintenance
strategies.
• Reactive Patches react to specific maintenance issues. They are characterized as follows:
– Usually delivered as Interim Patches
– Historically known as one-off patches
– Are provided on demand for a given defect, version, platform combination
– Go through basic sanity tests
– Certain reactive fixes may be included in future Release Updates
• Proactive Patches provide recommended updates for all Oracle Database customers. They are
characterized as follows:
– Address high impact bugs that affect a given configuration
– Contain proven low risk fixes
– Include cumulative of prior fixes
– Go through extra levels of testing, determined by the features affected by the patch
– Are available on My Oracle Support by clicking the Patches & Updates tab
– Are available as Release Updates (RU) and Monthly Recommended Patches (MRPs)

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 4


Oracle Patches Prior to 19.17.0

Interim patches Diagnostic patches

Interim patches for security bug fixes System patch

Oracle Internal and Oracle Academy Use Only


Bundle Patch Updates (BPUs) Patch Set Updates (PSUs)

Security Patch Updates (SPU) Merge Label Request (MLR)

Types of Oracle patches:

Oracle regularly makes patches available to upgrade features, enhance security, or fix problems with
supported software. The major types of patches are:
• Interim patches: They contain a single bug fix or a collection of bug fixes provided as required. A
patch containing one or more fixes is made available to customers who cannot wait until the next
patch set or new product release to get a fix.
• Interim patches for security bug fixes: They contain customer-specific security bug fixes, also
know as a one-off patch.
• Diagnostic patches: They are intended to help diagnose or verify a fix or a collection of bug fixes.
This may be from a Service Request to help diagnose your issue after a defect has been filed but
not fully resolved.
• Bundle Patch Updates (BPUs): It is a cumulative collection of fixes for a specific product or
component that is issued between patch sets. Bundle patches usually include only fixes, but some
products may include minor enhancements.
• Patch Set Updates (PSUs): It is a cumulative collection of high-impact, low-risk, and proven fixes
for a specific product or component and Security Patch Updates.
• Security Patch Updates (SPU): It is a cumulative collection of security bug fixes. SPUs were
formerly known as Critical Patch Updates (CPU).
• System Patch: It contains several sub-patches in a format that can be used by OPatchAuto.
• Merge Label Request (MLR): It is a merge of two or more fixes. MLR creation requires a label for
the new set of merged code and a Patch Set Exception.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 5


Oracle Patches 19.17.0 and Forward

RUR Retired

Release Updates (RU)

Oracle Internal and Oracle Academy Use Only


Monthly Recommended Patches (MRP)

One-Off Patches

Beginning with the October 2022 patching cycle, 19c RURs will no longer be provided for 19.17.0 and
above. No additional RURs will be delivered on any platform after the delivery of Oracle Database 19c RUR
19.16.2 in January, 2023.

Refer to Sunsetting of 19c RURs and FAQ (Note 2898381.1) for further details.

Proactive maintenance is accomplished by proactively applying a routine quarterly patch bundle (Release
Update) that is available from the My Oracle Support (MOS) Customer Portal for each Oracle Database
software release.

To provide customers more frequent access to recommended and well-tested collections of patches,
Oracle is pleased to introduce Monthly Recommended Patches (MRPs) starting in Nov 2022.
• MRPs are supported only on the Linux x86-64 platform. Refer to Introducing Monthly
Recommended Patches (MRPs) and FAQ (Note 2898740.1) for further details.
• Starting with Oracle Database 19c RU19.17 (mid-October 2022), MRPs will be delivered for each RU
in the 6 months following each RU s release. These will include the fixes documented in Oracle
Database Important Recommended Patches (Note 555.1), critical fixes from the 19c Known issues
MOS Note, plus the prior MRPs for the RU.

One-Off Patches: Oracle produces some proactive patches for very specific purposes outside of the
normal update and revision cycle. Such patches are usually delivered as Interim Patches . For example,
special time zone patches are released every six months for customers who require systems to use the
latest time zone data.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 6


Proactive Maintenance with RUs and MRPs

Release Updates (RU)

› Released Quarterly
– Third Tuesday of Jan, Apr, Jul, and Oct

Oracle Internal and Oracle Academy Use Only


Patch Update Announcements

› Primary Note for Database Proactive Patch Program (Doc ID 888.1)


› Monthly Recommended Patches (MRPs)
› Critical Patch Updates, Security Alerts, and Bulletins

RUs are highly tested bundles of critical fixes which enable you to avoid known issues. They usually
contain the following type of fixes: security, regression (bug), optimizer, and functional (which may
include feature extensions as well).
• Release Updates (RUs) are release quarterly
– Third Tuesday of January, April, July, and October

Patch updates are announced in the following locations:


• Primary Note for Database Proactive Patch Program (Doc ID 888.1)
• Monthly Recommended Patches (MRPs)
– Monthly Recommended Patches are released each month in between a quarterly Release
Update and are cumulative bundles of recommended patches.
• Critical Patch Updates, Security Alerts, and Bulletins
– Quarterly patch updates are announced on the Critical Patch Updates, Security Alerts, and
Bulletins page each page each January, April, July, and October.
– To receive email notifications when quarterly patch bundles are available, subscribe to Oracle
Security alerts.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 7


Proactive Maintenance with RUs and MRPs

Monthly Recommended Patches (MRP)

› Released Monthly
– Cumulative Bundles
– Deployed with opatchauto

Oracle Internal and Oracle Academy Use Only


– No Release Number Change
– Only for Linux x86-64 platform

Patch Notification

› Subscribe to Oracle Security Alerts

In October 2022, starting with RU 19.17, Oracle is modifying its proactive patch program between Release
Updates to use Monthly Recommended Patches (MPRs).
• MRPs will be delivered monthly for each RU in the six months following each RU’s release, starting
with Oracle Database 19c RU19.17 (mid-October, 2022). MRPs will include the fixes documented in
Oracle Database Important Recommended Patches (My Oracle Support Doc ID 555.1), plus the
prior MRPs for the RU.
• MRPs are characterized as follows:
– MRPs are cumulative: Each new MRP will contain the patches in any earlier MRPs released for
a given release update, as well as the current set of one-off patches that Oracle recommends
for the RU, plus the current set of recommended one-off patches for the RU.
– MRPs do not change the release number.
– MRPs are deployed using Opatchauto.
– MRPs are available only on the Linux x86-64 platform.

For Patch Notifications, subscribe to Oracle Security Alerts by going to:


[Link]
1. If you do not have an Oracle account, click View Accounts at the top of this page, then under
Oracle Account, select Create an Account.
2. If you already have an Oracle account, click View Accounts at the top of this page and log in to
your account.
3. Once logged in, click the account name to see profile.
4. Select Subscriptions, then Edit for Oracle security notifications, and then select the check box for
Security Alerts and click Save.
5. To unsubscribe, log in, click Subscriptions and uncheck the Security Alerts check box.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 8


Oracle Database Server Risk Matrix

› Located in the Oracle Critical Patch Update Advisories:

Oracle Internal and Oracle Academy Use Only


Note: Example taken from Oracle CPU Advisory – July 2023

Oracle has used industry-standard Common Vulnerabilities and Exposure (CVE) identifiers. These
simplify the identification of Oracle vulnerabilities when referenced in external security reports, such as
those produced by security researchers and vulnerability management systems. Vulnerabilities are scored
using version 3.0 of Common Vulnerability Scoring Standard (CVSS). Scores range from 0 to 10, with 10
being the most severe. A risk matrix such as the one shown on the slide is found in each Critical Patch
Update Advisory. The Oracle database server risk matrix includes the following columns:
• CVE#: The unique identifier of a vulnerability
• Component: The product component that contains the vulnerability
• Package and/or Privilege Required: Packages, privileges, roles, responsibilities, or other
preconditions required to attempt to exploit a vulnerability. It may be possible to reduce the risk of
attack by changing a required precondition. For example, if a vulnerability may be exploited only
by users with access to a certain database package, revoking untrusted users access to that
package will reduce the number of people who can exploit the vulnerability. Oracle strongly
recommends that such changes are first made on a test system because some changes may cause
loss of functionality or other unwanted side effects in custom code or other Oracle software.
• Protocol: The protocol required to attempt to exploit the vulnerability. It may be possible to
reduce the risk of attack by limiting access to this protocol.
• Remote Exploit Without Authentication? Indicates if the vulnerability may be exploited by a
remote attacker who has on authentication credentials for the targeted system. Vulnerabilities
which may be exploitable from a remote network and without authentication are higher risk and
marked with a Yes. Vulnerabilities which cannot be exploited remotely or which require
authentication are marked with a No.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 9


• CVSS Version Base Risk: The CVSS Base Score is an assessment of risk defined by the Common
Vulnerability Scoring Standard (CVSS). The CVSS base score assigns a numeric value between 0.0
and 10.0 to indicate the severity of the vulnerability, where 10.0 represents the highest severity.
Each risk matrix is ordered using this value, with the most severe vulnerability at the top of each
risk matrix.
• Attack Vector: This metric reflects the context by which vulnerability exploitation is possible.
Possible values are Network, Adjacent, Local, and Physical.
• Attack Complexity: This metric describes the conditions beyond the attacker’s control that must
exist in order to exploit the vulnerability. A value of Low indicates that specialized access
conditions or extenuating circumstances do not exist. An attacker can expect repeatable success
against the vulnerable component. A value of High indicates that a successful attack depends on
conditions beyond the attacker s control.

Oracle Internal and Oracle Academy Use Only


• Privileges Required: This metric describes the level of privileges an attacker must possess before
successfully exploiting the vulnerability. Values include None, Low, or High.
• User Interaction: This metric captures the requirement for a user, other than the attacker, to
participate in the successful compromise of the vulnerable component. Values are None or
Required.
• Scope: This metric represents the ability for a vulnerability in one software component to impact
resources beyond its means or privileges.
• Confidentiality Impact: This metric measures the impact to the confidentiality of the information
resources managed by a software component due to a successfully exploited vulnerability. Values
include Low, High, or None.
• Integrity Impact: This metric measures the impact to integrity of a successfully exploited
vulnerability. Integrity refers to the trustworthiness and veracity of information. Values include
Low, High, or None.
• Availability Impact: This metric measures the impact to the availability of the impacted
component resulting from a successfully exploited vulnerability. Values include Low, High, or
None.
• Supported Versions Affected: For each supported release of a product, the last patch set
affected by the vulnerability is listed. If the patch set for a specific release is not listed, no
supported versions of that release are affected. Patch sets later than the one listed for a specific
release are not affected. Products that do not have the concept of a patch set, have product
version listed instead.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 10


Oracle Patching Tools:

OPatch

OPatchauto

Oracle Internal and Oracle Academy Use Only


OPatchauto -binary

Oracle patching tools consist of patching utilities that help ensure your Oracle software stays current and
secure. The utilities are:

OPatch: A Java-based utility that enables the application and rollback of patches to Oracle software

OPatchauto: A patch orchestration tool that generates patching instructions specific to your target
configuration and then uses OPatch to perform the patching operations without user intervention.
Specifically, OPatchAuto can:
• Perform pre-patch checks
• Apply the patch
• Start and stop the running servers
• Perform post-patch checks
• Roll back patches when patch deinstallation is required

OPatchauto -binary: A patch application tool that applies a single patch on a selected Oracle home.
OPatchauto -binary patches only one Oracle home per session.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 11


Oracle Patching Tools: OPatch

Platform-dependent

Patch 6880880

Located in $ORACLE_HOME/OPatch

Oracle Internal and Oracle Academy Use Only


Utilizes JAR

opatch Logs

› Located in $ORACLE_HOME/cfgtoollogs/opatch

OPatch is a platform-dependent utility that requires installation of the Oracle Universal Installer and is
used to apply interim patches. Interim patches are bug fixes available to customers in response to specific
bugs. They require a particular base release or patch set to be installed before you can apply them. They
generally address specific bugs for a particular customer. These patches are not versioned and are
generally available in a future patch set as well as the next product release.

The OPatch tool for all products can be downloaded from Patch (Patch 6880880). OPatch is platform-
specific and release version-specific, so you must select the appropriate platform.

The OPatch tool can be placed anywhere, it is usually located in the $ORACLE_HOME/OPatch directory.
This directory is not automatically added to the PATH variable when using the oraenv utility. You must
manually add it or use the complete PATH when invoking the command.

OPatch uses the jar utility that comes with JDK for its jar, war, and ear operations. OPatch will look for
JDK inside the Oracle home specified. JAR stands for Java ARchive. It is a file format based on the popular
ZIP file format and is used for aggregating many files into one.

OPatch logs can be found in $ORACLE_HOME/cfgtoollogs/opatch.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 12


Oracle Patching Tools: OPatch

opatch command

<Path_to_OPatch>/opatch [-r[eport]][command] [-option]

Oracle Internal and Oracle Academy Use Only


Software owner

Shutdown processes

The OPatch utility is located in the $Oracle_Home/OPatch directory. You can run it with various
commands and options.
• Invoked with the command opatch after adding $ORACLE_HOME/OPatch to the PATH
– Comprises commands and possible options
• Invoked as the user that owns the software being patched
• Shut down all processes running from the ORACLE_HOME to be patched

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 13


Oracle Patching Tools: OPatch

-report

>$ORACLE_HOME/OPatch/opatch apply /stage/26030704 -report

Oracle Internal and Oracle Academy Use Only


>cd stage/26030704
>opatch apply -report

Using the -report command prints the selected command action without executing.
• Example 1: The OPatch command was run from the ORACLE_HOME/OPatch directory and
includes the location of the patch as an argument to the apply and –report command.
• Example 2: The OPatch directory is already included in the PATH variable on the host computer.

The patch you have downloaded has been saved to a directory that is named for the patch number from
My Oracle Support. In this example, the patch number is 15941858.

The user changes directory to the patch directory and then runs the OPatch apply command along with
the –report option.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 14


Oracle Patching Tools: OPatch

command

› -option

Oracle Internal and Oracle Academy Use Only


<Path_to_OPatch>/opatch lsinventory –xml /tmp/[Link]

<Path_to_OPatch>/opatch lsinventory –xml /tmp/[Link]

<Path_to_OPatch>/opatch compare /tmp/[Link] /tmp/[Link]

<Path_to_OPatch>/opatch apply verbose

• Opatch comprises commands and possible options for the commands.


• Available commands include:
– lsinventory - Lists what is currently installed on the system
– lspatches - Prints a summary of all installed patches
– apply - Install or apply a patch
– compare - Compares two files generated by the opatch lsinventory -xml
command
– rollback – Rolls back a patch
– napply - Installs n number of patches
– nrollback - Rolls back patches from several product
– query - Queries a given patch for specific details
– version - Prints the current version of the patch tool
– prereq - Runs patching prerequisite checks on an ORACLE_HOME
– Util - Invokes specified utilities on an GI/RAC home
• Each command has a variety of options to specify, for example what patch(s) to install, specify a
different patch location, and checking versions, to list a few.

In example 1 & 2, an XML file has been created with the lsinvertory command and XML option. The
default location is the opatch home unless specified in the lsinventory command.

Example 3 compares the XML files previously created by the lsinventory command.

In example 4, the verbose option prints additional OPatch output to the screen as well as to the log file
from the apply command.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 15


Oracle Patching Tools: OPatch

Opatch Help

<Path_to_OPatch>/opatch -help

Oracle Internal and Oracle Academy Use Only


Specific Command Help

<Path_to_OPatch>/opatch apply verbose

It is easy to obtain help with opatch commands and options.


• <Path_to_OPatch>/opatch -help
• The output displays the opatch format, list of commands along with examples, and how to obtain
detailed help for each opatch command.

How to obtain specific command help:


• In the above example it will list all the options with explanations for the prereq command.

List of commands and help syntax:


• opatch -help
• opatch -help -fmw
• opatch apply -help
• opatch compare -help
• opatch lsinventory -help
• opatch lspatches -help
• opatch napply –help
• opatch nrollback -help
• opatch rollback -help
• opatch prereq -help
• opatch util -help

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 16


Oracle Patching Tools: opatchauto

OPatchauto

End-to-End Patching

Oracle Internal and Oracle Academy Use Only


› From GI Home
› As Root User
› Grid Infrastructure & Database
› Shut down, Patch, Restart

OPatchauto: A patch orchestration tool that generates patching instructions specific to your target
configuration and then uses OPatch to perform the patching operations without user intervention

End-to-End Patching: OPatchAuto sequences and executes all required steps, on all nodes, for
comprehensive patch application. Because OPatchAuto can patch full systems in one invocation, it
removes the burdens of:
• The physical effort of going host to host and executing commands
• The mental effort of remembering the sequence of commands across the nodes in your system

Usually found in the directory $ORACLE_HOME/OPatch. Invoked with the command opatchauto after
adding $ORACLE_HOME/OPatch to the PATH

Invoked as the root user

Applies patches to Oracle Grid Infrastructure and Database Home combinations

Will shut down, patch, and restart all processes in both the Oracle Grid Infrastructure and Database Home,
just like Opatch Opatchauto has commands and various options for each command

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 17


Oracle Patching Tools: opatchauto

OPatchauto 4 Primary Commands

› Apply

Oracle Internal and Oracle Academy Use Only


<Path_to_OPatch>/opatchauto apply -analyze

› Resume
› Rollback
› Version

Similar to Opatch Opatchauto, there are commands along with various options for each command.
• opatchauto has 4 primary commands:
– apply: Apply a System Patch to a product home. Either the user specifies the patch location or
the current directory will be taken as the patch location.

In the above example, the apply command with the analyze option will verify prerequisites
prior to applying the patch.

– Resume: This operation resumes a previous patching session.

– Rollback: Removes a patch

– Version: Prints the current version of the patch tool

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 18


Oracle Patching Tools: opatchauto

OPatchauto 1 Global Command

› Help

<Path_to_OPatch>/opatchauto -help

Oracle Internal and Oracle Academy Use Only


Specific Command Help

<Path_to_OPatch>/opatchauto apply -help

It is easy to obtain help with opatchauto commands and options.

In the first example <Path_to_OPatch>/opatchauto -help


• The output displays the opatchauto format, list of commands along with examples, and how to
obtain detailed help for each opatchauto command.

How to obtain specific command help:


• In the second example, it will list all the options with explanations for the apply command.

List of commands and help syntax:


• opatchauto -help
• opatchauto version
• opatchauto apply -help
• opatchauto resume -help'
• opatchauto rollback -help'

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 19


Oracle Patching Tools: opatchauto -binary

opatchauto -binary

Single Oracle Home


› Manual Shutdown
› Only Applies Binaries

Oracle Internal and Oracle Academy Use Only


Analyze Mode

Commands

› Apply
› Rollback
› Help

• OPatchAuto -binary is a tool that applies multiple patches on a selected Oracle home. The utility
internally performs the prerequisite checks before applying the bits.
• Patch only one Oracle home per session
– Usually found in the directory $ORACLE_HOME/OPatch.. Invoked with the command
opatchauto after adding $ORACLE_HOME/OPatch to the PATH
– OPatchAuto -binary assumes that the targets have been already shutdown.
– OPatchAuto -binary does not perform any other operation apart from applying the binary bits
to the Oracle home.
• When running in analyze mode (-analyze) OPatchAuto -binary runs the prerequisite checks on the
patches but does not apply the bits. To run OPatchAuto -binary in analyze mode, use the -analyze
command line option.
• Run only the prerequisite checks and also apply or roll back the patch in report mode (patch
application/rollback is not actually carried out). The prerequisite checks are performed, thereby
reporting the feasibility of the patch session.
• Commands are limited to apply, rollback, and help. Apply and rollback have the same options
when using opatchauto –binary.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 20


1 2 3
Minimizing Downtimes: Shut down System A. Shut down System B. Shut down System C.

Rolling Patching Patch System A.


Start System A.
Patch System B.
Start System B.
Patch System C.
Start System C.

A Real Application Cluster (RAC)


system allows usage of nodes while
other nodes are being patched. System A System B System C

Oracle Internal and Oracle Academy Use Only


2

Apply SQL component to Database


while database is running.

A Real Application Cluster (RAC) system allows one node at a time to be patched, while other nodes
continue to provide service. This feature can provide zero downtime patching. Rolling patching requires
distinct software homes for each node rather than a single shared software home. Rolling patching allows
different versions of the software to coexist temporarily. It may not be available for all patches.

Although most patches can be applied in a rolling fashion, some patches cannot be applied in this
fashion. The README file for the patch indicates whether you can apply the patch using the rolling patch
method. If the patch cannot be applied using the rolling patch method, then you must use either
Minimum Down Time Patching or All Node Patching to apply the patch.

Note: A patch set that can be rolled for the clusterware may not be able to be rolled for the database.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 21


Shut down Standby.

Minimizing Downtimes: 1 Patch Standby binaries.


Restart Standby.

Standby-First Patching Resume Standby recovery.

Convert Standby to Snapshot Standby.


Install SQL component of Patch.
Data Guard Standby-First Patch 2 Use Oracle Real Application Testing to evaluate.
Apply allows the primary database Convert back to Standby rolling back SQL.

software to be different than the


standby database software for the Primary DB
Data Guard
Standby DB
purpose of applying patches.

Oracle Internal and Oracle Academy Use Only


Perform Data Guard Switchover.
New primary now running patched binaries
Patch new standby (that is, old primary).
3 Install SQL component on new primary.
Changes propagate to standby.
(Optional) Perform switchover to switch back to
the original configuration.

Oracle Data Guard Standby-First Patch Apply provides support for different database home software
between a primary database and its physical standby database(s) for the purpose of applying and
validating Oracle patches and patch bundles in rolling fashion with minimal risk to the primary database.
For example, with Data Guard Standby-First Patch Apply, you apply a database home patch first to a
physical standby database. The standby is used to run read-only workload, or read-write workload if it is a
snapshot standby, for testing and evaluation of the patch. After passing evaluation, the patch is then
installed on the primary system with greater assurance of the effectiveness and stability of the database
home patch.

Oracle Data Guard Standby-First Patch Apply is supported only for certified interim patches and patch
bundles (for example, Patch Set Update, or Database Patch for Exadata) for Oracle Database [Link] and
later, on both Oracle Engineered Systems (for example, Exadata, SuperCluster) and non-Engineered
Systems. A patch and patch bundle that is Data Guard Standby-First certified will state the following in
the patch README:

Data Guard Standby-First Installable

Oracle patch sets and major release upgrades do not qualify for Data Guard Standby-First Patch Apply.
The following types of patches are candidates to be Data Guard Standby-First certified:
• Database home interim patches
• Exadata bundle patches (for example, monthly and quarterly database patches for Exadata)
• Database patch set updates

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 22


Minimizing Downtimes: Patching a Cloned Home

– Clone existing ORACLE_HOME.


– Patch the cloned ORACLE_HOME.
– Shut down database using unpatched ORACLE_HOME.
– Start up database using patched ORACLE_HOME.
– Apply the SQL patch steps to the database.

Oracle Internal and Oracle Academy Use Only


– Adjust configuration files to reflect new ORACLE_HOME.

• [Link]
• [Link]
• /etc/oratab Primary DB
• Any client scripts as needed

A bundle patch or patch set update can take some time for the patch application. While applying the
patch, the database that is using the software to be patched needs to be shut down. A technique to
minimize the down time window is to quickly clone the ORACLE_HOME software for the database to a
new ORACLE_HOME location. Then the patch can be applied to the cloned copy of the software. While
the patch is being applied, the business can continue to use the unpatched version of the software. After
the patch has been applied to the cloned copy of the software, shut down the database and restart it
using the patched ORACLE_HOME. When the database is restarted on the patched software, apply the
SQL components of the patch to the running database. Adjust all configuration files that may reference
the old software location such as the [Link], [Link], /etc/oratab, and any client
scripts that may depend on storing a pointer to the unpatched ORACLE_HOME. The downtime for this
technique can be minimized to the amount of time it takes to shut down a database and restart it.
Summary

Understand the Oracle patch process

Describe Oracle patches

Learn about Oracle patching tools

Oracle Internal and Oracle Academy Use Only


Discuss Oracle patching techniques

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 6 - 24


Oracle Restart

Oracle Internal and Oracle Academy Use Only


Objectives

Get an overview of Oracle Restart

Configure and manage Oracle Restart

Explore the server control utility

Oracle Internal and Oracle Academy Use Only


Stop and restart Oracle Restart

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 2


Oracle Restart

› Provides a high-availability solution for


stand-alone Oracle databases

› Enhances the availability of Oracle databases

› Ensures that Oracle components are started

Oracle Internal and Oracle Academy Use Only


Controls the starting and stopping of components

› Maintains a list of managed components

› Runs periodic check operations to monitor the health of the components

› Runs out of the Oracle Grid Infrastructure home

Oracle Restart is designed to improve the availability of your Oracle database. It implements a high-
availability solution for single-instance (nonclustered) environments only. For Oracle Real Application
Cluster (Oracle RAC) environments, the functionality to automatically restart components is provided by
Oracle Clusterware. Oracle Restart can monitor the health and automatically components.

When you install Oracle Restart, various Oracle components can be automatically restarted after a
hardware or software failure or whenever your database host computer restarts.

Oracle Restart ensures that Oracle components are started in the proper order, in accordance with
component dependencies.

Oracle Restart automatically restarts various Oracle components when required, and automatically stops
Oracle components in an orderly fashion when you manually shut down your system. Oracle ASM disk
groups

Oracle Restart maintains a list of all the Oracle components that it manages and configuration
information for each component.

Oracle Restart ensures that the components are started in the proper order, in accordance with
component dependencies. If a component must be shut down, it ensures that the dependent
components are cleanly shut down first.

Oracle Restart operates inside Oracle Grid Infrastructure home.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 3


Oracle Restart

› Oracle Restart can monitor and restart


the following components:

– Database instances

– Oracle Net listener

Oracle Internal and Oracle Academy Use Only


Database services

– Oracle Automatic Storage Management (ASM) instance

– Oracle ASM disk groups

– Oracle Notification Services (ONS/eONS)

Oracle Restart can monitor the health and automatically restart the following components:
• Database instances
• Oracle Net listener
• Database services
• Oracle ASM instance
• Oracle ASM disk groups
• Oracle Notification Services (ONS/eONS): Service for sending Fast Application Notification (FAN)
events to integrated clients upon failover. The eONS is used by Oracle Enterprise Manager to
receive notification of change in status of components managed by Oracle Restart.

Restarting an Oracle ASM disk group means mounting it. The ability to restart ONS is applicable only in
Oracle Data Guard installations for automatic failover of connections between primary and standby
databases through FAN.

FAN[Fast Application Notification] is a mechanism that Oracle RAC uses to notify ONS about service
status changes, like UP and DOWN events, Instance state changes etc. Oracle RAC notifies the cluster
about FAN events the minute any changes have occurred.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 4


Oracle Restart Process Startup

› Oracle Restart is started by the OS init daemon.

Operating system Oracle Restart Oracle Restart


system daemon wrapper script daemons and processes
[Link]
[Link]
systemd [Link] [Link]
[Link]
cssdagent

Oracle Internal and Oracle Academy Use Only


[Link]

› During installation, Oracle Restart is registered with the operating


system so that it is started whenever the system starts up.

The wrapper script sets up the environment variables and then starts the Oracle Restart daemons and
processes. When a command is used to stop Oracle Restart, the daemons will be stopped, but the wrapper
script process will remain running.

The wrapper script is started with the respawn action so it will be restarted whenever it is terminated. In
addition, the respawn action causes the systemd process to restart the daemons if they fail.
Some of the Oracle Restart daemons will be running under the root user with real-time priority, and others will
be running under the Oracle Grid Infrastructure owner with user-mode priorities after they are started.
On a Windows platform, operating system services are used instead of wrapper initialization scripts and the
daemons are executable binaries.

Note: Executing the wrapper script directly is not supported.


• Oracle High Availability Services (ohasd)
• Oracle Agent (oraagent): Extends clusterware to support Oracle-specific requirements and complex
resources
• Oracle Root Agent (orarootagent): A specialized oraagent process that helps manage resources owned
by root, such as the network, and the Grid virtual IP address
• Diskmon (Disk Monitor daemon): Monitors and performs I/O fencing for Oracle Exadata Storage Server
storage. Because Exadata storage can be added to any Oracle RAC node at any time, the diskmon
daemon is always started when ocssd starts.
Note: (I/O) fencing is a method of preventing data corruption in a clustered and shared-storage
computer environment by isolating a malfunctioning node.
• The cssdagent process monitors the cluster.
• The ocssd. bin process is used for communication between a database instance and the ASM
(Automatic Storage Management) instance.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 5


Oracle Restart Configuration & Management
› Installed by Oracle Grid Infrastructure for Standalone Servers
› Maintains list of managed components
‒ Also known as the Oracle Restart Configuration
› Managing components
‒ Add components
– Automatically

Oracle Internal and Oracle Academy Use Only


– Manually
‒ Remove components
‒ Temporarily suspend restart for components

If you install Oracle Restart by installing the Oracle Grid Infrastructure for Standalone Servers and then
create your database, the database is automatically added to the Oracle Restart configuration and is then
automatically restarted when required.

Oracle Restart maintains a list of all the Oracle components that it manages and the configuration
information for each component.

All of this information is collectively known as the Oracle Restart configuration. When Oracle Restart
starts a component, it starts the component according to the configuration information for that
component. For example, the Oracle Restart configuration includes the location of the server parameter
file (SPFILE) for databases, and the TCP port to listen on for listeners.

If you install Oracle Restart and then create your database with Database Configuration Assistant (DBCA),
DBCA automatically adds the database to the Oracle Restart configuration. When DBCA then starts the
database, the required dependencies between the database and other components (for example disk
groups in which the database stores data) are established, and Oracle Restart begins to manage the
database.

You can manually add and remove components from the Oracle Restart configuration with SRVCTL
commands. For example, if you install Oracle Restart on to a host on which a database is already running,
you can use SRVCTL to add that database to the Oracle Restart configuration. When you manually add a
component to the Oracle Restart configuration and then start it with SRVCTL, Oracle Restart begins to
manage the component, restarting it when required.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 6


Oracle Restart Configuration

Oracle utilities will automatically update the Oracle Restart configuration.

Automatically added
Create Operations and the Oracle Restart Configuration
to configuration?
Create a database using OUI or Oracle DBCA YES
Create a database using a SQL statement NO
Create an Oracle ASM instance using OUI, Oracle DBCA, or Oracle ASMCA YES

Oracle Internal and Oracle Academy Use Only


Create a disk group (any method) YES
Add a listener using Oracle NETCA YES
Create a database service using SRVCTL YES
Create a database service by modifying SERVICE_NAMES initialization
NO
parameter
Create a database service using DBMS_SERVICE.CREATE SERVICE NO

Oracle Restart maintains a list of all the components that it manages and the configuration information
for each component. All of this information is collectively known as the “Oracle Restart Configuration.”

When Oracle Restart is installed, many operations that create Oracle components using Oracle utilities will
automatically add the components to the Oracle Restart configuration.

If a component is created manually without using an Oracle utility, then SRVCTL commands can be used
to add it to the Oracle Restart configuration if desired.

The table in the slide shows which create operations automatically add the component to the Oracle
Restart configuration and which create operations do not update the Oracle Restart configuration.

Note: Creating a database service by modifying the SERVICE_NAMES initialization parameter is not
recommended when Oracle Restart is in use.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 7


Oracle Restart Configuration

Delete/Drop/Remove Operations and the Oracle Restart configuration

Delete Operations and Automatically removed


the Oracle Restart Configuration from configuration?
Delete a database using DBCA YES
Delete a database by removing database files with OS commands
NO

Oracle Internal and Oracle Academy Use Only


Note – Not Recommended
Delete a listener using Oracle NETCA YES
Drop an Oracle ASM disk group (any method) YES
Drop a database service using SRVCTL YES
Delete a database service by any other means NO

The above is a list of delete/drop/remove operations and whether the deleted component is also
automatically removed from the Oracle Restart configuration.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 8


Managing Oracle Restart

• Oracle Clusterware Control (CRSCTL) utility


‒ Check status of Oracle Restart

‒ Display configuration of Oracle Restart

‒ Enable/Disable automatic restart of Oracle Restart

‒ Start/Stop Oracle Restart


• Display the Oracle Restart configuration

Oracle Internal and Oracle Academy Use Only


[grid@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM
The Oracle base has been set to /u01/app/grid
[grid@edvmr1p0 ~]$ crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

In order to use the CRSCTL utility, you must be the root user or Oracle grid infrastructure software owner
to run CRSCTL commands. In addition, you must be in the Oracle Grid Infrastructure software
ORACLE_HOME location.

The CRSCTL utility starts and stops Oracle Restart.


Typically, you use the CRSCTL utility when you must stop all of the running Oracle software in an Oracle
installation. For example, you might need to stop Oracle Restart when you are installing a patch or
performing operating system maintenance. When the maintenance is complete, you use the CRSCTL
utility to start Oracle Restart.

CRSCTL commands and components are case insensitive.


• check- Displays the Oracle Restart status
• config - Displays the Oracle Restart configuration
• disable - Disables automatic restart of Oracle Restart
• enable - Enables automatic restart of Oracle Restart
• start - Starts Oracle Restart
• stop - Stops Oracle Restart

The CRSCTL utility can be used to control the state of Oracle Restart. It can be used to determine if the
autostart capability is enabled or disabled as follows:
$ crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

The control files for ohas are used to control the state of ohas and determine if automatic restart is
enabled or disabled. These are known as SCLS_SCR files. For Linux, the location of the control files is
defined to be:
/etc/oracle/scls_scr/$HOST/<Oracle Restart owner> and
/etc/oracle/scls_scr/$HOST/root

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 9


Managing Oracle Restart

• Oracle Clusterware Control (CRSCTL)


‒ To enable or disable automatic restart

$ crsctl disable has


CRS-4621: Oracle High Availability Services autostart is disabled.
$ crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.

Oracle Internal and Oracle Academy Use Only


‒ Start or stop Oracle Restart
$ crsctl [ start | stop ] has

The CRSCTL utility starts and stops Oracle Restart. When the CRSCTL utility is used to stop Oracle Restart,
all components currently managed by Oracle Restart will also be stopped.
$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed
resources on 'host01'
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2673: Attempting to stop '[Link]' on 'host01'
CRS-2677: Stop of '[Link]' on 'host01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources
on 'host01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
When starting Oracle Restart with the CRSCTL utility, each component that is started is not displayed to
standard output.
$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
Note: Invoking the wrapper script directly to start the Oracle Grid Infrastructure processes is not
supported.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 10


Server Control Utility (SRVCTL)

› Oracle Restart task requires SRVCTL to be used

› Run SVRCTL from Correct Home

Component Being Configured Oracle Home from Which to Start SRVCTL

Oracle Internal and Oracle Academy Use Only


Database, database service Database home
Oracle ASM instance, disk group,
Oracle Grid Infrastructure home
listener, ONS

Many Oracle Restart tasks require that you run the SRVCTL utility. You must ensure that you run SRVCTL
from the correct Oracle home, and that you log in to the host computer with the correct user account.

The table above lists the components that you can configure with SRVCTL, and for each component, lists
the Oracle home from which you must run SRVCTL.

Note this assumes the listener was started from the Oracle Grid Infrastructure home. If you installed
Oracle Restart for an existing database, the listener may have been started from the database home, in
which case you start SRVCTL from the database home.

When Oracle Restart is in use, it is strongly recommended that you use the SRVCTL utility to start, stop,
and manage all Oracle Restart components. The SRVCTL utility is recommended for the following
reasons:
• All dependencies between components are maintained. This enables Oracle Restart to start or to
stop any dependent components first.
• Components are started according to their Oracle Restart configuration.
• Environment variables stored in the Oracle Restart configuration for the components are set.

Oracle Restart components can also be started with other utilities such as the listener control (LSNRCTL)
utility or SQL*Plus, but the benefits listed above may not be obtained with other utilities.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 11


Using the SRVCTL Utility

• The SRVCTL utility is used to start, stop, and manage Oracle Restart
components with the following syntax:
$ srvctl command component options

• The following command and components are supported:


Commands add config start stop status enable disable modify remove update
getenv setenv unsetenv upgrade downgrade

Oracle Internal and Oracle Academy Use Only


Components database service asm diskgroup listener home ons

Option extends the use of preceding verb-noun combinations

• Command = config Component = database option = -d followed


by database name
$ srvctl config database –d orcl

The options that are allowed vary with each command and component combination. The SRVCTL utility
syntax is as follows:
srvctl command component options

where:
• command is a verb such as start, stop, or remove
• component is the object on which SRVCTL performs the command, such as a database
• options extend the use of the preceding command to include additional parameters
For example, to display configured databases:

srvctl config database -d orcl

A SRVCTL command that produces no output is a successful command. Not all SRVCTL commands
return a message when it completes, successfully. However, if a SRVCTL command fails, then it always
returns an error message.

You can use the -eval parameter with several SRVCTL commands. This parameter, when you use it,
enables you to simulate running a command without making any changes to the system. SRVCTL returns
output that informs you what will happen if you run a particular command.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 12


Choosing the Correct SRVCTL Utility

• Invoked from the Oracle Grid Infrastructure home


‒ Oracle ASM instances - Disk Groups
‒ Listeners - ONS
$ export ORACLE_HOME=/u01/app/12.2.0/grid
$ $ORACLE_HOME/bin/srvctl command component options

– OR as Oracle grid infrastructure software owner

Oracle Internal and Oracle Academy Use Only


$ [grid@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM
The Oracle base has been set to /u01/app/grid

$ srvctl command component options

Oracle Restart includes the SRVCTL utility that you use to start, stop, and manage Oracle Restart
components. After the Oracle Database software is installed in addition to the Oracle Grid Infrastructure
software, there will be a copy of the SRVCTL utility in each ORACLE_HOME location.

You need to determine the correct ORACLE_HOME location in which to run the SRVCTL utility. You need to
run the SRVCTL utility from the Oracle Grid Infrastructure software home directory when managing the
Oracle ASM instance, Oracle ASM disk groups, Oracle Net listeners, and the ONS.

To determine the currently mapped location of the SRVCTL utility, use the which command as follows:
$ which srvctl
/u01/app/12.2.0/grid/bin/srvctl

Note: For the Oracle Net listener, the assumption is that Oracle Grid Infrastructure was installed before
the Oracle Database software. If Oracle Restart is added to an existing Oracle Database installation, the
Oracle Net listener could be running from the Oracle Database home directory. In that case, you should
use the SRVCTL utility from the Oracle Database home to manage the Oracle Net listener.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 13


Choosing the Correct SRVCTL Utility

• Invoke from the Oracle Database home


‒ Database - Service

$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
$ $ORACLE_HOME/bin/srvctl command component options

‒ Or as Database Software owner

Oracle Internal and Oracle Academy Use Only


[oracle@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle

$ srvctl command component options

The SRVCTL utility is run from the Oracle Database software home directory when managing the Oracle
database instances and services. You must ensure that you run SRVCTL from the correct Oracle home,
and that you log in to the host computer with the correct user account.

To determine the currently mapped location of the SRVCTL utility, use the which command as follows:
$ which srvctl
/u01/app/oracle/product/12.2.0/dbhome_1/bin/srvctl

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 14


Obtaining Help for the SRVCTL Utility

• The SRVCTL utility provides online Help for its commands,


components, and options.
‒ For help with general usage:
$ srvctl -h

‒ For help on a particular command:

Oracle Internal and Oracle Academy Use Only


$ srvctl command -h

‒ For help on a particular command and component:


$ srvctl command component -h

The SRVCTL utility provides detailed online Help for its commands, components, and options.

To display the online Help, you use the help (-h) option to display usage information. If the help (-h)
option is the only parameter specified, SRVCTL displays a general outline of all commands with the most
common options used for each command and component combination. This will not be a complete list of
all supported options. For more detailed and complete information, the help (-h) option can be used for a
specific command, or for a specific command and component combination.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 15


Starting Components Using the SRVCTL Utility

• Oracle recommends that the SRVCTL utility be used to start all components.
‒ Examples of starting individual components:

$ srvctl start database –d orcl –o mount


$ srvctl start listener –l LISTENER
$ srvctl start service –d orcl –s "service1,service2"
$ srvctl start diskgroup –g "DATA,FRA"
$ srvctl start asm

Oracle Internal and Oracle Academy Use Only


$ srvctl start eons -v
$ srvctl start ons

‒ Example of starting all Oracle Restart components in a specified Oracle home:

$ srvctl start home –o oracle_home –s state_file

The SRVCTL utility can be used to start individual components, along with any dependent components
that are necessary. For example, the srvctl start database –d orcl command may also start the
listener, the Oracle ASM instance, and multiple disk groups if those components have been defined as
being managed by Oracle Restart and are listed as dependent components to the orcl database.

The SRVCTL utility can also be used to start all components that are associated with a specified Oracle
home and have been configured for Oracle Restart with the following command:

srvctl start home –o /u01/app/oracle/product/12.1.0/dbhome_1 –s


/usr/local/bin/group_state_file

The state file contains the current state information for the components in the Oracle home and is
created when the srvctl status home command is executed. It is indicated with the state file option
(-s), and must specify the complete path of the state file. The state file can be created in any directory.

Note: The options shown in the slide represent the most common options and are not a complete list.
You can use the help option (-h) for a complete list of all available options for each command.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 16


Stopping Components Using the SRVCTL Utility

• Oracle recommends that the SRVCTL utility be used to stop all components.
‒ Examples of stopping individual components:

$ srvctl stop database –d orcl –o transactional


$ srvctl stop listener –l LISTENER -f
$ srvctl stop service –d orcl –s "service1,service2"
$ srvctl stop diskgroup –g "DATA,FRA" -f
$ srvctl stop asm –o immediate -f

Oracle Internal and Oracle Academy Use Only


$ srvctl stop eons -v
$ srvctl stop ons

‒ Example of stopping all Oracle Restart components in a specified Oracle home:

$ srvctl stop home –o oracle_home –s state_file –f

The SRVCTL utility can be used to stop individual components, along with any dependent components
that must be stopped. For example, the srvctl stop diskgroup –g "DATA -f" command will force an
unmount of the diskgroup even if files are open in it. It will also stop all database instances that depend
on the DATA disk group.

The SRVCTL utility can also be used to stop all components that are associated with a specified Oracle
home and have been configured for Oracle Restart with the following command:
srvctl stop home –o /u01/app/oracle/product/12.1.0/dbhome_1 –s
/usr/local/bin/group_state_file -f

This can be very useful when it is necessary to stop all components such as when you need to apply a
patch to the software binaries.

Note: The options shown in the slide represent the most common options and are not a complete list.
You can use the help option (-h) for a complete list of all available options for each command.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 17


Viewing Component Status

• Use the status command to view any component managed by Oracle Restart
• Display status for a database:
$ srvctl status database -d orcl
Database is running.

• Display the listener status:

Oracle Internal and Oracle Academy Use Only


$ srvctl status lsnr
Listener is enabled
Listener is running on node(s): host01

• Status for any component obtained from any home

You can use the SRVCTL utility to view the running status (running or not running) for any component
managed by Oracle Restart. Additional information is displayed for some components.

The format of the command is as follows:


srvctl status object [options]

object can be one of the following:


• asm: Oracle ASM instance
• database (db): Database instance
• diskgroup (dg): Oracle ASM disk group
• filesystem: Oracle ASM file system
• home: Oracle home or Oracle Clusterware home
• listener(lsnr): Oracle Net listener
• ons, eons: Oracle Notification Services
• service (serv): Database service

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 18


Displaying the Oracle Restart Configuration for a Component

• Use the config command to display configuration of a component.


• Display configuration for a database:

$ srvctl config database –d orcl


Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1
Oracle user: oracle

Oracle Internal and Oracle Academy Use Only


Spfile:
Domain: [Link]
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA,FRA
Database instance: orcl

You can use the SRVCTL utility to display the Oracle Restart configuration of a component with the
config command. The config command is valid for the database, service, asm, listener, ons,
and eons components.

The configuration for an Oracle Restart component can be modified with the SRVCTL utility modify
command. The following syntax shows an example of how to modify the database with the unique name
of orcl to use a different, nonstandard directory for the server parameter file (SPFILE).

srvctl modify database –d orcl –p /usr/local/oracle/[Link]

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 19


Manually Adding Components
to the Oracle Restart Configuration

• With the add command, components can be manually added.


‒ Define a new listener that was not created with Oracle NETCA

$ srvctl add listener –l MYLISTENER –p TCP:1525 –o


/u01/app/oracle/product/12.1.0/grid

‒ Specify a nondefault location for the new listener's networking files

Oracle Internal and Oracle Academy Use Only


$ srvctl setenv listener –l MYLISTENER –t TNS_ADMIN=/usr/local/oracle

The SRVCTL utility can be used to manually add components to the Oracle Restart configuration with the
add command. If the component was created with an Oracle utility such as Oracle NETCA, Oracle DBCA,
Oracle ASMCA, or OUI, it would have been automatically added to the Oracle Restart configuration and it
would not be necessary to manually add it.

The slide illustrates manually adding a new listener called MYLISTENER to the Oracle Restart
configuration. The listener will use the software binaries of the Grid home installation but will depend on a
nonstandard location for the networking files.

For this example, it is assumed that the [Link] networking file has been created in the
/usr/local/oracle directory.

The setenv command of the srvctl utility is used to define environment variables that may be needed
for specific components.

The TNS_ADMIN environment variable is set to the nondefault location of the [Link] file, and is
defined only for the listener named MYLISTENER. This will not have an impact on any other listeners that
may already exist and that use different directories for the networking files.

The SRVCTL utility includes a remove command to manually delete a component from the Oracle Restart
configuration. To delete the listener created above, use the following syntax:
srvctl remove listener -l mylistener –f

This will also remove the environment variable that was associated with the listener.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 20


Oracle Restart Maintenance Operations

• Maintenance
‒ Patches
‒ Environment changes
• Level of maintenance
‒ Clusterware

Oracle Internal and Oracle Academy Use Only


‒ Grid components
‒ Database components

When several components in an Oracle home are managed by Oracle Restart, you can stop Oracle Restart
and the components managed by Oracle Restart in the Oracle home.

At times it may becomes necessary to disable and stop the Clusterware to keep it from automatically
restarting components if the node reboots. You may also need to stop ASM or Database components to
perform required maintenance task such as patching or even environment changes such as OS or
hardware changes.

When the maintenance operation is complete, you can enable and restart Oracle Restart, and you can
restart the components managed by Oracle Restart in the Oracle home.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 21


Oracle Restart Maintenance Operations

• Statefile option
‒ Tracks state of components
• Oracle Home
‒ Grid Infrastructure
‒ Database Home

Oracle Internal and Oracle Academy Use Only


Use both the SRVCTL utility and the CRSCTL utility for the stop and start operations.
• The stop home SRVCTL command stops all of the components that are managed by Oracle
Restart in the specified Oracle home. The start home SRVCTL command starts these components.
The Oracle home can be an Oracle Database home or an Oracle Grid Infrastructure home.
When you use the home object, a state file, specified in the -statefile option, tracks the state of
each component. The stop and status commands create the state file. The start command uses
the state file to identify the components to restart.
• In addition, you can check the status of the components managed by Oracle Restart using the
status home command.

The stop CRSCTL command stops Oracle Restart, and the disable CRSCTL command ensures that the
components managed by Oracle Restart do not restart automatically. The enable CRSCTL command
enables automatic restart and the start CRSCTL command restarts Oracle Restart.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 22


Stopping and Restarting Restart for Maintenance Operations
• Oracle Clusterware Control (CRSCTL) utility
[grid@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM
The Oracle base has been set to /u01/app/grid
[grid@edvmr1p0 ~]$ crsctl command
• Grid Infrastructure components
$ [grid@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM

Oracle Internal and Oracle Academy Use Only


The Oracle base has been set to /u01/app/grid
$ srvctl command component options

• Database components
[oracle@edvmr1p0 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
$ srvctl command component options

Depending on what component or components you need to stop, ensure you select the correct home.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 23


Stopping and Restarting Restart Example
1. Connect to the correct home

[oracle@edvmr1p0 ~]$ . oraenv


ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
$ srvctl command component options

2. Order of shutdown:
1. Stop Database components first

Oracle Internal and Oracle Academy Use Only


2. Stop Grid components second

srvctl stop home -oraclehome oracle_home -statefile state_file [-


stopoption stop_options] [-force]

Use the SRVCTL utility to stop the components managed by Oracle Restart in an Oracle home:
• oracle_home = complete path of the Oracle home
• state_file = complete path to where you want the state file to be created
• stopoption stop_options = SHUTDOWN command options for the database
(for example: NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT). Default is IMMEDIATE.
• Force = Force stop each component

State information for the Oracle home is recorded in the specified state file. Make a note of the state file
location because it must be specified when starting the components.

Before stopping the components in an Oracle Grid Infrastructure home, ensure that you first stop the
components in a dependent Oracle Database home.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 24


Stopping and Restarting Restart Example

3. Patching Oracle Grid Infrastructure?


1. Disable and stop Oracle Restart.
2. Otherwise, skip this step.

crsctl disable has

crsctl stop has

Oracle Internal and Oracle Academy Use Only


4. Perform maintenance.

If you are patching an Oracle Grid Infrastructure home, then disable and stop Oracle Restart. Otherwise,
go to Step 4.

To disable and stop Oracle Restart, use the CRSCTL utility to run the above commands to disable them
stop Oracle Restart.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 25


Stopping and Restarting Restart: Example
5. Enable Automatic Restart
crsctl enable has
6. Start Oracle Restart
crsctl start has

7. SRVCTL utility to start the components that were stopped


1. Start Grid components first

Oracle Internal and Oracle Academy Use Only


2. Start Database Components second
srvctl start home -oraclehome oracle_home -statefile state_file
8. Optionally check component status
srvctl status home -oraclehome oracle_home -statefile state_file

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 26


Summary

Get an overview of Oracle Restart

Configure and manage Oracle Restart

Explore the server control utility

Oracle Internal and Oracle Academy Use Only


Stop and restart Oracle Restart

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 7 - 27


Oracle Internal and Oracle Academy Use Only
Upgrading to Oracle Grid Infrastructure 19c

Oracle Internal and Oracle Academy Use Only


Objectives

Upgrade the Oracle Grid Infrastructure software to version 19c using


Oracle Universal Installer (OUI)

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 2


Upgrading Oracle Grid Infrastructure:
Restrictions and Guidelines

› Oracle Grid Infrastructure supports only out-of-place upgrades.

› Administrative privileges are required for the user performing


the upgrade.

› The current Oracle Grid Infrastructure release must be Oracle Grid


Infrastructure 11g Release 2 ([Link]) or later.

Oracle Internal and Oracle Academy Use Only


› Do not delete any directories from existing Oracle Grid
Infrastructure home.

› The software in the 19c Oracle Restart home is not fully functional
until the upgrade is complete.

› Apply all mandatory patches for the upgrade to complete


successfully.

Oracle Grid Infrastructure upgrade has the following restrictions and guidelines that you must understand
before proceeding for the upgrade:
• Oracle Grid Infrastructure supports only out-of-place upgrades, which means the newer version
will be installed in a separate Oracle Grid Infrastructure home. Both versions will reside on the
same server. The older versions will be usable until the upgrade is finished; after the upgrade, only
the newer version will be used.
• The same user that owned the earlier release of the Oracle Restart software must perform the
Oracle Restart 19c upgrade.
• Direct upgrade for Oracle Grid Infrastructure 19c is supported only from Oracle Grid Infrastructure
11g release 2 ([Link]) or later releases.
• You must not delete any directories from existing Oracle Grid Infrastructure home. These
directories will be used during the upgrade.
• The software in the 19c Oracle Restart home is not fully functional until the upgrade is complete.
Running srvctl, crsctl, and other commands from the new Grid home is not supported until the
[Link] script is run and the upgrade is complete.
• You must install all mandatory patches for Oracle Grid Infrastructure before initiating an upgrade.
Check [Link] for latest patches and for a list of mandatory patches.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 3


Checklist for Upgrading Oracle Grid Infrastructure

Which statement is NOT true about Data Science projects?

Review the new features for the Oracle Restart.

Ensure that you have all of the information you need for the upgrade.

Unset the $ORACLE_HOME, $ORACLE_BASE, and $ORACLE_SID


environment variables.

Oracle Internal and Oracle Academy Use Only


Ensure that the installation owner user profile, such as .profile or .cshrc,
does not set any of these environment variables.

Unset any environment variables, such as ORA_NLS10 and TNS_ADMIN.

Ensure that the $ORACLE_HOME/bin path is removed from your PATH


environment variable.

Complete these pre-upgrade checks to avoid issues during the Oracle Restart upgrade process.
1. Review the new features for the Oracle Restart release to which you want to upgrade.
2. Ensure that you have all of the information you need for the upgrade. For example:
– An Oracle base location for Oracle Restart
– An Oracle Restart home location that is different from your existing Oracle Restart home
– Privileged user operating system groups
– root user access, to run scripts as the root user during the upgrade
3. Unset the $ORACLE_HOME, $ORACLE_BASE, and $ORACLE_SID environment variables because
these environment variables are used during the upgrade. For example, as the grid user, run the
following commands:
– For bash shell:
– $ unset ORACLE_HOME
– $ unset ORACLE_BASE
– $ unset ORACLE_SID
– For C shell:
– $ unsetenv ORACLE_HOME
– $ unsetenv ORACLE_BASE
– $ unsetenv ORACLE_SID
4. Ensure that the installation owner user profile, such as .profile or .cshrc, does not set any of these
environment variables.
5. Unset any environment variables, such as ORA_NLS10 and TNS_ADMIN, set for the installation
owner user that is connected with the Oracle software homes.
6. Ensure that the $ORACLE_HOME/bin path is removed from your PATH environment variable.
Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 4
Install the Oracle Preinstallation RPM

Install the 19c version of Oracle Preinstallation RPM to install a minimal set
of additional packages required to perform Oracle software installations:

# yum install oracle-database-preinstall-19c

Oracle Internal and Oracle Academy Use Only


Installation of Oracle software starts with examining the operating system. A minimal installation option
can be performed when installing Oracle Linux. Having a reduced number of installed packages enhances
performance and security because every package installed can become a source of security vulnerabilities
and require updates. A minimal installation lacks many RPMs required for Oracle software installation.
Oracle Preinstallation RPM will install a minimal set of additional packages required to perform Oracle
software installations.

Oracle Preinstallation RPM installs the X11 client libraries, but it does not install the X Window System
server packages if they were already missing. To use graphical user interfaces, such as OUI, configuration
assistants, and Oracle Enterprise Manager, set the display to a remote system that has the X Window
System server packages installed.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 5


Create a Copy of the Preinstallation Configuration
File for the Grid User

Create a copy of the preinstallation configuration file for the grid user to
set hard and soft limits for the operating system parameters.
› As the root user, go to the /etc/security/limits.d [Link]
# cd /etc/security/limits.d

› Create a copy of the preinstallation configuration file for the grid user by

Oracle Internal and Oracle Academy Use Only


replacing the oracle user with the grid [Link]
cat [Link] | sed 's/oracle /grid /g' >
[Link]

› Delete the preinstallation configuration files for the earlier [Link]


# rm –r –f [Link] oracle-grid-user-
[Link]

Create a copy of the preinstallation configuration file for the grid user to set hard and soft limits for the
operating system parameters.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 6


Configuration Option

Step 1 of 9
‒ Steps will change depending
on how dialogs are answered.
‒ The Upgrade Oracle Grid
Infrastructure option is
selected by default.
‒ Shut down all Oracle

Oracle Internal and Oracle Academy Use Only


Databases
that are using Oracle ASM.
‒ The dialog box to confirm
that the database is shut
down appears.

The Configuration Options window shown in the slide is the first window of the Oracle Universal Installer
(OUI) for Oracle Grid Infrastructure 19c. OUI provides the following configuration options for Oracle Grid
Infrastructure:
• Configure Oracle Grid Infrastructure for a New Cluster: Use this option to configure Oracle
Clusterware and Oracle ASM or Oracle Real Application Clusters (Oracle RAC) to create a multi-
cluster environment.
• Configure Oracle Grid Infrastructure for a Standalone Server (Oracle Restart): Use this option
to configure Oracle Grid Infrastructure for a single server and use Oracle ASM and Oracle Restart
features.
• Upgrade Oracle Grid Infrastructure: Use this option to upgrade an existing Oracle Grid
Infrastructure installation to 19c.
• Set Up Software Only: Use this option to install only Oracle Grid Infrastructure software binaries,
without any configuration. Advanced users can use this option to manually configure and enable
the software.

The default option is Upgrade Oracle Grid Infrastructure.

You must close the Oracle Database instance before proceeding with the upgrade because this upgrade
will also apply to Oracle ASM. Confirm in the dialog box after shutting down the database instance.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 7


Management Options

Step 2 of 9
‒ Register the product with
Enterprise Manager (EM)
Cloud Control to monitor and
manage it from a single
console (Optional).

Oracle Internal and Oracle Academy Use Only


The screenshot in the slide shows the management options for Oracle Grid Infrastructure and Oracle
ASM instance. You can configure this instance to be managed by Enterprise Manager Cloud Control. This
is an optional configuration.

If you want to register, then select the Register with Enterprise Manager (EM) Cloud Control check box
and enter the following details:
• OMS host: Host name of the server where the management repository is running
• OMS port: Port number of Oracle Enterprise Manager to receive requests from the Management
Service
• EM Admin User Name: Enterprise manager administrator username
• EM Admin Password: Enterprise manager administrator account password

For more information about Enterprise Manager Cloud Control, see Enterprise Manager Cloud Control
Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 8


Operating System Groups

Step 3 of 9
‒ Select the appropriate
groups for Oracle ASM
administrator, Oracle ASM
DBA, and Oracle ASM
operator.

Oracle Internal and Oracle Academy Use Only


‒ You created these groups
while preparing the system
for installation.

The screenshot in the slide shows the Operating System Groups window of the OUI where you can select
the groups that you want to use for operating system authentication to Oracle ASM. These groups are
used to implement job role separation of duties. If you are not using job role separation of duties, then set
all of the groups to the same operating system group, which is typically dba.

The available options for group selection are:


• Oracle ASM Administrator (OSASM) Group: Members of this group have full administrative
access to Oracle ASM and can configure and manage Oracle ASM instances. If your system has a
group named asmadmin, then the installer uses it as the default OSASM group.
• Oracle ASM DBA (OSDBA for ASM) Group: Members of this group have read and write access to
the Oracle ASM managed files. The Oracle Grid Infrastructure installation owner must be a
member of this group. If your system has a group named asmdba, then the installer uses it as the
default OSDBA for ASM group.
• Oracle ASM Operator (OSOPER for ASM) Group (Optional): Members of this group have access
to a subset of the Oracle ASM administrative privileges and can start and stop the storage tier. If
your system has a group named asmoper, then the installer uses it as the default OSOPER for
ASM group.

You created these groups and assigned them as secondary groups to the user account performing the
installation while preparing your operating system for Oracle Grid Infrastructure installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 9


Installation Location

Step 4 of 9
‒ /u01/app/<username>
appears in Oracle base by
default.
‒ Click “Browse” to select a
different directory for

Oracle Internal and Oracle Academy Use Only


Oracle base.

The image in the slide shows the Installation Location window of the OUI where you can specify an Oracle
base location.
• Oracle base: Select the Oracle base directory to store Oracle software– and
configuration- related files. It is owned by the installation user and each distinct operating system
user should use his or her own location. You can either select a location that contains an existing
configuration or that is empty.
If the ORACLE_BASE environment variable is not defined, as directed by the installation manual,
then the default will be /u01/app/<username> where <username> is the operating system
account name performing the installation, typically oracle or grid.

The installer selects the default location because the Oracle base exists from previous installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 10


Root Script Execution

Step 5 of 9
‒ The default is to run
configuration scripts manually.
‒ Select the “Automatically run
configuration scripts” check
box to automatically run

Oracle Internal and Oracle Academy Use Only


configuration scripts
(Optional).
‒ Select the method and enter
password to run root scripts.

The image in the slide depicts the Root script execution window of the OUI. For the upgrade process to
complete, certain operations need to be performed as a root user. OUI gives you an option to
automatically run the configuration scripts by selecting the Automatically run configuration scripts
option in this window. The OUI provides you the following two options to automatically run the scripts:
• Use “root” user credential: Provide the root user password.
• Use sudo: Sudo is a Linux and UNIX utility that grants members of the sudoers list privileges to
run individual commands as root. Provide the username and password of an operating system
user that is a member of sudoers and is authorized to run sudo. System administrators can
configure a user to be a member of the sudoers list.
In this option, you need to provide the Sudo program path, username of the user that is a member
of the sudoers list, and password for that user.

If you want to run scripts manually during the upgrade, then you can skip this step. A dialog box will then
appear during the upgrade to manually run the scripts that require root privilege. The dialog box will
indicate the name and path of each script that is required to be run.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 11


Prerequisite Checks

Step 6 of 9
‒ Checks if the system meets
the minimum installation
and configuration
requirements for Oracle
Grid Infrastructure 19c

Oracle Internal and Oracle Academy Use Only


‒ No inputs required in this
window unless OUI detects
errors

The image in the slide depicts the Prerequisite Checks window of the OUI. The installer verifies that the
target environment meets the minimum installation and configuration requirements for Oracle Grid
Infrastructure upgrade.

If the installer detects any issues, it lists them as verification results with Failed or Warning status. You can
find more details about a failed check and click Check Again to run a prerequisites check again if you
have corrected any errors.

The OUI includes fix-up scripts to fix many configuration issues. If an issue is fixable by the installer, then
it shows them in the Fixable column. You can select a fixable issue and click Fix and Check Again. Not all
errors can be corrected by the installer, such as configuration change that might require a reboot of the
server.

If you want to proceed with the Oracle Grid Infrastructure installation without fixing the prerequisite
issues, you can click Ignore All. You are not advised to ignore the issues because the installation may
abort, or it can cause performance and stability problems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 12


Summary

Step 7 of 9
‒ A summary of all the options
you have selected for the
installation appears.
‒ Click Edit to modify a
particular setting or option.

Oracle Internal and Oracle Academy Use Only


‒ Click Save Response File to
store the input options for use
in feature installations
(Optional).

The image in the slide depicts the Summary window of the OUI where it shows configuration information
and settings you chose on the previous installer screens. The summary has the following sections:
• Global Settings, which include the configuration option, Oracle base path, Grid home path,
operating system groups, and root script execution configuration
• Management Information, which includes management methods, such as Oracle Enterprise
Manager Cloud Control

You can edit the configuration information and settings on this page, if you have selected a wrong option
or simply want to change any selection.

This window also gives you an option to save a response file by using the Save Response File button.
You can use the response file to perform future unattended installation on multiple servers using the
same options and settings.

After you verify or edit the information this page, click Install to start the Oracle Grid Infrastructure 19c.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 13


Install Product

Step 8 of 9
‒ Installs the product with
selected options
‒ Dialog box to confirm the
execution of the root script
as the root user

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Install Product window of the OUI. Here you can check the progress of
the installation process in the progress bar and the current object being installed, below the progress bar.
The installer also shows the status of various installation activities, in the Status section, such as:
• Configure Local Node
– Prepare
– Link binaries
– Setup
• Setup Oracle Base
• Execute Root Scripts
• Configure Oracle Grid Infrastructure for a Standalone Server (Oracle Restart)

The installer also has a Details button to show more information about the current installation and
configuration action or task. If any installation step fails, you can fix the problem and click Retry.

Before the installer automatically executes the root scripts if that option was selected, it shows a dialog
box with a message that reads “Configuration scripts generated by the installer need to be run as a
privileged user (root). Installer will run these scripts using the privileged user credentials provided earlier.
Are you sure you want to continue?” Click Yes to execute the scripts automatically and continue with the
upgrade process.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 14


Finish

Step 9 of 9
‒ The installation
completed successfully.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Finish window of the OUI, which shows that the upgrade of Oracle Grid
Infrastructure to 19c was successful. The Oracle Grid Infrastructure is upgraded on your system with the
configuration information you provided during the upgrade.

You can quit the installer now by using the Close button at the bottom-right corner of the window.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 15


Summary

Upgrade Oracle Grid Infrastructure 12c


Release 2 to Oracle Grid Infrastructure 19c

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 8 - 16


Before Upgrading to Oracle Database 19c

Oracle Internal and Oracle Academy Use Only


Objectives

Describe the upgrade methods

Describe the data migration methods

Describe the upgrade process

Oracle Internal and Oracle Academy Use Only


List the upgrade requirements when certain features
or options are used in Oracle Database

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 2


Defining Upgrade and Data Migration

Upgrading: Migrating data:

› Transforms an existing Oracle Database › Moving data from one Oracle database
software version into a higher Oracle to another Oracle database that was
Database software version created for the data migration

› ›

Oracle Internal and Oracle Academy Use Only


Data dictionary for the database Does not include upgrading to a new
upgraded to the new release release of Oracle Database

› Does not affect user data

Upgrading transforms an existing Oracle Database environment (including installed components and
associated applications) into a new release Oracle Database environment. The data dictionary for the
database is upgraded to the new release. Upgrading does not directly affect user data; no data is touched,
changed, or moved during an upgrade., in this course, to Oracle Database 19c.

Data migration refers to moving data from one Oracle Database into a database that was created in
advance for the migrated data. Migration does not involve an upgrade of the Oracle Database software.

Note: Best practice is to perform migration and upgrade operations separately.

This lesson provides details on how you can upgrade to Oracle Database 19c and how you can migrate
data from an Oracle Database to an Oracle Database 19c.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 3


Upgrade Methods

› AutoUpgrade Utility: Recommended for major release upgrades and is


designed to automate the upgrade process, both before starting upgrades,
during upgrade deployments, and during postupgrade checks and
configuration migration
› Oracle Database Upgrade Assistant (DBUA): Provides a graphical user
interface that guides you through the upgrade of a database
› Manual upgrade using the Parallel Upgrade Utility, other command-line

Oracle Internal and Oracle Academy Use Only


utilities, and SQL scripts.

Upgrade

Oracle Database 11gR2, 18c Oracle Database 19c

You can ease the process of upgrading a database to Oracle Database 19c through careful planning and
use of the Oracle Database tools. The method you choose to upgrade depends on several factors. Oracle
Database supports the following methods for upgrading a database:

AutoUpgrade Utility

Identifies issues before upgrades, deploys upgrades, performs postupgrade actions, and starts the
upgraded Oracle Database
• AutoUpgrade Utility: The AutoUpgrade utility is designed to automate the upgrade process, both
before starting upgrades, during upgrade deployments, and during postupgrade checks and
configuration migration. The Autoupgrade Utility identifies issues before upgrades, deploys
upgrade to a single or multiple homes, performs postupgrade actions, and starts the upgraded
Oracle Database.
• Using Database Upgrade Assistant (DBUA): This tool can be launched by the Oracle Universal
Installer (OUI) or as a stand-alone tool at any time in the future to upgrade a database. Oracle
DBUA provides a graphical user interface (GUI) that guides you through the upgrade of a
database.
• Performing a manual upgrade: A manual upgrade is a command-line upgrade of a database
using the Parallel Upgrade Utility, other command-line utilities, and SQL scripts. Although a
manual upgrade gives you finer control over the upgrade process, it is susceptible to errors if any
of the upgrade or preupgrade steps are either not followed or are performed out of order.

Note: Oracle AutoUpgrade Utility is the preferred method of upgrading to Oracle Database 19c.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 4


AutoUpgrade Utility: Advantages and Disadvantages

Advantages:
› Identifies issues before upgrades, performs pre- and postupgrade actions, deploys upgrades,
performs postupgrade actions, and starts the upgraded Oracle Database
› Designed to automate the upgrade process, both before starting upgrades, during upgrade
deployments, and during postupgrade checks and configuration migration
› Upgrade multiple Oracle Database deployments at the same time, using a single configuration
file, and customized as needed for each database deployment

Oracle Internal and Oracle Academy Use Only


› AutoUpgrade Patching extends the AutoUpgrade upgrade process to out-of-place patching.

Disadvantages:

› Database restoration option is not available on an Oracle Database Standard Edition.


› AutoUpgrade does not handle GI upgrades.

The Oracle Database AutoUpgrade Utility:

The AutoUpgrade utility is designed to automate the upgrade process, both before starting upgrades,
during upgrade deployments, and during postupgrade checks and configuration migration. The
AutoUpgrade enables customers to upgrade one or many Oracle databases at the command-line with a
single command and a single configuration file. AutoUpgrade will run the preupgrade tasks, perform
automated fixups where needed, execute the database upgrade, and finish by taking care of post-
upgrade tasks. It includes automatic retry and fallback, the possibility to schedule upgrades for future
points in time, and the ability to set, change, or remove initialization parameters as desired. It saves time
and money by upgrading hundreds of databases with one command and replacing bespoke high
maintenance upgrade solutions. AutoUpgrade Patching extends the AutoUpgrade upgrade process to
patching, which enables you to perform out-of-place patching for multiple databases using a single
command.

AutoUpgrade utility does not handle GI upgrades and does not provide database restoration option for an
Oracle Database Standard Edition.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 5


Database Upgrade Assistant: Advantages and Disadvantages

Advantages:

› Automates all tasks


› Performs both release and patch set upgrades
› Supports RAC, single instance, and Oracle ASM
› Informs the user and fixes upgrade prerequisites
› Automatically reports errors found in spool logs

Oracle Internal and Oracle Academy Use Only


› Provides complete HTML report of the upgrade process
› Enables automation of ISVs using the command-line interface

Disadvantages:
› Offers less control over individual upgrade steps

The Oracle Database Upgrade Assistant (DBUA):


• Guides you through the upgrade process and configures a database for the new release
• Automates the upgrade process and makes appropriate recommendations for the configuration
options, such as tablespaces and redo logs
• Shows the upgrade progress for each component, while the upgrade is running
• Writes detailed trace and log files and produces a complete HTML report for later reference
• Automatically locks new user accounts in the upgraded database to enhance security
• Proceeds to create new configuration files (initialization parameter and listener files) in the new
Oracle home
• Upgrades all the database and configuration files on all nodes in the cluster, in an Oracle RAC
environment
• Supports a silent mode of operation where no user interface is presented to the user

If the DBA requires more control over the individual steps in the upgrade process, a manual upgrade is
still possible. Usually, however, the manual upgrade method is more error prone, is harder to automate,
and involves a greater amount of work than upgrading with the Oracle DBUA.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 6


Manual Upgrade: Advantages and Disadvantages

Advantages:
– The Parallel Upgrade Utility ([Link], and the dbupgrade script)
enable you to upgrade simultaneously components that do not
require upgrades to occur in a specific order.
Disadvantages:
– It involves more work for the DBA, who must:

Oracle Internal and Oracle Academy Use Only


Perform a manual space check for the SYSTEM
and SYSAUX tablespaces
– Manually adjust all obsolete or deprecated
initialization parameters
– Perform a user-driven backup of the database
– It is subject to errors.
DBA

The Parallel Upgrade Utility ([Link], and the dbupgrade script) enable you to upgrade simultaneously
components that do not require upgrades to occur in a specific order.

Oracle Database 12c release 1 (12.1) introduced the Parallel Upgrade Utility, [Link]. This utility reduces the
total amount of time it takes to perform an upgrade by loading the database dictionary in parallel, and by
using multiple SQL processes to upgrade the database. Performing parallel upgrades of components
enables you to take advantage of your CPU capacity. Oracle continues to make improvements to the
upgrade process to simplify both manual upgrades, and upgrades performed with the Database Upgrade
Assistant (DBUA). DBUA and the manual upgrade procedures take advantage of the new Parallel Upgrade
Utility.

You can run a shell command, dbupgrade, which starts up [Link] from the command line, instead of
requiring you to run it from Perl.

The dbupgrade shell command is located in the file path $ORACLE_HOME/bin on Linux and UNIX,
and %ORACLE_HOME%\bin on Windows. You can provide any command arguments that are valid
for [Link] to the shell command. Either run the command directly from the new Oracle home path, or
set a user environment variable to point to the file path.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 7


Upgrade Paths

– Direct upgrade to Oracle Database 19c is supported for


Oracle Database release [Link] and later.

– Upgrade to an intermediate release is required for


Oracle Database release [Link] and all earlier releases.

Oracle Internal and Oracle Academy Use Only


If your current Oracle Database is a release earlier than [Link], then you cannot directly upgrade your
Oracle Database to the latest release. In this case, you are required to upgrade to an intermediate release
before upgrading to Oracle Database 19c.

If you cannot carry out a direct upgrade, then carry out an upgrade to the most recent release where
direct upgrades are supported.

For any multistep upgrade, if you must carry out two upgrades to upgrade to the current release, then
you must run the preupgrade script twice: first, for the intermediate upgrade release, and second, for the
target upgrade target release.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 8


Upgrade Method Limitations

The discussed upgrades method have the following limitations:


– Target and source must be on the same platform.
– The database stays on the same platform.
– The operating system (OS) or hardware cannot be changed
during the upgrade.

Oracle Internal and Oracle Academy Use Only


– The OS version must be compatible with both versions of
the database.

A list of platforms can be obtained using the following query:


SQL> select platform_id, platform_name from v$db_transportable_platform;

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 9


Upgrading to a New Release of Oracle Database

Step Tasks
1. Prepare to upgrade. Choose an upgrade method.
Choose an Oracle home.
Develop a test plan.

2. Upgrade a test database. Test the upgrade process by using a test database.

3. Test the upgraded database. Complete the planned tests ensuring that there are no

Oracle Internal and Oracle Academy Use Only


issues. Repeat steps 1–3 if necessary.

4. Prepare the production database. Back up the production database.

5. Upgrade the production database. Upgrade to the new release of Oracle Database.

6. Tune and adjust the upgraded database. Implement the new features.
Test applications.

The table in the slide lists the major steps that you should perform to upgrade to a new release of Oracle
Database.

Basic tasks of each step are as follows:


1. Prepare to upgrade: Become familiar with the new features in the release. Develop a test plan and
backup strategy.
2. Upgrade a test database: Test the upgrade process using a test database, not the production
database system.
3. Test the upgraded database: Use the test plan developed in step 1 and test the upgraded
database. If there are any issues with the upgraded system, address the issues and retest.
4. Prepare the production database: Prepare the production database system for the upgrade.
Schedule downtime as necessary and perform a full or incremental backup.
5. Upgrade the production database: Use the procedures you tested in steps 2 and 3 to upgrade
the production database. Back up the database after the upgrade.
6. Tune and adjust the upgraded production database: Implement the new features. Test the
applications to ensure that they operate correctly. Tune the database as necessary.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 10


Migration Methods

• Oracle Data Pump


• CREATE TABLE AS SELECT SQL statement
‒ Create a database link from the source to the destination database.
‒ Create a table in the new version, reading from the old version.

Oracle Internal and Oracle Academy Use Only


SQL> insert into new_table select col1,col2 from old_db.dbo.old_table

You can use Oracle Data Pump to perform a full or partial export from your database followed by a full or
partial import into a new Oracle Database 19c. The use of Oracle Data Pump is described in the lesson
titled “Migrating Data Using Oracle Data Pump.”

Note: There can be installations to be migrated that do not support Oracle Data Pump, such as versions
before Oracle Database 10.1.0. In those cases, legacy Export and Import can be used.

The CREATE TABLE AS SELECT SQL statement can be used to copy data from one database into a new
Oracle Database 19c. Refer to the Oracle Database SQL Language Reference for additional information
about this command.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 11


Defining Upgrade and Data Migration

This method is required for certain situations:


› Change in platform
› Upgrade from unsupported versions

Export and import are useful in certain cases:

Oracle Internal and Oracle Academy Use Only


Changes in character set
› In combination with upgrade
› Converting tablespaces from dictionary managed to locally managed
› Converting tablespaces to automatic segment space management

You can use the Oracle Data Pump Export and Import utilities to perform a full or partial export from your
existing database, followed by a full or partial import into a new Oracle Database 19c. Export and Import
can copy a subset of the data, leaving the database unchanged.

The Export and Import method is required in certain situations.


• If you want to change operating systems or hardware platforms, you cannot use the AutoUpgrade.
• In some situations, a significant effort is required to move the database to a version where the
Autoupgrade can be used. In these cases, the Export and Import method can be used.

The Export and Import method is useful in certain cases.


• Character set conversion may be required in some upgrade scenarios.
• If there is a partial export of problem data, you can use the AutoUpgrade and import. This method
can be used to solve character set issues involving a small number of tables.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 12


Summary

Describe the upgrade methods

Describe the data migration methods

Describe the upgrade process

Oracle Internal and Oracle Academy Use Only


List the upgrade requirements when certain features
or options are used in Oracle Database

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 9 - 13


Oracle Internal and Oracle Academy Use Only
Upgrading to Oracle Database 19c

Oracle Internal and Oracle Academy Use Only


Objectives Prepare for an upgrade

Perform AutoUpgrade utility system checks

Create a backup of the database

Install Oracle Database 19c software using OUI

Upgrade the database to Oracle Database 19c using

Oracle Internal and Oracle Academy Use Only


the AutoUpgrade Utility

Upgrade the database to Oracle Database 19c using


the Oracle Database Upgrade Assistant (DBUA)

Perform a manual upgrade to Oracle Database


19c using scripts and tools

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 2


Preparing to Upgrade

Familiarize yourself with the features of Oracle Database 19c.

Determine the upgrade path.

Choose an upgrade method.

Oracle Internal and Oracle Academy Use Only


Choose an OFA-compliant Oracle home directory.

Prepare a backup and recovery strategy.

Develop a test plan to test your database, applications, and reports.

In preparation of your upgrade to Oracle Database 19c, you should become familiar with the features of
Oracle Database 19c that you want to use. The Oracle Database New Features Guide 19c provides a
comprehensive list of the new features.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 3


Planning the Upgrade

Choose an upgrade method.

Test the upgrade:

– Prepare the test source.


– Upgrade.
– Perform postupgrade steps.

Oracle Internal and Oracle Academy Use Only


Record problems.

Record the lessons learned.

Choosing an Upgrade Method

In many cases, the upgrade method chosen depends on a number of factors. The size of the database
and the time required to perform the upgrade are two of the most important factors. There are other
factors (such as platform, storage, and character sets) that may limit the choice of the upgrade method.

Testing the Upgrade

In most production environments, the cost of downtime is unacceptably high. So, testing the upgrade
becomes essential. As in any testing situation, the test environment should be as similar to the
production environment as possible. You would then perform the upgrade from preupgrade to
postupgrade.

Recording Problems

It is not unusual to find problems that were not anticipated in the plan during an upgrade. Ensure that
these issues are documented, especially the solutions.

Recording Lessons Learned

In sites where there are multiple databases to be upgraded, a record of the lessons learned through the
course of upgrade testing, and the upgrades themselves can be very valuable in reducing the time it takes
to perform each upgrade.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 4


Developing a Test Plan

Type of Testing Description

Upgrade Plan and test the upgrade path.

Minimal Move all or part of an application to the new database and run the application without
enabling any new database features.

Functional Perform a set of tests in which new and existing features and functions of the system
are tested after the upgrade.

Oracle Internal and Oracle Academy Use Only


High Availability Perform tests to ensure that the upgraded database system meets RTO and RPO
business requirements.

Integration Perform tests to ensure that component interaction is correct.

Performance Perform tests to compare the performance of various SQL statements in the new
database with the performance of those same statements in the current database.

Volume/Load Stress Perform tests of the entire upgraded Oracle database under high volume and loads.

You should develop a planned set of tests to validate all stages of the upgrade process.

Your test plan should include the following types of testing:


• Upgrade testing: Planning and testing the upgrade path
• Minimal testing: Moving all or part of an application from the current database to the new
database and running the application without enabling any new database features. This type of
testing helps to identify any application startup or invocation problems.
• Functional testing: Performing a set of tests in which new and existing features and functions of
the system are tested after the upgrade
• High availability testing: Performing tests to ensure that the upgraded database system meets
Recovery Time Objective (RTO) and Recovery Point Objective (RPO) business requirements
• Integration testing: Performing tests to ensure that interactions among components of the
system are correct
• Performance testing: Performing tests to compare the performance of various SQL statements in
the new database with the performance of those same statements in the current database
• Volume and load stress testing for Oracle Database upgrades: Performing tests of the entire
upgraded Oracle database under high volume and loads

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 5


Performance Testing

You can use the following Oracle Database features


to conduct performance tests:

› Database Replay: Perform real-world testing of a database upgrade using


a production workload before actually upgrading the production database.

Oracle Internal and Oracle Academy Use Only


SQL Performance Analyzer: Forecast the impact of system changes on a
SQL workload.

Performance tests are used to compare the performance of SQL statements in the upgraded database
with the performance of the same statements in the current database. Prior to upgrading your database,
you should ensure that you understand the performance profile of the application in the current
database.

The following Oracle Database features can be used to conduct performance tests:
• Database Replay: You can use Database Replay to perform real-world testing of your production
database workload before you upgrade the database. Database Replay captures the database
workload on the current production system and enables you to replay it on a test system.
• SQL Performance Analyzer: Use SQL Performance Analyzer to forecast the impact of system
changes on a SQL workload. SQL statements that will be impacted by the upgrade are identified
enabling you to evaluate the impact of the upgrade.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 6


Requirements for Databases Using
Oracle Label Security or Oracle Database Vault

› For Oracle Database releases earlier than 12.1 using


Oracle Label Security and Oracle Database Vault, you [Link]$
must run the OLS preprocess script before you
upgrade. The OLS preprocess script moves the AUD$
table from the SYSTEM schema to the SYS schema.

Oracle Internal and Oracle Academy Use Only


› If the Oracle Database you plan to upgrade uses
[Link]$
Oracle Database Vault, then you must disable Oracle
Database Vault before starting the upgrade.

Requirements for Databases Using Oracle Label Security or Oracle Database Vault:

If you are upgrading from a database earlier than Oracle Database release 12.1 that uses Oracle Label
Security (OLS) and Oracle Database Vault, then you must first run the OLS preprocess
script, [Link], to process the aud$ table contents. The OLS upgrade moves the aud$ table
from the SYSTEM schema to the SYS schema. The [Link] script is a preprocessing script
required for this move. The [Link] script creates a temporary table PREUPG_AUD$ in
the SYS schema and moves the [Link]$ records to SYS.PREUPG_AUD$. As a safety measure,
Oracle recommends that you archive your audit trail before running the [Link] script. If Oracle
Label Security is installed on your database, and you are upgrading from an earlier release, then you must
run the OLS preprocess script before upgrading.

If your source Oracle Database uses Oracle Database Vault, then you must first disable Oracle Database
Vault before you start the upgrade. You have two options you can use:
1. Use a manual procedure: Log in as the common Database Vault (DV) administrator in
the CDB$ROOT and grant the DV_PATCH_ADMIN role to SYS, or log in and disable Oracle
Database Vault on every container. Procedures vary slightly, depending on your upgrade scenario.
This procedure is described in My Oracle Support, "Requirement for Upgrading Database with
Database Vault (Doc ID 2757126.1)."
2. Download the latest AutoUpgrade Jar file, and perform the procedure described here.
With either option, when you run AutoUpgrade in Analyze mode, it detects that Oracle Database
Vault is enabled, and indicates in its report that you must ensure the prerequisites for Oracle
Database Vault and upgrade are met.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 7


Installing Oracle Database 19c Software Using OUI

Installing Oracle Database 19c software using OUI:

› Download and unzip Oracle Database 19c software in the new


Oracle Home directory.

Oracle Internal and Oracle Academy Use Only


› Start Oracle Universal Installer (OUI) from the new Oracle Home.

Installing Oracle Database 19c software using OUI:


• Download and unzip Oracle Database 19c software in the new Oracle Home directory.
• Start Oracle Universal Installer (OUI) from the new Oracle Home using “runInstaller” script.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 8


Configuration Option

Step 1
‒ The “Create and Configure a
single instance database”
option is selected by default.
‒ Select the “Set Up Software
Only” option.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Select Configuration Option window of the OUI. This window provides
the following Configuration options for Oracle Database:
• Create and configure a single instance database: Use this option to install Oracle Database
software and create and configure a new database with the OUI. With this option, you create a
starter database, and you do not get some advanced options.
• Set Up Software Only: Use this option to configure only Oracle Database software binaries. After
you set up the software by using this option, you can upgrade the database by using Oracle DBUA.

The default option is Create and configure a single instance database.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 9


Database Installation Option

Step 2
‒ The “Single instance database
installation” option is selected
by default.
‒ This step provides options to
create a database for a

Oracle Internal and Oracle Academy Use Only


clustered environment.

The image in the slide depicts the Database Installation Option window of the OUI, where you can specify
the type of database installation you want to perform. OUI provides you the following options:
• Single instance database installation: Use this option to create a single instance database. You
can configure this database with Oracle Grid Infrastructure to use Oracle Restart capabilities.
• Oracle Real Application Clusters database installation: Use this option to create a new database
as part of Oracle Real Application Clusters (RAC) and use it with Oracle Grid Infrastructure.

The default option is Single instance database installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 10


Database Edition

Step 3
‒ Steps will change depending
on how dialogs are answered.
‒ The “Enterprise Edition” option
is selected by default.
‒ Other editions may not be

Oracle Internal and Oracle Academy Use Only


available for certain database
installation types.

The image in the slide depicts the Select Database Edition window of the OUI where you can select the
database edition that you want to install. Oracle Database software has the following two editions:
• Enterprise Edition: Oracle Database 19c Enterprise Edition is a self-managing database that has
the scalability. performance, high availability, and security features required to run the most
demanding. mission-critical applications.

• Standard Edition 2: Oracle Database 19c Standard Edition 2 is a full-featured data management
solution ideally suited to the needs of medium-sized businesses.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 11


Installation Location

Step 4
‒ Specify Oracle Base, default value
is /u01/app/<username> for
Oracle base.
‒ The Oracle base value is taken
either from environment variable

Oracle Internal and Oracle Academy Use Only


setting or from an existing Oracle
base.
‒ Software directory location is
generated based on the software
location used to start the installer.

The image in the slide depicts the Specify Installation Location window of the OUI where you can specify
an Oracle base location and validate software directory location for Oracle Database software. In this
window, you need to specify Oracle Base locations:
• Oracle base: Designate the Oracle base directory to store Oracle software– and
configuration-related files. It is owned by the installation user and each distinct operating system
user should use their own location. You can either select a location that contains an existing
configuration or that is empty.
If the ORACLE_BASE operating system environment variable is not defined, as directed by the
installation manual, then the default will be /u01/app/<username> where <username> is the
operating system account name performing the installation, typically oracle or grid.
• Software Directory: Displays the Oracle Database home directory to configure Oracle database
software files and is generated based on the software location used to start the installer

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 12


Operating System Groups

Step 5
‒ Select the appropriate groups
for database administrator,
database operator, database
backup and recovery, data guard
administrative, encryption key
management administrative,

Oracle Internal and Oracle Academy Use Only


and RAC administrative.
‒ These groups are present on the
server from the existing
installation.

The image in the slide depicts the Privileged Operating System Groups window of the OUI where you can
select the groups that you want to use for SYS privileges. These groups are used to implement job role
separation of duties. If you are not using job role separation of duties, then set all of the groups to the
same operating system group, which is typically dba.
The available options for group selection are:
• OSDBA: Members of this group have full database administrative privileges. If your system has a
group named dba, then the installer uses it as the default OSDBA group.
• OSOPER: Members of this group have limited administrative privileges. If your system has a group
named oper, then the installer uses it as the default OSOPER group. This is an optional group.
• OSBACKUPDBA: Members of this group have limited set of database backup and recovery related
administrative privileges. If your system has a group named backupdba, then the installer uses it
as the default OSBACKUPDBA group.
• OSDGDBA: Members of this group have limited set of Oracle Data Guard administrative and
monitoring privileges. If your system has a group named dgdba, then the installer uses it as the
default OSDGDBA group.
• OSKMDBA: Members of this group have limited set of encryption key management privileges,
such as Oracle Wallet Manager management privileges. If your system has a group named kmdba,
then the installer uses it as the default OSKMDBA group.
• OSRACDBA: Members of this group have limited set of administrative privileges on Oracle Real
Application Clusters.

You created these groups and assigned them as secondary groups to the user account performing the
installation while preparing your operating system for Oracle Database software installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 13


Root Script Execution Configuration

Step 6
‒ Select to run configuration
scripts as a privileged user.
‒ Provide “root” user credential
or a user information with
“sudo” privilege.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the root script execution configuration. During the software configuration,
certain operations have to be performed as "root" user. You can choose to have the installer perform
these operations automatically by specifying inputs for one of the options below. The input specified will
also be used by the installer to perform additional prerequisite checks.

Select to automatically run configuration scripts as privilege user by providing either:


• Root user credentials.
• Use Sudo

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 14


Perform Prerequisite Checks

Step 7
‒ Checks if the system meets
minimum installation and
configuration requirements
for Oracle Database 19c
‒ No input required on this step

Oracle Internal and Oracle Academy Use Only


unless errors are detected

The image in the slide depicts the screen “Verifying that the target environment meets minimum
installation and configuration requirements for products you have selected.” This can take time.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 15


Perform Prerequisite Checks Results (For Errors)

Step 7 results
‒ Checks if the system meets
minimum installation and
configuration requirements
for Oracle Database 19c
‒ If errors are found, you may

Oracle Internal and Oracle Academy Use Only


use the “Fix & Check Again”
button if it’s available to
perform automatic corrections
or perform manual corrections
as needed and then use
”Check Again” to revalidate.

The image in the slide depicts the Perform Prerequisite Checks window of the OUI. The installer verifies
that the target environment meets minimum installation and configuration requirements for Oracle
Database software installation.

If the installer detects any issues, it lists them as verification results with Failed or Warning status. You can
find more details about a failed check and click Check Again to run a prerequisites check again if you
have corrected any errors.

The OUI includes fix-up scripts to fix many configuration issues. If an issue is fixable by the installer, then
it shows them in the Fixable column. You can select a fixable issue and click Fix and Check Again. Not all
errors can be corrected by the installer, such as configuration change that might require a reboot of the
server.

If you want to proceed with the Oracle Database software installation without fixing the prerequisite
issues, then you can click Ignore All. You are not advised to ignore the issues as the installation may
abort or it can cause performance and stability problems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 16


Summary

Step 8
‒ This shows a summary of all
the options you have selected
for the installation.
‒ Click Edit to modify a
particular setting or option.

Oracle Internal and Oracle Academy Use Only


‒ Click Save Response File to
store the input options for use
in future installations
(Optional).

The image in the slide depicts the Summary window of the OUI where it shows configuration information
and settings you chose on the previous installer screens. The summary includes the following global
settings:
• Disk space: Required disk space and available disk space
• Source location: Directory where you unzip the Oracle Database software installation files
• Database edition: Selected database edition and setup information
• Oracle base: Directory selected for the Oracle base for database software installation
• Software location: Directory where Oracle database software files are stored
• Privileged Operating System groups: Groups selected for operating system authentication for
SYS privileges

You can edit the settings on this page, if you have selected a wrong option or simply want to change any
selection.

This window also gives you an option to save a response file by using the Save Response File button.
You can use the response file to perform future unattended installation on multiple servers using the
same options and settings.

After you verify or edit the information on this page, click Install to start the Oracle Database Software
19c installation.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 17


Install Product

Step 9
‒ This step installs the product
with selected options.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Install Product window of the OUI. Here you can check the progress of
the installation process in the progress bar and the current object being installed, below the progress bar.
The installer also shows the status of various installation activities in the status section, such as:
• Oracle Database installation
– Prepare
– Copy files
– Link binaries
– Setup
• Setup Oracle Base
• Execute Root Scripts

The installer also has a Details button to see more information about the current installation and
configuration action or task. If any installation step fails, then you can fix the problem and click Retry.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 18


Install Product

Step 9
(root scripts execution warning)
‒ Configuration scripts generated
by the Installer need to be run as
a privileged user (root). Installer
will run these scripts using the
privileged user credentials

Oracle Internal and Oracle Academy Use Only


provided earlier.
‒ Select “Yes” to continue or ”No”
to abort.

The image in the slide depicts the Install Product window of the OUI requiring the execution of the
configuration scripts generated by the Installer that needs to run as a privileged user (root). Installer will
run these scripts using the privileged user credentials provided earlier.

. Select “Yes” to continue or ”No” to abort.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 19


Finish

Step 10
‒ The installation
completed successfully.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Finish window of the OUI, which shows that the installation of Oracle
Database software was successful. The Oracle Database software is installed on your system with the
configuration information you provided during the installation.

You can quit the installer now by using the Close button at the bottom-right corner of the screen.

Review the Oracle Database Installation Guide for any postinstallation tasks. Some of the most important
postinstallation tasks include:
• Unlocking and resetting Oracle Database user passwords
• Creating a backup of the [Link] script
• Setting language and locale preferences for client connections
• Recompiling all invalid objects
• Downloading and installing the ORAchk health check tool

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 20


AutoUpgrade Utility System Checks

To help ensure that your upgrade is successful, Oracle strongly recommends that
you check your system using the AutoUpgrade Utility in Analyze mode. The
AutoUpgrade Utility includes extensive system checks that can help to prevent
many issues that can arise during an upgrade. The utility is located in the new
Oracle Database binary home.

Oracle Internal and Oracle Academy Use Only


java -jar [Link] -config [Link] -mode analyze

To help ensure that your upgrade is successful, Oracle strongly recommends that you check your system
using the AutoUpgrade Utility in Analyze mode. The AutoUpgrade Utility includes extensive system
checks that can help to prevent many issues that can arise during an upgrade. The utility is located in the
new Oracle Database binary home. However, to obtain the latest updates, Oracle strongly recommends
that you download the most recent version of the tool from My Oracle Support Document 2485457.1. You
can place the downloaded file in any directory. To run Analyze to check readiness of the database for
upgrade to the new release while your database is running on your earlier release, you must specify the
target version manually in your configuration file, using the target_version parameter. For
example: upg1.target_version=19.

When you run AutoUpgrade in Analyze mode, AutoUpgrade only reads data from the database, and does
not perform any updates to the database. You can run AutoUpgrade using the Analyze mode during
normal business hours. You can run AutoUpgrade in Analyze mode on your source Oracle Database
home before you have set up your target release Oracle Database home.

To use AutoUpgrade, you must have Java 8 installed. Oracle Database Release 12.1 ([Link]) or newer
Oracle homes have a valid java version by default. Start AutoUpgrade in Analyze mode using the
following syntax, where Oracle_home is the Oracle home directory, or the environment variable set for
the Oracle home, and [Link] is your configuration file:

java -jar [Link] -config [Link] -mode analyze

While AutoUpgrade is running, if you want to obtain an overview of the progress, you can enter the
command lsj on Linux and Unix systems. When all checks are completed, the tool will write the
Preupgrade Fixup HTML File, which provides a report on system readiness, display the status of jobs run
to the screen, and exit. If all jobs are listed as "finished successfully," then it means that you can go ahead
and upgrade the database.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 21


Running AutoUpgrade Fixups

• As part of upgrade preparation, if the source database requires corrections for


conditions that would cause errors during an upgrade, then AutoUpgrade run in
Fixup mode performs automated fixes to the source database.
• When you run AutoUpgrade in Fixup mode, AutoUpgrade performs the checks
that it also performs in Analyze mode. After completing these checks,
AutoUpgrade then performs all automated fixups that are required for the new
release before you start an upgrade. When you plan to move your database to a

Oracle Internal and Oracle Academy Use Only


new release, using the Fixup mode prepares the database for upgrade.

java -jar [Link] -config [Link] -mode fixup

Running AutoUpgrade Fixups

As part of upgrade preparation, if the source database requires corrections for conditions that would
cause errors during an upgrade, then AutoUpgrade run in Fixup mode performs automated fixes to the
source database. Because running AutoUpgrade in Fixup mode is a step that you perform as you are
moving to another system, it does not create a guaranteed restore point. Oracle recommends that you
run this mode outside of normal business hours.

When you run AutoUpgrade in Fixup mode, AutoUpgrade performs the checks that it also performs in
Analyze mode. After completing these checks, AutoUpgrade then performs all automated fixups that are
required for the new release before you start an upgrade. When you plan to move your database to a new
release, using the Fixup mode prepares the database for upgrade.

Start AutoUpgrade in Fixup mode using the following syntax, where Oracle_home is the Oracle home
directory, or the environment variable set for the Oracle home, and [Link] is your configuration
file:

java -jar [Link] -config [Link] -mode fixup

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 22


Configuration File to Run AutoUpgrade Prechecks
• AutoUpgrade configuration files contain all the information required to
perform Oracle Database upgrades prechecks.
• Configuration file example:

[oracle@edvmr1p0 ~]$ cat /home/oracle/upgrade-config/[Link]

# Database orcl upgrade from 12.2 to 19c


[Link]=orcl
upg1.start_time=NOW

Oracle Internal and Oracle Academy Use Only


upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1
upg1.target_home=/u01/app/oracle/product/19.3.0/dbhome_1
[Link]=orcl
upg1.log_dir=/home/oracle/autoupgrade/orcl
upg1.upgrade_node=localhost
upg1.target_version=19.3
upg1.run_utlrp=yes
upg1.timezone_upg=yes
[oracle@edvmr1p0 ~]$

AutoUpgrade configuration files contain global and local configuration parameters. Global parameters
by default apply to all databases addressed by the configuration file. When specified for a specific
database, local configuration parameters override global parameters specified by the configuration file.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 23


Backing Up the Database

Perform an online backup using RMAN:

RUN
{
ALLOCATE CHANNEL chan_name TYPE DISK;
BACKUP DATABASE FORMAT 'some_backup_directory%U' TAG
before_upgrade;
BACKUP CURRENT CONTROLFILE FORMAT 'controlfile location and name';

Oracle Internal and Oracle Academy Use Only


}

After running the AutoUpgrade Prechecks, it is recommended that you back up the database. To
minimize downtime, you may perform an online backup.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 24


Upgrading Using the AutoUpgrade Utility

• The AutoUpgrade utility identifies issues before upgrades, performs preupgrade


actions, deploys upgrades, performs postupgrade actions, and starts the upgraded
Oracle Database.
• The AutoUpgrade utility is designed to automate the upgrade process, both before
starting upgrades, during upgrade deployments, and during postupgrade checks
and configuration migration.
• Use AutoUpgrade after you have downloaded binaries for the new Oracle

Oracle Internal and Oracle Academy Use Only


Database release, and set up new release Oracle homes.
• When you use AutoUpgrade, you can upgrade multiple Oracle Database
deployments at the same time, using a single configuration file, customized as
needed for each database deployment.

The AutoUpgrade utility identifies issues before upgrades, performs pre- and postupgrade actions,
deploys upgrades, performs postupgrade actions, and starts the upgraded Oracle Database.

Oracle recommends that you download the most recent version of the AutoUpgrade Utility from My
Oracle Support Document 2485457.1, and use [Link] to prepare for and to deploy your upgrade.
The AutoUpgrade utility is designed to automate the upgrade process, both before starting upgrades,
during upgrade deployments, and during postupgrade checks and configuration migration. You use
AutoUpgrade after you have downloaded binaries for the new Oracle Database release, and set up new
release Oracle homes. When you use AutoUpgrade, you can upgrade multiple Oracle Database
deployments at the same time, using a single configuration file, customized as needed for each database
deployment.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 25


AutoUpgrade with Source and
Target Database Homes on Same Server

When Oracle Database Source and Target Oracle homes are installed on the same physical
server, use the following steps:
– To start the preupgrade system analysis, use the following command:
java -jar [Link] -config [Link] -mode analyze

– If needed, run AutoUpgrade fixups to correct errors found on source database home using
the following command:

Oracle Internal and Oracle Academy Use Only


java -jar [Link] -config [Link] -mode fixups
– To start the deployment of the upgrade, enter the following command:

java -jar [Link] -config [Link] -mode deploy

Note: AutoUpgrade by default uses flashback for restoration, therefore, make sure
to enable archive logging and set a valid location and size for recovery location.

AutoUpgrade with Source and Target Database Homes on Same Server (Typical):

When your Oracle Database Source and Target Oracle homes are installed on the same physical server,
use this example:

To start the analysis, enter the following command:


– java -jar [Link] -config [Link] -mode analyze

The command produces a report that indicates any error conditions that the command finds. Review the
error conditions.

To start the deployment of the upgrade, enter the following command:


– java -jar [Link] -config [Link] -mode deploy

Note: AutoUpgrade by default uses flashback for restoration, therefore, make sure to enable archive
logging and set a valid location and size for recovery location.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 26


AutoUpgrade with Source and
Target Database Homes on Different Servers

When Oracle Database Source and Target Oracle homes are located on different physical
servers, you must complete tasks on both servers using the following steps:
– To start the preupgrade system analysis, use the following command:
java -jar [Link] -config [Link] -mode analyze

– If needed, run AutoUpgrade fixups to correct errors found on source database home server
using the following command:

Oracle Internal and Oracle Academy Use Only


java -jar [Link] -config [Link] -mode fixups

– Complete the tasks to move the source Oracle Database from the source server to the
target server.
– On the target server, start up the database in upgrade mode, and then run AutoUpgrade
in upgrade mode.
java -jar [Link] -config [Link] -mode upgrade

AutoUpgrade with Source and Target Database Homes on Different Servers:

When your Oracle Database Source and Target Oracle homes are located on different physical servers,
you must complete tasks on both servers.
1. To start the analysis, enter the following command:
– java -jar [Link] -config [Link] -mode analyze

The command produces a report that indicates any error conditions that the command finds. Review the
error conditions.

Because the source and target Oracle Database Oracle homes are on different servers, you run fixups on
the source server, and the upgrade on the target server.
2. Run fixups on the source server, on the source database enter the following:
– java -jar [Link] -config [Link] -mode fixups

3. Complete the tasks to move the source Oracle Database from the source server to the target
server.
On the target server, start up the database in upgrade mode, and then run AutoUpgrade
in upgrade mode:
– java -jar [Link] -config [Link] -mode upgrade

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 27


Overview of AutoUpgrade Job Stages
AutoUpgrade utility jobs pass through a series of phases, called stages, during which
specific actions are performed depending on the processing mode that you select for
AutoUpgrade: Analyze, Fixups, Deploy, and Upgrade. AutoUpgrade has the following
stages (page 1):
• SETUP: The initial preparation stage
• PREUPGRADE: The stage AutoUpgrade performs system checks

Oracle Internal and Oracle Academy Use Only


• PRECHECKS: The stage AutoUpgrade analyzes your source Oracle home to determine
requirements for upgrade
• GRP (Guaranteed Restore Point): AutoUpgrade creates GRP before starting the upgrade process.
(This option is not available for Oracle Database Standard Edition)
• PREFIXUPS: AutoUpgrade performs preupgrade fixups

Overview of AutoUpgrade Stages:

AutoUpgrade utility jobs pass through a series of phases, called stages, during which specific actions are
performed.

The actions that occur during a stage are defined by the processing mode that you select for
AutoUpgrade: Analyze, Fixups, Deploy, and Upgrade.

AutoUpgrade has the following stages:

SETUP: The initial stage that the AutoUpgrade utility job manager creates as part of the preparation for
starting a job

PREUPGRADE: The stage in which AutoUpgrade performs checks of your system, based on your current
system configuration to determine its readiness for upgrade, such as checking to determine if you have
sufficient available disk space

PRECHECKS: The stage in which AutoUpgrade analyzes your source Oracle home to determine if the
database meets the requirements for upgrade

GRP: The guaranteed restore point (GRP), which AutoUpgrade creates before starting the upgrade
process. This option is only available for Oracle Database Enterprise Edition releases. It is not available for
Oracle Database Standard Edition. Even though AutoUpgrade creates a GRP by default, Oracle highly
recommends that you perform a backup before starting your upgrade.

PREFIXUPS: The stage in which AutoUpgrade performs preupgrade fixups before starting the upgrade.
For example, this is the stage in which AutoUpgrade gathers dictionary statistics on the source Oracle
home.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 28


Overview of AutoUpgrade Job Stages

AutoUpgrade has the following stages (continued):


• DRAIN: AutoUpgrade shuts down the database.

• DBUPGRADE: AutoUpgrade performs the upgrade and compiles any invalid objects
found after the upgrade completes.

• POSTCHECKS: AutoUpgrade performs checks on the target Oracle home for


postupgrade fixups.

Oracle Internal and Oracle Academy Use Only


• POSTFIXUPS: AutoUpgrade performs processing of postupgrade fixups.

• POSTUPGRADE: AutoUpgrade copies or merges the source Oracle home configuration


files ([Link], [Link], and other files) to the target Oracle home.

Overview of AutoUpgrade Job Stages: (continued)

DRAIN: The stage during which AutoUpgrade shuts down the database

DBUPGRADE: The stage in which AutoUpgrade performs the upgrade and compiles any invalid objects
that are found after the upgrade completes

POSTCHECKS: The stage in which AutoUpgrade performs checks on the target Oracle home (the
upgraded Oracle Database) before starting postupgrade fixups

POSTFIXUPS: The stage in which AutoUpgrade performs processing of postupgrade fixups, such as
upgrading the time zone

POSTUPGRADE: The stage in which AutoUpgrade copies or merges the source Oracle home
configuration files ([Link], [Link], and other files) to the target Oracle home

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 29


AutoUpgrade Command-Line Parameters and Options

AutoUpgrade command-line tool parameters and options available for Oracle


Database upgrade (page 1):
• debug: Turns on the AutoUpgrade debug message feature to assist with correcting
AutoUpgrade job syntax
• clear_recovery_data: Removes the recovery checkpoint to have a fresh start the next time
the tool is launched on specified or all databases

Oracle Internal and Oracle Academy Use Only


• config: Identifies the configuration file used for the job
• config_values: Enables you to provide the same input values about the job as a text
configuration file
• console: Turns on the AutoUpgrade console to provide a set of commands to monitor the
job progress
• create_sample_file: Generates either a configuration file, or a settings file

AutoUpgrade Command-Line Parameters and Options:


• Debug: The AutoUpgrade parameter debug turns on the AutoUpgrade debug message feature,
which assists you with correcting faulty AutoUpgrade job syntax.
• clear_recovery_data: The AutoUpgrade parameter clear_recovery_data removes the recovery
checkpoint, which causes AutoUpgrade to have a fresh start the next time the tool is launched on
specified databases, or on all databases.
• Config: The AutoUpgrade parameter config identifies the configuration file that you use to
provide information about databases that you want to upgrade.
• config_values: The AutoUpgrade parameter config_values enables you to provide the same input
values about systems as a text configuration file. You can use it in conjunction with
the config parameter.
• console: The AutoUpgrade parameter console turns on the AutoUpgrade console and provides a
set of commands to monitor the progress of AutoUpgrade jobs.
• create_sample_file: The AutoUpgrade parameter create_sample_file generates either a
configuration file, or a settings file. You edit these files to create production configuration or
settings files for AutoUpgrade.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 30


AutoUpgrade Command-Line Parameters and Options
AutoUpgrade command-line tool parameters and options available for Oracle
Database upgrade (page 2):
• error_code: Shows the error codes for AutoUpgrade errors
• listchecks: Provides details about a list of all upgrade checks or a particular check specified
for an upgrade
• load_password: Enables you to enter passwords safely into AutoUpgrade's keystore

Oracle Internal and Oracle Academy Use Only


• mode: Mode specified sets the mode from which AutoUpgrade runs
• noconsole: Turns off the AutoUpgrade console to only use configuration file information
• preupgrade: Runs database checks and preupgrade fixups before you start an upgrade,
and postupgrade fixups after an upgrade is completed

AutoUpgrade Command-Line Parameters and Options: (continued)


• error_code: The AutoUpgrade parameter error_code shows the error codes for AutoUpgrade
errors.
• listchecks: The AutoUpgrade parameter listchecks either provides a list of all upgrade checks for
an upgrade, or if you specify a particular check, the details about the check you specify.
• load_password: The AutoUpgrade parameter load_password enables you to enter passwords
safely into AutoUpgrade's keystore.
• mode: The AutoUpgrade parameter mode value sets the mode from which AutoUpgrade runs.
• noconsole: The AutoUpgrade parameter noconsole turns off the AutoUpgrade console, so that
AutoUpgrade runs using only configuration file information.
• preupgrade: The AutoUpgrade parameter preupgrade runs database checks and preupgrade
fixups that fix most issues before you start an upgrade, and postupgrade fixups that fix most
issues after an upgrade is completed.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 31


AutoUpgrade Command-Line Parameters and Options

AutoUpgrade command-line tool parameters and options available for Oracle


Database upgrade (page 3):
• settings: Identifies the configuration file that provides custom runtime configuration of the
AutoUpgrade utility
• version: Prints to the terminal screen the current build of the [Link] file
• restore: Performs a system-level restoration of the AutoUpgrade jobs that is specified

Oracle Internal and Oracle Academy Use Only


• restore_on_all: Automatically restores any job that failed during the deployment
• tune_settings: (Optional) Enables special workflows that alter the behavior of AutoUpgrade
during runtime, depending on the workflow option to be specified
• zip: Creates a zip file of log files required for filing an AutoUpgrade service request

AutoUpgrade Command-Line Parameters and Options: (continued)


• settings: The AutoUpgrade parameter settings identify the configuration file that you use to
provide custom runtime configuration of the AutoUpgrade utility.
• version: The AutoUpgrade parameter version prints to the terminal screen the current build of
the [Link] file.
• restore: The AutoUpgrade parameter restore performs a system-level restoration of the
AutoUpgrade jobs that you specify.
• restore_on_all: The AutoUpgrade parameter restore_on_fail automatically restores any job that
failed during the deployment.
• tune_settings: (Optional) Enables special workflows that alter the behavior of AutoUpgrade
during runtime, depending on the workflow option that you specify
• zip: The AutoUpgrade parameter zip creates a zip file of log files required for filing an
AutoUpgrade service request.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 32


AutoUpgrade Command-Line Syntax

The AutoUpgrade utility is a Java JAR file that is located in the new release Oracle
Database homes at Oracle_home/rdbms/admin/[Link].
AutoUpgrade command syntax is case-sensitive and multiple options can be
concatenated. Enter commands in lowercase using the following syntax:

java -jar [Link] [options]

Oracle Internal and Oracle Academy Use Only


AutoUpgrade Command-Line Syntax:

To use AutoUpgrade to perform your upgrades, review the syntax and runtime use cases.

Prerequisites
• You must have Java Development Kit (JDK) 8 or later installed in your source environment. JDK 8
is installed with every release starting with Oracle Database 12c Release 2 (12.2). For any release
earlier than 12.2, you must either run AutoUpgrade using the Java release in the target Oracle
Database, or you must install JDK 8 on your source database server.
• Oracle Database upgrades using the AutoUpgrade utility follow the same upgrade rules that apply
to manual Oracle Database upgrades. Confirm that your source Oracle Database release is
supported for upgrade.
• The AutoUpgrade utility is a Java JAR file that is located in the new release Oracle Database
homes at:
– Oracle_home/rdbms/admin/[Link]
• Oracle strongly recommends that you obtain the latest AutoUpgrade JAR file from My Oracle
Support. The JAR file and deployment instructions for the JAR file are available from My Oracle
Support note 2485457.1
• AutoUpgrade command syntax is case-sensitive and multiple options can be concatenated.
• AutoUpgrade uses the following syntax:
– java -jar [Link] [options]

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 33


AutoUpgrade Configuration File

AutoUpgrade configuration files contain global and local configuration parameters


required to perform Oracle Database upgrades. Global and local parameters are identified
using a prefix. A simple configuration file example is as follows:

[oracle@edvmr1p0 ~]$ cat /home/oracle/upgrade-config/[Link]

# Database orcl upgrade from 12.2 to 19c


[Link]=orcl
upg1.start_time=NOW

Oracle Internal and Oracle Academy Use Only


upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1
upg1.target_home=/u01/app/oracle/product/19.3.0/dbhome_1
[Link]=orcl
upg1.log_dir=/home/oracle/autoupgrade/orcl
upg1.upgrade_node=localhost
upg1.target_version=19.3
upg1.run_utlrp=yes
upg1.timezone_upg=yes
[oracle@edvmr1p0 ~]$

AutoUpgrade configuration files contain all the information required to perform Oracle Database
upgrades.

Before you can use an AutoUpgrade processing mode, you must create an AutoUpgrade configuration
file for the databases that you want to upgrade.

AutoUpgrade configuration files contain global and local configuration parameters. Global parameters
by default apply to all databases addressed by the configuration file. When specified for a specific
database, local configuration parameters override global parameters specified by the configuration file.

To configure information for specific Oracle Databases for the AutoUpgrade utility upgrade using local
parameters. In the following example, the set of parameters for the first upgrade in the configuration file
uses the prefix sales, the set of parameters for the next upgrade in the configuration file uses the
prefix employees:

sales.source_home=/u01/app/oracle/12.2/dbhome1

...

[Link]=salescdb

employees.source_home-/03/app/oracle/21/dbhome1

Global parameters are identified with prefix “global” as the following example:

global.autoupg_log_dir=/home/oracle/autoupgrade

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 34


Upgrading Using the Oracle Database Upgrade Assistant (DBUA)

• You can use the Oracle Database Upgrade Assistant (DBUA) to:
‒ Upgrade to Oracle Database 19c
‒ Move a database from an existing 19c Oracle home
• Oracle DBUA provides both GUI interface and silent modes.
• Oracle DBUA can upgrade CDBs, PDBs, and non-CDBs.

Oracle Internal and Oracle Academy Use Only


The Oracle DBUA guides you through the upgrade process and configures a database for the new
release. The Oracle DBUA automates the upgrade process and makes appropriate recommendations for
configuration options, such as tablespaces and redo logs.

The Oracle DBUA also supports a silent mode of operation. Silent mode enables you to use a single
statement for the upgrade.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 35


Select Database

Step 1
‒ Steps will change depending
on how dialogs are answered.
‒ Select the database that you
want to upgrade.
‒ Enter the username and

Oracle Internal and Oracle Academy Use Only


password for sysdba if OS-
based authentication is not
enabled.

The image in the slide depicts the first window, which is the Select Database window, of the Oracle DBUA
19c GUI. From the list of available databases, select a database to upgrade. You can also use the Database
Filter to narrow your search to required database by entering database name, version, or type.

Note: If you do not see the required database in this window, then make sure that the /etc/oratab file
has an entry for the database.

Consider the following points when you select a database to upgrade:


• You can upgrade only one database at a time.
• Oracle DBUA lists the databases only from the current ORACLE_HOME. If you have installed Oracle
Database software 19c in a separate home, then run Oracle DBUA from 19c Oracle Home.
• If the user running Oracle DBUA does not have SYSDBA privileges and OS-based authentication is
not enabled, then you need to provide the username and password to enable SYSDBA privileges
for the database.

Click Next to enable Oracle DBUA to gather critical information about the database and run preupgrade
validation checks.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 36


Pluggable Databases

Step 2
‒ Steps are changed due to the
selection on the previous
screen.
‒ You can see a list of PDBs that
are plugged to the CDB.

Oracle Internal and Oracle Academy Use Only


‒ Specify the upgrade order for
PDBs if CDB has more than
one PDB.

The image in the slide depicts the Pluggable Databases window of the Oracle DBUA GUI. This window
appears only if the selected database is a multitenant container database (CDB). All the pluggable
databases (PDBs) are upgraded as part of the CDB upgrade.

You can also specify the order in which the PDBs will be upgraded. Click the Priority column of every PDB
and enter a numeric value to specify priority. PDB with priority 1 will be upgraded first, 2 will be upgraded
second, and so on.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 37


Prerequisite Checks

Step 3
‒ Checks if all preupgrade
requirements are met
‒ No input required on this step
unless errors are detected

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Prerequisite Checks window of the Oracle DBUA GUI. The Oracle DBUA
performs preupgrade checks to verify that the selected database meets minimum configuration
requirements for upgrade.

If Oracle DBUA detects any issues, it lists them as validation results with Error or Warning status. You can
select a check to find more details about it and click Check Again to run a prerequisites check again if you
have corrected any errors. Click Fix & Check Again to automatically fix the errors that are fixable by
Oracle DBUA and run the prerequisite check again.

You must fix all the errors before you can proceed to the next step. If you want to continue the Oracle
Database upgrade without fixing the warnings, you can click Next. You are not advised to ignore the
warnings as the Oracle DBUA may abort or it can cause performance and stability problems.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 38


Select Upgrade Options

Step 4
‒ Select the upgrade options.
‒ Some options are selected by
default.
‒ You can specify custom SQL
scripts to execute before or

Oracle Internal and Oracle Academy Use Only


after the upgrade.

The image in the slide depicts the Select Upgrade Options window of the Oracle DBUA GUI, which
provides the following options:
• Enable Parallel Upgrade: To run the upgrade processes in parallel to reduce the upgrade time,
based on the available CPUs to run processes and scripts simultaneously
• Recompile Invalid Objects During Post Upgrade: To recompile all invalid objects in SYS/SYSTEM
and user schemas. If you do not select this option, then you will have to recompile all invalid
objects manually after the upgrade is completed.
• Upgrade Timezone Data: To upgrade the time zone data file for Oracle Database 19c
• Specify the Custom SQL Scripts to be executed: To specify custom SQL scripts to run before or
after the upgrade. You can use the Browse button in front of Before Upgrade and After Upgrade
text boxes to select custom scripts.

After selecting the required upgrade options, click Next.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 39


Select Recovery Options

Step 5
‒ “Use Flashback and Guaranteed
Restore Point” is selected by
default.
‒ Select a suitable backup option.
‒ Select “I have my own backup

Oracle Internal and Oracle Academy Use Only


and restore strategy” if you
have manually backed up the
database.

The image in the slide depicts the Select Recovery Options window of the Oracle DBUA GUI, which
provides the following options:
• Use Flashback and Guaranteed Restore Point: Use this option to create a guaranteed restore
point to restore the database to guaranteed restore point in case the upgrade fails. If a guaranteed
restore point already exists, then you can select the option Use Available Guaranteed Restore
Point to use the existing restore point. Otherwise, you can create a new restore point.
• Use RMAN Backup: Use this option to select an existing RMAN backup or create a new full offline
backup. If you do not have an existing backup, select Create a New Full Offline RMAN Backup
option and specify a backup location, or Create a New Partial Offline RMAN Backup with User
Tablespace. If you select this option, then user tablespaces are placed into read-only mode during
the upgrade.
• If a latest RMAN backup exists, then select Use Latest Available RMAN Backup to use it.
• I have my own backup and restore strategy: Use this option if you have a third-party Oracle
Database backup solution in place.

The default option depends on the database archiving configuration of the selected database.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 40


Configure Network

Step 6
‒ Defaults to use listener on
port 1521 from Oracle Grid
Infrastructure home
‒ Allows you to create a new
listener for Oracle

Oracle Internal and Oracle Academy Use Only


Database home

The image in the slide depicts the Configure Network window of the Oracle DBUA GUI where you can
either select an existing listener or create a new listener for the database. The listener is a server process
that receives incoming client connection requests and manages traffic of these requests to the server.

If you want to use an existing listener from Oracle Grid Infrastructure home or Oracle Database home, you
can select from the list. The list has the following information about every listener:
• Name: Name of the listener
• Port: Port on which it is accepting connection requests
• Oracle Home: Oracle home in which the listener configuration file, [Link], is stored
• Status: Status of the listener. You must select a listener for the database with status Up. If the
listener is not up and running, you must manually start it.

If you want to create a separate listener for Oracle Database, then you can select the Create a new
listener check box and enter Listener Name and Listener Port details.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 41


Configure Management

Step 7
‒ The “Configure Enterprise
Manager (EM) database express”
check box is selected by default.
‒ Register the product with EM
Database Express or Enterprise

Oracle Internal and Oracle Academy Use Only


Manager cloud control to
monitor and manage it from a
single console (Optional).

The image in the slide depicts the Configure Management window of the Oracle DBUA GUI. You can
configure this instance to be managed by Enterprise Manager Database Express and Enterprise Manager
Cloud Control. This is an optional configuration.

If you want to configure EM Database Express, then provide the EM Database Express port. The default
port is 5500.

If you want to register with EM Cloud Control, then select the Register with Enterprise Manager (EM)
Cloud Control check box and enter the following details:
• OMS host: Host name of the server where the management repository is running
• OMS port: Port number of Oracle Enterprise Manager to receive requests from the Management
Service
• EM Admin User Name: Enterprise manager administrator username
• EM Admin Password: Enterprise manager administrator account password

For more information about Enterprise Manager Cloud Control, see Enterprise Manager Cloud Control
Administrator's Guide.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 42


Summary

Step 8
‒ It shows a summary of all the
options you have selected for
the database creation.
‒ It lists the preupgrade check
results and initialization

Oracle Internal and Oracle Academy Use Only


parameter changes.
‒ Check the values and go to the
respective step if you want to
update any option.

The image in the slide depicts the Summary window of the Oracle DBUA GUI where it shows the
configuration and parameter information you chose in the previous steps. The summary has the
following information about the database:
• Database Configuration Summary, which includes global database name, configuration type, SID,
storage type, and template name
• Database Components, which include Oracle JVM, Oracle Multimedia, Oracle Label Security,
Oracle Application Express, and Oracle Database Vault
• Initialization Parameters, which include database block size, database name, FRA destination,
memory target, and processes
• Character Sets, which include values for database character set and national character set
• Data Files, which include information about data file names, tablespaces they are using, and their
size
• Redo Group Logs, which includes the group numbers and their sizes

If you want to update any information, you can go back to the respective step and change it.

After you verify or edit the information in this window, click Finish to start the Oracle Database creation
process.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 43


Progress

Step 9
‒ Upgrades Oracle Database
to 19c
‒ Shows the overall progress
in the progress bar and
status of each step

Oracle Internal and Oracle Academy Use Only


‒ Check Oracle DBUA log
and alert log for more
information.

The image in the slide depicts the Progress window of the Oracle DBUA GUI. Here you can check the
progress of the database upgrade process in the progress bar.

The DBCA also shows the status of various activities in the status section, such as:
• Registering database with Oracle Restart
• Copying database files
• Creating and starting the Oracle instance
• Completing the database creation
• Creating pluggable databases

The installer also has Activity Log and Alert Log buttons to show more information about the current
task.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 44


Results

Step 10
‒ The Oracle Database is
upgraded successfully.
‒ Click Close to exit the
Oracle DBUA.

Oracle Internal and Oracle Academy Use Only


The image in the slide depicts the Results window of the Oracle DBUA GUI, which shows that the Oracle
Database upgrade was successful. The Oracle Database is upgraded on your system with the
configuration and parameters you provided in previous steps.

You can quit the installer now by using the Close button at the bottom-right corner of the window.

Review the Oracle Database Upgrade Guide for any postupgrade tasks.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 45


Manually Upgrading to Oracle Database 19c

Manually Upgrading to Oracle Database 19c (page 1)


Back up the source database.

Install the new Oracle home.

Run AutoUpgrade with the preupgrade parameter on the source database


and correct any issues that AutoUpgrade does not fix.

Oracle Internal and Oracle Academy Use Only


Log in to SQL*Plus and shut down the database instance.

Log in to SQL*Plus in the Oracle Database 19c home and start the database
(CDB and PDBs) in upgrade mode using STARTUP UPGRADE command.

Run the Parallel Upgrade Utility dbupgrade from the new Oracle home.

Manually Upgrading to Oracle Database 19c: (page 1)


1. Back up the source database.
2. If you have not done so, prepare the new Oracle home.
3. If you have not done so, run the Pre-Upgrade Information Tool. Review the Pre-Upgrade
Information tool output and correct all issues noted in the output before proceeding.
4. Shut down the database (the syntax is the same for a non-CDB and a CDB.) using “SHUTDOWN
IMMEDIATE”
5. Start SQL*Plus in the new Oracle home from the path Oracle_home/rdbms/admin directory and
start the CDB and all PDBS in upgrade mode using ”STARTUP UPGRADE”.
6. To upgrade an entire CDB, run the Parallel Upgrade Utility ([Link]) from the new Oracle home.
The Parallel Upgrade Utility provides parallel upgrade options that reduce downtime. You can run
the command by using the command-line script ”dbupgrade” from the new Oracle home
For example:
cd $ORACLE_HOME/bin
./dbupgrade

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 46


Manually Upgrading to Oracle Database 19c

Manually Upgrading to Oracle Database 19c (page 2)


Restart the database instance and the PDBs in read/write mode.

Run [Link], using the log file base (-b) command to set the log file base to utlrp.

Use the [Link] utility to run postupgrade_fixups.sql, setting the log file base
to postupgrade_fixups.

Oracle Internal and Oracle Academy Use Only


Use the [Link] utility to run [Link], setting the log file base to utlu19s.

Ensure that the time zone data files are current by using the DBMS_DST PL/SQL
package to upgrade the time zone file.

Manually Upgrading to Oracle Database 19c: (page 2)


7. For CDBs, log in to the CDB as SYSDBA and run the command “alter pluggable database all
open” to make databases available for recompiling code.
For example:
alter pluggable database all open
8. Run [Link], using the log file base (-b) command to set the log file base to utlrp. This
command starts [Link] and recompiles any remaining stored PL/SQL and Java code.
For example:
$ORACLE_HOME/perl/bin/perl [Link] -n 1 -e -b utlrp -d '''.''' [Link]
(Because the command specifies -b utlrp, recompile results are stored in log file [Link])
9. Use the catcon utility to run postupgrade_fixups.sql, setting the log file base
to postupgrade_fixups.
For example:
$ORACLE_HOME/perl/bin/perl [Link] -n 1 -e -b postupgrade_fixups -d '''.'''
postupgrade_fixups.sql
10. Use the catcon utility to run [Link], setting the log file base to utlu19s. This command
verifies that all issues are fixed. For example, in a CDB use:
$ORACLE_HOME/perl/bin/perl [Link] -n 1 -e -b utlu19s -d '''.''' [Link]
(Because the command specifies -b utlu19s, upgrade results are stored in log file [Link])
11. Ensure that the time zone data files are current by using the DBMS_DST PL/SQL package to
upgrade the time zone file. You can also update the time zone after the upgrade. If you update
the time zone, then you must update the time zone in both CDB$ROOT and the PDBs.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 47


Summary Prepare for an upgrade

Perform AutoUpgrade utility system checks

Create a backup of the database

Install Oracle Database 19c software using OUI

Oracle Internal and Oracle Academy Use Only


Upgrade the database to Oracle Database 19c using
the AutoUpgrade utility

Upgrade the database to Oracle Database 19c using


the Oracle Database Upgrade Assistant (DBUA)

Perform a manual upgrade to Oracle Database 19c using scripts and tools

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 10 - 48


Performing Postupgrade Tasks

Oracle Internal and Oracle Academy Use Only


Objectives

Perform postupgrade tasks

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 11 - 2


Required Tasks After Database Upgrade

Perform the following tasks as appropriate based on the upgrade


method to your environment:

– If using manual upgrade, you must run Postupgrade Fixups using


postupgrade_fixups.sql generated when you run the Pre-Upgrade
Information Tool ([Link]).
– Update the ORACLE_HOME and PATH operating system environment

Oracle Internal and Oracle Academy Use Only


variables as needed.
– Update the oratab file and existing scripts to point to the new Oracle
Home location.
– Validate and recompile any invalid objects that exist after upgrade
– Run OPatch commands after upgrading Oracle Database.
– Upgrade the RMAN Recovery Catalog.

After you upgrade to Oracle Database 19c and before you can consider the database operational, you
must complete some postupgrade tasks. The tasks you need to complete depend on the method used for
upgrade, and also on your configuration and use of features. Some common tasks include the following:
• When using manual upgrade, you must run the Postupgrade Fixups script
(postupgrade_fixups.sql) that is generated when you run the Pre-Upgrade Information Tool
([Link]). Run the postupgrade scripts any time after completing an upgrade. For both
Container Databases (CDBs) with pluggable databases (PDBs), and for Non-CDB databases, the
postupgrade fixup scripts provide general warnings, errors, and informational recommendations.
You can run the script either by using the [Link] utility, or by using SQL*Plus.
• Update the environment variables. On Linux and UNIX operating systems, ensure that the
ORACLE_HOME and PATH environment variables point to the new Oracle home.
• Update the oratab file and existing scripts to point to the new Oracle Home location.
• Oracle recommends that you identify and recompile invalid objects after you install, patch, or
upgrade a database. Oracle provides the recompilation scripts [Link], [Link],
and [Link]. These scripts are located in the Oracle_home/rdbms/admin directory. Note:
AutoUpgrade Utility can automate this step.
• After you upgrade Oracle Database, you must run OPatch commands from the new Oracle home.
Log in as the Oracle installation owner and run the lsinventory command from the new Oracle
home. The command generates an accurate and complete inventory of the Oracle software
installed on the system.
• Upgrade the RMAN Recovery Catalog. If the recovery catalog schema version is older than what is
required by the RMAN client, you must upgrade it.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 11 - 3


Required Tasks After Database Upgrade

Perform the following tasks as appropriate based on the upgrade


method to your environment: (continued):

– Upgrade statistics on tables using the DBMS_STATS package after upgrading


Oracle Database.
– Configure the FTP and HTTP ports and HTTP authentication for Oracle XML DB.

Oracle Internal and Oracle Academy Use Only


– Rebuild Oracle Text indexes.
– Update Oracle Application Express configuration after upgrading Oracle Database.
– Configure Access Control Lists (ACLs) to external network services.
– Enable Oracle Database Vault after upgrading Oracle Database.
– Check for the SQLNET.ALLOWED_LOGON_VERSION parameter behavior.

After you upgrade to Oracle Database 19c and before you can consider the database operational, you
must complete some postupgrade tasks. The tasks you need to complete depend on the method used for
upgrade, and also on your configuration and use of features. Some common tasks include the following
(continued):
• If the Pre-Upgrade Information Tool instructs you to upgrade the time zone files after completing
the database upgrade, then use the DBMS_DST PL/SQL package to upgrade the time zone file.
• If you used the DBMS_STATS.CREATE_STAT_TABLE procedure, then upgrade these tables by
running DBMS_STATS.UPGRADE_STAT_TABLE.
• Configure the FTP and HTTP ports, and HTTP authentication for Oracle XML DB.
• Regenerate user extensions to Oracle Text after upgrading and rebuild Oracle Text indexes.
• Oracle Application Express affects upgrade procedures, depending on the Oracle Application
Express release and your database installation type. Oracle Application Express can be removed
from the CDB and installed only into the PDB. This is the suggested architecture.
• Configure Access Control Lists (ACLs) to external network services.
• Enable Database Vault by registering Database Vault using the
DVSYS.DBMS_MACADM.ENABLE_DV procedure.
• Check for the SQLNET.ALLOWED_LOGON_VERSION parameter behavior.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 11 - 4


Recommended Tasks After Database Upgrade

It is recommended that you perform the following tasks after upgrading


to Oracle Database 19c:

– Reset passwords to enforce case sensitivity, if required.


– Set threshold values for tablespace alerts.

Oracle Internal and Oracle Academy Use Only


Implement new features as appropriate.
– Migrate to unified auditing if not already enabled and configured.

You should consider the recommended tasks that are listed in the slide depending on the release you
have migrated from and your use of various features:

Note: Additional information about each task can be found in the Oracle Database Upgrade Guide 19c.
• Reset passwords to enforce case sensitivity: To take advantage of enforced
case-sensitive passwords for releases earlier than [Link], you must reset the passwords of
existing users during the database upgrade procedure. You can execute the
DBMS_VERIFIER.EXPIRE_ACCOUNTS_WITHOUT_LATEST_VERIFIER procedure that forces
users whose accounts do not yet have the latest verifier to change their passwords the next time
they log in.
• Set threshold values for tablespace alerts: In an upgraded Oracle Database 19c database,
Tablespace Alerts are disabled (the thresholds are set to null). Tablespaces in the database that
are candidates for monitoring must be identified and the appropriate threshold values must be
set. The default threshold values for a newly created Oracle Database 12c database are:
– 85% full warning
– 97% full critical
• Implement new features: Refer to the Oracle Database New Features Guide for a description of
the new features in Oracle Database 19c. Attend the Oracle Database 19c: New Features for
Administrators course to learn more about the new features.
• Migrate unified auditing if not already implemented: Oracle Database 12c and later include a
new feature called unified audits. With unified auditing, all Oracle Database audit trails ([Link]$
for the database audit trail, SYS.FGA_LOG$ for fine-grained auditing, DVSYS.AUDIT_TRAIL$ for
Database Vault, and so on) are consolidated into one single audit trail. Please refer to Oracle
Database documentation for additional information about unified auditing.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 11 - 5


Summary

Perform postupgrade tasks

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 11 - 6


Migrating Data Using Oracle Data Pump

Oracle Internal and Oracle Academy Use Only


Objectives

Migrate data by using Oracle Data Pump

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 2


As a server-based facility for high-speed data
and metadata movement, Oracle Data Pump:
• Is callable via DBMS_DATAPUMP
• Provides the following tools:
– expdp
– impdp
– GUI interface in Enterprise Manager Cloud Control
Oracle Data Pump:
• Provides four data movement methods:
Overview
– Data file copying

Oracle Internal and Oracle Academy Use Only


– Direct path
– External tables
– Network link support
• Detaches from and reattaches to long-running jobs
• Restarts Data Pump jobs

Oracle Data Pump enables high-speed data and metadata loading and unloading of Oracle databases.
The Data Pump infrastructure is callable via the DBMS_DATAPUMP PL/SQL package. Thus, custom data
movement utilities can be built using Data Pump.

Oracle Database provides the following tools:


• Command-line export and import clients called expdp and impdp, respectively
• Export and import interface in Enterprise Manager Cloud Control

Data Pump automatically decides the data access methods to use; these can be either direct path or
external tables. Data Pump uses direct path load and unload when a table’s structure allows it and when
maximum single-stream performance is desired. However, if there are clustered tables, referential
integrity constraints, encrypted columns, or several other items, Data Pump uses external tables rather
than direct path to move the data.
The ability to detach from and reattach to long-running jobs without affecting the job itself enables you
to monitor jobs from multiple locations while they are running. All stopped Data Pump jobs can be
restarted without loss of data as long as the metainformation remains undisturbed. It does not matter
whether the job is stopped voluntarily or involuntarily due to a crash.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 3


Data Pump Export and Import Clients: Overview

expdp
client Database
link

Source Target
Data Pump Server
job process

Database Database

Master Master
Dump

Oracle Internal and Oracle Academy Use Only


table Dump table
file set file set

“Network mode”
Server Data Pump
process job

impdp
client

• Data Pump Export is a utility for unloading data and metadata into a set of operating system files
called dump file sets. Data Pump Import is used to load metadata and data stored in an export
dump file set into a target system.
• The Data Pump API accesses its files on the server rather than on the client.
• These utilities can also be used to export from a remote database directly to a dump file set, or to
load the target database directly from a source database with no intervening files. This is known as
network mode. This mode is particularly useful to export data from a read-only source database.
• At the center of every Data Pump operation is the master table (MT), which is a table created in
the schema of the user running the Data Pump job. The MT maintains all aspects of the job. The
MT is built during a file-based export job and is written to the dump file set as the last step.
Conversely, loading the MT into the current user’s schema is the first step of a file-based import
operation and is used to sequence the creation of all objects imported.
• Note: The MT is the key to Data Pump’s restart capability in the event of a planned or unplanned
stopping of the job. The MT is dropped when the Data Pump job finishes normally.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 4


Data Pump Utility: Interfaces and Modes

Data Pump Export and Import interfaces: Data Pump Export and Import modes:

› Command-line interface › Full

› Parameter file interface › Schema

› Interactive-command interface › Table

Oracle Internal and Oracle Academy Use Only


› GUI interface › Tablespace

› Transportable tablespace

› Transportable database

You can interact with Data Pump Export and Import using one of the following interfaces:
• Command-line interface: Enables you to specify most of the export parameters directly on the
command line
• Parameter file interface: Enables you to specify all command-line parameters in a parameter file.
The only exception is the PARFILE parameter.
• Interactive-command interface: Stops logging to the terminal and displays the export or import
prompts, where you can enter various commands. This mode is enabled by pressing Ctrl + C
during an export operation that is started with the command-line interface or the parameter file
interface. Interactive-command mode is also enabled when you attach to an executing or stopped
job.
• GUI interface: Select Schema > Database Export/Import. In the menu, select the export or import
operation you want to execute.

Data Pump Export and Import provide different modes for unloading and loading different portions of
the database. The mode is specified on the command line using the appropriate parameter. The available
modes are listed in the slide and are the same as in the original export and import utilities.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 5


Migrating Using Oracle Data Pump

To migrate to Oracle Database 19c using Oracle Data Pump,


perform the following steps:

› Export data from the source database.


› Install Oracle Database 19c and create a database.
› Import data into the new Oracle Database 19c database.

Oracle Internal and Oracle Academy Use Only


export import

Oracle Database 12c Oracle Database 19c

You can use Oracle Data Dump Export and Import to migrate your database to Oracle Database 19c. This
method provides the following advantages:
• The database can remain available for user access during the upgrade. If a consistent snapshot of
the database is required, the database must operate in restricted mode or must otherwise be
protected from changes when the export executes.
• The upgraded database can be created on a different operating system or hardware platform.
• The database can be restructured as part of the import. You can create new tablespaces or modify
existing tables, tablespaces, or partitions to be populated by imported data.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 6


Importing Using a Network Link

› Use Data Pump Import with a database link for a full database import.

› User performing the Export must have the


DATAPUMP_EXP_FULL_DATABASE role.

› User performing the Import must have the

Oracle Internal and Oracle Academy Use Only


DATAPUMP_IMP_FULL_DATABASE role.

impdp import_user
NETWORK_LINK=db_link FULL=Y

Oracle Database 19c Oracle Database 12c

Data Pump Import can be used with a database link to perform a full database import. When you use this
method, no intermediate dump files are created.

The user performing the export must be granted the DATAPUMP_EXP_FULL_DATABASE role. Specify this
user when the database link is created.

The user performing the import must be granted the DATAPUMP_IMP_FULL_DATABASE role.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 7


Creating a Container Database by Using Oracle DBCA

Oracle Internal and Oracle Academy Use Only


Another way to migrate a non-CDB database to a CDB is to create a multitenant container database and
then import the database. To create a CDB using Oracle DBCA, select “Create As Container Database.”

You must also provide a pluggable database name in the “Pluggable Database Name” field. If you select
“Advanced Mode,” you can create an empty CDB with only the root and seed containers.

In Advanced Mode, you can register the CDB with Enterprise Manager Cloud Control, configure the CDB
for Enterprise Manager Database Express, and set passwords for SYS and SYSTEM users.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 8


Creating an Empty New
Data files/
Tempfiles
Control
files
Redo log
files
PDB from PDB$SEED
SYSTEM
UNDO
SYSTEM › Copies the data files from PDB$SEED data files

TEMP
SYSTEM
Creates tablespaces, such as SYSTEM and SYSAUX

Data files › Creates a full catalog including metadata pointing


to Oracle-supplied objects
SYSTEM

SYSTEM
› Creates common users:

Oracle Internal and Oracle Academy Use Only


PDB$SEED
Create
PDB1 – Superuser SYS

Data files
from
PDB$SEED – SYSTEM

SYSTEM › Creates a local user (PDBA), which is granted the


SYSTEM local PDB_DBA role
PDB1 › Creates a new default service

The creation of a new PDB from the seed is nearly instantaneous. The operation copies the data files
from the READ ONLY seed PDB to the target directory defined in the CREATE PLUGGABLE DATABASE
statement.

It creates tablespaces such as SYSTEM to store a full catalog including metadata pointing to
Oracle-supplied objects, and SYSAUX for local auxiliary data.

It creates default schemas and common users that exist in seed PDB, SYS who continues to have all
superuser privileges, and SYSTEM who can administer the PDB.
It creates a local user (the PDBA), which is granted a local PDB_DBA role. Until the PDB SYS user grants
privileges to the local PDB_DBA role, the new PDBA cannot perform any other operation than connecting
to the PDB.

A new default service is also created for the PDB.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 9


Exporting from a Non-CDB
and Importing into a PDB
PRODDB › Export PRODDB with the FULL clause:
Non-CDB $ expdp system@PRODDB FULL=Y DUMPFILE=[Link]

export › Create PDBC if it does not exist in CDB1:


SQL> CONNECT sys@CDB1
Dump SQL> CREATE PLUGGABLE DATABASE
file 2 PDBC USING pdb$seed;

import › Open PDBC.


Oracle Internal and Oracle Academy Use Only


Create a Data Pump directory in PDBC.

PDBA PDBB PDBC


› Copy the dump file to the directory.
CDB1 › Create the same PRODDB tablespaces in PDBC for
CDB
new local user’s objects.
› Import into PDBC with the FULL and REMAP clauses:
$ impdp system@PDBC FULL=Y DUMPFILE=[Link]

To export data from a non-CDB and import it into a PDB of a CDB, perform the steps listed in the slide.

The example in the slide describes how to perform a conventional full database export from the
non-CDB and a conventional full database import into the PDB. You can also perform a full transportable,
a tablespace, schema, or table-level export and import.

The tablespace export and import can be of either type: conventional or transportable.

The users exported from the non-CDB database are re-created as local users in the PDB.

The tablespaces for the new local users and objects must be created in the PDB before the import.

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 10


Summary

Migrate data by using Oracle Data Pump

Oracle Internal and Oracle Academy Use Only

Oracle Database 19c: Deploy, Patch, and Upgrade Workshop 12 - 11


Oracle Internal and Oracle Academy Use Only

You might also like