Quick and Easy Oracle Database 19c Build – A Git deployment

Here’s a quick and easy (not dirty) why to get Oracle Database 19c up and running.  Its based on a github repository.

Once you run the oracle_19c_install command, you will essentially have the following built out:

  1. All required Linux rpms installed and parameters set
  2. A 19c Oracle DB Home installed
  3. A 19c DB created with a single
  4. CDB will be opened and PDB started in left in OPEN MODE

Warning this is essentially my output listing…. hope its easy to follow along:

First ya need to have git installed, if you dont have it already

[root@git19c ~]# yum -y install git

Loaded plugins: langpacks, ulninfo

Resolving Dependencies

--> Running transaction check

---> Package git.x86_64 0: will be installed

--> Processing Dependency: perl-Git = for package: git-

--> Processing Dependency: perl(Term::ReadKey) for package: git-

--> Processing Dependency: perl(Git) for package: git-

--> Processing Dependency: perl(Error) for package: git-

--> Running transaction check

---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed

---> Package perl-Git.noarch 0: will be installed

---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

Package                                       Arch                                Version                                      Repository                               Size


git                                           x86_64                                                   ol7_latest                              4.4 M

Installing for dependencies:

perl-Error                                    noarch                              1:0.17020-2.el7                              ol7_latest                               31 k

perl-Git                                      noarch                                                   ol7_latest                               55 k

perl-TermReadKey                              x86_64                              2.30-20.el7                                  ol7_latest                               30 k

Transaction Summary


Install  1 Package (+3 Dependent packages)

Total download size: 4.5 M

Installed size: 22 M

Downloading packages:

(1/4): perl-Error-0.17020-2.el7.noarch.rpm                                                                                                             |  31 kB  00:00:00     

(2/4): perl-Git-                                                                                                              |  55 kB  00:00:00     

(3/4): perl-TermReadKey-2.30-20.el7.x86_64.rpm                                                                                                         |  30 kB  00:00:00     

(4/4): git-                                                                                                                   | 4.4 MB  00:00:00     


Total                                                                                                                                         7.5 MB/s | 4.5 MB  00:00:00     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : 1:perl-Error-0.17020-2.el7.noarch                                                                                                                          1/4

  Installing : perl-TermReadKey-2.30-20.el7.x86_64                                                                                                                        2/4

  Installing : git-                                                                                                                                  3/4

  Installing : perl-Git-                                                                                                                             4/4

  Verifying  : perl-Git-                                                                                                                             1/4

  Verifying  : 1:perl-Error-0.17020-2.el7.noarch                                                                                                                          2/4

  Verifying  : git-                                                                                                                                  3/4

  Verifying  : perl-TermReadKey-2.30-20.el7.x86_64                                                                                                                        4/4


  git.x86_64 0:                                                                                                                                                 

Dependency Installed:

  perl-Error.noarch 1:0.17020-2.el7                       perl-Git.noarch 0:                       perl-TermReadKey.x86_64 0:2.30-20.el7                      


[root@git19c ~]# git version

git version

Now lets get the database bits from git 
[root@git19c ~]# git clone https://github.com/dockerhelp/docker-oracle-ee-19c.git

Cloning into 'docker-oracle-ee-19c'...

remote: Enumerating objects: 12, done.

remote: Counting objects: 100% (12/12), done.

remote: Compressing objects: 100% (11/11), done.

remote: Total 12 (delta 0), reused 0 (delta 0), pack-reused 0

Unpacking objects: 100% (12/12), done.

[root@git19c ~]# ls -lrt .
total 0
drwxr-xr-x. 4 root root 68 Oct  6 22:57 docker-oracle-ee-19c


drwxr-xr-x. 2 root root 4096 Oct  6 22:57 install

-rw-r--r--. 1 root root  412 Oct  6 22:57 Dockerfile

-rw-r--r--. 1 root root   23 Oct  6 22:57 README.md


total 2240

-rw-r--r--. 1 root root     627 Oct  6 22:57 oracle-19c-ee.rsp

-rw-r--r--. 1 root root    3549 Oct  6 22:57 oracle_19c_install.sh

-rw-r--r--. 1 root root    1201 Oct  6 22:57 post_install.sh

-rw-r--r--. 1 root root     495 Oct  6 22:57 tns.sh

-rw-r--r--. 1 root root 2267480 Oct  6 22:57 gosu

-rw-r--r--. 1 root root     441 Oct  6 22:57 netca.rsp

-rw-r--r--. 1 root root     486 Oct  6 22:57 dbca_19c.rsp

Review the oracle_19c_install.sh file and make appropriate changes to reflect your 
environment that you want to build; eg, OHome location and DBname, etc..
[root@git19c install]# more oracle_19c_install.sh


set -e

export INSTALL=$HOME/docker-oracle-ee-19c/install

echo `hostname -I|awk '{print $1}'` `hostname -s` `hostname` >> /etc/hosts

echo "Installing Dependencies"

yum install -y wget unzip binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 \

glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 \

libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 \

libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 oracle-database-preinstall-19c && yum clean all

rm -rf /var/cache/yum

echo "Creating Directory"

rm -rf /u01

mkdir -p /u01 && mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1 && chown -R oracle:oinstall /u01 && chmod -R 775 /u01

touch /etc/oratab

chmod 777 /etc/oratab

chmod 755 $INSTALL/post_install.sh

echo "Setting ENV"

echo oracle:oracle | chpasswd

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

export ORACLE_SID=ORCL19 >> /home/oracle/.bash_profile

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 >> /home/oracle/.bash_profile

export PATH=$ORACLE_HOME/bin:$PATH >> /home/oracle/.bash_profile

#Download oracle database zip

echo "Downloading oracle database zip"

wget -q --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-c

ertificate 'https://docs.google.com/uc?export=download&id=1QinowHmGgiOCdj-OO20qaTQGHfYN2u6M' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1QinowHmGgiOCdj-OO20qaTQ

[root@git19c install]#  chmod u+x $HOME/docker-oracle-ee-19c/install/oracle_19c_install.sh

[root@git19c install]# sh oracle_19c_install.sh

Installing Dependencies

Loaded plugins: langpacks, ulninfo

ol7_UEKR5                                                                                                                                              | 2.8 kB  00:00:00     

ol7_addons                                                                                                                                             | 2.8 kB  00:00:00     

ol7_developer                                                                                                                                          | 2.8 kB  00:00:00     

ol7_developer_EPEL                                                                                                                                     | 3.4 kB  00:00:00     

ol7_ksplice                                                                                                                                            | 2.8 kB  00:00:00     

ol7_latest                                                                                                                                             | 3.4 kB  00:00:00     

ol7_oci_included                                                                                                                                       | 2.9 kB  00:00:00     

ol7_optional_latest                                                                                                                                    | 2.8 kB  00:00:00     

ol7_software_collections                                                                                                                               | 2.8 kB  00:00:00     

(1/19): ol7_addons/x86_64/updateinfo                                                                                                                   |  69 kB  00:00:00     

(2/19): ol7_UEKR5/x86_64/updateinfo                                                                                                                    |  13 kB  00:00:00     

(3/19): ol7_developer_EPEL/x86_64/group_gz                                                                                                             |  87 kB  00:00:00     

(4/19): ol7_developer/x86_64/primary_db                                                                                                                | 434 kB  00:00:00     

(5/19): ol7_addons/x86_64/primary_db                                                                                                                   | 129 kB  00:00:00     

(6/19): ol7_developer_EPEL/x86_64/updateinfo                                                                                                           | 4.9 kB  00:00:00     

(7/19): ol7_ksplice/primary_db                                                                                                                         | 187 kB  00:00:00     

(8/19): ol7_UEKR5/x86_64/primary_db                                                                                                                    | 2.5 MB  00:00:00     

(9/19): ol7_latest/x86_64/group_gz                                                                                                                     | 148 kB  00:00:00     

(10/19): ol7_developer/x86_64/updateinfo                                                                                                               |   71 B  00:00:00     

(11/19): ol7_latest/x86_64/updateinfo                                                                                                                  | 2.6 MB  00:00:00     

(12/19): ol7_developer_EPEL/x86_64/primary_db                                                                                                          |  11 MB  00:00:00     

(13/19): ol7_optional_latest/x86_64/updateinfo                                                                                                         | 853 kB  00:00:00     

(14/19): ol7_ksplice/updateinfo                                                                                                                        | 4.8 kB  00:00:00     

(15/19): ol7_oci_included/x86_64/primary_db                                                                                                            |  48 kB  00:00:00     

(16/19): ol7_latest/x86_64/primary_db                                                                                                                  |  15 MB  00:00:00     

(17/19): ol7_software_collections/x86_64/updateinfo                                                                                                    | 8.7 kB  00:00:00     

(18/19): ol7_optional_latest/x86_64/primary_db                                                                                                         | 4.0 MB  00:00:00     

(19/19): ol7_software_collections/x86_64/primary_db                                                                                                    | 4.7 MB  00:00:00     

Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version

Package unzip-6.0-20.el7.x86_64 already installed and latest version

Package binutils-2.27-41.base.0.1.el7.x86_64 already installed and latest version

Package glibc-2.17-292.0.1.el7.x86_64 already installed and latest version

Package libaio-0.3.109-13.el7.x86_64 already installed and latest version

Package libgcc-4.8.5-39.0.1.el7.x86_64 already installed and latest version

Package libstdc++-4.8.5-39.0.1.el7.x86_64 already installed and latest version

Package 1:make-3.82-24.el7.x86_64 already installed and latest version

Package sysstat-10.1.5-18.el7.x86_64 already installed and latest version

Resolving Dependencies

--> Running transaction check

---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed

---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed

---> Package gcc.x86_64 0:4.8.5-39.0.1.el7 will be installed

--> Processing Dependency: cpp = 4.8.5-39.0.1.el7 for package: gcc-4.8.5-39.0.1.el7.x86_64

--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-39.0.1.el7.x86_64

--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-39.0.1.el7.x86_64

---> Package gcc-c++.x86_64 0:4.8.5-39.0.1.el7 will be installed

---> Package glibc.i686 0:2.17-292.0.1.el7 will be installed

--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-292.0.1.el7.i686

--> Processing Dependency: libfreebl3.so for package: glibc-2.17-292.0.1.el7.i686

---> Package glibc-devel.i686 0:2.17-292.0.1.el7 will be installed

--> Processing Dependency: glibc-headers = 2.17-292.0.1.el7 for package: glibc-devel-2.17-292.0.1.el7.i686

--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-292.0.1.el7.i686

---> Package glibc-devel.x86_64 0:2.17-292.0.1.el7 will be installed

---> Package ksh.x86_64 0:20120801-139.0.1.el7 will be installed

---> Package libXi.i686 0:1.7.9-1.el7 will be installed

--> Processing Dependency: libX11 >= for package: libXi-1.7.9-1.el7.i686

--> Processing Dependency: libXext.so.6 for package: libXi-1.7.9-1.el7.i686

--> Processing Dependency: libX11.so.6 for package: libXi-1.7.9-1.el7.i686

---> Package libXi.x86_64 0:1.7.9-1.el7 will be installed

--> Processing Dependency: libXext.so.6()(64bit) for package: libXi-1.7.9-1.el7.x86_64

---> Package libXtst.i686 0:1.2.3-1.el7 will be installed

---> Package libXtst.x86_64 0:1.2.3-1.el7 will be installed

---> Package libaio.i686 0:0.3.109-13.el7 will be installed

---> Package libaio-devel.i686 0:0.3.109-13.el7 will be installed

---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed

---> Package libgcc.i686 0:4.8.5-39.0.1.el7 will be installed

---> Package libstdc++.i686 0:4.8.5-39.0.1.el7 will be installed

---> Package libstdc++-devel.i686 0:4.8.5-39.0.1.el7 will be installed

---> Package libstdc++-devel.x86_64 0:4.8.5-39.0.1.el7 will be installed

---> Package oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 will be installed

--> Processing Dependency: xorg-x11-xauth for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64

--> Processing Dependency: xorg-x11-utils for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64

--> Processing Dependency: psmisc for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64

--> Running transaction check

---> Package cpp.x86_64 0:4.8.5-39.0.1.el7 will be installed

---> Package glibc-headers.x86_64 0:2.17-292.0.1.el7 will be installed

--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-292.0.1.el7.x86_64

--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-292.0.1.el7.x86_64

---> Package libX11.i686 0:1.6.7-2.el7 will be installed

--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.i686

--> Processing Dependency: libxcb.so.1 for package: libX11-1.6.7-2.el7.i686

---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed

--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.el7.x86_64

---> Package libXext.i686 0:1.3.3-3.el7 will be installed

---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed

---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed

---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed

---> Package nss-softokn-freebl.i686 0:3.44.0-5.0.1.el7 will be installed

---> Package psmisc.x86_64 0:22.20-16.el7 will be installed

---> Package xorg-x11-utils.x86_64 0:7.5-23.el7 will be installed

--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXxf86vm.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXrender.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXrandr.so.2()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

--> Processing Dependency: libXinerama.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64

---> Package xorg-x11-xauth.x86_64 1:1.0.9-1.el7 will be installed

--> Processing Dependency: libXmuu.so.1()(64bit) for package: 1:xorg-x11-xauth-1.0.9-1.el7.x86_64

--> Processing Dependency: libXau.so.6()(64bit) for package: 1:xorg-x11-xauth-1.0.9-1.el7.x86_64

--> Running transaction check

---> Package kernel-headers.x86_64 0:3.10.0-1062.1.2.el7 will be installed

---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed

---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed

---> Package libXinerama.x86_64 0:1.1.3-2.1.el7 will be installed

---> Package libXmu.x86_64 0:1.1.2-2.el7 will be installed

--> Processing Dependency: libXt.so.6()(64bit) for package: libXmu-1.1.2-2.el7.x86_64

---> Package libXrandr.x86_64 0:1.5.1-2.el7 will be installed

---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed

---> Package libXv.x86_64 0:1.0.11-1.el7 will be installed

---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el7 will be installed

---> Package libXxf86misc.x86_64 0:1.0.3-7.1.el7 will be installed

---> Package libXxf86vm.x86_64 0:1.1.4-1.el7 will be installed

---> Package libdmx.x86_64 0:1.1.3-3.el7 will be installed

---> Package libxcb.i686 0:1.13-1.el7 will be installed

--> Processing Dependency: libXau.so.6 for package: libxcb-1.13-1.el7.i686

---> Package libxcb.x86_64 0:1.13-1.el7 will be installed

--> Running transaction check

---> Package libXau.i686 0:1.0.8-2.1.el7 will be installed

---> Package libXt.x86_64 0:1.1.5-3.el7 will be installed

--> Processing Dependency: libSM.so.6()(64bit) for package: libXt-1.1.5-3.el7.x86_64

--> Processing Dependency: libICE.so.6()(64bit) for package: libXt-1.1.5-3.el7.x86_64

--> Running transaction check

---> Package libICE.x86_64 0:1.0.9-9.el7 will be installed

---> Package libSM.x86_64 0:1.2.2-2.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

Package                                                Arch                           Version                                       Repository                          Size
compat-libcap1                                         x86_64                         1.10-7.el7                                    ol7_latest                          17 k
compat-libstdc++-33                                    x86_64                         3.2.3-72.el7                                  ol7_latest                         190 k
gcc                                                    x86_64                         4.8.5-39.0.1.el7                              ol7_latest                          16 M
gcc-c++                                                x86_64                         4.8.5-39.0.1.el7                              ol7_latest                         7.2 M
glibc                                                  i686                           2.17-292.0.1.el7                              ol7_latest                         4.3 M
glibc-devel                                            i686                           2.17-292.0.1.el7                              ol7_latest                         1.1 M
glibc-devel                                            x86_64                         2.17-292.0.1.el7                              ol7_latest                         1.1 M
ksh                                                    x86_64                         20120801-139.0.1.el7                          ol7_latest                         883 k
libXi                                                  i686                           1.7.9-1.el7                                   ol7_latest                          40 k
libXi                                                  x86_64                         1.7.9-1.el7                                   ol7_latest                          40 k
libXtst                                                i686                           1.2.3-1.el7                                   ol7_latest                          20 k
libXtst                                                x86_64                         1.2.3-1.el7                                   ol7_latest                          20 k
libaio                                                 i686                           0.3.109-13.el7                                ol7_latest                          24 k
libaio-devel                                           i686                           0.3.109-13.el7                                ol7_latest                          12 k
libaio-devel                                           x86_64                         0.3.109-13.el7                                ol7_latest                          12 k
libgcc                                                 i686                           4.8.5-39.0.1.el7                              ol7_latest                         110 k
libstdc++                                              i686                           4.8.5-39.0.1.el7                              ol7_latest                         318 k
libstdc++-devel                                        i686                           4.8.5-39.0.1.el7                              ol7_latest                         1.5 M
libstdc++-devel                                        x86_64                         4.8.5-39.0.1.el7                              ol7_latest                         1.5 M

oracle-database-preinstall-19c                         x86_64                         1.0-1.el7                                     ol7_latest                          18 k

Installing for dependencies:

cpp                                                    x86_64                         4.8.5-39.0.1.el7                              ol7_latest                         6.0 M

glibc-headers                                          x86_64                         2.17-292.0.1.el7                              ol7_latest                         689 k

kernel-headers                                         x86_64                         3.10.0-1062.1.2.el7                           ol7_latest                         8.7 M

libICE                                                 x86_64                         1.0.9-9.el7                                   ol7_latest                          66 k

libSM                                                  x86_64                         1.2.2-2.el7                                   ol7_latest                          39 k

libX11                                                 i686                           1.6.7-2.el7                                   ol7_latest                         610 k

libX11                                                 x86_64                         1.6.7-2.el7                                   ol7_latest                         606 k

libX11-common                                          noarch                         1.6.7-2.el7                                   ol7_latest                         164 k

libXau                                                 i686                           1.0.8-2.1.el7                                 ol7_latest                          28 k

libXau                                                 x86_64                         1.0.8-2.1.el7                                 ol7_latest                          28 k

libXext                                                i686                           1.3.3-3.el7                                   ol7_latest                          38 k

libXext                                                x86_64                         1.3.3-3.el7                                   ol7_latest                          38 k

libXinerama                                            x86_64                         1.1.3-2.1.el7                                 ol7_latest                          13 k

libXmu                                                 x86_64                         1.1.2-2.el7                                   ol7_latest                          70 k

libXrandr                                              x86_64                         1.5.1-2.el7                                   ol7_latest                          27 k

libXrender                                             x86_64                         0.9.10-1.el7                                  ol7_latest                          25 k

libXt                                                  x86_64                         1.1.5-3.el7                                   ol7_latest                         172 k

libXv                                                  x86_64                         1.0.11-1.el7                                  ol7_latest                          18 k

libXxf86dga                                            x86_64                         1.1.4-2.1.el7                                 ol7_latest                          18 k

libXxf86misc                                           x86_64                         1.0.3-7.1.el7                                 ol7_latest                          19 k

libXxf86vm                                             x86_64                         1.1.4-1.el7                                   ol7_latest                          17 k

libdmx                                                 x86_64                         1.1.3-3.el7                                   ol7_latest                          15 k

libmpc                                                 x86_64                         1.0.1-3.el7                                   ol7_latest                          49 k

libxcb                                                 i686                           1.13-1.el7                                    ol7_latest                         229 k

libxcb                                                 x86_64                         1.13-1.el7                                    ol7_latest                         213 k

mpfr                                                   x86_64                         3.1.1-4.el7                                   ol7_latest                         198 k

nss-softokn-freebl                                     i686                           3.44.0-5.0.1.el7                              ol7_latest                         214 k

psmisc                                                 x86_64                         22.20-16.el7                                  ol7_latest                         141 k

xorg-x11-utils                                         x86_64                         7.5-23.el7                                    ol7_latest                         114 k

xorg-x11-xauth                                         x86_64                         1:1.0.9-1.el7                                 ol7_latest                          29 k

Transaction Summary

Install  20 Packages (+30 Dependent packages)
Total download size: 53 M

Installed size: 121 M

Downloading packages:

(1/50): compat-libcap1-1.10-7.el7.x86_64.rpm                                                                                                           |  17 kB  00:00:00     

(2/50): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                                                                                    | 190 kB  00:00:00     

(3/50): cpp-4.8.5-39.0.1.el7.x86_64.rpm                                                                                                                | 6.0 MB  00:00:00     

(4/50): gcc-c++-4.8.5-39.0.1.el7.x86_64.rpm                                                                                                            | 7.2 MB  00:00:00     

(5/50): gcc-4.8.5-39.0.1.el7.x86_64.rpm                                                                                                                |  16 MB  00:00:00     

(6/50): glibc-2.17-292.0.1.el7.i686.rpm                                                                                                                | 4.3 MB  00:00:00     

(7/50): glibc-devel-2.17-292.0.1.el7.i686.rpm                                                                                                          | 1.1 MB  00:00:00     

(8/50): glibc-devel-2.17-292.0.1.el7.x86_64.rpm                                                                                                        | 1.1 MB  00:00:00     

(9/50): glibc-headers-2.17-292.0.1.el7.x86_64.rpm                                                                                                      | 689 kB  00:00:00     

(10/50): ksh-20120801-139.0.1.el7.x86_64.rpm                                                                                                           | 883 kB  00:00:00     

(11/50): libICE-1.0.9-9.el7.x86_64.rpm                                                                                                                 |  66 kB  00:00:00     

(12/50): libSM-1.2.2-2.el7.x86_64.rpm                                                                                                                  |  39 kB  00:00:00     

(13/50): libX11-1.6.7-2.el7.i686.rpm                                                                                                                   | 610 kB  00:00:00     

(14/50): libX11-1.6.7-2.el7.x86_64.rpm                                                                                                                 | 606 kB  00:00:00     

(15/50): libX11-common-1.6.7-2.el7.noarch.rpm                                                                                                          | 164 kB  00:00:00     

(16/50): libXau-1.0.8-2.1.el7.i686.rpm                                                                                                                 |  28 kB  00:00:00     

(17/50): libXau-1.0.8-2.1.el7.x86_64.rpm                                                                                                               |  28 kB  00:00:00     

(18/50): kernel-headers-3.10.0-1062.1.2.el7.x86_64.rpm                                                                                                 | 8.7 MB  00:00:00     

(19/50): libXext-1.3.3-3.el7.i686.rpm                                                                                                                  |  38 kB  00:00:00     

(20/50): libXext-1.3.3-3.el7.x86_64.rpm                                                                                                                |  38 kB  00:00:00     

(21/50): libXi-1.7.9-1.el7.i686.rpm                                                                                                                    |  40 kB  00:00:00     

(22/50): libXi-1.7.9-1.el7.x86_64.rpm                                                                                                                  |  40 kB  00:00:00     

(23/50): libXinerama-1.1.3-2.1.el7.x86_64.rpm                                                                                                          |  13 kB  00:00:00     

(24/50): libXmu-1.1.2-2.el7.x86_64.rpm                                                                                                                 |  70 kB  00:00:00     

(25/50): libXrandr-1.5.1-2.el7.x86_64.rpm                                                                                                              |  27 kB  00:00:00     

(26/50): libXrender-0.9.10-1.el7.x86_64.rpm                                                                                                            |  25 kB  00:00:00     

(27/50): libXt-1.1.5-3.el7.x86_64.rpm                                                                                                                  | 172 kB  00:00:00     

(28/50): libXtst-1.2.3-1.el7.i686.rpm                                                                                                                  |  20 kB  00:00:00     

(29/50): libXtst-1.2.3-1.el7.x86_64.rpm                                                                                                                |  20 kB  00:00:00     

(30/50): libXv-1.0.11-1.el7.x86_64.rpm                                                                                                                 |  18 kB  00:00:00     

(31/50): libXxf86dga-1.1.4-2.1.el7.x86_64.rpm                                                                                                          |  18 kB  00:00:00     

(32/50): libXxf86misc-1.0.3-7.1.el7.x86_64.rpm                                                                                                         |  19 kB  00:00:00     

(33/50): libXxf86vm-1.1.4-1.el7.x86_64.rpm                                                                                                             |  17 kB  00:00:00     

(34/50): libaio-0.3.109-13.el7.i686.rpm                                                                                                                |  24 kB  00:00:00     

(35/50): libaio-devel-0.3.109-13.el7.i686.rpm                                                                                                          |  12 kB  00:00:00     

(36/50): libaio-devel-0.3.109-13.el7.x86_64.rpm                                                                                                        |  12 kB  00:00:00     

(37/50): libdmx-1.1.3-3.el7.x86_64.rpm                                                                                                                 |  15 kB  00:00:00     

(38/50): libgcc-4.8.5-39.0.1.el7.i686.rpm                                                                                                              | 110 kB  00:00:00     

(39/50): libmpc-1.0.1-3.el7.x86_64.rpm                                                                                                                 |  49 kB  00:00:00     

(40/50): libstdc++-4.8.5-39.0.1.el7.i686.rpm                                                                                                           | 318 kB  00:00:00     

(41/50): libstdc++-devel-4.8.5-39.0.1.el7.i686.rpm                                                                                                     | 1.5 MB  00:00:00     

(42/50): libstdc++-devel-4.8.5-39.0.1.el7.x86_64.rpm                                                                                                   | 1.5 MB  00:00:00     

(43/50): libxcb-1.13-1.el7.i686.rpm                                                                                                                    | 229 kB  00:00:00     

(44/50): libxcb-1.13-1.el7.x86_64.rpm                                                                                                                  | 213 kB  00:00:00     

(45/50): mpfr-3.1.1-4.el7.x86_64.rpm                                                                                                                   | 198 kB  00:00:00     

(46/50): nss-softokn-freebl-3.44.0-5.0.1.el7.i686.rpm                                                                                                  | 214 kB  00:00:00     

(47/50): oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm                                                                                           |  18 kB  00:00:00     

(48/50): psmisc-22.20-16.el7.x86_64.rpm                                                                                                                | 141 kB  00:00:00     

(49/50): xorg-x11-utils-7.5-23.el7.x86_64.rpm                                                                                                          | 114 kB  00:00:00     

(50/50): xorg-x11-xauth-1.0.9-1.el7.x86_64.rpm                                                                                                         |  29 kB  00:00:00     


Total                                                                                                                                         133 MB/s |  53 MB  00:00:00     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : libX11-common-1.6.7-2.el7.noarch                                                                                                                          1/50

  Installing : kernel-headers-3.10.0-1062.1.2.el7.x86_64                                                                                                                 2/50

  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                        3/50

  Installing : libstdc++-devel-4.8.5-39.0.1.el7.x86_64                                                                                                                   4/50

  Installing : libgcc-4.8.5-39.0.1.el7.i686                                                                                                                              5/50

  Installing : glibc-2.17-292.0.1.el7.i686                                                                                                                               6/50

  Installing : nss-softokn-freebl-3.44.0-5.0.1.el7.i686                                                                                                                  7/50

  Installing : mpfr-3.1.1-4.el7.x86_64                                                                                                                                   8/50

  Installing : libmpc-1.0.1-3.el7.x86_64                                                                                                                                 9/50

  Installing : libICE-1.0.9-9.el7.x86_64                                                                                                                                10/50

  Installing : glibc-headers-2.17-292.0.1.el7.x86_64                                                                                                                    11/50

  Installing : glibc-devel-2.17-292.0.1.el7.x86_64                                                                                                                      12/50

  Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                                                              13/50

  Installing : libxcb-1.13-1.el7.x86_64                                                                                                                                 14/50

  Installing : libX11-1.6.7-2.el7.x86_64                                                                                                                                15/50

  Installing : libXext-1.3.3-3.el7.x86_64                                                                                                                               16/50

  Installing : libXi-1.7.9-1.el7.x86_64                                                                                                                                 17/50

  Installing : libXrender-0.9.10-1.el7.x86_64                                                                                                                           18/50

  Installing : libXrandr-1.5.1-2.el7.x86_64                                                                                                                             19/50

  Installing : libXtst-1.2.3-1.el7.x86_64                                                                                                                               20/50

  Installing : libdmx-1.1.3-3.el7.x86_64                                                                                                                                21/50

  Installing : libXinerama-1.1.3-2.1.el7.x86_64                                                                                                                         22/50

  Installing : libXv-1.0.11-1.el7.x86_64                                                                                                                                23/50

  Installing : libXxf86vm-1.1.4-1.el7.x86_64                                                                                                                            24/50

  Installing : libXxf86misc-1.0.3-7.1.el7.x86_64                                                                                                                        25/50

  Installing : libXxf86dga-1.1.4-2.1.el7.x86_64                                                                                                                         26/50

  Installing : xorg-x11-utils-7.5-23.el7.x86_64                                                                                                                         27/50

  Installing : libSM-1.2.2-2.el7.x86_64                                                                                                                                 28/50

  Installing : libXt-1.1.5-3.el7.x86_64                                                                                                                                 29/50

  Installing : libXmu-1.1.2-2.el7.x86_64                                                                                                                                30/50

  Installing : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                                                                                                                      31/50

  Installing : cpp-4.8.5-39.0.1.el7.x86_64                                                                                                                              32/50

  Installing : gcc-4.8.5-39.0.1.el7.x86_64                                                                                                                              33/50

  Installing : psmisc-22.20-16.el7.x86_64                                                                                                                               34/50

  Installing : compat-libcap1-1.10-7.el7.x86_64                                                                                                                         35/50

  Installing : ksh-20120801-139.0.1.el7.x86_64                                                                                                                          36/50

  Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                                  37/50

  Installing : libstdc++-4.8.5-39.0.1.el7.i686                                                                                                                          38/50

  Installing : libstdc++-devel-4.8.5-39.0.1.el7.i686                                                                                                                    39/50

  Installing : libaio-0.3.109-13.el7.i686                                                                                                                               40/50

  Installing : libaio-devel-0.3.109-13.el7.i686                                                                                                                         41/50

  Installing : libXau-1.0.8-2.1.el7.i686                                                                                                                                42/50

  Installing : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                          43/50

  Installing : gcc-c++-4.8.5-39.0.1.el7.x86_64                                                                                                                          44/50

  Installing : glibc-devel-2.17-292.0.1.el7.i686                                                                                                                        45/50

  Installing : libxcb-1.13-1.el7.i686                                                                                                                                   46/50

  Installing : libX11-1.6.7-2.el7.i686                                                                                                                                  47/50

  Installing : libXext-1.3.3-3.el7.i686                                                                                                                                 48/50

  Installing : libXi-1.7.9-1.el7.i686                                                                                                                                   49/50

  Installing : libXtst-1.2.3-1.el7.i686                                                                                                                                 50/50

  Verifying  : libXext-1.3.3-3.el7.x86_64                                                                                                                                1/50

  Verifying  : libXi-1.7.9-1.el7.x86_64                                                                                                                                  2/50

  Verifying  : libdmx-1.1.3-3.el7.x86_64                                                                                                                                 3/50

  Verifying  : libICE-1.0.9-9.el7.x86_64                                                                                                                                 4/50

  Verifying  : libaio-devel-0.3.109-13.el7.i686                                                                                                                          5/50

  Verifying  : libXinerama-1.1.3-2.1.el7.x86_64                                                                                                                          6/50

  Verifying  : libXrender-0.9.10-1.el7.x86_64                                                                                                                            7/50

  Verifying  : libXv-1.0.11-1.el7.x86_64                                                                                                                                 8/50

  Verifying  : libXext-1.3.3-3.el7.i686                                                                                                                                  9/50

  Verifying  : cpp-4.8.5-39.0.1.el7.x86_64                                                                                                                              10/50

  Verifying  : libXxf86vm-1.1.4-1.el7.x86_64                                                                                                                            11/50

  Verifying  : libXt-1.1.5-3.el7.x86_64                                                                                                                                 12/50

  Verifying  : libstdc++-devel-4.8.5-39.0.1.el7.i686                                                                                                                    13/50

  Verifying  : libxcb-1.13-1.el7.i686                                                                                                                                   14/50

  Verifying  : libstdc++-devel-4.8.5-39.0.1.el7.x86_64                                                                                                                  15/50

  Verifying  : libXi-1.7.9-1.el7.i686                                                                                                                                   16/50

  Verifying  : glibc-devel-2.17-292.0.1.el7.x86_64                                                                                                                      17/50

  Verifying  : xorg-x11-utils-7.5-23.el7.x86_64                                                                                                                         18/50

  Verifying  : libXau-1.0.8-2.1.el7.i686                                                                                                                                19/50

  Verifying  : libXtst-1.2.3-1.el7.x86_64                                                                                                                               20/50

  Verifying  : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                          21/50

  Verifying  : libaio-0.3.109-13.el7.i686                                                                                                                               22/50

  Verifying  : libX11-1.6.7-2.el7.i686                                                                                                                                  23/50

  Verifying  : libX11-1.6.7-2.el7.x86_64                                                                                                                                24/50

  Verifying  : libXxf86misc-1.0.3-7.1.el7.x86_64                                                                                                                        25/50

  Verifying  : psmisc-22.20-16.el7.x86_64                                                                                                                               26/50

  Verifying  : libX11-common-1.6.7-2.el7.noarch                                                                                                                         27/50

  Verifying  : libXtst-1.2.3-1.el7.i686                                                                                                                                 28/50

  Verifying  : libxcb-1.13-1.el7.x86_64                                                                                                                                 29/50

  Verifying  : glibc-headers-2.17-292.0.1.el7.x86_64                                                                                                                    30/50

  Verifying  : nss-softokn-freebl-3.44.0-5.0.1.el7.i686                                                                                                                 31/50

  Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                                                                                         32/50

  Verifying  : glibc-devel-2.17-292.0.1.el7.i686                                                                                                                        33/50

  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                       34/50

  Verifying  : libmpc-1.0.1-3.el7.x86_64                                                                                                                                35/50

  Verifying  : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                                                                                                                      36/50

  Verifying  : glibc-2.17-292.0.1.el7.i686                                                                                                                              37/50

  Verifying  : ksh-20120801-139.0.1.el7.x86_64                                                                                                                          38/50

  Verifying  : gcc-c++-4.8.5-39.0.1.el7.x86_64                                                                                                                          39/50

  Verifying  : libstdc++-4.8.5-39.0.1.el7.i686                                                                                                                          40/50

  Verifying  : libSM-1.2.2-2.el7.x86_64                                                                                                                                 41/50

  Verifying  : libXxf86dga-1.1.4-2.1.el7.x86_64                                                                                                                         42/50

  Verifying  : mpfr-3.1.1-4.el7.x86_64                                                                                                                                  43/50

  Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                                  44/50

  Verifying  : gcc-4.8.5-39.0.1.el7.x86_64                                                                                                                              45/50

  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                                                                              46/50

  Verifying  : libXrandr-1.5.1-2.el7.x86_64                                                                                                                             47/50

  Verifying  : libgcc-4.8.5-39.0.1.el7.i686                                                                                                                             48/50

  Verifying  : kernel-headers-3.10.0-1062.1.2.el7.x86_64                                                                                                                49/50

  Verifying  : libXmu-1.1.2-2.el7.x86_64                                                                                                                                50/50


  compat-libcap1.x86_64 0:1.10-7.el7  compat-libstdc++-33.x86_64 0:3.2.3-72.el7  gcc.x86_64 0:4.8.5-39.0.1.el7              gcc-c++.x86_64 0:4.8.5-39.0.1.el7                 

  glibc.i686 0:2.17-292.0.1.el7       glibc-devel.i686 0:2.17-292.0.1.el7        glibc-devel.x86_64 0:2.17-292.0.1.el7      ksh.x86_64 0:20120801-139.0.1.el7                 

  libXi.i686 0:1.7.9-1.el7            libXi.x86_64 0:1.7.9-1.el7                 libXtst.i686 0:1.2.3-1.el7                 libXtst.x86_64 0:1.2.3-1.el7                      

  libaio.i686 0:0.3.109-13.el7        libaio-devel.i686 0:0.3.109-13.el7         libaio-devel.x86_64 0:0.3.109-13.el7       libgcc.i686 0:4.8.5-39.0.1.el7                    

  libstdc++.i686 0:4.8.5-39.0.1.el7   libstdc++-devel.i686 0:4.8.5-39.0.1.el7    libstdc++-devel.x86_64 0:4.8.5-39.0.1.el7  oracle-database-preinstall-19c.x86_64 0:1.0-1.el7

Dependency Installed:

  cpp.x86_64 0:4.8.5-39.0.1.el7          glibc-headers.x86_64 0:2.17-292.0.1.el7     kernel-headers.x86_64 0:3.10.0-1062.1.2.el7     libICE.x86_64 0:1.0.9-9.el7            

  libSM.x86_64 0:1.2.2-2.el7             libX11.i686 0:1.6.7-2.el7                   libX11.x86_64 0:1.6.7-2.el7                     libX11-common.noarch 0:1.6.7-2.el7     

  libXau.i686 0:1.0.8-2.1.el7            libXau.x86_64 0:1.0.8-2.1.el7               libXext.i686 0:1.3.3-3.el7                      libXext.x86_64 0:1.3.3-3.el7           

  libXinerama.x86_64 0:1.1.3-2.1.el7     libXmu.x86_64 0:1.1.2-2.el7                 libXrandr.x86_64 0:1.5.1-2.el7                  libXrender.x86_64 0:0.9.10-1.el7       

  libXt.x86_64 0:1.1.5-3.el7             libXv.x86_64 0:1.0.11-1.el7                 libXxf86dga.x86_64 0:1.1.4-2.1.el7              libXxf86misc.x86_64 0:1.0.3-7.1.el7    

  libXxf86vm.x86_64 0:1.1.4-1.el7        libdmx.x86_64 0:1.1.3-3.el7                 libmpc.x86_64 0:1.0.1-3.el7                     libxcb.i686 0:1.13-1.el7               

  libxcb.x86_64 0:1.13-1.el7             mpfr.x86_64 0:3.1.1-4.el7                   nss-softokn-freebl.i686 0:3.44.0-5.0.1.el7      psmisc.x86_64 0:22.20-16.el7           

  xorg-x11-utils.x86_64 0:7.5-23.el7     xorg-x11-xauth.x86_64 1:1.0.9-1.el7        


Loaded plugins: langpacks, ulninfo

Cleaning repos: ol7_UEKR5 ol7_addons ol7_developer ol7_developer_EPEL ol7_ksplice ol7_latest ol7_oci_included ol7_optional_latest ol7_software_collections

Creating Directory

Setting ENV

Downloading oracle database zip

Extracting oracle database zip

setting up Response files

Installing Oracle Binaries

Launching Oracle Database Setup Wizard...

The response file for this session can be found at:


You can find the log of this install session at:


As a root user, execute the following script(s):

1. /u01/app/oraInventory/orainstRoot.sh

2. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:


Execute /u01/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes:


Successfully Setup Software.

Moved the install session logs to:



Last login: Sun Oct  6 23:16:39 GMT 2019 on pts/0

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

SQL*Plus: Release - Production


Default 19c database install with PDB

Prepare for db operation

8% complete

Copying database files

31% complete

Creating and starting Oracle instance

32% complete

36% complete

40% complete

43% complete

46% complete

Completing Database Creation

51% complete

53% complete

54% complete

Creating Pluggable Databases

58% complete

77% complete

Executing Post Configuration Actions

100% complete

Database creation complete. For details check the logfiles at:


Database Information:

Global Database Name:ORCL19

System Identifier(SID):ORCL19

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ORCL19/ORCL19.log" for further details.

Starting default listener

Parsing command line arguments:

    Parameter "silent" = true

    Parameter "responsefile" = /u01/app/oracle/product/19.0.0/dbhome_1/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Configuring Listener:LISTENER_ORCL19

Listener configuration complete.

Oracle Net Listener Startup:

    Running Listener Control:

      /u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl start LISTENER_ORCL19

    Listener Control complete.

    Listener started successfully.

Profile configuration complete.

Oracle Net Services configuration successful. The exit code is 0

Configuring the TNS

Testing Database

Last login: Sun Oct  6 23:33:31 GMT 2019 on pts/0

SQL*Plus: Release - Production on Sun Oct 6 23:33:33 2019


Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release - Production



System altered.



--------- --------------------




---------- ------------------------------ ---------- ----------



SQL> Disconnected from Oracle Database 19c Enterprise Edition Release - Production


Cleaning up

DataBase Installed!!!

Database Name: ORCL19 with one pluggable database PDB19C has default password Welcome_1. Just switch to oracle user and login to database.

Clonewars – Next Gen Cloning with Oracle 12.2 Multitenancy (Part Deux)… With a Sprinkle of PDB Refresh


This is Part 2 of the Remote [PDB] Cloning capabilities of Oracle 12.2 Mulitenant.

Cloning Example 2:  Remote clone copy from an existing CBD/PDB into a local PDB (PDB->PDB).  In this example “darkside” is  CDB with darthmaul being the source/remote PDB and  yoda (PDB) is local target


SQL> select database_name from v$database;


darkside$SQL> alter pluggable database darthmaul open;
Pluggable database altered.

SQL> select name, open_mode from v$pdbs;


darkside$SQL> archive log list ;
Database log mode            Archive Mode
Automatic archival           Enabled
Archive destination          USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   3
Current log sequence         3

darkside$SQL> select name, open_mode from v$database;
--------- --------------------

darkside$SQL> COLUMN property_name FORMAT A30
COLUMN property_value FORMAT A30
SELECT property_name, property_value
FROM   database_properties
WHERE  property_name = 'LOCAL_UNDO_ENABLED'; 
------------------------------ ------------------------------

$ cat darkside_create_remote_clone_user.sql
create user c##darksidecloneuser identified by cloneuser123 container=ALL;
grant create session, create pluggable database to c##darksidecloneuser  container=ALL;

$cat darkside_db_link.sql
create database link darksideclone_link
CONNECT TO c##darksidecloneuser IDENTIFIED BY cloneuser123 USING 'darkside'

Nishan$SQL> select DB_LINK,HOST from dba_db_links;
------------  ---------------------------

darkside$SQL> select name from v$datafile;







darkside$SQL> show con_name

darkside$SQL> create table foofighters tablespace rey as select * from obj$;
Table created.

Nishan$SQL> create pluggable database yoda from darthmaul@DARKSIDECLONE_LINK;

Pluggable database created.

Nishan$SQL> alter session set container = yoda;
Session altered.

yoda$SQL> select name, open_mode from v$pdbs;
NAME                    OPEN_MODE
YODA                   MOUNTED

yoda$SQL> select name from v$datafile;

Now on to Refresh the PDB

SQL>create table foofighters tablespace rey as select * from obj$

Table created.

SQL> select segment_name from dba_segments where tablespace_name = 'REY'




SQL> select name, open_mode from v$pdbs;

NAME            OPEN_MODE





YODA            MOUNTED

SQL> alter pluggable database yoda open read only;

Pluggable database altered.

SQL> select segment_name from dba_segments where tablespace_name = 'REY';

no rows selected

SQL> alter session set container = yoda;

Session altered.


Pluggable database altered.


Pluggable database altered.

SQL> select segment_name from dba_segments where tablespace_name = 'REY';

select segment_name from dba_segments where tablespace_name = 'REY'  

ERROR at line 1:

ORA-01219: database or pluggable database not open: queries allowed on fixed

tables or views only


Pluggable database altered.

SQL> select segment_name from dba_segments where tablespace_name = 'REY';









Clonewars – Next Gen Cloning with Oracle 12.2 Multitenancy (Part Un)

In this blog, we will walk through Oracle 12.2 Remote Cloning of PDB feature. In Oracle 12.1, remote cloning was also available, however, this required placing the productions database (which is usually the source) in read-only mode. This makes the cloning feature very inefficient to leverage. In 12.2, it is now possible to maintain the production database in read-write mode and allow for online copy of the database, this is reffered to as a “hot clone”.  The distinction between a hot clone and a cold clone is only relevant for customers running 12.1 Multitenancy. As of 12.2 all clones are hot clones, unless the source database is explicitly closed.

We will illustrate two examples of this real-world example, just the names have been changed to protect the extremely innocent. And sorry about the StarWars references.. just couldn’t help myself!!

Note, for clarity, the remote DB is source database which will cloned, and the local DB is the CDB where the PDB will cloned into.

Cloning Example 1: Remote clone copy from existing non-CDB into a local PDB (non-CDB->PDB).  In this example “hansolo” is remote non-CDB (source PDB).

Cloning Example 2: Remote clone copy from existing CBD/PDB into a local PDB (PDB->PDB). In this example “darkside” is CDB with obiwan being the source PDB and  nishan-obiwan (PDB) is local.

Cloning Example 1

Prep work and validation
 Hansolo$SQL> startup
 ORACLE instance started.
 Total System Global Area 2483027968 bytes
 Fixed Size 8795808 bytes
 Variable Size 637536608 bytes
 Database Buffers 1610612736 bytes
 Redo Buffers 7979008 bytes
 In-Memory Area 218103808 bytes
 Database mounted.
 Database opened.
Hansolo$SQL> select database_name from v$database;

Nishan$SQL> select name from v$pdbs;

In 12.2, each PDB will have its own undo tablespace. 
This new undo management configuration is called local undo mode, and is the underlying 
design for many of the portability features in 12.2. Local Undo is the default for greefield/fresh 12.2 installs, 
for upgrades to 12.2 the Shared Undo will need to converted to Local (we won't cover that here)
Hansolo$SQL> SELECT property_name, property_value FROM database_properties WHERE property_name = 'LOCAL_UNDO_ENABLED ';
------------------------------ ------------------------------

Hansolo$SQL> archive log list
 Database log mode Archive Mode
 Automatic archival Enabled
 Archive destination USE_DB_RECOVERY_FILE_DEST
 Oldest online log sequence 118
 Next log sequence to archive 120
 Current log sequence 120

Hansolo$SQL> select name, open_mode from v$database
--------- --------------------

Hansolo$SQL> create tablespace kyloren datafile size 20M;

Tablespace created.

Hansolo$SQL> create tablespace MazKanata datafile size 20M

Tablespace created.

Hansolo$SQL> select tablespace_name from dba_tablespaces;


Hansolo$SQL> select current_scn from v$database;


$cat hansolo_create_remoteclone.sql
 CREATE USER cloneuser IDENTIFIED BY cloneuser123;


Verify user connection

Hansolo$SQL> connect cloneuser/cloneuser123;

Now, prep the source environment

Nishan$SQL> select database_name from v$database;


Create DBLink to hansolo from nishan

$cat pdbclone_dblink.sql
cloneuser123 USING 'hansolo'

Nishan$SQL> @pdbclone_dblink.sql

Nishan$SQL> select db_link, host from dba_db_links;
DB_LINK            HOST
----------------  -----------------

Verify connection to hansolo from forceawakens PDB

$ sqlplus cloneuser/cloneuser123@hansolo

Nishan$SQL> create pluggable database forceawakens from non$cdb@REMOTECLONELINK;

Pluggable database created.

Nishan$SQL> alter session set container = FORCEAWAKENS;
Session altered.

forceawakens$SQL> select name, open_mode from v$pdbs;
 NAME           OPEN_MODE
---------       ----------------------

forceawakens$SQL> select name from v$datafile;

forceawakens$SQL> select current_scn from v$database;


Since the source database was a non-CDB, it needs to be cleansed to be PDB-capable using the @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql. This is a requirement before you can open and online the PDB.

forceawakens$SQL> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

forceawakens$SQL> alter pluggable database open;

What’s with MGTDB anyways

For those who have either upgraded or fresh-installed 12.1 (12c) Grid Infrastructure stack, will notice a new database instance (-MGMTDB) that was provisioned automagically. So what is this MGMTDB and why do I need this overhead.

Si let’s recap what the DB is and what it does…
Management Database is the central repository to store Cluster Health Monitor, the Grid Infrastructure Management Repository.

MGMT database is a container database (CDB) with one pluggable database (PDB) running. However, this database runs out of the Grid Infrastructure home.
The MGMTDB is a Rac One Node database; i.e., it runs on one node at a time, but because this is Clustered Resource, it can be started or failed over on any node in the cluster. MGMTDB is as a non-critical component of the GI stack (with no “real” hard dependencies). This means that if MGMTDB fails or becomes unavailable, Grid Infrastructure continues running

MGMTDB is configured (subject to change) with 750 MB SGA/325 MB PGA, and 5GB database size. But note that, due to the footprint MGMT’s SGA is not configured for hugepages . Since, this database is dynamically created on install, the OUI installer does not have pre-knowledge of the database that are configured or will be migrated to this cluster, thus in order to avoid any database names conflict the name “-MGMTDB” was chosen (notice the “-“). Note, bypassing MGMTDB installation is only allowed for upgrades to New installations or upgrades to future releases will require MGMTDB to be installed. if MGMTDB is not selected during upgrade, all features (Cluster Health Monitor (CHM/OS) etc) that depend on it will be disabled.

So if you are wondering where the datafiles and other structures are stored for this database. Well they would will be stored in the same diskgroup as OCR and VOTE However, these dtabase files can be migrated into ASM diskgroup post install.

MGMTDB will store a subset of Operating System (OS) performance data for longer term to provide diagnostic information and support intelligent workload management. Performance data (OS metrics similar to, but a subset of Exawatcher) collected by the ‘Cluster Health Monitor’ (CHM) is stored also on local disk, so when not using MGMTDB, CHM data can still be obtained from local disk but intelligent workload management (QoS) will be disabled. onger term MGMTDB will become a key component of the Grid Infrastructure and provide services for important components, because of this MGMTDB will eventually become a mandatory component in future upgrades to releases on Exadata.

See document 1568402.1 for more details.

Creating PDBs part 3

Due to so many people asking me other methods besides SQLplus for provisioning PDBs; such as OEM, DBCA, etc. In this blog entry I’ll DBCA, just because its simple to show. As I mentioned in my last PDB blog,
the installer DBCA (initial DBA invocation) looks different than the subsequent (post initial db creation).

The main DBCA screen shows the following pages. We will choose Manage Pluggable Database

PDB12c 2013 08 20 17 46 20

Choose the CDB, Note you could have many CDBs on the same Node or RAC cluster

PDB12c 2013 08 30 17 51 59

We choose our PDB that we created in Part 1 of the blog

PDB12c 2013 08 30 17 52 39

Ahh..we gotta open the PDB first. As before:

CDB$ROOT@YODA> alter session set container=pdbobi;
Session altered.

CDB$ROOT@YODA> alter pluggable database pdbobi open;

Pluggable database altered.

or CDB$ROOT@YODA> alter pluggable database all open;

PDB12c 2013 08 30 17 54 22

Now we can Add support for and configure Database Vault. Additionally, Label Security can be configured.
It would have been nice to enable and modify Resource Manager as well other PDB tasks.
But I get the fact that this DBCA is really driven for the PDB operations (plug,unplug, create and destroy PDB).
Bulk of the PDB admin tasks are provided in EM

PDB12c 2013 08 30 18 14 54

Let’s do a new PDB creation for grins 🙂

PDB12c 2013 08 30 18 21 01

Specify the PDB name, storage location, and a default tablespace. Again, it would have been nice to specify a TEMP tablespace too, but that was left out

PDB12c 2013 08 30 18 22 26

Progress ….

PDB12c 2013 08 30 18 23 18

And Completion….Pretty Straightforward

PDB12c 2013 08 30 18 22 53

Creating PDB’s part 2

Once we have installed 12.1 Database Software, we can create the Container Database and the Pluggable Databases. In my case I did a software only install then manually executed DBCA

In this blog entry I’ll show the screens that walk-thru the configuration of the “first” database. I noticed that once DBCA is used to create the initial database, the capability and options (screens) for DBCA are different; i.e., it much more aligned to create/manage additional databases. I’ll show those screens in Part 3 of PDB

So let’s get started by executing
$ $ORACLE_HOME/bin/dbca

Rac01 2013 09 15 22 39 12

Choose Advanced mode for Policy Managed Database or use “Default Configuration”. Being a big promoter of Policy Managed Databases and since I have 4 RAC nodes (my best practice threshold to choose Policy Managed), I’ll choose, that.

Rac01 2013 09 15 22 39 44

I’ll pick a Global Database name and choose PDB option, and also option to choose how many PDBs to create (with prefix)

Rac01 2013 09 15 22 40 30

Pick a Server Pool name, I chose a cardinality of 2

Rac01 2013 09 15 22 40 58

Define the Management Options

Rac01 2013 09 15 22 41 20

Choose the Storage locations

Rac01 2013 09 15 22 43 31

Define Database Vault Owner and also the Separate Account Manager. Note the user name definitions

Rac01 2013 09 15 22 45 31

And now the finish

Rac01 2013 09 15 22 56 41

12c PDB Multitenancy, Schema Consolidation, and whatever

Many of you have probably have heard me speak over the years (at OOW, local user groups and at the local bars) about the virtues of simplification, rationalization, and consolidation. I mentioned the different database consolidation and multi-tenancy models: Virtualization based, Database Instance and Schema consolidation.

The following papers I wrote [when I was at Oracle] touch in detail on this topic –

And here’s a more current version of that paper., updated for 12c and PDB.

For those who have done consolidation via Virtualization platforms such as VMWare or OVM know its fairly straightforward and its a simple “drag and drop”, as I say. Similarly consolidation of many databases as separate database instances on platform is also fairly straightforward. Its the consolidation of many disparate schemas into a common database that makes things interesting. Couple of key points on “why schema consolidation” from the paper:

  • The schema consolidation model has consistently provided the most opportunities for reducing operating expenses, since you only have a single big database to maintain,monitor, mange and maintain.
  • Though schema consolidation allows the best ROI (w.r.t CapEX/OPex), you are sacrificing flexibility for compaction. As I’ve stated in my presentations and papers, “…consolidation and isolation move in opposite directions” The more you consolidate the less capabilities you’ll have for isolation; in contrast, the more you try to isolate, the more you sacrifice benefits of consolidation.
  • Custom (home-grown) apps have been best fit use cases for schema consolidation, since application owners and developers have more control on how the application and schema is built.

Well, with the 12c Oracle Database feature Pluggable Database (PDB) , you now have more incentive to lean towards the schema consolidation. PDB “begins” to eliminate the typical issues that come with schema consolidation; such as namespace collisions, security, granularity of recovery.

In this 1st part of the three part series on PDB, I’ll illustrate the installation of the 12c Database with Pluggable Database feature. The next upcoming parts of the series will cover management and user isolation (security) with PDB.

But first a very, very high-level primer on terminology:

  • Root Container Database – Or the root CDB (cdb$root) is the real database (if you will), and the name you give it will be name of the instance. The CDB database owns the SGA and running processes. I can have many CDBs on the same database server (each with its own PDBs). But the cool thing is that you can have a more than one CDB, allowing DBAs to have a Database Instance consolidation model coupled a schema consolidation. For best scalability, mix in RAC and leverage all the benefits of RAC Services, QoS, and Workload Distribution. The seed PDB (PDB$SEED) is a Oracle supplied system template that the CDB can use to create new PDBs. The seed PDB is named PDB$SEED. One cannot add or modify objects in PDB$SEED.
  • Pluggable Database – The PDB databases are sub-containers that serviced by CDB resources. The true beauty of the PDB is its mobility; i.e., I can unplug and plug 12c databases into and out of CDBs. I can “create like” new PDBs from existing PDB, like full snapshots.

So, now I’ll illustrate the important/interesting and new screens of 12c Database Installer:

PDB12c 2013 08 19 17 22 42

We chose Server Class

PDB12c 2013 08 19 17 23 09

It will single instance ..for now 🙂

PDB12c 2013 08 19 17 23 37

Choose Advanced Install

PDB12c 2013 08 19 17 24 07

And now for the fun step. We choose a Enterprise Edition, as Pluggable Database feature is only available in EE

PDB12c 2013 08 19 17 24 47

The next couple of screens ask about the Oracle Home and Oracle Base location, nothing new, but look at screen for Step 11. This where the fun is. We specify the Database name, but also specify if we want to create a Container Database. If we check it, it allows us to create our first PDB database in the Container Database (CDB). In my example I speficied Yoda as my CDB name and (in keeping with Star Wars theme) I said PDB is PDBOBI

PDB12c 2013 08 19 17 27 19

We obviously choose ASM as the storage location

PDB12c 2013 08 19 17 28 18

And we have the opportunity to register EM Cloud Control this new target database.

PDB12c 2013 08 20 17 46 20

The rest of the steps/screens are standard stuff, so I won’t bore you with it. But here’s an excerpt from the database alert that shows magic underneath:

create pluggable database PDB$SEED as clone  using '/u02/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/templates//pdbseed.xml'  source_file_name_convert = ('/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/temp01.dbf','+PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/pdbseed_temp01.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/sysaux01.dbf','+PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.270.823892297') file_name_convert=NONE  NOCOPY
Mon Aug 19 18:58:59 2013
Post plug operations are now complete.
Pluggable database PDB$SEED with pdb id - 2 is now marked as NEW.

create pluggable database pdbobi as clone  using '/u02/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/templates//sampleschema.xml'  source_file_name_convert = ('/ade/b/3593327372/oracle/oradata/seeddata/SAMPLE_SCHEMA/temp01.dbf','+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/pdbobi_temp01.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/SAMPLE_SCHEMA/sysaux01.dbf','+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/sysaux.274.823892813') file_name_convert=NONE  NOCOPY
Mon Aug 19 19:07:42 2013
Post plug operations are now complete.
Pluggable database PDBOBI with pdb id - 3 is now marked as NEW.
Completed: create pluggable database pdbobi as clone  using '/u02/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/templates//sampleschema.xml'  source_file_name_convert = ('/ade/b/3593327372/oracle/oradata/seeddata/SAMPLE_SCHEMA/temp01.dbf','+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/pdbobi_temp01.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/SAMPLE_SCHEMA/sysaux01.dbf','+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/sysaux.274.823892813') file_name_convert=NONE  NOCOPY
alter pluggable database pdbobi open restricted
Pluggable database PDBOBI dictionary check beginning
Pluggable Database PDBOBI Dictionary check complete
Database Characterset is US7ASCII

XDB installed.

XDB initialized.
Mon Aug 19 19:08:01 2013
Pluggable database PDBOBI opened read write
Completed: alter pluggable database pdbobi open restricted

I will cover more of PDB creation and management in the next blog. But I’ll leave you with this teaser of DBCA screen:

PDB12c 2013 08 20 17 46 20

A 12c Flex Cluster Installation Walk-thru

Let’s start the 12c Flex install, with the execution of the traditional runInstaller script

Rac12c1 2013 07 30 22 55 32

Let’s choose Install 12c Flex Cluster

Rac12c1 2013 07 30 22 56 04

And yes we picking English… since we live in English-land

Rac12c1 2013 07 30 22 56 29

Now let’s specify the Scan information and yes, we’ll need to define GNS and since we have to use GNS, we’ll need to get DNS domain delegation setup. In our case we have us.viscosityna-test.com as the sub-domain

Rac12c1 2013 07 30 22 57 07

This is the new stuff!! We define which nodes in the cluster will be Hubs and which will be Leaf. Note, you’ll ocassionaly hear the terms Hub and RIM be used interchangeably. It just historical!

Rac12c1 2013 07 30 22 57 42

Let’s specify the interfaces. You all have seen this screen before. But it now got a small twist to it. You can specify a separate “ASM &Private” networks.

Rac12c1 2013 07 30 22 58 32

Now the validation!

Rac12c1 2013 07 30 23 01 02

This step is new too. You have the option to configure Grid Infrastructure Repository,
which is used for storing Cluster Health Monitor (CHM) data. In 11gR2 this was stored
in a Berkley DB database and was created by default. Now this option allows users to
specify a Oracle Database to store the CHM data. This database is a single instance
database that is named MGMTDB by default. It is an internal CRS resource, which has
HA-failover capabilities. I’ll cover this topic in more detail later, but I should
mention that this is the only opportunity to create this repository; i,e, you have
uninstall/reinstall to get this GI repos option.

Rac12c1 2013 07 30 23 00 38

Now the fun stuff! Let’s create the ASM disk group. Note, that if you are configuring a GI repo, then you’ll need a minimum of 5GB disk (for testers and laptop folks).

Rac12c1 2013 07 31 17 47 57

Now define passwords

Rac12c1 2013 07 31 17 48 32

Verify…and yes we’re cool w/ the passwords

Rac12c1 2013 07 31 17 49 00


Rac12c1 2013 07 31 17 49 32

No define the group definitions

Rac12c1 2013 07 31 17 50 06

Where we gonna put the Oracle Home and Oracle Base

Rac12c1 2013 07 31 17 52 41

Now this really cool. I can specify the root password/credentials, for downstream root required actions.

Rac12c1 2013 07 31 18 02 05

Gotta run some fix some things, execute fixup.sh script

Rac12c1 2013 07 31 21 43 21

Now off to the races !!!

Rac12c1 2013 07 31 23 33 54

Secret Agentman – Clusterware Processes and Agents

Some of you may old enough to recall the song “Secret Agent Man” from Johnny Rivers:
There’s a man who leads a life of danger.
To everyone he meets he stays a stranger.
With every move he makes another chance he takes.
Odds are he won’t live to see tomorrow.

Well that’s how I felt when I was at a customer site recently (well maybe not exactly).

They recently had a issue with a node eviction. That in itself deserves a blog post later.
But anyways, he was asking “what are all these Clusterware processes and how do you even traverse through all the log files”.
After 15 mins of discussion, I realized I had thoroughly confused him.
So I suggested we start from the beginning and firstly try to understand Oracle Clusterware processes, agents, and relationships, then draw up some pictures. Maybe then we’ll have a better feel for hierarchy.

Let’s start with the grand master himself HAS (or OHASD)

OHASD manages clusterware daemons, including CRSD. We’ll discuss CRSD resources and startp in another blog. For now just keep in mind that OHASD starts up CRSD (at some point later in the stack), once CRSD is started, it manages the remaining startup of the stack

The “-init flag” is needed for crsctl to operate on OHASD resources,e.g. crsctl stat res ora.crsd -init
To list resources started by CRSD you would issue just “crsctl stat res”

OHASD resource startup order
ora.gpnpd -> Starts ora.mdnsd because of dependency
ora.cssd -> Starts ora.diskmon and ora.cssdmonitor because of dependency

OHASD has agents that work for him. These agents are oraagent, orarootagent, cssdagent and cssdmonitoragent. Each agent manages and handles very specific OHASD resources, and each agent runs as a specific user (root or, clusterware user).
For example, the ora.cssd resource (as root user) is started and monitored by the ora.cssdagent, whereas ora.asm is handled by the oraagent (running as cluster ware user).

All agent as well as other OHASD resource log files are in the CRS $ORACLE_HOME/log/hostname/agent/{ohasd|crsd}/agentname_owner/agentname_owner.log or in CRS $ORACLE_HOME/log/hostname/resource_name/resource_name.log; respectively.

To find out which agent is associated with a resource issue the following:

[root@rhel59a log]# crsctl stat res ora.cssd -init -p |grep “AGENT_FILENAME”

For example, for CRSD we find:

[root@rhel59a bin]# crsctl stat res ora.crsd -init -p |grep “AGENT_FILENAME”

Note, an agent log file can have log messages for more than one resources, since those resources are managed by the same agent.

When I debug a resource, I start by going down the following Clusterware log file tree:
1. Start with Clusterware alert.log

2. Depending on the resource (managed by OHASD or CRSD) I look $ORACLE_HOME/logs//ohasd/ohasd.log or $ORACLE_HOME/logs//crsd/crsd.log

3. Then agent log file, as I mentioned above

4. Then finally to the resources log file itself (that’ll be listed in the agent log)

Item #2 requires a little more discussion, and will be the topic of our next discussion

My new Favorite RAC-Clusterware command

My new favorite 12c Oracle Clusterware command is the 'crsctl stat res "resource name" -dependency'

What this command does, is to provide a dependency tree structure for resource the in question.  This will display startup (default) and shutdown dependencies.  

From this we can understand the pull-up, pushdown, weak, and hard dependencies between clusterware resources 

[oracle@rac02 ~]$ crsctl stat res ora.dagobah.db -dependency
Resource Start Dependencies
| type:ora.listener.type[weak:type]
| | type:ora.cluster_vip_net1.type[hard:type,pullup:type]
| | | ora.net1.network(ora.network.type)[hard,pullup]
| | | ora.gns<Resource not found>[weak:global]
| type:ora.scan_listener.type[weak:type:global]
| | ora.scan1.vip(ora.scan_vip.type)[hard,pullup]
| | | ora.net1.network(ora.network.type)[hard,pullup:global]
| | | ora.gns<Resource not found>[weak:global]
| | | type:ora.scan_vip.type[dispersion:type:active]
| | type:ora.scan_listener.type[dispersion:type:active]
| ora.ons(ora.ons.type)[weak:uniform]
| | ora.net1.network(ora.network.type)[hard,pullup]
| ora.gns<Resource not found>[weak:global]
| ora.PDBDATA.dg(ora.diskgroup.type)[weak:global:uniform]
| | ora.asm(ora.asm.type)[hard,pullup:always]
| | | ora.LISTENER.lsnr(ora.listener.type)[weak]
| | | | type:ora.cluster_vip_net1.type[hard:type,pullup:type]
| | | | | ora.net1.network(ora.network.type)[hard,pullup]
| | | | | ora.gns<Resource not found>[weak:global]
| | | ora.ASMNET1LSNR_ASM.lsnr(ora.asm_listener.type)[hard,pullup]
| | | | ora.gns<Resource not found>[weak:global]
| ora.FRA.dg(ora.diskgroup.type)[hard:global:uniform,pullup:global]
| | ora.asm(ora.asm.type)[hard,pullup:always]
| | | ora.LISTENER.lsnr(ora.listener.type)[weak]
| | | | type:ora.cluster_vip_net1.type[hard:type,pullup:type]
| | | | | ora.net1.network(ora.network.type)[hard,pullup]
| | | | | ora.gns<Resource not found>[weak:global]
| | | ora.ASMNET1LSNR_ASM.lsnr(ora.asm_listener.type)[hard,pullup]
| | | | ora.gns<Resource not found>[weak:global]

Now the same for shutdown (pushdown) dependencies

[oracle@rac02 ~]$ crsctl stat res ora.dagobah.db -dependency -stop
Resource Stop Dependencies
| ora.dagobah.hoth.svc(ora.service.type)[hard:intermediate]
| ora.dagobah.r2d2.svc(ora.service.type)[hard:intermediate]

Why is this command and output important?  Well, in cases where a particular resource doesn't come up, you may want to understand relationship with its dependents
The reason is, if you are creating your own resource dependencies using the CRS API (formally known as CLSCRS API).

<pre>CLSCRS is a set of C-based APIs for Oracle Clusterware. The CLSCRS APIs enable you to manage the operation of entities that are managed by Oracle Clusterware. These entities include resources, resource types, servers, and server pools. You can use the APIs to register user applications with Oracle Clusterware so that the clusterware can manage them and maintain high availability. Once an application is registered, you can manage, monitor and query the application's status.  The APIs allow you to use the callbacks for diagnostic logging.


Oh..GUID of PDB World

We have done a lot talks, sessions, blogs on Oracle 12c Pluggable Databases (PDB).  The question that seems to come up a lot is what is this long string of alphanumeric characters embedded in the database file name.

Before we answer that, let's take a trip down memory lane and understand how OMF works and its relationship with this GUID

Oracle Managed Files (OMF) was a feature introduced in 9i to minimize the overhead of managing database files.  Part of this feature is the database automatic naming of database files (on successful file creation). 
Files are named using system generated names and placed in the location as defined by the DB_CREATE_FILE_DEST init.ora .  In Data Guard configurations there are *_FILE_NAME_CONVERT, STANDBY_FILE_MANAGEMENT to assist with converting names of existing and newly created datafiles when OMF is in use.

OMF really came into play with widespread use, because of the implementation of ASM.  When ASM is used, OMF is inherently used for file management.  The ASM-OMF directory structure for datafiles traditionally consists of //DATAFILE/.  A traditional file name in ASM consists of 3 parts, ...  For example:


Note,Users are not allowed to directly create files with this naming structure, if you try you'll get a single-form file name error ORA-15046!

So what does this GUID thingy mean for 12c PDB configurations with ASM-OMF.  In addition to the OMF file naming and directory structure (discussed above), there is an embedded global unique identifier (GUID).  The GUID is globally unique immutable ID assigned to the 12c database at creation time.  Each 12c database, whether its non-CDB, CDB, or PDB, has a GUID associated with it.  Thus, with PDB, the directory structure changes for each pluggable database (PDB) in a container database (CDB). 

For pre-12c non-CDB databases, the GUID will be created when the database is upgraded to 12c.  

There are so many identifiers for a 12c database, let's make sure we get this straight. There's dbid, con_id, con_uid, and guid. The DBID is the database id embedded in the database file, control file, redo log header. The con_id is simply a container number in that specific CDB, starts with 0 and 1 is for root PDB. The con_uid is a local unique identifier within that CDB. The GUID is universal across all CDB/PDB.  Keep in mind that we can unplug a PDB from one CDB into another CDB, so the GUID provides this uniqueness and streamlines portability. More on this later!

The following query shows the different 12c database identifiers:

CDB$ROOT@YODA> select CON_ID,DBID,NAME,TOTAL_SIZE from v$pdbs;    
CON_ID      DBID     NAME                     TOTAL_SIZE
---------- ---------- -------------          -------------      
2    4066465523 PDB$SEED                      283115520      
3     483260478 PDBOBI                        917504000      
4     994649056 PDBVADER                              0

Note, that the GUID does not change throughout the life of the PDB/non-CDB. The GUID for a particular container/non-CDB can be found by querying V$CONTAINERS or v$PDBs. To assist with identifying which files belong to which PDB, an ASM directory structure of ///DATAFILE/ is used for PDBs. This is one of the main reasons a PDB should be cloned (cloning generates a new GUID) rather than copying the same PDB to multilple locations and plugging in to multiple CDBs.

See the example below, for GUID:

CDB$ROOT@YODA> select name, con_id from v$datafile order by con_id
NAME                                                                                    CON_ID
----------------------------------------------------------------------------------- ----------
+PDBDATA/YODA/DATAFILE/undotbs1.260.823892155                                                1
+PDBDATA/YODA/DATAFILE/sysaux.257.823892063                                                  1
+PDBDATA/YODA/DATAFILE/system.258.823892109                                                  1
+PDBDATA/YODA/DATAFILE/users.259.823892155                                                   1
+PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.271.823892297                 2
+PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.270.823892297                 2
+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/example.275.823892813                3
+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/users.277.823892813                  3
+PDBDATA/YODA/E456D87DF75E6553E043EDFE10AC71EA/DATAFILE/obiwan.284.824683339                 3
+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/system.276.823892813                 3
+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/sysaux.274.823892813                 3
+PDBDATA/YODA/E46B24386A131109E043EDFE10AC6E89/DATAFILE/sysaux.279.823980769                 4
+PDBDATA/YODA/E46B24386A131109E043EDFE10AC6E89/DATAFILE/users.281.823980769                  4
+PDBDATA/YODA/E46B24386A131109E043EDFE10AC6E89/DATAFILE/example.282.823980769                4
+PDBDATA/YODA/E46B24386A131109E043EDFE10AC6E89/DATAFILE/system.280.823980769                 4

That long identifier, "E46B24386A131109E043EDFE10AC6E89", in the OMF name, is the GUID.

Now a similar example from ASM (asmcmd) perspective

ASMCMD [+PDBDATA] > ls -l dagobah
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 Y    DATAFILE/
                                                 Y    DD7C48AA5A4404A2E04325AAE80A403C/
                                                 Y    F2F952556B226FA5E0430B2910AC1FE5/
                                                 Y    ONLINELOG/
                                                 Y    PARAMETERFILE/
                                                 Y    PASSWORD/
                                                 Y    TEMPFILE/
PASSWORD       UNPROT  COARSE   FEB 21 23:00:00  N    orapwdagobah => +PDBDATA/DAGOBAH/PASSWORD/pwddagobah.293.840152893
PARAMETERFILE  UNPROT  COARSE   APR 09 15:00:00  N    spfiledagobah.ora => +PDBDATA/DAGOBAH/PARAMETERFILE/spfile.310.840153477

ASMCMD [+PDBDATA/TATOOINE/F2F7CA2C1F1F0593E0430A2910AC246A/datafile] > ls

Let's look at two examples of PDB creation and the GUID.
Example1. This example illustrates the PDB creation and GUID

SQL> CREATE PLUGGABLE DATABASE pdbhansolo admin user hansolo identified by hansolo roles=(dba);

Pluggable database created.

SQL> select * from v$pdbs ;

    CON_ID       DBID    CON_UID GUID                             NAME      OPEN_MODE  RES     OPEN_TIME             CREATE_SCN TOTAL_SIZE
---------- ---------- ---------- -------------------------------- ------------------- ------   -----------           ----------- ------------
         2 4080865680 4080865680 F13EFFD958E24857E0430B2910ACF6FD PDB$SEED   READ ONLY  NO  17-FEB-14 PM   1720768  283115520
         3 3403102439 3403102439 F2A023F791663F8DE0430B2910AC37F7 PDBHANSOLO MOUNTED        17-FEB-14 PM   1846849          0

Example two. Here, we are going to plug in (convert) a PDB from a non-CDB. Note, that we can see the GUID in manifest file. In the XML output below (from manifest xml file), you see the GUID listed for this non-CBD


Now connect to the CDB and create the Wookie PDB from the manifest file

CDB_SQL>CREATE PLUGGABLE DATABASE wookie USING '/home/oracle/wookie_pdb.xml'

Pluggable database created.

SQL> select name, open_mode from v$pdbs;

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

SQL> select name, guid from v$pdbs;

NAME                           GUID
------------------------------ --------------------------------
PDB$SEED                       F13EFFD958E24857E0430B2910ACF6FD
WOOKIE                         F2BBDF340FFE3E90E0430B2910AC097F

Here's where the big issue comes in. Many DBAs have mentioned to me that there is no real way to identify the PDB by solely looking at the path name. We do however, know the name of the CDB its in, but that's as far as we can go. In order to determine the PDB associated with the file, you would need to login directly to PDB (not even the CDB), and get the name

Initially there are some issues w/ GUID/OMF/ASM when are files are copied, and a physical standby database is in place. There have been improvements made to the multitenant plugin operation on both the primary and standby environments, e.g., You need PSU 2 at least, then DataGuard will do the right thing when you plug on a new pdb at the primary after making sure the files are at the standby first. RMAN has been enhanced so that, when copying files between databases it recognizes the GUID and acts accordingly when writing the files.

Here are some additional RMAN considerations for GUID management

* If the clone/auxiliary instance being connected to for clone operations is a CDB root, the GUID of the RMAN target database is used to determine the directory structure to write the datafiles. Connect to the CDB root as the RMAN clone/auxiliary instance when the source database should be a 12c non-CDB or PDB that is going to be migrated and plugged into a remote CDB as a brand new PDB. This will ensure that the files copied by RMAN will be written to the GUID directory of source database for the migration.
* If the clone/auxiliary instance being connected to for clone operations is a PDB, the GUID of the auxiliary PDB will be used to determine the directory structure to write the datafiles. Connect to the destination PDB as the RMAN clone auxiliary instance when the source database is a 12c non-CDB or PDB that requires a cross platform full transportable database import and the data and files will be imported into an existing PDB. This will ensure the files copied by RMAN will be written to the GUID directory of the PDB target database for the migration.

* The enhancements for multitenant plugin operations with OMF simplify the process extensively. The manifest generated on the source non-CDB/PDB contains all of the filenames and characteristics about each file. Normally, the plugin operation would use the filenames in the manifest and look for those exact filenames or partially converted (using the SOURCE_FILE_NAME_CONVERT clause on the CREATE PLUGGABLE DATABASE....USING...statement). Since all filenames will be different when copied to a new location when OMF is used, you would need to specify full directory and filename convert pairs for EACH file being plugged in. By using the SOURCE_FILE_DIRECTORY clause on the CREATE PLUGGABLE DATABASE....USING... statement in the plugin operation, the filename in the manifest is ignored and the plugin looks for a file to match additional characteristics about the file stored in the manifest, looking for the file in the SOURCE_FILE_DIRECTORY location.