Preparation for Exam : Oracle Cloud Infrastructure Architect Professional

I would like to share my learning experience with Oracle Cloud Infrastructure, It took 6 months to prepare for OCI-P Exam.

Thank you Oracle University for providing a great free learning opportunity

This article covers useful tips and important URLs related to OCI-P Exam.

[1]  Candidate must have one of the following certifications.
Oracle Cloud Infrastructure 2018|2019|2020 Certified Architect Associate

[2] Register for the OCI free tier

Spend enough time for OCI HandsOn on Oracle Cloud free tier and always free tier.

[3] OCI-P Exam Preparation Session.

[4] OCI-P Study Guide

[5] Oracle University Free Training to Become OCI Architect Professional
Oracle Cloud Infrastructure 2019|2020 Architect Professional

[6] OCI Sessions recordings

[7] Oracle Cloud Infrastructure Documentation
https://docs.cloud.oracle.com/pdf/gsg/OCI_Getting_Started.pdf
https://docs.cloud.oracle.com/pdf/ug/OCI_User_Guide.pdf
https://docs.cloud.oracle.com/en-us/iaas/Content/General/Reference/aqswhitepapers.htm

[8] My Personal Study Materials (Tips / FAQs / Screen Captured Material during OU. training and documentation)

[9] Register the OCI-P Exam.

[10] OCI-P Badges

Oracle Cloud Infrastructure 2019 Certified Architect Professional

[11] OCI-P Certification

Thank you for visiting this blog 🙂

Launch OCI free tier ATP and ADW using Terraform on Window platform

Terraform template available at GitHub will not work directly with OCI free tier ADB database service. You have to adjust some parameter inside the Terraform template to make it compatible with free tier ADB services.

We will Launch two ADB databases one for the ATP database and one for the ADW database using a single command then we will play with ADB using OCI CLI and then finally we will destroy the created infrastructure using a single command.

Download the terraform for window10.
https://releases.hashicorp.com/terraform/0.12.19/terraform_0.12.19_windows_amd64.zip

Installation Steps
copy the downloads for windows version.
copy inside program file and configure windows path variable

 

 

C:\Users\oracle-learn>terraform
Usage: terraform [-version] [-help] <command> [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
apply Builds or changes infrastructure
console Interactive console for Terraform interpolations
destroy Destroy Terraform-managed infrastructure
env Workspace management
fmt Rewrites config files to canonical format
get Download and install modules for the configuration
graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform
init Initialize a Terraform working directory
output Read an output from a state file
plan Generate and show an execution plan
providers Prints a tree of the providers used in the configuration
refresh Update local state file against real resources
show Inspect Terraform state or plan
taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted
validate Validates the Terraform files
version Prints the Terraform version
workspace Workspace management

All other commands:
0.12upgrade Rewrites pre-0.12 module source code for v0.12
debug Debug output management (experimental)
force-unlock Manually unlock the terraform state
push Obsolete command for Terraform Enterprise legacy (v1)
state Advanced state management

C:\Users\oracle-learn>

C:\Users\oracle-learn>terraform --version
Terraform v0.12.18

Prepare the Environment.

oracle-learn MINGW64 ~/projects/adb (master)
$ cat .profile
#Terraform
export TF_VAR_tenancy_ocid=ocid1.tenancy.oc1..xyz
export TF_VAR_user_ocid=ocid1.user.oc1..pqr
export TF_VAR_fingerprint=
export TF_VAR_region=ap-mumbai-1
export TF_VAR_private_key_path=<path/oci_api_key.pem>
export TF_VAR_private_key_password={put-here-the-private-key-password}
export TF_VAR_compartment_ocid=ocid1.compartment.oc1..cid

You may refer OCI Documentation to find these variable values.

 

$ cat provider.tf
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "${var.region}"
}

provider "local" {
  version = ">=1.3.0" # Need this version of the local provider to support base64 encoded inputs
}
$ cat variables.tf
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.

variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "region" {}
variable "compartment_ocid" {}

variable "autonomous_database_db_workload" {
  default = "OLTP"
}

variable "autonomous_data_warehouse_db_workload" {
  default = "DW"
}

variable "autonomous_database_defined_tags_value" {
  default = "value"
}

variable "autonomous_database_freeform_tags" {
  default = {
    "Department" = "Finance"
  }
}

variable "autonomous_database_license_model" {
  default = "LICENSE_INCLUDED"
}

variable "autonomous_database_is_dedicated" {
  default = false
}

I have modified the template accordingly for the free tier template available at GitHub

$ cat autonomous_database_wallet.tf
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.

resource "random_string" "autonomous_database_wallet_password" {
  length  = 16
  special = true
}

data "oci_database_autonomous_database_wallet" "autonomous_database_wallet" {
  autonomous_database_id = "${oci_database_autonomous_database.autonomous_database.id}"
  password               = "${random_string.autonomous_database_wallet_password.result}"
  base64_encode_content  = "true"
}

resource "local_file" "autonomous_database_wallet_file" {
  content_base64 = "${data.oci_database_autonomous_database_wallet.autonomous_database_wallet.content}"
  filename       = "${path.module}/autonomous_database_wallet.zip"
}

output "autonomous_database_wallet_password" {
  value = "${random_string.autonomous_database_wallet_password.result}"
}

$ cat autonomous_database.tf
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.

resource "random_string" "autonomous_database_admin_password" {
  length      = 16
  min_numeric = 1
  min_lower   = 1
  min_upper   = 1
  min_special = 1
}

resource "oci_database_autonomous_database" "autonomous_database" {
  #Required
  admin_password           = "${random_string.autonomous_database_admin_password.result}"
  compartment_id           = "${var.compartment_ocid}"
  cpu_core_count           = "1"
  data_storage_size_in_tbs = "1"
  db_name                  = "atpdb1"
  is_free_tier             = true
  #Optional
  db_workload                                    = "${var.autonomous_database_db_workload}"
  display_name                                   = "example_autonomous_database"
  is_auto_scaling_enabled                        = "false"
  is_preview_version_with_service_terms_accepted = "false"
}

data "oci_database_autonomous_databases" "autonomous_databases" {
  #Required
  compartment_id = "${var.compartment_ocid}"

  #Optional
  display_name = "${oci_database_autonomous_database.autonomous_database.display_name}"
  db_workload  = "${var.autonomous_database_db_workload}"
}

output "autonomous_database_admin_password" {
  value = "${random_string.autonomous_database_admin_password.result}"
}

output "autonomous_database_high_connection_string" {
  value = "${lookup(oci_database_autonomous_database.autonomous_database.connection_strings.0.all_connection_strings, "high", "unavailable")}"
}

output "autonomous_databases" {
  value = "${data.oci_database_autonomous_databases.autonomous_databases.autonomous_databases}"
}

Follow the same steps for autonomous_data_warehouse_wallet.tf and autonomous_data_warehouse.tf

[1] Initialize a Terraform working directory
$ terraform init

[2] Generate and show an execution plan
$ terraform plan

[3] Builds or changes infrastructure
$ terraform apply

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

random_string.autonomous_database_admin_password: Creating...
random_string.autonomous_data_warehouse_admin_password: Creating...
random_string.autonomous_data_warehouse_wallet_password: Creating...
random_string.autonomous_database_wallet_password: Creating...
random_string.autonomous_database_admin_password: Creation complete after 0s [id=0++6KrIV8T?=F1*k]
random_string.autonomous_data_warehouse_admin_password: Creation complete after 0s [id=Dtbt2t!0KZ]y0Y<&] random_string.autonomous_data_warehouse_wallet_password: Creation complete after 0s [id=a?*>RADQ+]Uv[Xgt]
random_string.autonomous_database_wallet_password: Creation complete after 0s [id=_HLrXaT*Zf@eXqu#]
oci_database_autonomous_database.autonomous_data_warehouse: Creating...
oci_database_autonomous_database.autonomous_database: Creating...
oci_database_autonomous_database.autonomous_database: Still creating... [10s elapsed]
oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [10s elapsed]
oci_database_autonomous_database.autonomous_database: Still creating... [20s elapsed]
oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [20s elapsed]
.........
oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [1m50s elapsed]
oci_database_autonomous_database.autonomous_database: Still creating... [2m0s elapsed]
oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [2m0s elapsed]
oci_database_autonomous_database.autonomous_database: Still creating... [2m10s elapsed]
oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [2m10s elapsed]

oci_database_autonomous_database.autonomous_data_warehouse: Still creating... [2m20s elapsed]
......
local_file.autonomous_data_warehouse_wallet_file: Creating...
local_file.autonomous_data_warehouse_wallet_file: Creation complete after 0s [id=a2cfa32740b9dcdffb8524d72fc703f62c5cfcdf]

Apply complete! Resources: 8 added, 0 changed, 0 destroyed.

Outputs:

[4] Play with ADB

#List of all the ADBs
$ oci db autonomous-database list –compartment-id $TF_VAR_compartment_ocid

#List of all the ADWs
$ oci db autonomous-data-warehouse list –compartment-id $TF_VAR_compartment_ocid

#Stop ADW
$ oci db autonomous-data-warehouse stop –autonomous-data-warehouse-id ocid1.autonomousdatabase.oc1.xyz

#Start ADW
$ oci db autonomous-data-warehouse start –autonomous-data-warehouse-id ocid1.autonomousdatabase.oc1.xyz

#Get details about specific ADW
$ oci db autonomous-data-warehouse get –autonomous-data-warehouse-id ocid1.autonomousdatabase.oc1.xyz

[5] Destroy Terraform-managed infrastructure
$ terraform destroy

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

local_file.autonomous_database_wallet_file: Destroying... [id=6c0eff5f4d195f0e38a364ef7d414dc7c39ed027]
local_file.autonomous_data_warehouse_wallet_file: Destroying... [id=a2cfa32740b9dcdffb8524d72fc703f62c5cfcdf]
local_file.autonomous_data_warehouse_wallet_file: Destruction complete after 0s
local_file.autonomous_database_wallet_file: Destruction complete after 0s
random_string.autonomous_data_warehouse_wallet_password: Destroying... [id=a?*>RADQ+]Uv[Xgt]
random_string.autonomous_data_warehouse_wallet_password: Destruction complete after 0s
.....
Destroy complete! Resources: 8 destroyed.

Thank you for visit this blog.
Happy Learning. 🙂

Launch your first Compute Instance from OCI CLI on Window 10 OS Platform

First of all, We have to install OCI CLI in the windows machine then we will configure OCI CLI and further we will play with compute instance life cycle operations like launch instance, start, stop and other possible actions and at the end, we will terminate the instance from oci cli.

#Install OCI CLI 
Follow the below commands provided in OCI Documentation.

C:\WINDOWS\system32>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned

PS C:\WINDOWS\system32> powershell -NoProfile -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1&#8217;))”

******************************************************************************
You have started the OCI CLI Installer in interactive mode. If you do not wish
to run this in interactive mode, please include the -AcceptAllDefaults option.
If you have the script locally and would like to know more about
input options for this script, then you can run:
help .\install.ps1
If you would like to know more about input options for this script, refer to:
https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst
******************************************************************************
VERBOSE: Python found in registry: HKCU:\Software\Python\PythonCore
VERBOSE: Downloading install script to C:\Users\oracle-learn\AppData\Local\Temp\tmpDDAF.tmp
VERBOSE: False False
VERBOSE: Using Python executable: C:\Users\oracle-learn\AppData\Local\Programs\Python\Python37\python.exe to run install
script…
VERBOSE: Arguments to python script: “C:\Users\oracle-learn\AppData\Local\Temp\tmpDDAF.tmp”
— Verifying Python version.
— Python version 3.7.5 okay.

===> In what directory would you like to place the install? (leave blank to use ‘C:\Users\oracle-learn\lib\oracle-cli’):
— We will install at ‘C:\Users\oracle-learn\lib\oracle-cli’.

===> In what directory would you like to place the ‘oci.exe’ executable? (leave blank to use ‘C:\Users\oracle-learn\bin’):
— The executable will be in ‘C:\Users\oracle-learn\bin’.

===> In what directory would you like to place the OCI scripts? (leave blank to use ‘C:\Users\oracle-learn\bin\oci-cli-scripts’):
— The scripts will be in ‘C:\Users\oracle-learn\bin\oci-cli-scripts’.

===> Currently supported optional packages are: [‘db (will install cx_Oracle)’]
What optional CLI packages would you like to be installed (comma separated names; press enter if you don’t need any optional packages)?:
— The optional packages installed will be ”.
— Downloading virtualenv package from https://github.com/pypa/virtualenv/archive/15.0.0.tar.gz.
— Downloaded virtualenv package to C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\15.0.0.tar.gz.
— Checksum of C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\15.0.0.tar.gz OK.
— Extracting ‘C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\15.0.0.tar.gz’ to ‘C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h’.
— Copying DLLs into virtualenv.
— Copying C:\Users\oracle-learn\AppData\Local\Programs\Python\Python37\python3.dll to C:\Users\oracle-learn\lib\oracle-cli\Scripts
— Copying C:\Users\oracle-learn\AppData\Local\Programs\Python\Python37\python37.dll to C:\Users\oracle-learn\lib\oracle-cli\Scripts
— Copying C:\Users\oracle-learn\AppData\Local\Programs\Python\Python37\vcruntime140.dll to C:\Users\oracle-learn\lib\oracle-cli\Scripts
— Executing: [‘C:\\Users\\oracle-learn\\AppData\\Local\\Programs\\Python\\Python37\\python.exe’, ‘virtualenv.py’, ‘–python’, ‘C:\\Users\\oracle-learn\\AppData\\Local\\Programs\\Python\\Python37\\python.exe’, ‘C:\\Users\\oracle-learn\\lib\\oracle-cli’]
Already using interpreter C:\Users\oracle-learn\AppData\Local\Programs\Python\Python37\python.exe
Using base prefix ‘C:\\Users\\oracle-learn\\AppData\\Local\\Programs\\Python\\Python37’
virtualenv.py:1030: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses
import imp
New python executable in C:\Users\oracle-learn\lib\oracle-cli\Scripts\python.exe
Installing setuptools, pip, wheel…done.
— Executing: [‘C:\\Users\\oracle-learn\\lib\\oracle-cli\\Scripts\\pip’, ‘install’, ‘–cache-dir’, ‘C:\\Users\\oracle-learn\\AppData\\Local\\Temp\\tmpukxf413h’, ‘oci_cli’, ‘–upgrade’]
Collecting oci_cli
Downloading https://files.pythonhosted.org/packages/93/b3/6f4d3f257dd9bcddbf1c139aa0b085369ff6534cb94da9355907c7c62ef1/oci_cli-2.7.0-py2.py3-none-any.whl (6.3MB)
|████████████████████████████████| 6.3MB 363kB/s
Collecting jmespath==0.9.3
Downloading https://files.pythonhosted.org/packages/b7/31/05c8d001f7f87f0f07289a5fc0fc3832e9a57f2dbd4d3b0fee70e0d51365/jmespath-0.9.3-py2.py3-none-any.whl
Collecting oci==2.8.0
Downloading https://files.pythonhosted.org/packages/7e/97/55a70ea8b2c2c79c5c39740439c93cd076a48bd19d5dfc75f6ab5ddaa7f2/oci-2.8.0-py2.py3-none-any.whl (3.1MB)
|████████████████████████████████| 3.1MB 409kB/s
Collecting cryptography==2.4.2
Downloading https://files.pythonhosted.org/packages/c7/c7/2b97b9af3b16ea45aeabd5fe7eb07902c0c24c5d596b68f677c1f50ae55e/cryptography-2.4.2-cp37-cp37m-win_amd64.whl (1.3MB)
|████████████████████████████████| 1.3MB 726kB/s
Collecting six==1.11.0
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting configparser==3.5.0
Downloading https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz
Collecting pytz==2016.10
Downloading https://files.pythonhosted.org/packages/f5/fa/4a9aefc206aa49a4b5e0a72f013df1f471b4714cdbe6d78f0134feeeecdb/pytz-2016.10-py2.py3-none-any.whl (483kB)
|████████████████████████████████| 491kB 1.3MB/s
Collecting PyYAML==5.1.2
Downloading https://files.pythonhosted.org/packages/bc/3f/4f733cd0b1b675f34beb290d465a65e0f06b492c00b111d1b75125062de1/PyYAML-5.1.2-cp37-cp37m-win_amd64.whl (215kB)
|████████████████████████████████| 225kB 285kB/s
Collecting pyOpenSSL==18.0.0
Downloading https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl (53kB)
|████████████████████████████████| 61kB 218kB/s
Collecting click==6.7
Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
|████████████████████████████████| 71kB 353kB/s
Collecting python-dateutil==2.7.3
Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB)
|████████████████████████████████| 215kB 504kB/s
Collecting certifi
Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
|████████████████████████████████| 163kB 409kB/s
Collecting idna<2.7,>=2.5
Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
|████████████████████████████████| 61kB 563kB/s
Collecting terminaltables==3.1.0
Downloading https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz
Collecting retrying==1.3.3
Downloading https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz
Collecting arrow==0.10.0
Downloading https://files.pythonhosted.org/packages/54/db/76459c4dd3561bbe682619a5c576ff30c42e37c2e01900ed30a501957150/arrow-0.10.0.tar.gz (86kB)
|████████████████████████████████| 92kB 368kB/s
Collecting cffi!=1.11.3,>=1.7
Downloading https://files.pythonhosted.org/packages/71/71/6011c17e8a523be0be20149ed7ba7e8671db7ec6fc52868e4f9a49d527f8/cffi-1.13.2-cp37-cp37m-win_amd64.whl (175kB)
|████████████████████████████████| 184kB 1.1MB/s
Collecting asn1crypto>=0.21.0
Downloading https://files.pythonhosted.org/packages/6b/8c/ff300484eca90b397d919408619fae479965bdd8a1df3d6d08d58e491da5/asn1crypto-1.2.0-py2.py3-none-any.whl (103kB)
|████████████████████████████████| 112kB 1.3MB/s
Collecting pycparser
Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
|████████████████████████████████| 163kB 328kB/s
Building wheels for collected packages: configparser, terminaltables, retrying, arrow, pycparser
Building wheel for configparser (setup.py) … done
Created wheel for configparser: filename=configparser-3.5.0-cp37-none-any.whl size=20865 sha256=abc942bac573f3e5f612d62de463f504320677dc1a6d2788edfb03ed52de7aed
Stored in directory: C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\wheels\a3\61\79\424ef897a2f3b14684a7de5d89e8600b460b89663e6ce9d17c
Building wheel for terminaltables (setup.py) … done
Created wheel for terminaltables: filename=terminaltables-3.1.0-cp37-none-any.whl size=15362 sha256=53403741f831f93681673c00903de32d313f57c3d539207141a994b5a75026d8
Stored in directory: C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\wheels\30\6b\50\6c75775b681fb36cdfac7f19799888ef9d8813aff9e379663e
Building wheel for retrying (setup.py) … done
Created wheel for retrying: filename=retrying-1.3.3-cp37-none-any.whl size=11435 sha256=662b2240b6aaa349ae3edc39b178cb9bd2cafa4ffd22333154573f356f63434a
Stored in directory: C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\wheels\d7\a9\33\acc7b709e2a35caa7d4cae442f6fe6fb
f2c43f80823d46460c
Building wheel for arrow (setup.py) … done
Created wheel for arrow: filename=arrow-0.10.0-py2.py3-none-any.whl size=32856 sha256=358422ae1a2eaa31691be7ded73643fd
700ee2e1d19d64e1bd42124c1d3cea5c
Stored in directory: C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\wheels\ce\4f\95\64541c7466fd88ffe72fda5164f8323c91d695c9a77072c574
Building wheel for pycparser (setup.py) … done
Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size=111018 sha256=402b3b5fcdf0280d8ca2389825fed90efcdb20185d76b36fab57cc6008fdbf4c
Stored in directory: C:\Users\oracle-learn\AppData\Local\Temp\tmpukxf413h\wheels\f2\9a\90\de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built configparser terminaltables retrying arrow pycparser
Installing collected packages: jmespath, idna, pycparser, cffi, asn1crypto, six, cryptography, configparser, certifi, pytz, pyOpenSSL, python-dateutil, oci, PyYAML, click, terminaltables, retrying, arrow, oci-cli
Successfully installed PyYAML-5.1.2 arrow-0.10.0 asn1crypto-1.2.0 certifi-2019.11.28 cffi-1.13.2 click-6.7 configparser-3.5.0 cryptography-2.4.2 idna-2.6 jmespath-0.9.3 oci-2.8.0 oci-cli-2.7.0 pyOpenSSL-18.0.0 pycparser-2.19 python-dateutil-2.7.3 pytz-2016.10 retrying-1.3.3 six-1.11.0 terminaltables-3.1.0

===> Modify PATH to include the CLI and enable tab completion in PowerShell now? (Y/n): Y

— ** Close and re-open PowerShell to reload changes to your PATH **
— In order to run the autocomplete script, you may also need to set your PowerShell execution policy to allow for running local scripts (as an Administrator run Set-ExecutionPolicy RemoteSigned in a PowerShell prompt)

— Installation successful.
— Run the CLI with C:\Users\oracle-learn\bin\oci.exe –help
VERBOSE: Successfully installed OCI CLI!
PS C:\WINDOWS\system32>

#Configure the OCI CLI

C:\Users\oracle-learn\bin> oci setup config
This command provides a walkthrough of creating a valid CLI config file.

The following links explain where to find the information required by this
script:

User OCID and Tenancy OCID:

https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#Other

Region:

https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm

General config documentation:

https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm

Enter a location for your config [C:\Users\oracle-learn\.oci\config]: C:\Users\oracle-learn\.oci\config
Enter a user OCID: ocid1.user.oc1..fddsfdsfdsfjhgjhjhg54534vcxvcxvcxv
Enter a tenancy OCID: ocid1.tenancy.oc1..dfdsfljfsdjf433sdfsdlfjsfjsdf
Enter a region (e.g. ap-mumbai-1, ap-seoul-1, ap-sydney-1, ap-tokyo-1, ca-toronto-1, eu-frankfurt-1, eu-zurich-1, sa-saopaulo-1, uk-gov-london-1, uk-london-1, us-ashburn-1, us-gov-ashburn-1, us-gov-chicago-1, us-gov-phoenix-1, us-langley-1, us-luke-1, us-phoenix-1): ap-mumbai-1
Do you want to generate a new RSA key pair? (If you decline you will be asked to supply the path to an existing key.) [Y/n]: Y
Enter a directory for your keys to be created [C:\Users\oracle-learn\.oci]:
Enter a name for your key [oci_api_key]:
Public key written to: C:\Users\oracle-learn\.oci\oci_api_key_public.pem
Enter a passphrase for your private key (empty for no passphrase):
File C:\Users\oracle-learn\.oci\oci_api_key.pem already exists, do you want to overwrite? [y/N]: y
Private key written to: C:\Users\oracle-learn\.oci\oci_api_key.pem
Fingerprint: 29:80:a7:d8:4d:5b:a1:54:d1:c6:cc:b3:de:6c:ef:52
Config written to C:\Users\oracle-learn\.oci\config

If you haven’t already uploaded your public key through the console,

follow the instructions on the page linked below in the section ‘How to
upload the public key’:

https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#How2
C:\Users\oracle-learn\bin>C:\Users\oracle-learn\.ssh\id_rsa.pub

C:\Users\oracle-learn\bin>oci –help

Once everything is configured correctly you can run a few commands to try out the client. The basic syntax is:
$ oci

$ oci
Some of the available services are:

Core (Networking, Compute, Block Volume, etc.)
Database
IAM
Load Balancing
Object Storage

#Launch Compute instance

When you launch an instance you have to provide the following information, some of which you’ve already obtained:

compartment-id
availability-domain
subnet-id
image-id
shape

Sample commands to find the required information.
oci iam user list –compartment-id
oci iam availability-domain list
oci compute shape list -c
oci compute image list -c

You can use -h option at end of the command to find an help related to specific command option.
oci compute image list -h
oci compute shape list -h

Syntax:
oci compute instance launch –availability-domain “” -c –shape “” –display-name “” –image-id –ssh-authorized-keys-file “” –subnet-id

Example:

oci compute instance launch --availability-domain "AARS:AP-MUMBAI-1-AD-1" -c ocid1.compartment.oc1..ggfdh434332sfsdfsdfsdfsf --shape "VM.Standard.E2.1" --display-name "MyFirstMachineFromCLI" --image-id ocid1.image.oc1.ap-mumbai-1.aaaaaaaaka7f3qhfuobx2s7dqfgbcx5klllh5xlflbgzb5pymqsnuphehk2a --ssh-authorized-keys-file "C:\Users\oracle-learn\.ssh\id_rsa.pub" --subnet-id ocid1.subnet.oc1.ap-mumbai-1.aaaaaaaah44xlfte72zz4yrgrp5pqc3ndqy5atc3kqlfmz4lzwdlsdlhyoya

#List Compute instances
oci compute instance list --compartment-id ocid1.compartment.oc1..ggfdh434332sfsdfsdfsdfsf

Performs one of the following power actions on the specified instance

[1] * **START** – Powers on the instance.

oci compute instance action --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf --action START --wait-for-state RUNNING

[2] * **STOP** – Powers off the instance.

oci compute instance action --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf --action STOP --wait-for-state STOPPED

[3] * **SOFTRESET** – Gracefully reboots instance by sending a shutdown
command to the operating system and then powers the instance back
on.

oci compute instance action --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf --action SOFTRESET --wait-for-state RUNNING

[4] * **SOFTSTOP** – Gracefully shuts down instance by sending a
shutdown command to the operating system.

oci compute instance action --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf --action SOFTSTOP --wait-for-state STOPPED

[5] * **RESET** – Powers off the instance and then powers it back on.

oci compute instance action --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf --action RESET --wait-for-state RUNNING

#Terminate Compute instance
oci compute instance terminate --instance-id ocid1.instance.oc1.ap-mumbai-1.fdsfdsfsdfsdfdsf343sdfsdfsfsdf

#OCI Documentation References
https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/gettingstartedwiththeCLI.htm
https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliinstall.htm
https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm

Thank you for visit this blog

Happy Learning 🙂

How to share an Internet access from Window 10 to VirtualBox Oracle Linux 7.x Server

I am glad to share my experience here.

To share an Internet access from Windows10 to Oracle Linux7.3 which is installed in VirtualBox6.

Below are the steps required to be following in sequence.

1. VirtualBox Machine OL7.3

2. VB Network Configuration

3. After Starting OL7.3

4. Connect Wire from topLeft

5. Ifconfig After Connect Wire

6. Able to browse my website

7. Able to access VB Machine from MobaXterm (In Windows10)

Bridged Networking is used when you want your vm to be a full network citizen, i.e. to be an equal to your host machine on the network; in this mode, a virtual NIC is “bridged” to a physical NIC on your host.

The effect of this is that each VM has access to the physical network in the same way as your host. It can access any service on the network such as external DHCP services, name lookup services, and routing information just as the host does. Logically, the network looks like this:

Bridging to wired LAN

Oracle blog Oracle VM VirtualBox: Networking options and how-to manage them

Thank you for visiting this blog. 🙂

Learning Python

This is a very good course to start learning python.
Course : Learning Python
By Instructor: Joe Marini
Learning Objectives:
Installing Python
Choosing an editor or IDE
Working with variables and expressions
Writing loops
Using the date, time, and datetime classes
Reading and writing files
Fetching internet data
Parsing and processing HTML
Thank you, Joe Marini, for sharing your practical experience.
🙂

Performance Management

I would like to share my learning experience of Oracle Database Performance Management. This article also covered skillset5 for OCM12c Certification Exam.

Go back to OCM 12c Preparation Project 

Thank you for visiting this blog 🙂

Data Management

I would like to share my learning experience of Oracle Data Management . This article also covered skillset4 for OCM12c Certification Exam.

Go back to OCM 12c Preparation Project 

Thank you for visiting this blog 🙂

Data Warehouse Management

I would like to share my learning experience of how to manage the Data Warehouse. This article also covered  skillset3 for OCM12c Certification Exam.

Go back to OCM 12c Preparation Project 

Thank you for visiting this blog 🙂

HOL for Installing 2 Node 19c RAC in OL7.6

I am sharing my learning experience while installing 2-Node RAC Database 19.3  on Oracle Linux 7.6 64 bit deployed on Virtual Box 6.0

I faced two issues during the 19c RAC installation which i covered in this artical.

1.     Implement Platform Prerequisites
                                                                                                                                    
Create groups and users

[root@racnode1 ~]# groupadd oinstall
[root@racnode1 ~]# groupadd dba
[root@racnode1 ~]# groupadd oper
[root@racnode1 ~]# groupadd asmdba
[root@racnode1 ~]# groupadd asmadmin
[root@racnode1 ~]# groupadd asmoper
[root@racnode1 ~]# groupadd backupdba
[root@racnode1 ~]# groupadd dgdba
[root@racnode1 ~]# groupadd kmdba
[root@racnode1 ~]# groupadd racdba

[root@racnode1 ~]#
[root@racnode1 ~]#

# usermod -g oinstall -G dba,oper,asmdba,asmadmin,asmoper,backupdba,dgdba,kmdba,racdba oracle
# chown -R oracle:oinstall /home/oracle
# chmod -R 776 /home/oracle

Create directories and Assign ownership and permissions

[root@racnode1 ~]# df -kh
Filesystem           Size  Used Avail Use% Mounted on
devtmpfs             2.4G     0  2.4G   0% /dev
tmpfs                2.5G     0  2.5G   0% /dev/shm
tmpfs                2.5G  9.2M  2.5G   1% /run
tmpfs                2.5G     0  2.5G   0% /sys/fs/cgroup
/dev/mapper/ol-root   50G  5.0G   45G  10% /
/dev/sda1           1014M  212M  803M  21% /boot
/dev/mapper/ol-home   25G   38M   25G   1% /home
SOFTWARES            550G  144G  407G  27% /media/sf_SOFTWARES
tmpfs                495M   12K  495M   1% /run/user/42
tmpfs                495M     0  495M   0% /run/user/0

[root@racnode1 ~]# mkdir -p /u01/app/19.3.0/grid
[root@racnode1 ~]# chown -R oracle:oinstall /u01/app/19.3.0/grid/
[root@racnode1 ~]# chown -R oracle:oinstall /u01/
[root@racnode1 ~]# chmod 776 -R /u01/app/
[root@racnode1 ~]# chmod 776 -R /u01/app/19.3.0/grid/
[root@racnode1 ~]# chmod 776 -R /u01/

Configure limits

vi /etc/security/limits.conf
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

Installing mandatory RPMs as per oracle documentation

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'  bc  binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender-devel libXrender libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb

make nfs-utils (for Oracle ACFS)
net-tools (for Oracle RAC and Oracle Clusterware)
python (for Oracle ACFS Remote)
python-configshell (for Oracle ACFS Remote)
python-rtslib (for Oracle ACFS Remote)
python-six (for Oracle ACFS Remote)
smartmontools
sysstat
targetcli (for Oracle ACFS Remote)

Configure oracle user profile

vi .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=racnode1
export ORACLE_UNQNAME=acsdb
export ORACLE_BASE=/u01/app/oracle
export GRID_HOME=/home/oracle/19.3.0/grid
export DB_HOME=$ORACLE_BASE/product/19.3.0/db_1
export ORACLE_HOME=$DB_HOME
export ORACLE_SID=cdb1
export ORACLE_TERM=xterm
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$BASE_PATH

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

alias grid_env='. /home/oracle/grid_env'
alias db_env='. /home/oracle/db_env'

-------------------------------------------------
vi /home/oracle/grid_env
export ORACLE_SID=+ASM1
export ORACLE_HOME=$GRID_HOME
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
---------------------------------------------------
vi /home/oracle/db_env
export ORACLE_SID=cdb1
export ORACLE_HOME=$DB_HOME
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Format the storage partitions

[root@racnode1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x9f87b470.

Command (m for help): u
Changing display/entry units to cylinders (DEPRECATED!).

Command (m for help): p
Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x9f87b470

   Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First cylinder (1-3916, default 1):
Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-3916, default 3916):
Using default value 3916
Partition 1 of type Linux and of size 30 GiB is set
Command (m for help): p

Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x9f87b470

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3916    31454246   83  Linux

Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

[root@racnode1 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xcedd7490.

Command (m for help): u
Changing display/entry units to cylinders (DEPRECATED!).

Command (m for help): p
Disk /dev/sdc: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xcedd7490

   Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First cylinder (1-10443, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-10443, default 10443):
Using default value 10443
Partition 1 of type Linux and of size 80 GiB is set

Command (m for help): p

Disk /dev/sdc: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xcedd7490

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       10443    83882373+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Configure UDEV rules for storage partitions

[root@racnode1 ~]# vi /etc/scsi_id.config
options=-g
--------------
Find the WWWID:
--------------
[root@racnode1 ~]# vi /etc/scsi_id.config
[root@racnode1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb1
1ATA_VBOX_HARDDISK_VB94584d4c-2eb8a9ee
[root@racnode1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc1
1ATA_VBOX_HARDDISK_VB65e8a8d7-38d946d8

--------------
Add the Rules:
--------------
vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB94584d4c-2eb8a9ee", SYMLINK+="oracleasm/asm-disk1", OWNER="oracle", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB65e8a8d7-38d946d8", SYMLINK+="oracleasm/asm-disk2", OWNER="oracle", GROUP="asmadmin", MODE="0660"

------------------------------------------------
Load updated block device partition tables.
------------------------------------------------
# /sbin/partprobe /dev/sdb1
# /sbin/partprobe /dev/sdc1

-------------------------------------------------
Test the rules are working as expected.
-------------------------------------------------
/sbin/udevadm test /block/sdb/sdb1
/sbin/udevadm test /block/sdb/sdc1
-------------------------------------------------
Reload the UDEV rules.
-------------------------------------------------
/sbin/udevadm control --reload-rules

# ls -al /dev/oracleasm/*

[root@racnode1 ~]# ls -al /dev/oracleasm/*
lrwxrwxrwx 1 root root 7 Jul 18 16:00 /dev/oracleasm/asm-disk1 -> ../sdb1
lrwxrwxrwx 1 root root 7 Jul 18 16:00 /dev/oracleasm/asm-disk2 -> ../sdc1

[root@racnode1 ~]# ls -al /dev/sd*1
brw-rw---- 1 root   disk 8,  1 Jul 18 14:52 /dev/sda1
brw-rw---- 1 oracle asmadmin  8, 17 Jul 18 16:00 /dev/sdb1
brw-rw---- 1 oracle asmadmin  8, 33 Jul 18 16:00 /dev/sdc1


Clone the Virtual Machine1 as Machine2

Step-1 Shutdown Machine1
# shutdown -h now

Step-2 Create directory for Machine2
Machine1
F:\Local Lab

New - Machine2
Create Directory D:\ASELAB\RACNODE2

Step-3 Command to start clonning
cd C:\Program Files\Oracle\VirtualBox
VBoxManage clonehd "D:\ASELAB\RACNODE1\RACNODE1\RACNODE1.vdi" "D:\ASELAB\RACNODE2\RACNODE2\RACNODE2.vdi"

C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd "D:\ASELAB\RACNODE1\RACNODE1\RACNODE1.vdi" "D:\ASELAB\RACNODE2\RACNODE2\RACNODE2.vdi"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'VDI'. UUID: 2548f99c-3f42-416f-8b97-b817e46720d4

Step-4 Create Machine2 using cloned Image disk
Create Machine2 with Clone Image of Machine2

Step-5 Add network adapters
Attach the Network adapter

Step-6 Shared storage with Machine2
Attach the Storage

Step-7 Start Machine2
Start the Machine2

Step-8 Configure Machine2
Hostname change
Ip address changes for public and private interface
restart machine2 and confirm changes

2. 19c GI Installation
Extract GI Software 

-bash-4.2$ cd source/
-bash-4.2$ ls
LINUX.X64_193000_grid_home.zip
-bash-4.2$
-bash-4.2$ ll
total 2821472
-rwxrwxrw- 1 oracle oinstall 2889184573 Jul 18 17:09 LINUX.X64_193000_grid_home.zip
-bash-4.2$
-bash-4.2$
-bash-4.2$ unzip -qq LINUX.X64_193000_grid_home.zip -d /home/oracle/19.3.0/grid
-bash-4.2$









GUI is unable to setup
passwordless ssh connectivity 

This is the first issue i got during installation.
[root@racnode1 deinstall]# ./sshUserSetup.sh -user oracle -hosts "racnode1 racnode2" -noPromptPassphrase -confirm -advanced
The output of this script is also logged into /tmp/sshUserSetup_2019-07-18-17-27-21.log
Hosts are racnode1 racnode2

user is oracle
Platform:- Linux
Checking if the remote hosts are reachable
PING racnode1 (192.168.56.11) 56(84) bytes of data.
64 bytes from racnode1 (192.168.56.11): icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from racnode1 (192.168.56.11): icmp_seq=2 ttl=64 time=0.020 ms
64 bytes from racnode1 (192.168.56.11): icmp_seq=3 ttl=64 time=0.018 ms
64 bytes from racnode1 (192.168.56.11): icmp_seq=4 ttl=64 time=0.021 ms
64 bytes from racnode1 (192.168.56.11): icmp_seq=5 ttl=64 time=0.020 ms
--- racnode1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4178ms
rtt min/avg/max/mdev = 0.015/0.018/0.021/0.005 ms
PING racnode2 (192.168.56.12) 56(84) bytes of data.
64 bytes from racnode2 (192.168.56.12): icmp_seq=1 ttl=64 time=0.416 ms
64 bytes from racnode2 (192.168.56.12): icmp_seq=2 ttl=64 time=0.357 ms
64 bytes from racnode2 (192.168.56.12): icmp_seq=3 ttl=64 time=0.401 ms
64 bytes from racnode2 (192.168.56.12): icmp_seq=4 ttl=64 time=0.343 ms
64 bytes from racnode2 (192.168.56.12): icmp_seq=5 ttl=64 time=0.370 ms
--- racnode2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4124ms
rtt min/avg/max/mdev = 0.343/0.377/0.416/0.032 ms
Remote host reachability check succeeded.
The following hosts are reachable: racnode1 racnode2.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost racnode1
numhosts 2

The script will setup SSH connectivity from the host racnode1 to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host racnode1
and the remote hosts without being prompted for passwords or confirmations.

NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.

NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEGES TO THESE
directories.

Do you want to continue and let the script make the above mentioned changes (yes/no)?
Confirmation provided on the command line
The user chose yes
User chose to skip passphrase related questions.
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /root/.ssh/config, it would be backed up to /root/.ssh/config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host with empty passphrase
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:4MMvcII5TYmP7HQA9md9/yOl++lg9bb1jfq7IwuYf5w root@racnode1
The key's randomart image is:
+---[RSA 1024]----+

|..               |

|.... ..          |

|  o.oo.. .       |

| . Ooo .. .      |

|  B * = S  . o   |

| o o + o o  = .  |

|  .   . + .* + o.|

|       . ...E =.=|

|          .o=O==o|

+----[SHA256]-----+

Creating .ssh directory and setting permissions on remote host racnode1
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host racnode1. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host racnode1.
Warning: Permanently added 'racnode1,192.168.56.11' (ECDSA) to the list of known hosts.
oracle@racnode1's password:
Done with creating .ssh directory and setting permissions on remote host racnode1.
Creating .ssh directory and setting permissions on remote host racnode2
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host racnode2. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host racnode2.
Warning: Permanently added 'racnode2,192.168.56.12' (ECDSA) to the list of known hosts.
oracle@racnode2's password:
Done with creating .ssh directory and setting permissions on remote host racnode2.
Copying local host public key to the remote host racnode1
The user may be prompted for a password or passphrase here since the script would be using SCP for host racnode1.
oracle@racnode1's password:
Done copying local host public key to the remote host racnode1
Copying local host public key to the remote host racnode2
The user may be prompted for a password or passphrase here since the script would be using SCP for host racnode2.
oracle@racnode2's password:

Done copying local host public key to the remote host racnode2
Creating keys on remote host racnode1 if they do not exist already. This is required to setup SSH on host racnode1.
Creating keys on remote host racnode2 if they do not exist already. This is required to setup SSH on host racnode2.
Updating authorized_keys file on remote host racnode1
Updating known_hosts file on remote host racnode1
Updating authorized_keys file on remote host racnode2
Updating known_hosts file on remote host racnode2
SSH setup is complete.
===================
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.

The possible causes for failure could be:
The server settings in /etc/ssh/sshd_config file do not allow ssh for user oracle.
The server may have disabled public key based authentication.
The client public key on the server may be outdated.
~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
User may not have passed -shared option for shared remote users or may be passing the -shared option for non-shared remote users.
If there is output in addition to the date, but no password is asked,it may be a security alert shown as part of company policy. Append the
additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.
--racnode1:--
Running /usr/bin/ssh -x -l oracle racnode1 date to verify SSH connectivity has been setup from local host to racnode1.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Thu Jul 18 17:28:38 IST 2019
--racnode2:--
Running /usr/bin/ssh -x -l oracle racnode2 date to verify SSH connectivity has been setup from local host to racnode2.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Thu Jul 18 17:28:38 IST 2019
Verifying SSH connectivity has been setup from racnode1 to racnode1
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
Thu Jul 18 17:28:39 IST 2019
Verifying SSH connectivity has been setup from racnode1 to racnode2
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
Thu Jul 18 17:28:39 IST 2019
-Verification from complete-
SSH verification complete.























second issues i faced during root.sh execution on node1.
please refer this artical
[root@racnode1 ~]# sh /u01/app/19.3.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/19.3.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/racnode1/crsconfig/rootcrs_racnode1_2019-07-19_10-44-23PM.log
2019/07/19 22:44:32 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2019/07/19 22:44:32 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2019/07/19 22:44:32 CLSRSC-363: User ignored prerequisites during installation
2019/07/19 22:44:32 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2019/07/19 22:44:34 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2019/07/19 22:44:35 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2019/07/19 22:44:35 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2019/07/19 22:44:36 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2019/07/19 22:45:15 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2019/07/19 22:45:17 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2019/07/19 22:45:20 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2019/07/19 22:45:35 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2019/07/19 22:45:35 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2019/07/19 22:45:41 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2019/07/19 22:45:41 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2019/07/19 22:46:06 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2019/07/19 22:46:12 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2019/07/19 22:46:18 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2019/07/19 22:46:24 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.


ASM has been created and started successfully.

[DBT-30001] Disk groups created successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmca-190719PM104658.log for details.
2019/07/19 22:47:50 CLSRSC-482: Running command: '/u01/app/19.3.0/grid/bin/ocrconfig -upgrade oracle oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 2110c8fa2f3e4f05bf3b54ea3708b20b.
Successfully replaced voting disk group with +OVDATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced

##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
  1. ONLINE 2110c8fa2f3e4f05bf3b54ea3708b20b (/dev/sdb1) [OVDATA]
Located 1 voting disk(s).
2019/07/19 22:49:26 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2019/07/19 22:50:38 CLSRSC-343: Successfully started Oracle Clusterware stack
2019/07/19 22:50:38 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2019/07/19 22:52:07 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2019/07/19 22:52:35 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded


[root@racnode2 grid]# sh root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/19.3.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/racnode2/crsconfig/rootcrs_racnode2_2019-07-22_04-11-43PM.log
2019/07/22 16:11:49 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2019/07/22 16:11:49 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2019/07/22 16:11:49 CLSRSC-363: User ignored prerequisites during installation
2019/07/22 16:11:49 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2019/07/22 16:11:51 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2019/07/22 16:11:51 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2019/07/22 16:11:51 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2019/07/22 16:11:51 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2019/07/22 16:11:53 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2019/07/22 16:11:53 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2019/07/22 16:12:03 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2019/07/22 16:12:03 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2019/07/22 16:12:05 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2019/07/22 16:12:06 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2019/07/22 16:12:19 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2019/07/22 16:12:31 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2019/07/22 16:12:32 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2019/07/22 16:12:34 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2019/07/22 16:12:35 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2019/07/22 16:12:46 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2019/07/22 16:13:33 CLSRSC-343: Successfully started Oracle Clusterware stack
2019/07/22 16:13:33 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2019/07/22 16:13:50 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2019/07/22 16:13:58 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

[root@racnode1 ~]#  /u01/app/19.3.0/grid/bin/crsctl check cluster -all
**************************************************************
racnode1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
racnode2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
[root@racnode1 ~]#  /u01/app/19.3.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.chad
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.net1.network
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.ons
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.OVDATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 Started,STABLE
      2        ONLINE  ONLINE       racnode2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode2.vip
      1        ONLINE  ONLINE       racnode2                 STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
--------------------------------------------------------------------------------

3.     Invoke ASMCA to create diskgroup






4.     RAC DB Software Installation















5.     RAC DB Creation using DBCA

cd /home/oracle/source/
$unzip -q LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/db_1
















6.     19C DB EXPRESS



7.     Verify the Cluster and DB Status

[root@racnode1 ~]# /u01/app/19.3.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.chad
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.net1.network
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.ons
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.OVDATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 Started,STABLE
      2        ONLINE  ONLINE       racnode2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cdb.db
      1        ONLINE  ONLINE       racnode1                 Open,HOME=/u01/app/o
                                                            racle/product/19.3.0
                                                             /db_1,STABLE
      2        ONLINE  ONLINE       racnode2                 Open,HOME=/u01/app/o
                                                             racle/product/19.3.0
                                                             /db_1,STABLE
ora.cvu
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode2.vip
      1        ONLINE  ONLINE       racnode2                 STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
--------------------------------------------------------------------

select * from v$active_instances;

INST_NUMBER INST_NAME                   CON_ID                                                                                                                                                                                                     CON_ID
----------- ------------------------------------------
          1 racnode1:cdb1                     0                                                                                                                                                                                                    0
          2 racnode2:cdb2                     0                                                                                                                                                                                                   0

SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ACS                            READ WRITE NO

Thank you for visiting this blog...