0% found this document useful (0 votes)
28 views48 pages

Oracle Database Installation

The document discusses Oracle 19C database administration. It describes Oracle multitenant container databases which include pluggable databases. It also discusses tools used for administration of multitenant databases like SQL*Plus, SQL Developer, Oracle Enterprise Manager and Oracle Database Configuration Assistant.

Uploaded by

arthurmaleo4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
28 views48 pages

Oracle Database Installation

The document discusses Oracle 19C database administration. It describes Oracle multitenant container databases which include pluggable databases. It also discusses tools used for administration of multitenant databases like SQL*Plus, SQL Developer, Oracle Enterprise Manager and Oracle Database Configuration Assistant.

Uploaded by

arthurmaleo4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 48

Oracle 19C Database

Administration
1. Oracle Multitenant Container Database
• The multitenant architecture enables an Oracle database to function
as a multitenant container database (CDB).

• A CDB includes zero, one, or many customer-created pluggable


databases (PDBs). A PDB is a portable collection of schemas, schema
objects, and nonschema objects that appears to an Oracle Net client
as a non-CDB. All Oracle databases before Oracle Database 12c were
non-CDBs.
Understanding PDBs
• A pluggable database (PDB) is a portable collection of
schemas, schema objects, and nonschema objects that
appears to an Oracle Net client as a non-CDB.

• PDBs can be plugged into to CDBs.

• A CDB can contain multiple PDBs.

• Each PDB appears on the network as a separate database.


About Containers in a CDB
• A container is logical collection of data or metadata within the
multitenant architecture.
• The following figure represents possible containers in a CDB.
About Containers
in a CDB (*Conti..)

• CDB root container (also called simply the root)

• The CDB root is a collection of schemas, schema objects, and non-schema objects to which all PDBs
belong.
• The root stores Oracle-supplied metadata and common users.
• An example of metadata is the source code for Oracle-supplied PL/SQL packages.
• A common user is a database user known in every container.
• The root container is named CDB$ROOT.
• Example: CDB with No Application
Containers PDB$SEED.

• This example shows a simple CDB with five


containers: the system container (the entire
CDB), the CDB root, the PDB seed ( PDB$SEED
), and two PDBs.

• Each PDB has its own dedicated


application.

• A different PDB administrator manages


each PDB.

• A common user exists across a CDB with a


single identity.

• In this example, common user SYS can


manage the root and every PDB.

• At the physical level, this CDB has a


database instance and database files, just as a
non-CDB does.
CDB with an
Application
Container
• In this example, multiple DBAs manage the CDB
environment:
• A CDB administrator manages the CDB itself.

• An application container administrator manages


the saas_sales_ac container, including application
installation and upgrades.

• An application PDB administrator manages the


two PDBs in the saas_sales_ac container: cust1_pdb
and cust2_pdb.

• A PDB administrator manages hrpdb.


Tools used in a multi-tenant architecture
• SQL*Plus and SQL Developer for command-line access.
• Oracle Enterprise Manager Cloud Control (Cloud Control).
• Oracle Enterprise Manager Database Express (EM Express).
• Oracle Database Configuration Assistant (DBCA).
Installation of Oracle 19 C & Oracle Database Instance Configurations

Download Oracle Database 19c software for Windows

https://www.oracle.com/database/technologies/oracle19c-windows-downloads.html

On this page you will find many packages.

In this guide, we will focus on the Oracle Database 19c (19.3) for Microsoft Windows x64 (64-bit) package.

If you want to access your future Oracle database remotely, you can also download the Oracle Database
19c Client (19.3) for Microsoft Windows x64 (64-bit)

Or

Oracle Database 19c Client (19.3) for Microsoft Windows (32- bit) according to the architecture of the
client computer.
Launch the
setup wizard
Once the download is complete
• unzip the package then copy
it to the root of your disk;
• rename the folder, choose a
shorter name (eg. db_home);
• then launch the setup.

Note: the installation wizard


may take several minutes to
open. So be patient.
Choose database
installation
options
• This step is very important. It allows you
to choose the database installation
options.
• You can install Oracle software and create
a database at the same time (Create and
configure a single instance database).
• Since we only want to install the Oracle
19c software and its components, we will
opt for “Set up Software Only”.
• This option installs the essential
components for creating and
administering a database.
• You can also use it to upgrade an older
version of Oracle (example: 12c or 18c) or
install RAC.
Select database
installation type
• The first option allows you to install a
single instance database on your
server.
• Oracle Database with the Oracle Real
Application Clusters (RAC) option
allows multiple instances running on
different servers to access the same
physical database stored on shared
storage.
• As we want to install Oracle 19c on a
single server, we select option 1.
• You can create a database after
installation by using Oracle Database
Configuration Assistant (Oracle
DBCA).
Choose database
edition
• The version of the database to
install depends on your needs.
• For an application developer or
and medium-size companies,
the standard version covers
practically all needs.
• To take full advantage of Oracle
19c, you can install the
Enterprise version.
• Obviously, the Enterprise
version requires more
resources (storage, RAM, CPU).
Specify Oracle home
user
• During Oracle Database installation, you
can specify an optional Oracle home user
associated with the Oracle home.
• Oracle home user can be a Windows
built-in account (LocalSystem for Server
and LocalService for Client), virtual
account, or a regular (not an
administrator) Windows account.
• If you specify an existing user as the
Oracle home user, then the Windows
user account you specify can either be a
Windows domain user or a Windows
local user.
• A Windows user account need not be
created by the administrator if a virtual
account or a Windows built-in account is
used during installation.
• If you specify a non-existing user as the
Oracle home user, then the Windows
user account you specify must be a
Windows local user. The installer creates
this account automatically to run the
Windows services for the Oracle home.
Do not log in using this account to
perform administrative tasks.
Specify the location of Oracle software
• In a default Windows
installation, the Oracle base
directory appears as
follows: DRIVE_LETTER:\app
\username where username
is the Oracle installation
user if you choose Windows
built-in account, else it is
the Oracle Home user
(standard Windows user
account).
• You can change this
directory at your
convenience or leave it as
default.
Minimum requirements checks, summary and end of
the installation.
• After these
initial phases of
configuration,
let’s check the
installation
prerequisites.
• If, however,
there are
errors, try to
readjust
the minimum
installation
requirements a
nd start again.
Click install if
no error
occurs.
That’s it. You
can close the
installation
wizard now.
Database Sharding
Sharding is the practice of
optimizing database management
systems by separating the rows or
columns of a larger database table
into multiple smaller tables.

The new tables are called “shards”


(or partitions), and each new table
either has the same schema but
unique rows (as is the case for
“horizontal sharding”) or has a
schema that is a proper subset of
the original table’s schema (as is
the case for “vertical sharding”).

To achieve sharding, the rows or


columns of a larger database table With sharding, new tables called “shards” (or partitions) are created. Each
are split into multiple smaller new table either has the same schema but unique rows (as is the case for
tables. “horizontal sharding”) or has a schema that is a proper subset of the
original table’s schema (as is the case for “vertical sharding”).
Why Is Sharding Used?
• Sharding is a common concept in scalable database architectures. By sharding a larger table, you can
store the new chunks of data, called logical shards, across multiple nodes to achieve horizontal scalability
and improved performance. Once the logical shard is stored on another node, it is referred to as a physical
shard.

• When running a database on a single machine, you will eventually reach the limit of the amount of
computing resources you can apply to any queries, and you will obviously reach a maximum amount of data
with which you can efficiently work.

• By horizontally scaling out, you can enable a flexible database design that increases performance in two
key ways:

• With massively parallel processing, you can take advantage of all the compute resources across your
cluster for every query.

• Because the individual shards are smaller than the logical table as a whole, each machine has to scan
fewer rows when responding to a query.
Why Is Sharding Used? (Conti..)

• Horizontal sharding is effective when queries tend to return a subset of rows that
are often grouped together. For example, queries that filter data based on short
date ranges are ideal for horizontal sharding since the date range will necessarily
limit querying to only a subset of the servers.

• Vertical sharding is effective when queries tend to return only a subset of


columns of the data. For example, if some queries request only names, and others
request only addresses, then the names and addresses can be sharded onto
separate servers.
Why Is Sharding Used? (Conti..)

Also, sharded databases can offer higher levels of availability. In the


event of an outage on an unsharded database, the entire application is
unusable.

With a sharded database, only the portions of the application that relied
on the missing chunks of data are unusable.

In practice, sharded databases often further mitigate the impact of such


outages by replicating backup shards on additional nodes.
Oracle Database Server
• Oracle Database is an object-relational database management system developed and
marketed by Oracle Corporation.

• Oracle Database is commonly referred to as Oracle RDBMS or simply Oracle.

Database and Instance

• An Oracle Database consists of a database and at least one instance.

• An instance, or database instance, is the combination of memory and processes that are
a part of a running installation and a database is a set of files that store data.

• The following picture illustrates the Oracle Database server architecture.


Chapter 2: ACCESSING AN ORACLE DATABASE
Oracle Database Tools
Database Tool Choices
SQL Developer
Enterprise Manager Database Express
Chapter 3: CREATING AN ORACLE DATABASE BY USING DBCA
Planning the Database

Choosing a Database Template

Configuration Assistant
CREATING AN ORACLE DATABASE BY USING DBCA

1. Launch DBCA

The Oracle DBCA tool is available after installing the


Oracle 19c software. To launch it, you must log into
Windows as an administrator and use one of the
methods below:

•open it from the Windows Start menu;

•run the dbca command from the Windows


command prompt;

•execute the following combination: “Windows + R”,


then type dbca.

• Select “Create a database” and click “Next”


Select database configuration mode

• DBCA enables you to create a database


with typical configuration or with advanced
configuration:

• in “Typical configuration” mode, you


can set up your database quickly using
Oracle prebuilt templates.

• in “Advanced configuration” mode, you


can customize storage locations,
management options, database options,
configuration option, user credentials, etc.
It allows you to have full control of your
database configuration.
• In the following, we use the Advanced
configuration mode.
Select database deployment type

• This step enables you to select the type of


database and template to use to create the
database.
• You can select:

• Oracle Single Instance Database


• RAC database
• RAC node database

• for the database type and


• Data Warehouse
• General Purpose or Transaction Processing
• Custom Database

• for the database template. In this guide, it is


advised to use “Oracle Single Instance
Database” and “General Purpose or
Transaction Processing” as a template.
However, you can select the type and template
suited to the type of workload your database
will support. For more information on
templates, click on “View details” next to each
template.
Specify database identification details

• In this step, provide the global


database name, something
like “database.domaine_name”.
You don’t need to fill the SID. It is
created automatically from the
global database name.

• If you want to create a multitenant


container database (CDB), then
check Create as Container
Database and specify the number
of pluggable databases the CDB
can support. You can also create
an empty CDB.
Select database storage option
• You can customize the database storage
options in different ways. Make sure your
select “Use template file for database storage
attributes” and click “Next”.

• If you want to specify your own location to


store database files select “Use following for the
database storage attributes” option.

• With this option, you need to choose how the


database files will be managed:

• File System option: your operating system will


manage your database files.
• Automatic Storage Management (ASM)
option: you place your data files in Oracle
Automatic Storage Management (Oracle ASM)
disk groups.
• Oracle-Managed Files (OMF) option: Oracle
Database will directly manage operating system
files comprising an Oracle database.
Select Fast recovery option
• The fast recovery is an essential
component of your database. In fact,
it allows you to recover your data if a
system failure occurs. It is a location
in which Oracle Database can store
and manage files related to backup
and recovery.

• Check “Specify Fast Recovery


Area” to specify a backup and
recovery area and its directory
location, file storage type and size.

• You can also to enable the


archiving of database online redo log
files, which Oracle uses to recover a
database with the “Enable
archiving” option.
Specify network configuration details
• Configuring a listener is mandatory if
you want to access your database
remotely.

• A listener receives incoming client


connection requests and manages the
traffic of these requests to the database
server.

• In this step, you can select among the


listeners in the current Oracle home or
create a new one by providing the listener
name and a port number.

• Then click “Next” to continue.

You can configure Oracle Database Vault and Oracle Label Security in the next window, or you can click Next to
continue through DBCA without configuring Oracle Database Vault and Oracle Label Security. I’ll skip this in this guide.
Specify configuration options
Memory allocation: The Memory
tab enables you to control how
the database manages its
memory. You can either use:
•Automatic Shared Memory
Management if you want to
allocate specific amounts of
memory to the SGA and
aggregate PGA to your database
instance;
•Manual Shared Memory
Management if you want to
allocate specific memory amount
for each SGA component and the
aggregate PGA;
•Automatic Memory
Management if you want Oracle
to automatically tune the
memory components of the SGA,
and allocates memory to
individual PGAs as needed.
Block size and processes: this tab
allows you to set the database
data block size and the maximum
number of user processes that
can simultaneously connect to the
database.

The maximum number of


processes depend on many
parameters.

The value you select should allow


for all background processes, user
processes, and parallel execution
processes.

A small value for the maximum


number of processes may result
to the database not running.
Character sets: Use this tab to determine how character data is stored in the database.
Select Unicode (AL32UTF8) as the database character set.
Connection mode: this tab enables you
to select the database connection
mode.

In Dedicated server mode, each user


process is associated with a dedicated
server process.

This option is suitable when the number


of clients is small.

In Shared serve mode, several client


connections share a database-allocated
pool of resources.

This mode is the best option when client


load is expected to cause a strain on
memory and other system resources.

If you select this mode, then make sure


you provide the number of Shared
servers.
Sample schemas: this tab allows you to include the sample schemas like HR and OE in your database.

Select “Add sample schemas to the database” if you want to use them later.
Specify management options
Enterprise Manager provides
Web-based management tools
for Oracle databases.

You can select Configure


Enterprise Manager (EM)
express and click “Next”.

If Enterprise Manager cloud


control is installed on your host
computer, then you can choose
Register with Enterprise
Manager (EM) cloud control
and provide the necessary
connection details (host, port
number, username and
password).
Specify database user credentials

Provide passwords for the


administrative accounts
SYS and SYSTEM and the
Oracle home user
account.

You can specify a


password for each
administrative account or
use the same password
for all accounts.

For security reasons, We


recommend to set
different password for
each administrative
account.
Select database creation option

In this step, you can select any of the


following options for creating the database:

•“Create database” to create your database


now;

•“Save as a database template” to save the


database definition as a template to use at a
later time;

•“Generate database creation scripts” to


generate a SQL database creation script that
you can run at a later time.

Moreover, you can adjust the server


initialization parameters, relocate or replicate
your database files (control files, redo logs,
etc.).
Oracle database creation summary

This step enables you to


review the summary
information.

To change any of these


options, click “Back” and
return to the window
where you can modify
the option.

Click “Finish” to start the


creation of the database.

Congratulations! You have successfully created your Oracle 19c database with DBCA.
Before closing the window, make sure you copy the “Enterprise Manager Database Express URL”.
Test the database

To check if your database is running


properly, you can:

start a new SQLPlus session with an


administrative account.

or connect to EM Express with SYS administrative account.


You should see the following screen if everything is okay.
Procedures to connect ORACLE EM
If you are unable to connect by missing the url or any cause:

Just follow these steps:

1. To know your port number


1. Select DBMS_XDB_CONFIG.gethttpsport() FROM DUAL;

Port number is 5500 in your case it may vary if its


same then follow the same.

Type the identified port number along with


https://localhost:5500/em
To Check the database in sqlplus you have created using dbca wizard

• Login to sqlplus> using SYSTEM username &


its password.
(use the newly created database admin
credential [SYSTEM])

• To view your database created:


• >select name from v$database;

• To view your pluggable database created:


• >select name from v$pdbs;

• To view your container created:


• >select name from v$containers;

You might also like