27 June, 2016

Multitenant : Create and Configure a Pluggable Database (PDB) in Oracle Database 12c Release 1 (12.1)

The multitenant option introduced in Oracle Database 12c allows a single container database (CDB) to host multiple separate pluggable databases (PDB).

Oracle Universal Installer (OUI)

In a previous article we discussed the creation of a pluggable database (PDB) during the creation of the container database (CDB) during the installation of the Oracle software using the Oracle Universal Installer (OUI). This topic will not be repeated here, so please refer to the Container Database article for more information.

Database Configuration Assistant (DBCA)


In a previous article we discussed the creation of a pluggable database (PDB) during the creation of the container database (CDB) using the Database Configuration Assistant (DBCA). This topic will not be repeated here, so please refer to the Container Database article for more information.
The DBCA includes a new option on the opening "Database Operation" screen that allows you to manage the pluggable databases of an existing container database. Select the "Manage Pluggable Databases" option and click the "Next" button.

The following sections describe some of these options.
PDB DBCA - Database Operation

You can see from the resulting screen what operations are possible with pluggable databases.
PDB DBCA - Manage Pluggable Databases

The following sections describe some of these options.

Create a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database to house the new pluggable database and click the "Next" button.
PDB DBCA - Database List

Select the "Create a new Pluggable Database" option and click the "Next" button. If you were plugging in a previously unplugged database, you would select the PDB Archive or PDB File Set options to match the format of the files containing the unplugged PDB.
PDB DBCA - Create Pluggable Database

Enter the pluggable database name, database location and admin credentials, then click the "Next" button.
PDB DBCA - Pluggable Database Options

If you are happy with the summary information, click the "Finish" button.
PDB DBCA - Summary

Wait while the pluggable database is created. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.
PDB DBCA - Summary

The new pluggable database has been created as a clone of the seed database.

Unplug a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Unplug a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be unplugged and click the "Next" button.
PDB DBCA - Database List

Select the PDB to unplug, decide whether to use a pluggable database archive or a file set and enter the appropriate location details. Click the "Next" button.
PDB DBCA - Unplug Pluggable Database

If you are happy with the summary information, click the "Finish" button.

PDB DBCA - Summary

Wait while the pluggable database is unplugged. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

PDB DBCA - Summary

The pluggable database has now been unplugged.

Plugin a Pluggable Database (PDB) using the DBCA


On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database to house the new pluggable database and click the "Next" button.
PDB DBCA - Database List

Select the "Create Pluggable Database From PDB Archive" or "Create Pluggable Database using PDB File Set" option and enter the location of the required files. You can browse for the files using the "Browse" button.

PDB DBCA - Create Pluggable Database

Enter the pluggable database name, database location and admin credentials, then click the "Next" button.

PDB DBCA - Pluggable Database Options

If you are happy with the summary information, click the "Finish" button.

PDB DBCA - Summary

Wait while the pluggable database is created. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

PDB DBCA - Summary

The pluggable database has been plugged into the container database.

Delete a Pluggable Database (PDB) using the DBCA


On the "Manage Pluggable Databases" screen shown previously, select the "Delete a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be deleted and click the "Next" button.
PDB DBCA - Database List

Select the PDB to delete and click the "Next" button.

PDB DBCA - Delete Pluggable Database

If you are happy with the summary information, click the "Finish" button.

PDB DBCA - Summary

Wait while the pluggable database is deleted. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.

PDB DBCA - Summary

The pluggable database has been deleted from the container database.

Configure a Pluggable Database (PDB) using the DBCA

On the "Manage Pluggable Databases" screen shown previously, select the "Configure a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database that houses the pluggable database to be configured and click the "Next" button.
PDB DBCA - Database List
Select the PDB to configure and click the "Next" button.
PDB DBCA - Pluggable Database List

Select any additional options you would like to configure, then click the "Next" button.
PDB DBCA - Pluggable Database Options

If you are happy with the summary information, click the "Finish" button.
PDB DBCA - Summary

Wait while the pluggable database is configured. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen.
PDB DBCA - Progress

The pluggable database has been configured.


Manual (SQL*Plus)

There are lots of variations on the CREATE PLUGGABLE DATABASE and ALTER PLUGGABLE DATABASE commands, so we will keep things simple here and only focus on those that mimic what is possible in the DBCA.
For all the operations listed here you must be connected to the CDB with the container set to root (the default). Typically you will be connected to a common user with SYSDBA or SYSOPER privilege. When creating a new pluggable database, the user must have the CREATE PLUGGABLE DATABASE system privilege.

Create a Pluggable Database (PDB) Manually

To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file should be placed. We can do this using one of two methods. The first method uses the FILE_NAME_CONVERT clause in the CREATE PLUGGABLE DATABASE statement.
CONN / AS SYSDBA

CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
  FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb2/');
Alternatively, we can specify the PDB_FILE_NAME_CONVERT initialization parameter before calling the command without using the FILE_NAME_CONVERT clause.
CONN / AS SYSDBA

ALTER SESSION SET PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb3/';

CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1;
Every time there is a need to convert file locations, either of these two methods will work. For the remainder of the article I will stick to using the FILE_NAME_CONVERT method to cut down on the variations I have to display.
We can see the PDBs are present by querying the DBA_PDBS and V$PDBS views.
COLUMN pdb_name FORMAT A20

SELECT pdb_name, status
FROM   dba_pdbs
ORDER BY pdb_name;

PDB_NAME      STATUS
-------------------- -------------
PDB$SEED      NORMAL
PDB1       NORMAL
PDB2       NEW
PDB3       NEW

SQL>

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED
PDB2          MOUNTED
PDB3          MOUNTED

SQL>
The PDBs are created with the status of 'NEW'. They must be opened in READ WRITE mode at least once for the integration of the PDB into the CDB to be complete.
ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;

SELECT pdb_name, status
FROM   dba_pdbs
ORDER BY pdb_name;

PDB_NAME      STATUS
-------------------- -------------
PDB$SEED      NORMAL
PDB1       NORMAL
PDB2       NORMAL
PDB3       NORMAL

SQL>

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED
PDB2          READ WRITE
PDB3          READ WRITE

SQL>
 Depending on the syntax used, you may need to grant the PDB_DBA role to the local admin users for the PDB.

Unplug a Pluggable Database (PDB) Manually

Before attempting to unplug a PDB, you must make sure it is closed. To unplug the database use the ALTER PLUGGABLE DATABASE command with the UNPLUG INTO clause to specify the location of the XML metadata file.
ALTER PLUGGABLE DATABASE pdb2 CLOSE;
ALTER PLUGGABLE DATABASE pdb2 UNPLUG INTO '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml';
The pluggable database is still present, but you shouldn't open it until the metadata file and all the datafiles are copied somewhere safe.
SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED
PDB2          MOUNTED
PDB3          READ WRITE

SQL>
You can delete the PDB, choosing to keep the files on the file system.
DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED
PDB3          READ WRITE

SQL>

Plugin a Pluggable Database (PDB) Manually

Plugging in a PDB into the CDB is similar to creating a new PDB. First check the PBD is compatible with the CDB by calling the DBMS_PDB.CHECK_PLUG_COMPATIBILITY function, passing in the XML metadata file and the name of the PDB you want to create using it.
SET SERVEROUTPUT ON
DECLARE
  l_result BOOLEAN;
BEGIN
  l_result := DBMS_PDB.check_plug_compatibility(
                pdb_descr_file => '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml',
                pdb_name       => 'pdb2');

  IF l_result THEN
    DBMS_OUTPUT.PUT_LINE('compatible');
  ELSE
    DBMS_OUTPUT.PUT_LINE('incompatible');
  END IF;
END;
/
compatible

PL/SQL procedure successfully completed.

SQL>
If the PDB is not compatible, violations are listed in the PDB_PLUG_IN_VIOLATIONS view. If the PDB is compatible, create a new PDB using it as the source. If we were creating it with a new name we might do something like this.
CREATE PLUGGABLE DATABASE pdb5 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml'
  FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb2/','/u01/app/oracle/oradata/cdb1/pdb5/');
Instead, we want to plug the database back into the same container, so we don't need to copy the files or recreate the temp file, so we can do the following.
CREATE PLUGGABLE DATABASE pdb2 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml'
  NOCOPY
  TEMPFILE REUSE;

ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED
PDB2          READ WRITE
PDB3          READ WRITE

SQL>

Clone a Pluggable Database (PDB) Manually

Cloning an existing local PDB is similar to creating a new PDB from the seed PDB, except now we are using non-seed PDB as the source, which we have to identify using the FROMclause. Make sure the source PDB is open in READ ONLY mode.
ALTER PLUGGABLE DATABASE pdb3 CLOSE;
ALTER PLUGGABLE DATABASE pdb3 OPEN READ ONLY;

CREATE PLUGGABLE DATABASE pdb4 FROM pdb3
  FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb3/','/u01/app/oracle/oradata/cdb1/pdb4/');

ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE;

-- Switch the source PDB back to read/write
ALTER PLUGGABLE DATABASE pdb3 CLOSE;
ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;
The cloning syntax also allows for cloning from remote databases using a database link in the local CBD. There are a few restriction associated with this functionality.
  • The database link can point directly to the remote PDB or to a common user in the remote CBD that owns the remote PDB.
  • If it points to a common user in the remote CBD that owns the remote PDB, that user must have the CREATE PLUGGABLE DATABASE system privilege.
  • The source and target CDBs must have the same endians.
  • The source and target CDBs must have the same options installed.
  • The source and target CDBs must have the same character set and national character set.
Assuming the remote PDB was in READ ONLY mode, the following command should perform the required operation.
CREATE PLUGGABLE DATABASE pdb5 FROM remote_pdb5@remotecdb1
  FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/remote_pdb5/','/u01/app/oracle/oradata/cdb1/pdb5/');

ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE;
This functionality does not work properly in the 12.1.0.1 release of the database, but it has been fixed in 12.1.0.2. You can see an article specifically on this subject here.

Clone a Pluggable Database (PDB) Manually (Metadata Only : NO DATA)

The 12.1.0.2 patchset introduced the ability to do a metadata-only clone. Adding the NO DATA clause when cloning a PDB signifies that only the metadata for the user-created objects should be cloned, not the data in the tables and indexes. You can read more about this feature in the following article.

Delete a Pluggable Database (PDB) Manually

When dropping a pluggable database, you must decide whether to keep or drop the associated datafiles. The PDBs must be closed before being dropped.
ALTER PLUGGABLE DATABASE pdb2 CLOSE;
DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;

ALTER PLUGGABLE DATABASE pdb3 CLOSE;
DROP PLUGGABLE DATABASE pdb3 INCLUDING DATAFILES;

ALTER PLUGGABLE DATABASE pdb4 CLOSE;
DROP PLUGGABLE DATABASE pdb4 INCLUDING DATAFILES;

SELECT name, open_mode
FROM   v$pdbs
ORDER BY name;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         READ ONLY
PDB1          MOUNTED

SQL>

SQL Developer

The DBA section of SQL Developer includes tree node called "Container Database".
PDB SQL Developer
Right-clicking on the "Container Database" node produces a popup menu showing you what operations are available.
PDB SQL Developer Popup 1
Right-clicking on a specific PDB node produces a popup menu showing only those operations that are relevant to that PDB.
PDB SQL Developer Popup 2
If you understand the DBCA and SQL*Plus approach to managing PDBs, these SQL Developer screens are very straight forward.

Cloud Control

Cloud Control 12cR3 onward supports pluggable database functionality. Once you click on the container database, the "Oracle Database > Control > Open/Close Pluggable Database" menu option allows you to control the state of the PDBs owned by the CDB.
PDB Cloud Control - Control
The "Oracle Database > Provision > Provision Pluggable Database" menu option allows you to perform other operations PDBs owned by the CDB, including cloning, unplugging amongst other things.
PDB Cloud Control - Provisioning
As with SQL Developer, if you understand how the pluggable database functionality works, the Cloud Control screens are self explanatory.

Multitenant : Overview of Container Databases (CDB) and Pluggable Databases (PDB)

Oracle 12c Release 1 (12.1) introduced the Multitenant option. This article provides a basic overview of the multitenant option.

Overview

The multitenant option represents one of the biggest architectural changes in the history of the Oracle database. The option introduced the concepts of the Container Database (CDB) and Pluggable Database (PDB).
  • Container Database (CDB) : On the surface this seems very similar to a conventional Oracle database, as it contains most of the working parts you will be already familiar with (controlfiles, datafiles, undo, tempfiles, redo logs etc.). It also houses the data dictionary for those objects that are owned by the root container and those that are visible to all PDBs.

  • Pluggable Database (PDB) : Since the CDB contains most of the working parts for the database, the PDB only needs to contain information specific to itself. It does not need to worry about controlfiles, redo logs and undo etc. Instead it is just made up of datafiles and tempfiles to handle it's own objects. This includes it's own data dictionary, containing information about only those objects that are specific to the PDB.


Multitenant Overview

This split of the data dictionary between common objects, in the root container, and PDB-specific objects, in the PDB's data dictionary, is very important, because this separation is what gives the multitenant option its flexibility. From the perspective of the PDB, the data dictionary is the union of the root and PDB data dictionaries, so internally the PDB feels very much like a normal Oracle database. For example, the DBA_% and ALL_% views within the PDB appears the same as any non-CDB database.

Creating Pluggable Databases (PDBs)


Since the bulk of the working parts are already present in the root container, creating a new PDB is a comparatively quick and simple task. When creating a completely new PDP, the PDB is created as a copy of a seed PDB, so it only takes as long as the files take to copy.

Multitenant Create From Seed


Instead of creating a new PDB from the seed, you can clone an existing PDB.

Multitenant Clone

It is also possible to create clones in a remote CDB.

Multitenant Remote Clone

Unpluging and Plugging in Pluggable Databases (PDBs)

One of the most powerful features of the multitenant option is the ability to unplug a PDB from a CDB and plug it back into another CDB.

Multitenant Unplug Plug

Not only does this allow databases to be moved easily, but it also paves the way for quick patching and upgrading to future versions. A PDB can be unplugged from a 12.1 CBD and plugged into a 12.2 CDB, effectively upgrading it in seconds.

Conversion of a non-CDB database to a pluggable database involves getting a description the non-CDB database and using this to plug it into a CDB as a new PDB.

Views

The introduction of the multitenant option brings with it an extra layer of data dictionary views, allowing reporting across the root container and the pluggable databases (PDBs). Ignoring editions for the moment, prior releases had the following hierarchy.
DBA_ : All objects in the database.
|
--ALL_ : Objects accessible by the current user, including those owned by the current user.
  |
  --USER_ : Objects owned by the current user.
With Oracle 12c, an extra layer is added to the hierarchy.
CDB_ : All objects in all containers (root and all PDBs).
|
--DBA_ : All objects in the current container (root or PDB).
  |
  --ALL_ : Objects accessible by the current user in the current container (root or PDB), including those owned by the current user.
    |
    --USER_ : Objects owned by the current user in the current container (root or PDB).



25 June, 2016

Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 6

This article describes the installation of Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum of 2G swap, with SELinux set to permissive and the firewall disabled. The following package groups were included for this installation.
  • Base System > Base
  • Base System > Compatibility libraries
  • Base System > Hardware monitoring utilities
  • Base System > Large Systems Performance
  • Base System > Network file system client
  • Base System > Performance Tools
  • Base System > Perl Support
  • Servers > Server Platform
  • Servers > System administration tools
  • Desktops > Desktop
  • Desktops > Desktop Platform
  • Desktops > Fonts
  • Desktops > General Purpose Desktop
  • Desktops > Graphical Administration Tools
  • Desktops > Input Methods
  • Desktops > X Window System
  • Applications > Internet Browser
  • Development > Additional Development
  • Development > Development Tools

Unpack Files

Unzip the files.
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
You should now have a single directory called "database" containing installation files.

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address>  <fully-qualified-machine-name>  <machine-name>
For example.
127.0.0.1       localhost.localdomain  localhost
192.168.0.210   ol6-121.localdomain    ol6-121

Oracle Installation Prerequisites

Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.

Automatic Setup

If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all your prerequisite setup, issue the following command.
# yum install oracle-rdbms-server-12cR1-preinstall -y
 Earlier versions of Oracle Linux required manual setup of the Yum repository by following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking necessary.
# yum update

Manual Setup

If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
Install the following packages if they are not already present.
# From Public Yum or ULN
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
Create the new groups and users.
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin

useradd -u 54321 -g oinstall -G dba,oper oracle
Uncomment the extra groups you require.

Additional Setup

The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Amend the "/etc/security/limits.d/90-nproc.conf" file as described below. See MOS Note [ID 1487773.1]
# Change this
*          soft    nproc    1024

# To this
* - nproc 16384
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. To disable it, do the following.
# service iptables stop
# chkconfig iptables off
Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
 Putting mount points directly under root is typically a bad idea. It's done here for simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and issue the following command.
xhost +<machine-name>
Add the following lines at the end of the "/home/oracle/.bash_profile" file.
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol6-121.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
./runInstaller

Proceed with the installation of your choice.
 If you are doing an installation for an Enterprise Manager repository, remember to do an advanced installation and pick the ALT32UTF8 character set.

  1. Configure Security Updates

2.My Oracle Support Credentials

3. Select Installation Type

4. System Class


5. Grid Installation Options


6. Select Install Type


7. Typical Install Configuration


8. Create Inventory


10. Perform Prerequisite Checks

10. Summary


11. Install Product


12. Execute Configuration Scripts


13. Oracle Database Configuration


14. Database Configuration Assistant


15. Database Configuration Assistant Complete


16. Finish


17. Database Express 12c Login

18. Database Express 12c Dashboard


 The "Database Configuration Assistant Complete" screen displays the Database Express 12c URL, which will be something like "https://ol6-121.localdomain:5500/em".

Useful Scripts

To Find session details using SID. set verify off col sid format 99999 col machine format a10 col program format a25 trunc col username form...