Good Contents Are Everywhere, But Here, We Deliver The Best of The Best.Please Hold on!
Introduction

In my previous articles, we have learned how to Create Oracle Database Appliance Database Configuration Parameter file. 

If you want to create a database with different database configuration parameter then you must create a database configuration file with your desired parameters. You can use the ‘oakcli create db_config_params’ command to create a database configuration file. The configuration files are created under the locatoin ‘/opt/oracle/oak/install/dbconf’ with a default extension of ‘.dbconf’.

Refer to the blog post at on how to create a databsae configuration file
http://netsoftmate.blogspot.com/2018/05/oracle-database-appliance-database-configuration-file.html

In this article we will demonstrate how to create a database using custom configuration parameter file.

One can use OAKCLI or DBCA utility to create the database on ODA. But it is recommended to use OAKCLI on ODA to create the database. With OAKCLI, creating database is very easy and it is just one command.



Courtesy Oracle

Steps to Create a Database Using Configuration File


  • Login to Compute node 1 as root user and execute the following command:

[root@odanode1]# oakcli create database -db testdb -oh OraDb12102_home1 -params ayx.conf
INFO: 2018-04-23 16:13:42: Please check the logfile  ‘/opt/oracle/oak/log/odanode1/tools/12.1.2.10.0/createdb_testdb_94038.log’ for more details

Please enter the ‘root’  password :
Please re-enter the ‘root’ password:

Please enter the ‘SYSASM’  password : (During deployment we set the SYSASM password to ‘welcome1’):
Please re-enter the ‘SYSASM’ password:

Please select one of the following for Database type  [1 .. 3] :
1    => OLTP
2    => DSS
3    => In-Memory
1 –> Enter 1 for OLTP and hit return
The selected value is : OLTP
Please select one of the following for Database Deployment  [1 .. 3] :
1    => EE : Enterprise Edition
2    => RACONE
3    => RAC
3 –> Enter 3 for RAC and hit return
The selected value is : RAC

Specify the  Database Class (1. odb-01 ‘1 core, 8 GB memory’   2. Others) [1] : 2 –> Enter 2 for Others and hit return

Please select one of the following for Database Class [1 .. 9] :
1    => odb-01s  (   1 cores ,     4 GB memory)
2    =>  odb-01  (   1 cores ,     8 GB memory)
3    =>  odb-02  (   2 cores ,    16 GB memory)
4    =>  odb-04  (   4 cores ,    32 GB memory)
5    =>  odb-06  (   6 cores ,    48 GB memory)
6    =>  odb-12  (  12 cores ,    96 GB memory)
7    =>  odb-16  (  16 cores ,   128 GB memory)
8    =>  odb-20  (  20 cores ,   160 GB memory)
9    =>  odb-24  (  24 cores ,   192 GB memory)
3 –> Enter 3 for odb-02
The selected value is : odb-02  (   2 cores ,    16 GB memory)
INFO   : Logging all actions in the file /opt/oracle/oak/onecmd/tmp/odanode1-20180423161500.log and traces in the file /opt/oracle/oak/onecmd/tmp/odanode1-20180423161500.trc
INFO   : Loading the configuration file /opt/oracle/oak/onecmd/create_database.params…
INFO   : Creating the node list files…
INFO   : Setting up ssh for root…
INFO   : Setting up SSH across the Private Network…

…………Completed
INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.24 /root/DoAllcmds.sh
INFO   : Background process 99086 (node: 192.168.16.24) gets done with the exit code 0
INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.25 /root/DoAllcmds.sh
INFO   : Background process 99132 (node: 192.168.16.25) gets done with the exit code 0
INFO   : Setting up SSH completed successfully
INFO   : Running the command /usr/bin/rsync -tarqvz /opt/oracle/oak/onecmd/ root@192.168.16.25:/opt/oracle/oak/onecmd –exclude=*zip –exclude=*gz –exclude=*log –exclude=*trc –exclude=*rpm to sync directory</opt/oracle/oak/onecmd> on node <192.168.16.25>
SUCCESS: Ran /usr/bin/rsync -tarqvz /opt/oracle/oak/onecmd/ root@192.168.16.25:/opt/oracle/oak/onecmd –exclude=*zip –exclude=*gz —exclude=*log –exclude=*trc –exclude=*rpm and it returned: RC=0

……….Completed
INFO   : Did not do scp for node : odanode1
INFO   : Running as root: /usr/bin/ssh -l root odanode1 /root/DoAllcmds.sh
INFO   : Background process 99840 (node: odanode1) gets done with the exit code 0
INFO   : Running as root: /usr/bin/ssh -l root odanode2 /root/DoAllcmds.sh
INFO   : Background process 99887 (node: odanode2) gets done with the exit code 0
INFO   : Did not do scp for node : odanode1
INFO   : Running as root: /usr/bin/ssh -l root odanode1 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161544.sh
INFO   : Background process 99960 (node: odanode1) gets done with the exit code 0
INFO   : Running as root: /usr/bin/ssh -l root odanode2 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161544.sh
INFO   : Background process 307 (node: odanode2) gets done with the exit code 0
INFO   : Setting up SSH for user oracle…
…INFO   : checking nodes in /opt/oracle/oak/onecmd/tmp/db_nodes…

SUCCESS: All nodes in /opt/oracle/oak/onecmd/tmp/db_nodes are pingable and alive.
INFO   : Checking SSH setup for user (oracle) on nodes in /opt/oracle/oak/onecmd/tmp/db_nodes…
INFO   : Did not do scp for node : odanode1
INFO   : This is root, will become oracle and run: /bin/su oracle -c /usr/bin/ssh -l oracle odanode1 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161609.sh
INFO   : Running on the local node: /bin/su oracle -c /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161609.sh
INFO   : Background process 1220 (node: odanode1) gets done with the exit code 0
INFO   : This is root, will become oracle and run: /bin/su oracle -c /usr/bin/ssh -l oracle odanode2 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161609.sh
INFO   : Background process 1266 (node: odanode2) gets done with the exit code 0
INFO   : Setting up ACFS storage
INFO   : Did not do scp for node : odanode1
INFO   : Running as root: /usr/bin/ssh -l root odanode1 /opt/oracle/oak/onecmd/tmp/acfsm_94038.sh
INFO   : Running as root: /usr/bin/ssh -l root odanode2 /opt/oracle/oak/onecmd/tmp/acfsm_94038.sh
INFO   : Background process 1669 (node: odanode1) gets done with the exit code 0
INFO   : Background process 1715 (node: odanode2) gets done with the exit code 0
INFO: 2018-04-23 16:16:27: Successfully setup the storage structure for the database ‘testdb’
SUCCESS: Successfully setup ACFS storage for the database testdb
INFO   : Creating Database using DBCA…
INFO   : Did not do scp for node : odanode1
INFO   : Running as root: /usr/bin/ssh -l root odanode1 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161627.sh
INFO   : Background process 4974 (node: odanode1) gets done with the exit code 0
INFO   : Running as root: /usr/bin/ssh -l root odanode2 /opt/oracle/oak/onecmd/tmp/DoAllcmds-20180423161627.sh
INFO   : Background process 5026 (node: odanode2) gets done with the exit code 0
INFO   : Running DBCA using /opt/oracle/oak/onecmd/tmp/dbca-testdb.sh on odanode1 as oracle…
INFO   : Check output in /opt/oracle/oak/onecmd/tmp/dbca-testdb-20180423161500.log on odanode1
INFO   : This is root, will become oracle and run: /bin/su oracle -c /usr/bin/ssh -l oracle odanode1 /opt/oracle/oak/onecmd/tmp/dbca-testdb.sh
INFO   : Running on the local node: /bin/su oracle -c /opt/oracle/oak/onecmd/tmp/dbca-testdb.sh
         Instance testdb1 is running on node odanode1
         Instance testdb2 is running on node odanode2
INFO   : One or more Instances running on the cluster nodes.
INFO   : Running export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1;/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/srvctl setenv database -d testdb -t ‘TZ=America/New_York’ to set DB timezone
INFO   : Running the command /u01/app/12.1.0.2/grid/bin/crsctl stat resource ora.testdb.db -p
.INFO   : Did not do scp for node : odanode1
..
INFO   : This is root, will become oracle and run: /bin/su oracle -c /usr/bin/ssh -l oracle odanode1 /opt/oracle/oak/onecmd/tmp/dbupdates-testdb.sh
INFO   : Running on the local node: /bin/su oracle -c /opt/oracle/oak/onecmd/tmp/dbupdates-testdb.sh
INFO   : Running export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1;/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/srvctl stop database -d testdb
INFO   : Running export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1;/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/srvctl start database -d testdb
INFO: 2018-04-23 16:31:42: Successfully set the RMAN SNAPSHOT control file
.INFO   : Did not do scp for node : odanode1
..
INFO   : This is root, will become oracle and run: /bin/su oracle -c /usr/bin/ssh -l oracle odanode1 /opt/oracle/oak/onecmd/tmp/runDatapatch.sh
INFO   : Running on the local node: /bin/su oracle -c /opt/oracle/oak/onecmd/tmp/runDatapatch.sh
SUCCESS: 2018-04-23 16:32:13: Successfully created the Database : testdb
INFO   : Resecuring the environment… odanode1 odanode2
INFO   : Removing the SSH setup for root…
INFO   : Running as root: /usr/bin/ssh -l root odanode1 chmod 751 /opt/oracle/oak/onecmd/tmp
INFO   : Running as root: /usr/bin/ssh -l root odanode2 chmod 751 /opt/oracle/oak/onecmd/tmp
INFO   : Running as root: /usr/bin/ssh -l root odanode2 /bin/rm -rf /root/.ssh
INFO   : Running as root: /usr/bin/ssh -l root odanode1 /bin/rm -rf /root/.ssh


Conclusion
In this article we have learned how to create a database on Oracle Database Appliance using Database Configuration parameter file. If you want to create a database with different database configuration parameter then you must create a database configuration file first with your desired parameters. Creating an Oracle Database on ODA is just one step process. OAKCLI utility takes care of everything for you to create the database.

0

When you create a database on Oracle Database Appliance (ODA) it uses a ‘default’ database configuration file which consists of a default parameters. 



The default database configuration file uses the following parameters:

[root@odanode1 ~]# oakcli show db_config_params
The available DB configuration files are :
default

[root@odanode1 ~]# oakcli show db_config_params -conf default -detail
DATABASE_BLOCK_SIZE       =>    8192
DATABASE_LANGUAGE         =>    AMERICAN
DATABASE_CHARACTERSET     =>    AL32UTF8
DATABASE_TERRITORY        =>    AMERICA
COMPONENT_LANGUAGES       =>    en
NLS_NCHAR_CHARACTERSET    =>    AL16UTF16

If you want to create a database with different database configuration parameter then you must create a database configuration file with your desired parameters. You can use the ‘oakcli create db_config_params’ command to create a database configuration file. The configuration files are created under the locatoin ‘/opt/oracle/oak/install/dbconf’ with a default extension of ‘.dbconf’.

In this article we will demonstrate how to create a database configuration file.

Steps to generate/create a database configuration file

Step 1: List the Database Configuration files

[root@odanode1 ~]# oakcli show db_config_params
The available DB configuration files are :
default

Step 2: Create Database Configuration file

[root@odanode1 dumpfiles]# oakcli create db_config_params -conf newdbconf
Please select one of the following for Database Block Size  [1 .. 4] :
1    => 4096
2    => 8192
3    => 16384
4    => 32768
2    –> Enter the value. Here I entered 2 for 8k block size
The selected value is : 8192

Specify the  Database Language (1. AMERICAN 2. Others) [1] : 1 –> Here I entered 1 for AMERICAN database language
The selected value is : AMERICAN

Specify the  Database Characterset (1. AL32UTF8 2. Others) [1] : 2 –> Enter 2 for Other Characterset

Please select one of the following for Database Characterset [0 .. 10] :
0    => Others
1    => AL32UTF8
2    => AR8ADOS710
3    => AR8ADOS720
4    => AR8APTEC715
5    => AR8APTEC715T
6    => AR8ARABICMACS
7    => AR8ASMO8X
8    => AR8HPARABIC8T
9    => AR8ISO8859P6
10    => AR8MSWIN1256

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 21] :
11    => AR8MUSSAD768
12    => AR8MUSSAD768T
13    => AR8NAFITHA711
14    => AR8NAFITHA711T
15    => AR8NAFITHA721
16    => AR8NAFITHA721T
17    => AR8SAKHR706
18    => AR8SAKHR707
19    => AR8SAKHR707T
20    => AZ8ISO8859P9E
21    => BG8MSWIN

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 32] :
22    => BG8PC437S
23    => BLT8CP921
24    => BLT8ISO8859P13
25    => BLT8MSWIN1257
26    => BLT8PC775
27    => BN8BSCII
28    => CDN8PC863
29    => CEL8ISO8859P14
30    => CL8ISO8859P5
31    => CL8ISOIR111
32    => CL8KOI8R

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 43] :
33    => CL8KOI8U
34    => CL8MACCYRILLICS
35    => CL8MSWIN1251
36    => EE8ISO8859P2
37    => EE8MACCES
38    => EE8MACCROATIANS
39    => EE8MSWIN1250
40    => EE8PC852
41    => EL8DEC
42    => EL8ISO8859P7
43    => EL8MACGREEKS

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 54] :
44    => EL8MSWIN1253
45    => EL8PC437S
46    => EL8PC851
47    => EL8PC869
48    => ET8MSWIN923
49    => HU8ABMOD
50    => HU8CWI2
51    => IN8ISCII
52    => IS8PC861
53    => IW8ISO8859P8
54    => IW8MACHEBREWS

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 65] :
55    => IW8MSWIN1255
56    => IW8PC1507
57    => JA16EUC
58    => JA16EUCTILDE
59    => JA16SJIS
60    => JA16SJISTILDE
61    => JA16VMS
62    => KO16KSC5601
63    => KO16KSCCS
64    => KO16MSWIN949
65    => LA8ISO6937

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 76] :
66    => LA8PASSPORT
67    => LT8MSWIN921
68    => LT8PC772
69    => LT8PC774
70    => LV8PC1117
71    => LV8PC8LR
72    => LV8RST104090
73    => N8PC865
74    => NE8ISO8859P10
75    => NEE8ISO8859P4
76    => RU8BESTA

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 87] :
77    => RU8PC855
78    => RU8PC866
79    => SE8ISO8859P3
80    => TH8MACTHAIS
81    => TH8TISASCII
82    => TR8DEC
83    => TR8MACTURKISHS
84    => TR8MSWIN1254
85    => TR8PC857
86    => US8PC437
87    => UTF8

<<Hit enter to display more characterset>>

Please select one of the following for Database Characterset  [0 .. 98] :
88    => VN8MSWIN1258
89    => VN8VN3
90    => WE8DEC
91    => WE8DG
92    => WE8ISO8859P1
93    => WE8ISO8859P15
94    => WE8ISO8859P9
95    => WE8MACROMAN8S
96    => WE8MSWIN1252
97    => WE8NCR4970
98    => WE8NEXTSTEP
96 –> Enter 96 to select WE8MSWIN1252 as characterset
The selected value is : WE8MSWIN1252

Specify the  Database Territory (1. AMERICA 2. Others) [1] : –> Here I entered 1 for AMERICA database Territory
The selected value is : AMERICA

Specify the  Component Language (1. en 2. Others) [1] : –> Here I entered 1 for en Component Language
The selected value is : en

Please select one of the following for NLS Characterset  [1 .. 2] :
1    => AL16UTF16
2    => UTF8
1    –> Here I entered 1 for AL16UTF16 NLS Characterset
The selected value is : AL16UTF16

Successfully generated the Database parameter file ‘newdbconf’

Step 3: Verify the configuration file is created

[root@odanode1 ~]# oakcli show db_config_params
The available DB configuration files are :
newdbconf
default

Step 4: List the parameters for newly created configuration file

[root@odanode1 ~]# oakcli show db_config_params -conf newdbconf -detail
DATABASE_BLOCK_SIZE       =>    8192
DATABASE_LANGUAGE         =>    AMERICAN
DATABASE_CHARACTERSET     =>    WE8MSWIN1252
DATABASE_TERRITORY        =>    AMERICA
COMPONENT_LANGUAGES       =>    en
NLS_NCHAR_CHARACTERSET    =>    AL16UTF16


Conclusion

In this article we have learned how to create a database configuration file with the desired parameters. The Default database configuration file parameters may not be applicable for all the databases. You can use the ‘oakcli create db_config_params’ command to create a database configuration file.

0


Oracle Database Appliance stack patching is very simple and straight forward. The ODA patching process is fully automated and single patch contains updates for all system components such as OS, Firmware, BIOS, ILOM, Storage, Grid Infrastructure and Database. ODA patches are released every quarter and one should always consult the MOS note 888888.1 for recommended patches.

Oracle Database Appliance stack Patching consists of following major steps:

  1. Patching ODA Nodes (Includes Grid Infrastructure Patching)
  2. Patching Storage Shelve(s)
  3. Patching Database


In this article we will demonstrate the steps for patching entire Oracle Database Appliance stack to 12.2.1.2.0.

Steps for Patching Oracle Database Appliance (ODA) Stack




Step 1: ODA Nodes Patching

  • As root user, note down the current version of the ODA on both nodes
# oakcli show version -detail
  • As root user, Verify the shared disks status on both nodes. There shouldn’t be any bad disk.

# oakcli show disk
# oakcli show diskgroup

  • As root user, Validate the ODA infrastructure on both nodes
# oakcli validate -d
  • Ensure that sufficient space is available in the following file sytems on both nodes
# df -h -P / /opt /u01 /boot
  • Download and stage the ODA patches on the both nodes
# mkdir -p /u01/app/oracle/software/ODA
  • Ensure root user equivalence is working on both nodes

From node 1
ssh 192.168.16.25 hostname
 


From node 2
ssh 192.168.16.24 hostname
 

  • Copy software to node 2
# mkdir -p /u01/app/oracle/software/ODA
# scp /u01/app/oracle/software/ODA/p* 192.168.16.25:/u01/app/oracle/software/ODA/
  • Unpack software on both nodes

# /opt/oracle/oak/bin/oakcli unpack –package /u01/app/oracle/software/ODA/p27119652_122120_Linux-x86-64_1of3.zip
# /opt/oracle/oak/bin/oakcli unpack –package /u01/app/oracle/software/ODA/p27119652_122120_Linux-x86-64_2of3.zip
# /opt/oracle/oak/bin/oakcli unpack –package /u01/app/oracle/software/ODA/p27119652_122120_Linux-x86-64_3of3.zip

  • Stop databases
$ srvctl stop database -d <name>
  • Umount the NFS mounts if any
# umount /nsf
  • Verify the patch
# oakcli update -patch 12.2.1.2.0 -verify
  • Run from the patching from ILOM CLI

ssh odanode1-ilom
enter the root password when prompted
-> start /SP/console
enter y and hit return to confirm
# oakcli update -patch 12.2.1.2.0 -server -local 

Note: Node will be rebooted as part of patching

  • Ensure that CRS is Up and Running
# $GRID_HOME/bin/crsctl stat res -t
  • Perform patching post checks
# oakcli update -patch 12.2.1.2.0 -verify
  • Check the inventory looks as expected:
# oakcli show version -detail
  • Check GI patches

$ $GRID_HOME/OPatch/opatch lspatches


*****Repeat the above steps on the second node before continuing…*******




Step 2: Storage patching



Once both ODA nodes are patched successfully, we can continue with the storage patching. 
 

  • As root user on node 1 only, execute the following command:
# oakcli update -patch 12.2.1.2.0 -storage
  • Post Storage Patching, ensure that CRS is up and running on both nodes
# $GRID_HOME/bin/crsctl stat res -t
  • Verify that the patching sucessful on both nodes.
# oakcli show version -detail



Step 3: Database Patching:



Once both ODA nodes and Storage Patching completed successfully, we can now patch databases.
 

  • As root user on execute the following command:
# /opt/oracle/oak/bin/oakcli update -patch  12.2.1.2.0  –database –local
  • Verify the versions of the databsae homes

# oakcli show databases -detail 
# oakcli show dbhomes -detail


Conclusion
 

In this article we have learned to patch an Oracle Database Appliance. Oracle Database Appliance stack patching is very simple and straight forward. The ODA patching process is fully automated and single patch contains updates for all system components. The Patching is also known as One-Button patching process as it is fully automated with just few steps.



0