In the previous blog (Part 2) we have created a VM template for oracle database and we could successfully registered it in Nutanix Era. Now we are going to use it to provision an oracle database named ORATEST on a new VM called test1-VM.

For more information on Nutanix products, I would encourage you to visit Nutanix website.

Check

As we can see our VM template has been previously correctly registered in Nutanix Era and is currently stopped. No need to have the VM template up and running to use it provisioning new databases.




Software profile

We first need to create a software profile using our recently VM template. This will be the reference and used as template to provision new oracle database.

From the “Profiles” Menu, we will choose Software, create, Oracle and Single Instance Database :







We will then provide :

  • A name for the profile.
  • A description.
  • The system will create automatically a 1.0 version of the software profile. This one can later be patched with new RU for example.
  • We will provide the Software profile version.
  • And choose our VM template as VM reference.















We can check the progress from the “Operations” menu.







And see that our software profile has been created.







This operation is of course only needed one time as long as we would like to use this software profile as reference.

Compute profile

If none compute profile answer our needs, we will have to create one. The compute profile needs to be set accordingly of which database parameter profile we are using.
We need to provide enough resource in compute profile that will be provided to oracle SGA and PGA in the database parameter. Otherwise the provisioning might fail with following error :




Let’s create a compute profile named SMALL_COMPUTE with 2 cores and 16 GB RAM.







Database parameters profile

Let’s finally create a database parameters profile to match configuration for database we would like to provision.

From the profile menu, database parameters part, chose create, then Oracle and click next.







We will not use AMM (Automatic Memory Management) here, so resetting memory_target parameter, and use ASMM (Automatic Shared Memory Management) instead. We will therefore set both sga and pga parameters.









Provision a database

All is now ready for us to provision a database.

This will be done from the “Databases” Menu, choosing “Oracle Source DBs” :







Click on Provision, Oracle, Single Instance Database :







We will choose to create a new VM. Of course we could deploy a new database on an existing VM that would have previously already registered in Nutanix Era.

We will provide :

  • Name of the VM.
  • The Software Profile we would like to use to deploy the oracle database. We will choose the one we just created.
  • The Compute Profile, we just created to match the database sizing we would like.
  • The Network Profile
  • The Public key of the oracle user we generated in previous blog when creating the VM template.











We will then provide :

  • The database name.
  • The SID.
  • SYS and SYSTEM password.
  • The size of the file system.
  • The size of the FRA.
  • The Character Set.
  • The National Character Set.
  • The Listener Port.









Additional information for the Time Machine Snapshots.







We can now push the provision button to start provisioning the database. And with the Operations menu we can check that all is going as expected.







Connect to the new provisioned database and do some checks

Let’s see how Nutanix Era provisioned the oracle database and if it is working.

We will first connect with ssh on the new created VM. As expected, we can connect with the private key of the oracle user we generated on the VM template :

ec2-user@ip-10-0-129-41 .ssh]$ ssh -i oracle-nutanix-era-template-oracleDB-vm.pem [email protected]
The authenticity of host 'X.X.X.174 (X.X.X.174)' can't be established.
ECDSA key fingerprint is SHA256:FbmiWaGZ51o+Y9oCusUYt4IpSyji3YxehWs/hnXQ4hY.
ECDSA key fingerprint is MD5:c9:38:14:5f:7f:a8:41:7b:14:04:42:c6:fd:c8:54:f1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'X.X.X.174' (ECDSA) to the list of known hosts.
Last login: Wed Aug 11 14:33:44 2021 from X.X.X.253
[oracle@test1-VM ~]$


We can check the file system :

[oracle@test1-VM .ssh]$ df -h
Filesystem                                                                                                                          Size  Used Avail Use% Mounted on
devtmpfs                                                                                                                            7.7G     0  7.7G   0% /dev
tmpfs                                                                                                                               3.0G     0  3.0G   0% /dev/shm
tmpfs                                                                                                                               7.7G  8.7M  7.7G   1% /run
tmpfs                                                                                                                               7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/mapper/vgroot--lv-root                                                                                                         6.0G  108M  5.9G   2% /
/dev/mapper/vgroot--lv-usr                                                                                                          3.0G  1.6G  1.5G  53% /usr
/dev/sda1                                                                                                                           496M  224M  273M  46% /boot
/dev/sda2                                                                                                                          1022M   12K 1022M   1% /boot/efi
/dev/sdb                                                                                                                             50G  9.8G   38G  21% /u02
/dev/mapper/vgroot--lv-home                                                                                                         4.0G   72M  4.0G   2% /home
/dev/mapper/vgroot--lv-opt                                                                                                          4.0G   69M  4.0G   2% /opt
/dev/mapper/vgroot--lv-tmp                                                                                                          3.0G  911M  2.2G  30% /tmp
/dev/mapper/vgroot--lv-var                                                                                                          3.0G  3.0G   60M  99% /var
/dev/mapper/ntnx_era_agent_vg_f5f089e315114644a8921b21a51d82f2-ntnx_era_agent_lv_era_software_f5f089e315114644a8921b21a51d82f2      2.9G  668M  2.1G  25% /opt/era_base/era_engine
/dev/mapper/ntnx_era_agent_vg_47aab96bac4343b2a4a73453130a22fd-ntnx_era_agent_lv_db_stagging_logs_47aab96bac4343b2a4a73453130a22fd   98G   71M   93G   1% /opt/era_base/db_logs/ORATEST
/dev/mapper/ntnx_era_agent_vg_f5f089e315114644a8921b21a51d82f2-ntnx_era_agent_lv_era_config_f5f089e315114644a8921b21a51d82f2         93M  1.6M   85M   2% /opt/era_base/cfg
/dev/mapper/ntnx_era_agent_vg_f5f089e315114644a8921b21a51d82f2-ntnx_era_agent_lv_era_logs_f5f089e315114644a8921b21a51d82f2          7.7G   72M  7.2G   1% /opt/era_base/logs
/dev/mapper/oradata_fra_ORATEST_vg-oradata_fra_ORATEST_lv                                                                           9.8G  955M  8.4G  11% /u02/app/oracle/oradata/fra_ORATEST
/dev/mapper/oradata_ORATEST_vg-oradata_ORATEST_lv                                                                                    20G  2.9G   16G  16% /u02/app/oracle/oradata/datafiles_ORATEST
tmpfs                                                                                                                               1.6G     0  1.6G   0% /run/user/54321      


We can check the database files :

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/datafiles_ORATEST/ORATEST/
total 12K
drwxr-x---. 2 oracle oinstall 4.0K Aug 11 14:35 controlfile
drwxr-x---. 2 oracle oinstall 4.0K Aug 11 14:35 onlinelog
drwxr-x---. 2 oracle oinstall 4.0K Sep 29 12:03 datafile

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/datafiles_ORATEST/ORATEST/controlfile/
total 12M
-rw-r-----. 1 oracle oinstall 12M Sep 30 08:58 o1_mf_jk7r16xw_.ctl

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/fra_ORATEST/ORATEST/controlfile/
total 12M
-rw-r-----. 1 oracle oinstall 12M Sep 30 08:56 o1_mf_jk7r16ys_.ctl

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/datafiles_ORATEST/ORATEST/onlinelog/
total 601M
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:16 o1_mf_1_jk7r195y_.log
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:45 o1_mf_2_jk7r196j_.log
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:59 o1_mf_3_jk7r1986_.log

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/fra_ORATEST/ORATEST/onlinelog
total 601M
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:16 o1_mf_1_jk7r19br_.log
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:45 o1_mf_2_jk7r19gf_.log
-rw-r-----. 1 oracle oinstall 201M Sep 30 08:59 o1_mf_3_jk7r19lz_.log

[oracle@test1-VM .ssh]$ ls -ltrh /u02/app/oracle/oradata/datafiles_ORATEST/ORATEST/datafile/
total 2.7G
-rw-r-----. 1 oracle oinstall  129M Sep 29 22:00 o1_mf_temp_jk7rk1xc_.tmp
-rw-r-----. 1 oracle oinstall   11M Sep 30 08:50 o1_mf_tstsourc_jo8ok0yn_.dbf
-rw-r-----. 1 oracle oinstall  5.1M Sep 30 08:50 o1_mf_users_jk7r05t2_.dbf
-rw-r-----. 1 oracle oinstall 1001M Sep 30 08:55 o1_mf_system_jk7qywmo_.dbf
-rw-r-----. 1 oracle oinstall  1.2G Sep 30 08:56 o1_mf_sysaux_jk7qzopd_.dbf
-rw-r-----. 1 oracle oinstall  513M Sep 30 09:00 o1_mf_undotbsp_jk7rk221_.dbf
[oracle@test1-VM .ssh]$


We can see that Nutanix Era used our software profile, let’s say our VM template we created in previous blog, and setted up :

  • a file system /u02/app/oracle/oradata/datafiles_ORATEST for the database files (control files, online log files, and datafiles) sized as requested with 20 GB.
  • a file system /u02/app/oracle/oradata/fra_ORATEST for the FRA sized as requested with 10 GB.

On the other hand the directory we used on the VM template for the ORACLE_HOME does not exist any more…

[oracle@test1-VM .ssh]$ ls -l /u01/app
total 0
drwxrwxr-x. 5 oracle oinstall 51 Aug 13 12:59 oraInventory


The ORACLE variables are setted up :

[oracle@test1-VM ~]$ echo $ORACLE_HOME
/u02/app/oracle/product/19.0.0/dbhome_1

[oracle@test1-VM ~]$ echo $ORACLE_SID
ORATEST


So here we can see that Nutanix Era created the Oracle Binaries home directory in /u02.

[oracle@test1-VM ~]$ ls /u02/app/oracle/product/19.0.0/dbhome_1
addnode     bin          crs  data       demo         env.ora  instantclient  jdk   log      nls     OPatch.v.17  ord   owm      QOpatch  relnotes       root.sh.old.2  root.sh.ouibak  slax          sqlplus   usm
admin       cfgtoollogs  css  dbjava     diagnostics  has      inventory      jlib  md       odbc    opmn         ords  perl     R        root.sh        root.sh.old.3  runInstaller    sqldeveloper  srvm      utl
apex        client       ctx  dbs        drdaas       hs       javavm         ldap  mgw      olap    oracore      oss   plsql    racg     root.sh.old    root.sh.old.4  schagent.conf   sqlj          suptools  wwg
assistants  clone        cv   deinstall  dv           install  jdbc           lib   network  OPatch  oraInst.loc  oui   precomp  rdbms    root.sh.old.1  root.sh.old.5  sdk             sqlpatch      ucp       xdk
[oracle@test1-VM ~]$


Let’s check what version of binaries we have :

[oracle@test1-VM ~]$ cd $ORACLE_HOME/OPatch
[oracle@test1-VM OPatch]$ ./opatch lsinv | grep -i description
ARU platform description:: Linux x86-64
Patch description:  "Database Release Update : 19.12.0.0.210720 (32904851)"
Patch description:  "OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380)"
Patch description:  "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"
[oracle@test1-VM OPatch]$


This is as expected and the version we installed on the VM template.

Is the database even started?

[oracle@test1-VM OPatch]$ ps -ef | grep pmon | grep -v grep
[oracle@test1-VM OPatch]$


No, and as expected from the /etc/oratab, which by the way has been updated accordingly by Nutanix Era :

[oracle@test1-VM OPatch]$ grep -i ORATEST /etc/oratab
ORATEST:/u02/app/oracle/product/19.0.0/dbhome_1:N
[oracle@test1-VM OPatch]$


Let’s start the database :

[oracle@test1-VM OPatch]$ echo $ORACLE_SID
ORATEST

[oracle@test1-VM OPatch]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Aug 13 13:31:02 2021
Version 19.12.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2147481648 bytes
Fixed Size		    8898608 bytes
Variable Size		  486539264 bytes
Database Buffers	 1644167168 bytes
Redo Buffers		    7876608 bytes
Database mounted.
Database opened.


Database is up and running :

[oracle@test1-VM OPatch]$ ps -ef | grep pmon | grep -v grep
oracle    107265       1  0 13:31 ?        00:00:00 ora_pmon_ORATEST
[oracle@test1-VM OPatch]$


Let’s check the datapatch version of the database :

[oracle@test1-VM OPatch]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Aug 13 13:33:37 2021
Version 19.12.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL> set linesize window
SQL> select instance_name, host_name from v$instance;

INSTANCE_NAME	 HOST_NAME
---------------- ----------------------------------------------------------------
ORATEST 	 test1-VM

SQL> select patch_id, source_version, target_version, status, description from dba_registry_sqlpatch;

  PATCH_ID SOURCE_VERSION  TARGET_VERSION  STATUS		     DESCRIPTION
---------- --------------- --------------- ------------------------- ----------------------------------------------------------------------------------------------------
  32876380 19.1.0.0.0	   19.1.0.0.0	   SUCCESS		     OJVM RELEASE UPDATE: 19.12.0.0.210720 (32876380)
  32904851 19.1.0.0.0	   19.12.0.0.0	   SUCCESS		     Database Release Update : 19.12.0.0.210720 (32904851)

SQL>


How was the database created? Simply using dbca tool :

oracle@test1-VM:/u02/app/oracle/cfgtoollogs/dbca/ORATEST/ [ORATEST] pwd
/u02/app/oracle/cfgtoollogs/dbca/ORATEST

oracle@test1-VM:/u02/app/oracle/cfgtoollogs/dbca/ORATEST/ [ORATEST] ls -l
total 19272
-rw-r-----. 1 oracle oinstall     4951 Aug 11 14:41 cloneDBCreation.log
-rw-r-----. 1 oracle oinstall      560 Aug 11 14:34 CloneRmanRestore.log
-rw-r-----. 1 oracle oinstall      910 Aug 11 14:41 lockAccount.log
-rw-r-----. 1 oracle oinstall     1026 Aug 11 14:43 ORATEST.log
-rw-r-----. 1 oracle oinstall     2316 Aug 11 14:43 postDBCreation.log
-rw-r-----. 1 oracle oinstall        0 Aug 11 14:41 postScripts.log
-rw-r-----. 1 oracle oinstall        0 Aug 11 14:34 rmanUtil
-rw-r-----. 1 oracle oinstall 18726912 Aug 11 14:34 tempControl.ctl
-rw-r-----. 1 oracle oinstall   981858 Aug 11 14:43 trace.log_2021-08-11_02-33-45PM


The database has been provisioned with success.

This is the recovery area destination Nutanix Era have been setting :

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u02/app/oracle/oradata/fra_OR
                                                 ATEST
db_recovery_file_dest_size           big integer 10G
recovery_parallelism                 integer     0
remote_recovery_file_dest            string


And what from Nutanix Era GUI side?

On Nutanix Era GUI side we can see that we have now 2 VMs. Our template VM which is stopped and does not need to be started to provision databases, and the new created test1-VM.






And we can see our ORATEST database been provisionned.






Conclusion

We could successfully and easily provision an oracle database with Nutanix Era. On the next blog we will see how to clone a database and how Nutanix Era interacts with the database to perform the clone.