Featured

BSOD/DPC Watchdog Violation Whenever WIFI is Enabled

SYMPTOMS

Every time when wifi is enabled,the PC crashes with BSOD/DPC Watchlog Violation error as below:

Environment:

  • Windows 10 64bit Home Edition.
  • TP-link Archer T4E AC1200 Wireless Dual Band PCI Express Adapter 

After disabled wifi adapter, rebooted the PC successfully without any errors, then tried to enable wifi adapter, system crashed with BSOD screen.

After disabled wifi or set wifi to MANUAL, restarted PC, then PC operated normally while offline.  As soon as connecting PC to wifi, PC froze, then BSOD/DPC WATCHDOG VIOLATION.

The following methods have been tried, but still without luck.

  • Tried restoring from earliest available restore point.
  • Uninstalled driver and installed the driver download from TP-LINK website.
  • Uninstalled driver and installed the driver from original CD.
  • Uninstalled driver, and found only two drivers left. one is from RealTek ( rtwlane.sys) and another driver is Windows native ( vwifibus.sys )
  • Uninstalled device from device manager, then scan device back again.
  • Uninstalled VPN and anti-virus software.

INVESTIGATIONS

Download and install WinDbg

Download and install WinDbg as per Download Debugging Tools for Windows

Run WinDbg

a) Click Start -> All Programs -> Windows Administrative Tool -> Windows Kits ->WinDbg( X64).

b)Select File -> Symbol file path and modify it to suit your situation, then copy and paste it into the box and click OK.

I suggest and use the following as Symbol Path:

SRV*c:\symbols*http://msdl.microsoft.com/download/symbols

c) Select File ->Select Open Crash Dump, and then navigate to the MEMORY.DMP file originated created under C:\Windows, and select Open.

d)Click on ” ! analyze -v

From the above screen, we can see driver “rtwlane.sys” used by “TP-link Archer T4E AC1200 Wireless Dual Band PCI Express Adapter” contributed to the BSOD issue.

QUESTION

Wonder why TP-Link uses RealTek driver ?

Featured

Install Oracle RAC Software and Create Oracle RAC Database In Silent Mode

In this post, I am going to install Oracle 18c RAC software, and create a 18c RAC database in silent mode.

This post will also apply to how to install Oracle 19c RAC software, and create a 19c RAC database in silent mode.

There are a lot of prerequisite tasks assumed to have been done before proceeding with this assignment.

The following Oracle provided response files will be modified and used for this assignment to install and create RAC database in silent mode.

  • $ORACLE_HOME/install/response/db_install.rsp
  • $ORACLE_HOME/assistants/dbca/dbca.rsp

From Oracle Database 18c, we have to unzip the software  into the directory of ORACLE_HOME, which is different from pre-18c versions for which we extract Oracle software image into a staging area.

[oracle@racnode1 ~]$ mkdir -p /u01/app/oracle/product/18.0.0/dbhome_1
[oracle@racnode1 ~]$ unzip /media/sf_Software/18c/LINUX.X64_180000_db_home.zip -d /u01/app/oracle/product/18.0.0/dbhome_1

For Oracle 18c RAC software installation, copy the response file db_install.rsp, and modify it by updating some needed following parameters.

[oracle@racnode1 ~]$ cp /u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_install.rsp ~/18c_install_rac.rsp
[oracle@racnode1 ~]$
[oracle@racnode1 ~]$ diff 18c_install_rac.rsp /u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_install.rsp
29c29
< oracle.install.option=INSTALL_DB_SWONLY
oracle.install.option=
34c34
< UNIX_GROUP_NAME=oinstall
UNIX_GROUP_NAME=
41c41
< INVENTORY_LOCATION=/u01/app/oraInventory
INVENTORY_LOCATION=
45c45
< ORACLE_HOME=/u01/app/oracle/product/18.0.0/dbhome_1
ORACLE_HOME=
50c50
< ORACLE_BASE=/u01/app/oracle
ORACLE_BASE=
62c62
< oracle.install.db.InstallEdition=EE
oracle.install.db.InstallEdition=
79c79
< oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSDBA_GROUP=
85c85
< oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSOPER_GROUP=
90c90
< oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSBACKUPDBA_GROUP=
95c95
< oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSDGDBA_GROUP=
100c100
< oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSKMDBA_GROUP=
105c105
< oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.OSRACDBA_GROUP=
120c120
< oracle.install.db.CLUSTER_NODES=racnode1,racnode2
oracle.install.db.CLUSTER_NODES=
[oracle@racnode1 ~]$

Setup environment for new 18c RAC HOME.

[oracle@racnode1 ~]$ export ORACLE_BASE=/u01/app/oracle
[oracle@racnode1 ~]$ export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1
[oracle@racnode1 ~]$

Start to install 18c Oracle RAC software in silent mode, and ignore the Warnings related to VM machine itself like TMP size, memory size. etc.

[oracle@racnode1 ~]$ $ORACLE_HOME/runInstaller -silent -responseFile ~/18c_install_rac.rsp -ignorePrereqFailure

Launching Oracle Database Setup Wizard…

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2020-08-09_06-33-20PM/installActions2020-08-09_06-33-20PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2020-08-09_06-33-20PM/installActions2020-08-09_06-33-20PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_2020-08-09_06-33-20PM.rsp

You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2020-08-09_06-33-20PM/installActions2020-08-09_06-33-20PM.log

As a root user, execute the following script(s):
1. /u01/app/oracle/product/18.0.0/dbhome_1/root.sh

Execute /u01/app/oracle/product/18.0.0/dbhome_1/root.sh on the following nodes:
[racnode1, racnode2]
Successfully Setup Software with warning(s).
[oracle@racnode1 ~]$
[root@racnode1 ~]# /u01/app/oracle/product/18.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/18.0.0/dbhome_1/install/root_racnode1.virtuallab_2020-08-09_18-45-08-624147961.log for the output of root script
[root@racnode1 ~]#
[root@racnode2 ~]# /u01/app/oracle/product/18.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/18.0.0/dbhome_1/install/root_racnode2.virtuallab_2020-08-09_18-45-47-572742609.log for the output of root script
[root@racnode2 ~]#

Now we start to create 18c RAC database in silent mode.

Copy dbca.rsp file for customizing.

[oracle@racnode1 ~]$ cp /u01/app/oracle/product/18.0.0/dbhome_1/assistants/dbca/dbca.rsp 18c_dbca_RAC18DBA_rac.rsp

Show what parameters modified.

[oracle@racnode1 ~]$ diff 18c_dbca_RAC18DBA_rac.rsp /u01/app/oracle/product/18.0.0/dbhome_1/assistants/dbca/dbca.rsp
32c32
< gdbName=RAC18DBA
gdbName=
42c42
< sid=RAC18DBA
sid=
52c52
< databaseConfigType=RAC
databaseConfigType=
162c162
< createAsContainerDatabase=TRUE
createAsContainerDatabase=
172c172
< numberOfPDBs=1
numberOfPDBs=
182c182
< pdbName=RAC18DBAPDB
pdbName=
203c203
< pdbAdminPassword=xxxxxxxx
pdbAdminPassword=
213c213
< nodelist=racnode1,racnode2
nodelist=
223c223
< templateName=General_Purpose.dbc
templateName=
233c233
< sysPassword=xxxxxxxx
sysPassword=
243c243
< systemPassword=xxxxxxxx
systemPassword=
284c284
< runCVUChecks=TRUE
runCVUChecks=
295c295
< dbsnmpPassword=xxxxxxxx
dbsnmpPassword=
431c431
< storageType=ASM
storageType=
440c440
< diskGroupName=+DATA
diskGroupName=
458c458
< recoveryGroupName=+FRA
recoveryGroupName=
468c468
< characterSet=AL32UTF8
characterSet=
478c478
< nationalCharacterSet=AL16UTF16
nationalCharacterSet=
565c565
< sampleSchema=TRUE
sampleSchema=
584c584
< databaseType=OLTP
databaseType=
[oracle@racnode1 ~]$

Run dbca to create RAC database in silent mode, and ignore the Warnings related to VM machine itself like TMP size, memory size. etc.

[oracle@racnode1 ~]$ $ORACLE_HOME/bin/dbca -silent -createDatabase -responseFile 18c_dbca_RAC18DBA_rac.rsp -ignorePrereqFailure

[WARNING] [DBT-09102] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details.
ACTION: Find the appropriate configuration from the log file or from the installation guide to meet the prerequisites and fix this manually.

Prepare for db operation
7% complete
Copying database files
27% complete
Creating and starting Oracle instance
28% complete
31% complete
35% complete
37% complete
40% complete
Creating cluster database views
41% complete
53% complete
Completing Database Creation
57% complete
59% complete
60% complete
Creating Pluggable Databases
64% complete
80% complete
Executing Post Configuration Actions
100% complete

Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/RAC18DBA.
Database Information:
Global Database Name:RAC18DBA
System Identifier(SID) Prefix:RAC18DBA
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/RAC18DBA/RAC18DBA.log" for further details.

Check and confirm RAC database created successfully.

[oracle@racnode1 ~]$ srvctl status database -d RAC18DBA
Instance RAC18DBA1 is running on node racnode1
Instance RAC18DBA2 is running on node racnode2
SQL> show pdbs

CON_ID CON_NAME     OPEN MODE  RESTRICTED
------ ----------- ----------- ---------
2      PDB$SEED     READ ONLY   NO
3      RAC18DBAPDB  READ WRITE  NO

SQL>
[oracle@racnode1 ~]$ srvctl config database -d RAC18DBA
Database unique name: RAC18DBA
Database name: RAC18DBA
Oracle home: /u01/app/oracle/product/18.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/RAC18DBA/PARAMETERFILE/spfile.341.1048016383
Password file: +DATA/RAC18DBA/PASSWORD/pwdrac18dba.325.1048015711
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: RAC18DBA1,RAC18DBA2
Configured nodes: racnode1,racnode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@racnode1 ~]$
SQL> select COMP_NAME, VERSION, STATUS, SCHEMA 
       from dba_registry order by COMP_NAME;

COMP_NAME                        VERSION    STATUS SCHEMA
-------------------------------- ---------- ------ ------
JServer JAVA Virtual Machine     18.0.0.0.0 VALID  SYS
OLAP Analytic Workspace          18.0.0.0.0 VALID  SYS
Oracle Database Catalog Views    18.0.0.0.0 VALID  SYS
Oracle Database Java Packages    18.0.0.0.0 VALID  SYS
Oracle Database Packages and     18.0.0.0.0 VALID  SYS
Types
Oracle Database Vault            18.0.0.0.0 VALID  DVSYS
Oracle Label Security            18.0.0.0.0 VALID  LBACSYS
Oracle Multimedia                18.0.0.0.0 VALID  ORDSYS
Oracle OLAP API                  18.0.0.0.0 VALID  OLAPSYS
Oracle Real Application Clusters 18.0.0.0.0 VALID  SYS
Oracle Text                      18.0.0.0.0 VALID  CTXSYS
Oracle Workspace Manager         18.0.0.0.0 VALID  WMSYS
Oracle XDK                       18.0.0.0.0 VALID  SYS
Oracle XML Database              18.0.0.0.0 VALID  XDB
Spatial                          18.0.0.0.0 VALID  MDSYS

15 rows selected.

If there are any issues during installation process, the following files can be reviewed to get exact warnings or errors.

[oracle@racnode1 ~]$ ls -ltr /u01/app/oracle/cfgtoollogs/dbca/RAC18DBA
total 27980
-rw-r----- 1 oracle oinstall 18726912 Aug 9 19:30 tempControl.ctl
-rw-r----- 1 oracle oinstall 400 Aug 9 19:30 CloneRmanRestore.log
-rw-r----- 1 oracle oinstall 2832 Aug 9 19:33 cloneDBCreation.log
-rw-r----- 1 oracle oinstall 0 Aug 9 19:34 rmanUtil
-rw-r----- 1 oracle oinstall 3686 Aug 9 19:36 plugDatabase.log
-rw-r----- 1 oracle oinstall 577 Aug 9 19:37 ordlib_catcon_16180_gen_inst_conn_strings_query.sql
-rw-r----- 1 oracle oinstall 4006 Aug 9 19:37 ordlib0.log
-rw------- 1 oracle oinstall 3248 Aug 9 19:37 ordlib_catcon_16180.lst
-rw-r----- 1 oracle oinstall 577 Aug 9 19:37 execemx_catcon_16330_gen_inst_conn_strings_query.sql
-rw-r----- 1 oracle oinstall 3931 Aug 9 19:37 execemx0.log
-rw------- 1 oracle oinstall 3250 Aug 9 19:37 execemx_catcon_16330.lst
-rw-r----- 1 oracle oinstall 3407 Aug 9 19:37 postScripts.log
-rw-r----- 1 oracle oinstall 577 Aug 9 19:37 catclust_catcon_16549_gen_inst_conn_strings_query.sql
-rw-r----- 1 oracle oinstall 4852 Aug 9 19:38 catclust0.log
-rw------- 1 oracle oinstall 3254 Aug 9 19:38 catclust_catcon_16549.lst
-rw-r----- 1 oracle oinstall 1706 Aug 9 19:38 CreateClustDBViews.log
-rw-r----- 1 oracle oinstall 138 Aug 9 19:38 lockAccount.log
-rw-r----- 1 oracle oinstall 577 Aug 9 19:39 utlrp_catcon_17944_gen_inst_conn_strings_query.sql
-rw-r----- 1 oracle oinstall 9882 Aug 9 19:40 utlrp0.log
-rw------- 1 oracle oinstall 3242 Aug 9 19:40 utlrp_catcon_17944.lst
-rw-r----- 1 oracle oinstall 4521 Aug 9 19:41 postDBCreation.log
-rw-r----- 1 oracle oinstall 0 Aug 9 19:42 PDBCreation.log
-rw-r----- 1 oracle oinstall 28 Aug 9 19:43 plugDatabase1R.log
-rw-r----- 1 oracle oinstall 5889 Aug 9 19:43 hr_main.log
-rw-r----- 1 oracle oinstall 6111 Aug 9 19:43 postPDBCreation.log
-rw-r----- 1 oracle oinstall 1091 Aug 9 19:43 RAC18DBA.log
-rw-r----- 1 oracle oinstall 9802395 Aug 9 19:43 trace.log_2020-08-09_07-26-21PM
[oracle@racnode1 ~]$
Featured

Step by Step Setting Up SQL Server Always On Availability Group

This post demonstrates how to build a lab environment of SQL-Server High Availability feature Always On. All the step by step procedures require extensive knowledge of Virtual machine, Windows OS, Networks, Active Directory Domain, DNS, Firewall, SQL Server, Clustering, etc. After you complete the whole exercise, there is no doubt you will be in the strong position as a DBA.

Build Virtual Machines for Domain Controller Role and  Windows Server Failover Cluster Nodes

The following three Windows Server 2019 virtual machines need to be built with required specifications by referring to ” How to Install Windows Server 2019 on Oracle VirtualBox“.

SERVERFUNCTIONMINI SPACE
VIRTUALLABDC Domain Controller20GB
MSSQLNODE1 SQL Cluster Node120GB
MSSQLNODE2SQL Cluster Node220GB
Windows Server 2019 evaluations https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2019
SERVERPUBLIC IPPRIVATE IPINTERNET
VIRTUALLABDC192.168.78.30N/ANAT
MSSQLNODE1192.168.78.31192.168.79.1NAT
MSSQLNODE2192.168.78.32192.168.79.2NAT
Interfaces and IP
NAMEIP ADDRESS
FAILOVER CLUSTERMSSQLCLUSTER192.168.78.35
AVAILABILITY GROUP LISTENERAGRPLISTENER192.168.78.36
AVAILABILITY GROUP AGRPMSSQL
Cluster Specifications

Install SQL Server 2019 onto MSSQLNODE1 and MSSQLNODE2

a) Install SQL Server 2019 evaluations on to mssqlnode1 and mssqlnode2 as per “How to Install SQL Server 2019 on Windows Server 2019 VM of VirtualBox“.

b) Apply the latest Cumulative Updates as per How to Apply the Latest Cumulative Update for SQL Server.

Create a Firewall Rule to Allow Connections Between VIRTUALLAB.COM Environment

Open Windows Firewall -> Advanced settings->Inbound Rules->New Rules.

Click Custom.

Click All programs.

Leave all the default values, and click Next.

Provide both Public and Private IPs, and click Next.

Choose Allow the connection, and click Next.

Leave all the default, and click Next.

Provide this Firewall name as “VIRTUALLAB Enviroment”, and click Finish.

Setup VM Machine VIRTUALLABDC as Domain Controller

Install “Active Directory Domain Services” OS feature

On Domain Controller Server, run Server Manager console, and select Add roles and features.

Click Next.

Choose “Role-based or feature-based installation“.

Choose “Select a server from the server pool“.

Check “Active Directory Domain Services“, then pop up a window which reminds some management tools are required to be installed too.

Click “Add Features“, and “Next“.

Click “Next” on “Select Features” page.

Because Active Directory Domain Services requires DNS Server to work with. This page just reminds DNS Server will be install if not yet.

Click “Next“.

Click “Install” to start installation.

Monitor the processing …..

Click “Promote this server to a domain controller“.

Promote server virtuallabdc to a domain controller

Choose “Add a new forest“, and provide Root domain name as “VIRTUALLAB.COM”.

Click “Next“.

Provide the Directory Services Restore Mode( DSRM) password in case restoring the Directory Services from backup is required..

Keep the default for “DNS Options” and click “Next“.

After 5 seconds around, The NetBIOS domain name is auto-filled with “VIRTUALLAB”.

Click “Next“.

Keep the default path, and click “Next“.

Review the contents, click “View Scripts“.

Click “Next”.

#
Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest -CreateDnsDelegation:$false
-DatabasePath "C:\Windows\NTDS" -DomainMode "WinThreshold"
-DomainName "VIRTUALLAB.COM" -DomainNetbiosName "VIRTUALLAB"
-ForestMode "WinThreshold" -InstallDns:$true
-LogPath "C:\Windows\NTDS" -NoRebootOnCompletion:$false
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

All looks good, then click “Install“.

It is complete to configure server VIRTUALLABDC as a domain controller.

Server rebooted.

Logon server after it is available.

Set Up DNS for Domain Controller

Open DNS from Control Panel -> System and Security -> Administrative Tools.

Reverse Lookup Zone is blank. Without the Reverse Lookup Zone, DNS will not function. So Right click on “Reverse Lookup Zone” -> Click “New Zone“.

Choose the “Primary Zone” and click Next.

Choose the second option “To all DNS servers running on Domain Controllers in this Domain

Choose “IP V4 Reverse Lookup Zone” and Click Next

Specify the network id as “192.168.78″

Choose “Allow both nonsecure and secure dynamic updates” and click Next

Click the finish button to complete creating the Reverse Lookup Zone.

Run nslookup in command line, it uses IP6 which should be turned off for now.

C:\Users\Administrator>nslookup
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
primary name server = 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
responsible mail addr = (root)
serial = 0
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 86400 (1 day)
Default Server: UnKnown
Address: ::1

Uncheck “Internet Protocol Version 6 ( TCP/IPv6)” of network Ethernet Properties.
Provide Preferred DNS server.

Re-test NSLOOKUP in command line, all looks great.

C:\Users\Administrator>nslookup
Default Server: VIRTUALLABDC.VIRTUALLAB.COM
Address: 192.168.78.30

>virtuallabdc
Server: VIRTUALLABDC.VIRTUALLAB.COM
Address: 192.168.78.30

Name: virtuallabdc.VIRTUALLAB.COM
Address: 192.168.78.30

>192.168.78.30
Server: VIRTUALLABDC.VIRTUALLAB.COM
Address: 192.168.78.30

Name: VIRTUALLABDC.VIRTUALLAB.COM
Address: 192.168.78.30
>

Configure Networks and Join the Domain for MSSQLNODE1 and MSSQLNODE2

Login as Administrator on MSSQLNODE1.
Open Control Panel -> Network and Internet->Network Connections -> Right click interface “HostOnly” -> Properties -> Uncheck Internet Protocol Version 6 (TCP/IP V6).
Then click Properties of TCP/IP V4 -> provide IPAddress as “192.168.78.31” and the DNS as “192.168.78.30”.

Open Control Panel -> Network and Internet->Network Connections -> Right click interface “Private” -> Properties -> Uncheck TCP/IP V6.
Then click Properties of TCP/IP V4 -> provide Ip address as “192.168.79.1” and leave the rest as default.

From both nodes test network connection successfully.

C:\Users\Administrator>ping 192.168.78.30
Pinging 192.168.78.30 with 32 bytes of data:
Reply from 192.168.78.30: bytes=32 time<1ms TTL=128
Reply from 192.168.78.30: bytes=32 time<1ms TTL=128
Reply from 192.168.78.30: bytes=32 time<1ms TTL=128
Reply from 192.168.78.30: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.78.30:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\Administrator>

On MSSQLNODE1 node, right click on “This PC” and go into the properties.
Click on the “Advanced system Settings” and click the “Computer Name” tab, provide Domain name and Computer name.
Click OK,
Provide domain name VIRTUALLAB.COM ,
Provide Active Directory Administrator User/Password,
Welcome message for joining the domain successfully,
Reboot the server to make changes effective.

On MSSQLNODE2 node, repeat the same procedure for MSSQLNODE2 to join domain VIRTUALLAB.COM.

Create AD Service Account 

Two service accounts are required to be created for running SQL Server Database Service( DS) and Agent Service( AS) respectively.

On the domain controller machine, Click Start -> Run -> Type dsa.msc -> On the AD console.

Right click User, and then New User.

Provide User logon name “svcSQLDScluster” as Database Service account.

Specify the password , click Next and click on finish to create the user.

Also create a new service account named svcSQLAScluster This will be the  Service account for running SQL Service Agent.

Install Failover Clustering Features

It is time to install failover clustering OS features for MSSQLNODE1 and MSSQLNODE2.

First on MSSQLNODE1, logon as Administrator. Open Server Manager Dashboard, and click “Add roles and features“.

Click Next.

Click Next.

Click Next.

Click Next.

Choose “Failover Clustering“, a pop up window suggests including management tools.
Click “Add Features“, then Click Next.

Review and click Install.

Monitoring the progressing until completion.

Click Close, the reboot the server as instructed.

After it is done on MSSQLNODE1, then repeat the same instructions on MSSQLNODE2.

Configure Failover Clustering between MSSQLNODE1 and MSSQLNODE 2

Please DISABLE NAT interface on VM VirtualBox Manager temporarily for both SQL Cluster nodes. It can only be enabled later after cluster created when OS updating or any downloading required through Internet. Otherwise Windows Failover Cluster Manager will show some unwanted events.

Login to MSSQLNODE1 as Administrator , and run program “Failover Cluster Manager“.

 click Validate Configuration

Add MSSQLNODE1 and MSSQLNODE2 as the nodes by clicking the Browse button and specifying the server name.

Ignore the following warnings of VM machine configurations related. Refer to “Failover Cluster Validation Report” for details.

No disks were found on which to perform cluster validation tests.
Unsigned drivers were found on one or more of the servers.

Continue to click “Create the cluster now using the validated nodes“.

Click Next.

Provide Cluster Name and Cluster IP, then click Next.

Uncheck “Add all eligible storage to the cluster“, and click Next.

Monitore the progressing until completion. then click Next.

Click Finish.

Go back to Failover Cluster Manager console to view all the nodes and networks.

Enable SQL Server 2019 Always On Availability Groups Feature

Run the SQL Server Configuration Manager
Click SQL Server Services
Right click SQL Server(MSSQLNODE1INST1) -> Properties.
Click Always Availability Groups
Choose Enable Always On Availability Groups.
Click Apply.

Restart the service as requested.

Repeat the same configurations onto MSSQLNODE2INST1.

Create and Configure SQL Server Always On Availability Groups

Run SQL Server Management Studio
Connect to the SQL Server instance MSSQLNODE1INST1
Expand folder “Always On High Availability” in the Object Explorer
Highlight “Availability Groups

Right-click on the Availability Groups
Select the New Availability Group Wizard… option launching the New Availability Group Wizard.
Click Next


 Provide Availability group name, and click Next.

Select Database, and click Next.

Click Add Replicas, and provide required information.

For Endpoints, leave the default one, and click Backup Preferences.

Choose backup preferences to Primary, then click Listener tab.

Choose “Create an availability group listener“,and provide Listener DNS Name, Port and IP.
Click “Read-Only Routing“.

Leave all default ones, and click Next.

Select “Joint only“, and click Next. Since the backup has been restored onto secondary databases.

Click Next.

Click Finish.

Monitor the progressing until completion.

Check Primary side, and shows “Synchronized” status.

And Secondary side shows “Synchronizing” status because of using Asynchronous Commit.

Thanks for reading my post. If you have any questions about how to build SQL 2019 Always On High Availability Group, feel free to contact us.

Featured

Upgrade Oracle Database by Using AutoUpgrade Utility

Contents

Introduction

This post demonstrates how to upgrade 18c database to 19c by using Oracle upgrade utility tool – AutoUpgrade.

Environment :

Primary Database Host / Database : oemnode1 / OEMREP

Standby Database Host / Database:   stbnode1 / STBOEMREP

Install 19c software on both primary and secondary

Install 19c Oracle database software onto both primary and standby servers.

Apply the latest OPatch utility RU/RUR

Download and apply the latest OPatch utility, RU/RUR onto current 18c primary and standby databases, plus new 19c Oracle software home.

Download and run the latest PreUpgrade tool

1)  Download the latest PreUpgrade utility from Doc ID 884522.1.
2) Check version of current PreUpgrade :

[oracle@oemnode1 admin]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin

[oracle@oemnode1 admin]$ grep c_build preupgrade_package.sql |grep "CONSTANT NUMBER"
c_build CONSTANT NUMBER := 1; -- the unique build# of this package.

3) unzip “preupgrade_19_cbuild_6_lf.zip” into “/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/”

[oracle@oemnode1 19c]$ unzip ./preupgrade_19_cbuild_6_lf.zip -d /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/
Archive: ./preupgrade_19_cbuild_6_lf.zip
replace /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade_package.sql? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade_package.sql
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade_driver.sql
replace /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/dbms_registry_extended.sql? 
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/dbms_registry_extended.sql
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/parameters.properties
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade_messages.properties
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/components.properties
inflating: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar

4) Check new version of  PreUpgrade.

[oracle@oemnode1 admin]$ grep c_build preupgrade_package.sql |grep "CONSTANT NUMBER"
c_build CONSTANT NUMBER := 6; -- the unique build# of this package.

5) Run PreUpgrade utility.

[oracle@oemnode1 admin]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar FILE TEXT -c 'EMPDBREPOS'
==================
PREUPGRADE SUMMARY
==================
  /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/preupgrade.log
  /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/preupgrade_fixups.sql
  /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/postupgrade_fixups.sql

Execute fixup scripts across the entire CDB:

Before upgrade:

1. Execute preupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/ -b preup_OEMREP /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/preupgrade_fixups.sql

2. Review logs under /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/

After the upgrade:

1. Execute postupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/ -b postup_OEMREP /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/postupgrade_fixups.sql

2. Review logs under /u01/app/oracle/cfgtoollogs/OEMREP/preupgrade/

Preupgrade complete: 2020-05-28T16:46:52

6) After executing preupgrade fixups, rerun PreUpgrade again until you can fix all the mentioned issues.

Download and run the latest AutoUpgrade

Download the latest autoupgrade tool — “autoupgrade.jar” as per “AutoUpgrade Tool (Doc ID 2485457.1)”, and put “autoupgrade.jar” file under $ORACLE_HOME/rdbms/admin/.

Check AutoUpgrade tool version

[oracle@oemnode1 ~]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin
[oracle@oemnode1 admin]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@oemnode1 admin]$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -version
build.hash 04dd9f2
build.version 19.7.5
build.date 2020/02/11 15:28:49
build.max_target_version 19
build.type production

Configuration file for upgrading 18c to 19c

$ cat /home/oracle/autoupgrade/OEMREP_config.txt
global.autoupg_log_dir=/home/oracle/autoupgrade
upg1.source_home=/u01/app/oracle/product/18.0.0/dbhome_1
upg1.target_home=/u01/app/oracle/product/19.0.0/dbhome_1
upg1.sid=OEMREP
upg1.start_time=now
upg1.log_dir=/home/oracle/autoupgrade/OEMREP
upg1.pdbs=EMPDBREPOS
upg1.upgrade_node=localhost # Upgrade node that operation will run on (Required)
upg1.run_utlrp=yes          # yes(default) to run utlrp as part of upgrade, no to skip it (Optional) 
upg1.timezone_upg=yes       # yes(default) to upgrade timezone if needed, no to skip it (Optional) 
upg1.target_version=19.7    # Oracle Home Target version number (Required)

 AutoUpgrade Analyze Processing Mode

[oracle@oemnode1 admin]$ pwd
/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin

[oracle@oemnode1 admin]$ $ORACLE_HOME/jdk/bin/java        \
  -jar ./autoupgrade.jar                                   \
  -config /home/oracle/autoupgrade/OEMREP_config.txt -mode analyze

AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be analyzed
Type 'help' to list console commands
upg> Job 100 completed

------------------- Final Summary --------------------
Number of databases            [ 1 ]
Jobs finished successfully     [1]
Jobs failed                    [0]
Jobs pending                   [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 100 for OEMREP
[oracle@oemnode1 admin]$ ls -ltr /home/oracle/autoupgrade/OEMREP/OEMREP/100/prechecks/
total 516
-rwx------ 1 oracle oinstall 142299 May 29 17:52 prechecks_cdb_root.log
-rwx------ 1 oracle oinstall 126290 May 29 17:52 prechecks_pdb_seed.log
-rwx------ 1 oracle oinstall 130220 May 29 17:52 prechecks_empdbrepos.log
-rwx------ 1 oracle oinstall 21975 May 29 17:52 oemrep_checklist.xml
-rwx------ 1 oracle oinstall 23149 May 29 17:52 oemrep_checklist.json
-rwx------ 1 oracle oinstall 6263 May 29 17:52 oemrep_checklist.cfg
-rwx------ 1 oracle oinstall 22214 May 29 17:52 oemrep_preupgrade.log
-rwx------ 1 oracle oinstall 42901 May 29 17:52 oemrep_preupgrade.html
[oracle@oemnode1 admin]$

oemrep_checklist.cfg contains the prechecks which corresponding fixup will action on items to be fixed.

AutoUpgrade Fixup Processing Mode

It is recommended to take a backup, or create a GRP before running Autoupgrade in fixup mode. In Upgrade mode, there will be a GRP created automatically.

[oracle@oemnode1 admin]$ $ORACLE_HOME/jdk/bin/java
              -jar ./autoupgrade.jar 
              -config /home/oracle/autoupgrade/OEMREP_config.txt 
              -mode fixups
AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be processed
Type 'help' to list console commands
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
| 102| OEMREP|PRECHECKS|PREPARING|RUNNING|20/05/31 17:32|     N/A|17:32:45|Loading DB info|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1

upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [FIXUPS]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 102
    DB name: OEMREP
        SETUP             <1 min
        PRECHECKS         <1 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [37]
JVM used memory                       [71] MB
CPU in use                            [13%]
Processes in use                      [36]

upg> tasks
+---+--------------+-------------+
| ID|          NAME|         Job#|
+---+--------------+-------------+
|  1|          main|      WAITING|
| 34|      jobs_mon|      WAITING|
| 35|       console|     RUNNABLE|
| 36|  queue_reader|      WAITING|
| 37|         cmd-0|      WAITING|
| 53| job_manager-0|      WAITING|
| 55|    event_loop|TIMED_WAITING|
| 56|    bqueue-102|      WAITING|
|224|    checks-102|      WAITING|
|225|rep_checks-102|TIMED_WAITING|
|227| oemrep-puic-0|      WAITING|
|228| oemrep-puic-1|      WAITING|
|229| oemrep-puic-2|      WAITING|
|230| oemrep-puic-3|      WAITING|
|231| oemrep-puic-4|      WAITING|
|232| oemrep-puic-5|      WAITING|
|233| oemrep-puic-6|      WAITING|
|234| oemrep-puic-7|      WAITING|
|321|      quickSQL|     RUNNABLE|
|337|      quickSQL|     RUNNABLE|
|341|      quickSQL|     RUNNABLE|
|350|      quickSQL|     RUNNABLE|
|351|      quickSQL|     RUNNABLE|
|352|      quickSQL|     RUNNABLE|
|353|      quickSQL|     RUNNABLE|
|354|      quickSQL|     RUNNABLE|
+---+--------------+-------------+

upg> lsj
+----+-------+---------+---------+--------+--------------+--------+--------+-------+
|Job#|DB_NAME|    STAGE|OPERATION|  STATUS|    START_TIME|END_TIME| UPDATED|MESSAGE|
+----+-------+---------+---------+--------+--------------+--------+--------+-------+
| 102| OEMREP|PREFIXUPS|PREPARING|FINISHED|20/05/31 17:32|     N/A|17:33:01|       |
+----+-------+---------+---------+--------+--------------+--------+--------+-------+
Total jobs 1

upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [FIXUPS]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 102
    DB name: OEMREP
        SETUP             <1 min
        PRECHECKS         <1 min
        PREFIXUPS         <1 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [39]
JVM used memory                       [144] MB
CPU in use                            [13%]
Processes in use                      [26]

upg> tasks
+---+--------------+-------------+
| ID|          NAME|         Job#|
+---+--------------+-------------+
|  1|          main|      WAITING|
| 34|      jobs_mon|      WAITING|
| 35|       console|     RUNNABLE|
| 36|  queue_reader|      WAITING|
| 37|         cmd-0|      WAITING|
| 53| job_manager-0|      WAITING|
| 55|    event_loop|TIMED_WAITING|
| 56|    bqueue-102|      WAITING|
|435|    fixups-102|      WAITING|
|436|rep_checks-102|TIMED_WAITING|
|438|oemrep-puifx-0|      WAITING|
|439|oemrep-puifx-1|      WAITING|
|440|oemrep-puifx-2|      WAITING|
|441|oemrep-puifx-3|      WAITING|
|443|      quickSQL|     RUNNABLE|
+---+--------------+-------------+
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|      MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
| 102| OEMREP|PREFIXUPS|EXECUTING|RUNNING|20/05/31 17:32|     N/A|17:33:14|Remaining 7/9|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
Total jobs 1
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|      MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
| 102| OEMREP|PREFIXUPS|EXECUTING|RUNNING|20/05/31 17:32|     N/A|17:33:14|Remaining 7/9|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------+
Total jobs 1
upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [FIXUPS]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 102
    DB name: OEMREP
        SETUP             <1 min
        PRECHECKS         <1 min
        PREFIXUPS         <1 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [39]
JVM used memory                       [145] MB
CPU in use                            [13%]
Processes in use                      [26]

upg> tasks
+---+--------------+-------------+
| ID|          NAME|         Job#|
+---+--------------+-------------+
|  1|          main|      WAITING|
| 34|      jobs_mon|      WAITING|
| 35|       console|     RUNNABLE|
| 36|  queue_reader|      WAITING|
| 37|         cmd-0|      WAITING|
| 53| job_manager-0|      WAITING|
| 55|    event_loop|TIMED_WAITING|
| 56|    bqueue-102|      WAITING|
|435|    fixups-102|      WAITING|
|436|rep_checks-102|TIMED_WAITING|
|438|oemrep-puifx-0|      WAITING|
|439|oemrep-puifx-1|      WAITING|
|440|oemrep-puifx-2|      WAITING|
|441|oemrep-puifx-3|      WAITING|
|444|     exec_loop|      WAITING|
|446|      quickSQL|     RUNNABLE|
+---+--------------+-------------+
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
| 102| OEMREP|PREFIXUPS|EXECUTING|RUNNING|20/05/31 17:32|     N/A|17:35:02|Loading DB info|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1
upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [FIXUPS]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 102
    DB name: OEMREP
        SETUP             <1 min
        PRECHECKS         <1 min
        PREFIXUPS         2 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [39]
JVM used memory                       [27] MB
CPU in use                            [13%]
Processes in use                      [35]

upg> Job 102 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished successfully     [1]
Jobs failed                    [0]
Jobs pending                   [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 102 for OEMREP

 Before AutoUpgrade Deploy Mode

1) Disable Dada Guard broker, and defer log shipping from the Primary. In case upgrading failure, then fail-over to standby database as primary database.

SQL> alter system set dg_broker_start=false;
SQL> alter system set log_archive_dest_state_2=defer;

System altered.

SQL> show parameter log_archive_dest_state_2;

NAME                      TYPE     VALUE
------------------------- -------  -------
log_archive_dest_state_2  string   DEFER

2)Shutdown Standby Database.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL>

AutoUpgrade Deploy Mode

[oracle@oemnode1 admin]$ $ORACLE_HOME/jdk/bin/java 
             -jar ./autoupgrade.jar
             -config /home/oracle/autoupgrade/OEMREP_config.txt 
             -mode deploy
AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be processed
Type 'help' to list console commands
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
| 103| OEMREP|PRECHECKS|PREPARING|RUNNING|20/05/31 18:39| N/A|18:39:16|Loading DB info|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1
upg> lsj
+----+-------+-----+---------+-------+--------------+--------+--------+-------+
|Job#|DB_NAME|STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED|MESSAGE|
+----+-------+-----+---------+-------+--------------+--------+--------+-------+
| 103| OEMREP| GRP|EXECUTING|RUNNING|20/05/31 18:39| N/A|18:39:29| |
+----+-------+-----+---------+-------+--------------+--------+--------+-------+
Total jobs 1
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
| 103| OEMREP|PREFIXUPS|EXECUTING|RUNNING|20/05/31 18:39| N/A|18:39:51|Loading DB info|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1
upg> status
---------------- Config -------------------
User configuration file [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [DEPLOY]
DB upg fatal errors ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time [1440] minutes
DB restore abort time [120] minutes
DB GRP abort time [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed [0]
Total CDB being processed [1]
Jobs finished successfully [0]
Jobs finished/aborted [0]
Jobs in progress [1]
Jobs stage summary
Job ID: 103
DB name: OEMREP
SETUP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
GRP <1 min
PREFIXUPS <1 min (IN PROGRESS)
------------ Resources ----------------
Threads in use [40]
JVM used memory [99] MB
CPU in use [13%]
Processes in use [25]

upg>
-------------------------------------------------
Errors in database [OEMREP]
Stage [PREFIXUPS]
Operation [STOPPED]
Status [ERROR]
Info [
Error: UPG-1312
[Unexpected Exception Error]
Cause: One of the checks present in the database has an ERROR 
       severity but its fixup is not available. 
       This will require a manual fix to the database.
For further details, see the log file located at /home/oracle/
  autoupgrade/OEMREP/OEMREP/103/autoupgrade_20200531_user.log]

-------------------------------------------------
Logs: [/home/oracle/autoupgrade/OEMREP/OEMREP/103/
      autoupgrade_20200531_user.log]
-------------------------------------------------

Fix the issue raised in the logfile:

2020-05-31 18:40:00.505 ERROR The following checks have ERROR 
     severity and no fixup is available or the fixup failed to 
     resolve the issue. Please fix them manually before continuing:
OEMREP MIN_RECOVERY_AREA_SIZE
2020-05-31 18:40:00.571 INFO Starting error management routine
SQL> alter system set db_recovery_file_dest_size=15g;

System altered.

Resume the deploy job again

upg> resume -job 103
Resuming job: [103][OEMREP]
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
| 103| OEMREP|PREFIXUPS|EXECUTING|RUNNING|20/05/31 18:39|     N/A|19:16:26|Loading DB info|
+----+-------+---------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1

upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [DEPLOY]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 103
    DB name: OEMREP
        SETUP             <1 min
        PREUPGRADE        <1 min
        PRECHECKS         <1 min
        GRP               <1 min
        PREFIXUPS         <1 min
        DRAIN             <1 min
        DBUPGRADE         <1 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [40]
JVM used memory                       [146] MB
CPU in use                            [13%]
Processes in use                      [16]

upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|            MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
| 103| OEMREP|DBUPGRADE|EXECUTING|RUNNING|20/05/31 18:39|     N/A|19:17:54|0%Upgraded CDB$ROOT|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|            MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
| 103| OEMREP|DBUPGRADE|EXECUTING|RUNNING|20/05/31 18:39|     N/A|19:52:20|0%Upgraded PDB$SEED|
+----+-------+---------+---------+-------+--------------+--------+--------+-------------------+
Total jobs 1

upg> lsj
+----+-------+----------+---------+-------+--------------+--------+--------+---------------+
|Job#|DB_NAME|     STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|        MESSAGE|
+----+-------+----------+---------+-------+--------------+--------+--------+---------------+
| 103| OEMREP|POSTCHECKS|PREPARING|RUNNING|20/05/31 18:39|     N/A|20:24:23|Loading DB info|
+----+-------+----------+---------+-------+--------------+--------+--------+---------------+
Total jobs 1

upg> lsj
+----+-------+----------+---------+-------+--------------+--------+--------+--------------+
|Job#|DB_NAME|     STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|       MESSAGE|
+----+-------+----------+---------+-------+--------------+--------+--------+--------------+
| 103| OEMREP|POSTFIXUPS|EXECUTING|RUNNING|20/05/31 18:39|     N/A|21:20:24|Remaining 9/10|
+----+-------+----------+---------+-------+--------------+--------+--------+--------------+
Total jobs 1


upg> status
---------------- Config -------------------
User configuration file    [/home/oracle/autoupgrade/OEMREP_config.txt]
General logs location      [/home/oracle/autoupgrade/cfgtoollogs/upgrade/auto]
Mode                       [DEPLOY]
DB upg fatal errors        ORA-00600,ORA-07445
DB Post upgrade abort time [60] minutes
DB upg abort time          [1440] minutes
DB restore abort time      [120] minutes
DB GRP abort time          [3] minutes
------------------------ Jobs ------------------------
Total databases in configuration file [1]
Total Non-CDB being processed         [0]
Total CDB being processed             [1]
Jobs finished successfully            [0]
Jobs finished/aborted                 [0]
Jobs in progress                      [1]
Jobs stage summary
    Job ID: 103
    DB name: OEMREP
        SETUP             <1 min
        PREUPGRADE        <1 min
        PRECHECKS         <1 min
        GRP               <1 min
        PREFIXUPS         <1 min
        DRAIN             <1 min
        DBUPGRADE         67 min
        POSTCHECKS        55 min
        POSTFIXUPS        6 min (IN PROGRESS)
------------ Resources ----------------
Threads in use                        [41]
JVM used memory                       [89] MB
CPU in use                            [13%]
Processes in use                      [22]

upg> lsj
+----+-------+-----------+---------+-------+--------------+--------+--------+--------------------+
|Job#|DB_NAME|      STAGE|OPERATION| STATUS|    START_TIME|END_TIME| UPDATED|             MESSAGE|
+----+-------+-----------+---------+-------+--------------+--------+--------+--------------------+
| 103| OEMREP|POSTUPGRADE|EXECUTING|RUNNING|20/05/31 18:39|     N/A|21:26:56|Creating final SPFIL|
+----+-------+-----------+---------+-------+--------------+--------+--------+--------------------+
Total jobs 1
upg> Job 103 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished successfully     [1]
Jobs failed                    [0]
Jobs pending                   [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 103 for OEMREP

---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from OEMREP: drop restore point AUTOUPGRADE_221145114461854_OEMREP

oratab file has been updated automatically.

[oracle@oemnode1 admin]$ cat /etc/oratab

OEMREP:/u01/app/oracle/product/19.0.0/dbhome_1:Y

Note the various upgrade directories and log files for each stage.

[oracle@oemnode1 admin]$ ls -ltr /home/oracle/autoupgrade/OEMREP/OEMREP/103/
total 2076
drwx------ 2 oracle oinstall 27 May 31 18:39 preupgrade
drwx------ 2 oracle oinstall 4096 May 31 18:39 prechecks
-rwx------ 1 oracle oinstall 5644 May 31 18:40 autoupgrade_err.log
drwx------ 2 oracle oinstall 4096 May 31 19:16 prefixups
drwx------ 2 oracle oinstall 29 May 31 19:17 drain
drwx------ 2 oracle oinstall 4096 May 31 20:23 dbupgrade
drwx------ 2 oracle oinstall 4096 May 31 21:20 postchecks
drwx------ 2 oracle oinstall 4096 May 31 21:26 postfixups
drwx------ 2 oracle oinstall 28 May 31 21:27 postupgrade
-rwx------ 1 oracle oinstall 25860 May 31 21:27 autoupgrade_20200531_user.log
-rwx------ 1 oracle oinstall 2068389 May 31 21:27 autoupgrade_20200531.log
[oracle@oemnode1 admin]$

View the Upgrade Summary report

[oracle@oemnode1 admin]$ cat /home/oracle/autoupgrade/OEMREP/OEMREP/103/dbupgrade/upg_summary.log

Oracle Database Release 19 Post-Upgrade Status Tool    05-31-2020 19:46:0
Container Database: OEMREP
[CON_ID: 1 => CDB$ROOT]

Component                          Current   Full     Elapsed Time
Name                               Status    Version  HH:MM:SS

Oracle Server                     UPGRADED   19.7.0.0.0  00:10:25
JServer JAVA Virtual Machine      VALID      19.7.0.0.0  00:01:15
Oracle XDK                        UPGRADED   19.7.0.0.0  00:00:35
Oracle Database Java Packages     UPGRADED   19.7.0.0.0  00:00:04
OLAP Analytic Workspace           UPGRADED   19.7.0.0.0  00:00:19
Oracle Label Security             UPGRADED   19.7.0.0.0  00:00:07
Oracle Database Vault             UPGRADED   19.7.0.0.0  00:00:19
Oracle Text                       UPGRADED   19.7.0.0.0  00:00:16
Oracle Workspace Manager          UPGRADED   19.7.0.0.0  00:00:21
Oracle Real Application Clusters  UPGRADED   19.7.0.0.0  00:00:00
Oracle XML Database               UPGRADED   19.7.0.0.0  00:01:49
Oracle Multimedia                 UPGRADED   19.7.0.0.0  00:00:40
Spatial                           LOADING    19.7.0.0.0  00:03:49
Oracle OLAP API                   INVALID    19.7.0.0.0  00:00:05
Datapatch                                                00:04:26
Final Actions                                            00:04:41
Post Upgrade                                             00:00:06

Total Upgrade Time: 00:26:22 [CON_ID: 1 => CDB$ROOT]

Database time zone version is 31. It is older than current release time
zone version 32. Time zone upgrade is needed using the DBMS_DST package.


Oracle Database Release 19 Post-Upgrade Status Tool
 05-31-2020 20:16:5
Container Database: OEMREP
[CON_ID: 3 => EMPDBREPOS]

Component                  Current   Full       Elapsed Time
Name                       Status    Version    HH:MM:SS

Oracle Server               UPGRADED   19.7.0.0.0  00:10:23
JServer JAVA Virtual Machine   VALID   19.7.0.0.0  00:00:30
Oracle XDK                  UPGRADED   19.7.0.0.0  00:00:41
Oracle Database Java PackagesUPGRADED   19.7.0.0.0 00:00:03
OLAP Analytic Workspace      UPGRADED   19.7.0.0.0 00:00:20
Oracle Label Security        UPGRADED   19.7.0.0.0 00:00:01
Oracle Database Vault        UPGRADED   19.7.0.0.0 00:00:34
Oracle Text                  UPGRADED   19.7.0.0.0 00:00:04
Oracle Workspace Manager     UPGRADED   19.7.0.0.0 00:00:20
Oracle Real Application ClustersUPGRADED19.7.0.0.0 00:00:00
Oracle XML Database          UPGRADED   19.7.0.0.0 00:01:38
Oracle Multimedia            UPGRADED   19.7.0.0.0 00:00:30
Spatial                       LOADING   19.7.0.0.0 00:03:20
Oracle OLAP API                 VALID   19.7.0.0.0 00:00:04
Datapatch                                          00:03:25
Final Actions                                      00:03:40
Post Upgrade                                       00:00:09

Total Upgrade Time: 00:23:28 [CON_ID: 3 => EMPDBREPOS]

Database time zone version is 31. It is older than current release time
zone version 32. Time zone upgrade is needed using the DBMS_DST package.


Oracle Database Release 19 Post-Upgrade Status Tool    05-31-2020 20:20:1
Container Database: OEMREP
[CON_ID: 2 => PDB$SEED]

Component                        Current  Full     Elapsed Time
Name                             Status   Version  HH:MM:SS

Oracle Server                     VALID  19.7.0.0.0 00:10:12
JServer JAVA Virtual Machine      VALID  19.7.0.0.0 00:00:33
Oracle XDK                        VALID  19.7.0.0.0 00:00:24
Oracle Database Java Packages     VALID  19.7.0.0.0 00:00:03
OLAP Analytic Workspace           VALID  19.7.0.0.0 00:00:21
Oracle Label Security             VALID  19.7.0.0.0 00:00:01
Oracle Database Vault             VALID  19.7.0.0.0 00:00:42
Oracle Text                       VALID  19.7.0.0.0 00:00:04
Oracle Workspace Manager          VALID  19.7.0.0.0 00:00:10
Oracle Real Application Clusters OPTION OFF  19.7.0.0.0 00:00:00
Oracle XML Database               VALID  19.7.0.0.0 00:01:47
Oracle Multimedia                 VALID  19.7.0.0.0 00:00:29
Spatial                           VALID  19.7.0.0.0 00:03:12
Oracle OLAP API                   VALID  19.7.0.0.0 00:00:04
Datapatch                                           00:03:28
Final Actions                                       00:03:44
Post Upgrade                                        00:00:24
Post Compile                                        00:03:23

Total Upgrade Time: 00:26:40 [CON_ID: 2 => PDB$SEED * ]
Asterisks denotes compilation time has been included during the upgrade process.

Database time zone version is 31. It is older than current release time
zone version 32. Time zone upgrade is needed using the DBMS_DST package.


Upgrade Times Sorted In Descending Order

Total Upgrade Time: 00:26:40 [CON_ID: 2 => PDB$SEED * ]
Total Upgrade Time: 00:26:22 [CON_ID: 1 => CDB$ROOT]
Total Upgrade Time: 00:23:28 [CON_ID: 3 => EMPDBREPOS]
Grand Total Upgrade Time:    [0d:1h:6m:12s]
[oracle@oemnode1 admin]$

 After Completing AutoUpgrade

  • Stop the old listener, AutoUpgrade has copied over the listener.ora and tnsnames.ora files from old Oracle Home. Just start the listener in new Oracle Home.
  • dg_broker_config_file1(2) has been configured in the new Oracle Home, so we just need enable data guard broker.
SQL> show parameter dg_broker_config_file  
NAME                    TYPE          VALUE 
----------------------- ------------- ------------------------------
 dg_broker_config_file1  string /u01/app/oracle/product/19.0.0/dbhome_1/dbs/dr1OEMREP.dat dg_broker_config_file2   string /u01/app/oracle/product/19.0.0/dbhome_1/dbs/dr2OEMREP.dat 

SQL> show parameter dg_broker_start 
NAME            TYPE         VALUE
--------------  ------------ --------- 
dg_broker_start  boolean     FALSE 

SQL> alter system set dg_broker_start=true; 
System altered.
  • On standby side.
    a) Manually copy the listener.ora and tnsnames.ora files from old Oracle Home to new        Oracle Home, then start the listener in new Oracle Home.

    b) Manually modify /etc/oratab.  
    STBOEMREP:/u01/app/oracle/product/19.0.0/dbhome_1:Y

    c) Manually copy  all files under old $ORCALE_HOME/dbs into new $ORACLE_HOME/dbs, and then startup mount database.

  • Recreate DataGuard Broker Configuration.

Enable log shipping.

SQL> alter system set log_archive_dest_state_2=enable;

System altered.

We can see  deferred archive logs are shipped and applied onto standby databases smoothly.

2020-05-31T22:46:07.206437+10:00
(2):Resize operation completed for file# 4, old size 447488K, new size 457728K
2020-05-31T22:46:13.809455+10:00
MRP0 (PID:31973): Media Recovery Log /u01/app/oracle/fra/STBOEMREP/archivelog/2020_05_31/o1_mf_1_116_hf79jml0_.arc
2020-05-31T22:46:21.093404+10:00
MRP0 (PID:31973): Media Recovery Log /u01/app/oracle/fra/STBOEMREP/archivelog/2020_05_31/o1_mf_1_117_hf79k4rz_.arc
2020-05-31T22:46:27.150922+10:00
MRP0 (PID:31973): Media Recovery Log /u01/app/oracle/fra/STBOEMREP/archivelog/2020_05_31/o1_mf_1_118_hf79k4sf_.arc
2020-05-31T22:46:32.828307+10:00
MRP0 (PID:31973): Media Recovery Log /u01/app/oracle/fra/STBOEMREP/archivelog/2020_05_31/o1_mf_1_119_hf79k4vm_.arc
2020-05-31T22:46:38.706191+10:00
MRP0 (PID:31973): Media Recovery Log /u01/app/oracle/fra/STBOEMREP/archivelog/2020_05_31/o1_mf_1_120_hf79kpdl_.arc

Final Checks

DGMGRL> show configuration;

Configuration - dg_oemrep

  Protection Mode: MaxPerformance
  Members:
  oemrep    - Primary database
    stboemrep - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 49 seconds ago)

DGMGRL> show database stboemrep

Database - stboemrep

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 30.00 KByte/s
  Real Time Query:    OFF
  Instance(s):
    STBOEMREP

Database Status:
SUCCESS
[oracle@oemnode1 dbs]$ $ORACLE_HOME/OPatch/opatch lspatches

30894985;OCW RELEASE UPDATE 19.7.0.0.0 (30894985)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)

OPatch succeeded.
SQL> set pagesize 200
SQL> set linesize 300
SQL>  select CON_ID,
        TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time,
        PATCH_ID,
        PATCH_TYPE,
        ACTION,
        DESCRIPTION,
        SOURCE_VERSION,
        TARGET_VERSION
   from CDB_REGISTRY_SQLPATCH
  order by CON_ID, action_time, patch_id;  

    CON_ID ACTION_TIM   PATCH_ID PATCH_TYPE ACTION   DESCRIPTION                                           SOURCE_VERSION  TARGET_VERSION
---------- ---------- ---------- ---------- -------- ----------------------------------------------------- --------------- ---------------
         1 2020-05-31   30805684 INTERIM    APPLY    OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)       19.1.0.0.0      19.1.0.0.0
         1 2020-05-31   30869156 RU         APPLY    Database Release Update : 19.7.0.0.200414 (30869156)  19.1.0.0.0      19.7.0.0.0
         3 2020-05-31   30805684 INTERIM    APPLY    OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)       19.1.0.0.0      19.1.0.0.0
         3 2020-05-31   30869156 RU         APPLY    Database Release Update : 19.7.0.0.200414 (30869156)  19.1.0.0.0      19.7.0.0.0
 SQL> select comp_name, status,version,VERSION_FULL 
        from dba_registry

COMP_NAME                         STATUS     VERSION   VERSION_FULL
--------------------------------- ---------  --------- ------------
Oracle Database Catalog Views     VALID      19.0.0.0.0 19.7.0.0.0
Oracle Database Packages and TypesVALID      19.0.0.0.0 19.7.0.0.0
Oracle Real Application Clusters  OPTION OFF 19.0.0.0.0 19.7.0.0.0
JServer JAVA Virtual Machine      VALID      19.0.0.0.0 19.7.0.0.0
Oracle XDK                        VALID      19.0.0.0.0 19.7.0.0.0
Oracle Database Java Packages     VALID      19.0.0.0.0 19.7.0.0.0
OLAP Analytic Workspace           VALID      19.0.0.0.0 19.7.0.0.0
Oracle XML Database               VALID      19.0.0.0.0 19.7.0.0.0
Oracle Workspace Manager          VALID      19.0.0.0.0 19.7.0.0.0
Oracle Text                       VALID      19.0.0.0.0 19.7.0.0.0
Oracle Multimedia                 VALID      19.0.0.0.0 19.7.0.0.0
Spatial                           VALID      19.0.0.0.0 19.7.0.0.0
Oracle OLAP API                   VALID      19.0.0.0.0 19.7.0.0.0
Oracle Label Security             VALID      19.0.0.0.0 19.7.0.0.0
Oracle Database Vault             VALID      19.0.0.0.0 19.7.0.0.0

15 rows selected.
SQL> show con_name;

CON_NAME
----------------
EMPDBREPOS

SQL> select count(*) from dba_objects where status!='VALID';

  COUNT(*)
----------
         0

SQL> connect / as sysdba
Connected.
SQL>  select count(*) from dba_objects where status!='VALID';

  COUNT(*)
----------
         0

Check TimeZone version has been upgraded to version 32 from version 31 in 18c.

SQL> SELECT * FROM v$timezone_file;

FILENAME             VERSION     CON_ID
-------------------- ------- ----------
timezlrg_32.dat           32          0


SQL> SELECT tz_version FROM registry$database;

TZ_VERSION
----------
        32

SQL> SELECT property_name, property_value
     FROM   database_properties
     WHERE  property_name LIKE 'DST_%'
  ORDER BY property_name

PROPERTY_NAME                  PROPERTY_VALUE
------------------------------ --------------------
DST_PRIMARY_TT_VERSION         32
DST_SECONDARY_TT_VERSION       0
DST_UPGRADE_STATE              NONE

SQL> SELECT DBMS_DST.get_latest_timezone_version  from dual;

GET_LATEST_TIMEZONE_VERSION
---------------------------
                         32

Drop GRP ( Guarantee Restore Point )

SQL> select name from v$restore_point;

NAME
--------------------------------------------
AUTOUPGRADE_221145114461854_OEMREP

SQL> drop restore point AUTOUPGRADE_221145114461854_OEMREP;

Restore point dropped.
Featured

Step by Step Installing Oracle Enterprise Manager 13cR3( 13.3.0.0 ) Cloud Control

CONTENTS

Introduction

This exercise is to demonstrate the installation of Oracle Enterprise Manager Cloud Control 13c Release 3 (13.3.0.0) on Oracle Linux  7 (x86_64).

For detailed Oracle official instantiation guide, please refer to  Oracle documentation.

Package Requirements for Oracle Management Service

Package Requirements for Oracle Management ServicE

Platform32-Bit Packages for 32-Bit Platform64-Bit Packages for 64-Bit Platform
Oracle Linux 7.x
Red Hat Enterprise Linux 7.x
Not Supportedmake-3.82-21
binutils-2.23
gcc-4.8.2-16
libaio-0.3.109-12
glibc-common-2.17-55
libstdc++-4.8.2-16
sysstat-10.1.5-4
glibc-devel 2.17-55 (x86_64) (This is a 64-bit package)
libXtst-1.2.2-2 (x86_64)
Package Requirements for OMS

Package Requirements for Oracle Management Agent

Platform32-Bit Packages for 32-Bit Platform64-Bit Packages for 64-Bit Platform
Oracle Linux 7.x Red Hat Enterprise Linux 7Default Packages Are Sufficientmake-3.82-21
binutils-2.23
gcc-4.8.2-16
libaio-0.3.109-12
glibc-common-2.17-55
libstdc++-4.8.2-16
sysstat-10.1.5-4
Package Requirements for Oracle Management Agent

Create an OEM Database Instance

Create an OEM databse instance with Pre-configured Repository Using Database Templates

Download “18.1.0.0.0 DB Template with CDB PDB for EM 13.3.0.0 on Linux x86-64” from https://www.oracle.com/enterprise-manager/downloads/db-templates-13c-release3-downloads.html

Extract “18.1.0.0.0 DB Template with CDB PDB for EM 13.3.0.0 on Linux x86-64” to the following location on the database host.

$ $ORACLE_HOME/assistants/dbca/templates

Create OEM repository database in either way below :

Run $ORACLE_HOME/bin/dbca GUI, and select the template

“18_1_0_0_0_Database_Template_with_cdbpdb_for_EM13_3_0_0_0_Small_deployment.dbc”.

SQL> select name, open_mode from v$pdbs;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
EMPDBREPOS                     READ WRITE

SQL>

Please refer to DBCA Screen Shots

OR

Run dbca to create the OEM repository database in silent mode

Drop old OEM database if still exists
[oracle@oemnode1 templates]$ dbca -silent -deleteDatabase -sourceDB OEMREP -sysDBAUserName sys -sysDBAPassword Password123
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. 
All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/OEMREP/OEMREP.log" for further details.
Create OEM repository database by using dbca in silent mode
[oracle@oemnode1 templates]$ dbca -silent -createDatabase \
> -templateName 18_1_0_0_0_Database_Template_with_cdbpdb_for_EM13_3_0_0_0_Small_deployment.dbc \
> -gdbname OEMREP -sid OEMREP -responseFile NO_VALUE \
> -characterSet AL32UTF8 \
> -sysPassword Password123 \
> -systemPassword Password123 \
> -createAsContainerDatabase true \
> -pdbAdminPassword Password123 \
> -automaticMemoryManagement false \
> -storageType FS \
> -datafileDestination "/u01/app/oracle/oradata/" \
> -emConfiguration NONE \
> -ignorePreReqs
Prepare for db operation
9% complete
Copying database files
36% complete
Creating and starting Oracle instance
37% complete
38% complete
42% complete
46% complete
49% complete
55% complete
Completing Database Creation
60% complete
63% complete
64% complete
Executing Post Configuration Actions
91% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/OEMREP.
Database Information:
Global Database Name:OEMREP
System Identifier(SID):OEMREP
Look at the log file "/opt/oracle/cfgtoollogs/dbca/OEMREP/OEMREP3.log" for further details.
[oracle@oemnode1 templates]$
Check the CDB/PDB and SYSMAN are created

Please note PDB name is “EMPDBREPOS”, which is default and unchangeable at the moment.

SQL> set pagesize 120
SQL> set linesize 300
SQL> select name, open_mode from v$pdbs;

NAME                      OPEN_MODE
------------------------- ----------
PDB$SEED                  READ ONLY
EMPDBREPOS                READ WRITE
SQL> alter session set container=EMPDBREPOS;

Session altered.

SQL> select owner, status, count(*) 
       from dba_objects 
      where owner like 'SYSMAN%' 
      group by  owner, status;


OWNER                     STATUS    COUNT(*)
------------------------- ------- ----------
SYSMAN_MDS                VALID           66
SYSMAN_TYPES              VALID          163
SYSMAN_STB                VALID            9
SYSMAN                    VALID        19948
SYSMAN_RO                 VALID         3194
SYSMAN_OPSS               VALID          680
SYSMAN_BIPLATFORM         VALID         1514

7 rows selected.
Check and confirm parameters

This sql “shpool_18_1_0_0_0_Database_SQL_for_EM13_3_0_0_0.sql” should have been run when creating OEM repository database:

[oracle@oemnode1 templates]$ cat shpool_18_1_0_0_0_Database_SQL_for_EM13_3_0_0_0.sql alter system set shared_pool_size='600000000'; alter system set db_securefile=PERMITTED sid='*'; alter system set "_allow_insert_with_update_check"=TRUE scope=both sid='*';
SQL>  show parameter shared_pool_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------
shared_pool_size                     big integer 576M

SQL>  show parameter db_securefile

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----------------
db_securefile                        string      PERMITTED

SQL> show parameter allow_insert_with

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------
_allow_insert_with_update_check      boolean     TRUE

Installing an Enterprise Manager System for a Production Site (Advanced Configuration)

[oracle@oemnode1 13.3.0.0.0]$ ./em13300_linux64.bin -J-Djava.io.tmpdir=/media/sf_software/TMP/
0%...........................................................................100%
Launcher log file is /media/sf_software/TMP/OraInstall2020-03-26_11-45-42PM/launcher2020-03-26_11-45-42PM.log.
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz.   Actual 3000.002 MHz    Passed
Checking monitor: must be configured to display at least 256 colors.   Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 8191 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Preparing to launch the Oracle Universal Installer from /media/sf_software/TMP/OraInstall2020-03-26_11-45-42PM
...
..
.
My Oracle Support Details
My Oracle Support Details
My Oracle Support Details
My Oracle Support Details
Software Updates
Software Updates
Prerequisite Checks
Prerequisite Checks

Fix the Warning items and click Next>

Prerequisite Checks Warnings
Prerequisite Checks Warnings
Install Types : Advanced
Install Types : Advanced
Installation Details
Installation Details
Select Plug-ins
Select Plug-ins
Weblogic Server Configuration Details
Weblogic Server Configuration Details
Database Connection Details
Database Connection Details
Database Connection Details
Database Connection Details
SQL> alter system set sga_target=3g scope=spfile;

System altered.

SQL> alter system set shared_pool_size=600m ;

System altered.

SQL> shutdown immediate;

SQL>startup;
Database Connection Details
Database Connection Details

Disable the Password Verification as per Disable Oracle Password Verification and Complexity Function

Enterprise Manager Configuration Details
Enterprise Manager Configuration Details
Enterprise Manager Shared Location Details
Enterprise Manager Shared Location Details
Port Configuration Details
Port Configuration Details
Review
Review
Installation Progressing
Installation Progressing

Run root scripts “allroot.sh” as per the pop up screen required.

[root@oemnode1 Middleware]# pwd
/u01/app/oracle/Product/Middleware
[root@oemnode1 Middleware]# /u01/app/oracle/Product/Middleware/allroot.sh

Starting to execute allroot.sh .........

Starting to execute /u01/app/oracle/Product/Middleware/root.sh ......
/etc exist

Creating /etc/oragchomelist file...
/u01/app/oracle/Product/Middleware
Finished product-specific root actions.
/etc exist
Finished execution of /u01/app/oracle/Product/Middleware/root.sh ......


Starting to execute /u01/app/oracle/Product/Agent/agent_13.3.0.0.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of /u01/app/oracle/Product/Agent/agent_13.3.0.0.0/root.sh ......
OEM Installation Finish
OEM Installation Finish

Installation Screen Log

The installation screen log. OEM13cR3 Installation Screen Log

Access Enterprise Manager Cloud Control 13c

URL :            https://oemnode1:7803/em
username:  sysman
Password:   you specified during your installation

Capture
Capture

Check OMS and Local Agent Status

Local Agent Status

[oracle@oemnode1 scripts]$ . oraenv
ORACLE_SID = [OEMREP] ? AGENT

[oracle@oemnode1 scripts]$ emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.3.0.0.0
OMS Version : 13.3.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/Product/Agent/agent_inst
Agent Log Directory : /u01/app/oracle/Product/Agent/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/Product/Agent/agent_13.3.0.0.0
Core JAR Location : /u01/app/oracle/Product/Agent/agent_13.3.0.0.0/jlib
Agent Process ID : 6463
Parent Process ID : 6403
Agent URL : https://oemnode1:3872/emd/main/
Local Agent URL in NAT : https://oemnode1:3872/emd/main/
Repository URL : https://oemnode1:4903/empbs/upload
Started at : 2020-03-27 23:43:12
Started by user : oracle
Operating System : Linux version 4.14.35-1902.10.7.el7uek.x86_64 (amd64)
Number of Targets : 33
Last Reload : (none)
Last successful upload : 2020-03-28 00:14:07
Last attempted upload : 2020-03-28 00:14:07
Total Megabytes of XML files uploaded so far : 1.72
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 13.15%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2020-03-28 00:13:52
Last successful heartbeat to OMS : 2020-03-28 00:13:52
Next scheduled heartbeat to OMS : 2020-03-28 00:14:52

Agent is Running and Ready

OMS & BI Publisher status

[oracle@oemnode1 ~]$ . oraenv
ORACLE_SID = [OMS] ? OMS

[oracle@oemnode1 ~]$ emctl status oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
BI Publisher Server is Up

[oracle@oemnode1 ~]$ emctl status oms -details
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : oemnode1
HTTP Console Port : 7788
HTTPS Console Port : 7803
HTTP Upload Port : 4889
HTTPS Upload Port : 4903
EM Instance Home : /u01/app/oracle/Product/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/Product/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://oemnode1:7803/em
Upload URL: https://oemnode1:4903/empbs/upload

WLS Domain Information
Domain Name : GCDomain
Admin Server Host : oemnode1
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: oemnode1
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Up

BI Publisher HTTP Managed Server Port : 9701
BI Publisher HTTPS Managed Server Port : 9803
BI Publisher HTTP OHS Port : 9788
BI Publisher HTTPS OHS Port : 9851
BI Publisher is locked.
BI Publisher Server named 'BIP' running at URL: https://oemnode1:9851/xmlpserver/servlet/home
BI Publisher Server Logs: /u01/app/oracle/Product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/
BI Publisher Log : /u01/app/oracle/Product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/bipublisher/bipublisher.log
[oracle@oemnode1 ~]$

Most Used Commands for OMS and Agent

Stop only OMS & JVMD Engine

[oracle@oemnode1 ~]$ emctl stop oms
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down

[oracle@oemnode1 ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Down
JVMD Engine is Down
BI Publisher Server is Up
[oracle@oemnode1 ~]$

Stop OMS including Administration Server, BI Publisher,HTTP Server and Node Manager

[oracle@oemnode1 ~]$ emctl stop oms -all
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
Stopping Oracle Management Server...
WebTier Successfully Stopped
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
AdminServer Successfully Stopped
BI Publisher Server is Down
[oracle@oemnode1 ~]$

Check the status of OMS

[oracle@oemnode1 ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
BI Publisher Server is Up
[oracle@oemnode1 ~]$

Get detailed OMS status,  SYSMAN Password is required

[oracle@oemnode1 ~]$ emctl status oms -details
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : oemnode1
HTTP Console Port : 7788
HTTPS Console Port : 7803
HTTP Upload Port : 4889
HTTPS Upload Port : 4903
EM Instance Home : /u01/app/oracle/Product/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/Product/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://oemnode1:7803/em
Upload URL: https://oemnode1:4903/empbs/upload

WLS Domain Information
Domain Name : GCDomain
Admin Server Host : oemnode1
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: oemnode1
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Up

BI Publisher HTTP Managed Server Port : 9701
BI Publisher HTTPS Managed Server Port : 9803
BI Publisher HTTP OHS Port : 9788
BI Publisher HTTPS OHS Port : 9851
BI Publisher is locked.
BI Publisher Server named 'BIP' running at URL: https://oemnode1:9851/xmlpserver/servlet/home
BI Publisher Server Logs: /u01/app/oracle/Product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/
BI Publisher Log : /u01/app/oracle/Product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/bipublisher/bipublisher.log

Stop OEM agent

[oracle@oemnode1 ~]$ emctl stop agent

Start OEM agent

[oracle@oemnode1 ~]$ emctl start agent

Check status of OEM agent

[oracle@oemnode1 ~]$ emctl status agent
Featured

Step by Step Installing Oracle 12c GI and RAC on Linux 7 Using VirtualBox

Great start to build your own RAC with detailed instructions and explanations. For building 18c/19c/20c GI/RAC, this post is still helpful. After completing this lab, you should be in better position as an Oracle RAC DBA.

Contents

Introduction

This article describes the detailed step by step installation of Oracle Database 12c  (12.1.0.2 64-bit) GI and RAC on Linux (Oracle Linux 7.1 64-bit) using VirtualBox (5.0.10).

System Specifications

Windows 10 64 bit
Capture

Download Software

Download the following software:

Capture

Setup VirtualBox

  1.   Start VirtualBox Manager.
  2.   From the main screen, choose File > Preferences > Network.
Capture

3.  Double click on VirtualBox Host-Only Ethernet Adapter. Update settings as shown and click Ok twice.

Pv4 Address: 192.168.78.1

IPv4 Network Mask: 255.255.255.0

Capture

On OS X and Linux the VirtualBox Host-Only Ethernet Adapter is called vboxnet0.

4.  On your computer, create a new folder virtuallab on a location of your choice that will contain all the virtual disks.

5.  In VirtualBox, from the main screen, click the New icon in the upper left hand corner. Type in racnode1 for the Name of the VM. Choose Linux for the Type and Oracle (64 bit) for the Version and click Next.

Capture

6. Type 4096 in the Size field and click Next.

Untitled

7. Leave Create a virtual hard drive now selected and click Create.

Untitled

8.  Leave VDI (VirtualBox Disk Image) selected and click Next.

Untitled

9.  Leave Dynamically allocated selected and click Next.

Untitled

10.  Type in the full path or choose through the browse icon the Location for the disk file to be created. It’s better to use the common folder virtuallab previously created for all the virtual disks.

The file should be named racnode1.vdi.  Type in 30.00 GB in the Size field and click Create.

Capture

11. From the main screen, select the virtual machine racnode1 and click the Settings icon in the upper left hand corner.

Untitled

12. Open the USB sub-menu. Uncheck the Enable USB Controller check box.

Untitled

13.  Open the Storage sub-menu. Delete the Empty disk under the IDE Controller.

Untitled

14.  Click REMOVE.

Untitled

15.  Click on the Add Optical Device.

Untitled

16.   Click on the Choose disk.

Untitled

17.   Locate and open the v74844-01.iso file.

Untitled

18.  Open the Network sub-menu. Under the Adapter 1 tab, change the Attached to: drop down to Host-only Adapter.

Untitled

19. Choose the Adapter 2 tab. Check the box for Enable Network Adapter. Change the Attached to: drop down to Internal Network and type the name rac-priv in the Name field.

Untitled

20.  Choose the Adapter 3 tab. Check the box for Enable Network Adapter. Change the Attached to: drop down to NAT.

Untitled

21. Select the Shared Folders tab. Click Add Shared Folder.

Enter the path where you have downloaded the Oracle installation media and enter a name for your folder.

Enter the Folder Name

Check Auto-mount and click OK.

Untitled

22. Review the summary of the new virtual machine.

Untitled

OS Installation

  1.  Click on Start to boot the virtual machine. If asked to select a start-up disk, choose V74844-01.iso and click Start again.Untitled
Untitled

2.  Leave English (English) selected and click Continue.

Untitled
Untitled

3.  In the hostname field, type racnode1.virtuallab

  • Click Configure Network in the bottom left corner.
  • Highlight enpOs3 and click the Configure
  • Click the Connect automatically
  • Click the IPv4 Settings tab
  • Click the Method: drop down and select Manual.
  • Click Add and type 192.168.78.51 for the address.
  • Leave Netmask at 24.
  • In the DNS servers: box, type 192.168.78.51, 192.168.78.52.
  • In the Search domains: box, type virtuallab.
  • Click the Save.
Untitled

4.  Highlight System EnpOs9 and click the Configure… button.

  • Click the Connect automatically
  • Click the IPv4 Settings 
  • Click the Method: drop down and select Automatic (DHCP) addresses only.
  • Click the Apply
  • Click Close to close the network configuration menu and click Next.
Untitled
Untitled

5.  Click Begin Installation.

Untitled
Untitled
Untitled

6.  To connect to the new created virtual machine, create a connection in Putty for the new VM called racnode1 with the IP Address of 192.168.78.51.

Untitled
Untitled

7.  Turn off and disable the firewall IPTables.

You must disable IPTABLES. Missing this step and then DNS does not work.
[root@racnode1 ~]# service iptables stop
Redirecting to /bin/systemctl stop  iptables.service
Failed to issue method call: Unit iptables.service not loaded.
[root@racnode1 ~]# chkconfig iptables off
error reading information on service iptables: No such file or directory
[root@racnode1 ~]#
[root@racnode1 ~]# chkconfig --list iptables
[root@racnode1 ~]#

8. Disable SELinux. Open the config file and change the SELINUX variable from enforcing to disabled.

[root@racnode1 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@racnode1 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.

SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@racnode1 ~]# vi /etc/selinux/config
[root@racnode1 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

9. Verify that all the network interfaces are up.

[root@racnode1 ~]# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 08:00:27:2d:25:e6 brd ff:ff:ff:ff:ff:ff

3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000

    link/ether 08:00:27:f8:0e:13 brd ff:ff:ff:ff:ff:ff

4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000

   link/ether 08:00:27:27:ed:e6 brd ff:ff:ff:ff:ff:ff

10. Install the database pre-install package oracle-rdbms-server-12cR1-preinstall.

    a) To download this RPM from your OL7 machine you first need to modify the default yum configuration file. Modify /etc/repos.d/public-yum-ol7.repo to enable ol7_addons repository: set enabled=1 instead of 0 , It was 0 initially enabled=0

[ol7_addons]

name=Oracle Linux $releasever Add ons ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/addons/ basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1     b) #yum update     c) #yum -y install oracle-rdbms-server-12cR1-preinstall [root@racnode1~]# yum install oracle-rdbms-server-12cR1-preinstall ol7_UEKR3                  | 1.2 kB  00:00:00 ol7_latest                 | 1.4 kB  00:00:00 (1/5): ol7_UEKR3/x86_64/updateinfo        |  57 kB  00:00:00 (2/5): ol7_latest/x86_64/updateinfo         | 439 kB  00:00:01 (3/5): ol7_latest/x86_64/group              | 652 kB  00:00:03 (4/5): ol7_latest/x86_64/primary            |  12 MB  00:00:23 (5/5): ol7_UEKR3/x86_64/primary             |  13 MB  00:00:26 ol7_UEKR3                                    327/327 ol7_latest                                 10502/10502 Resolving Dependencies –> Running transaction check —> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7 will be installed –> Processing Dependency: sysstat for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: xorg-x11-utils for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: bind-utils for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: xorg-x11-xauth for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: psmisc for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 –> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64 …… …… …… …… —> Package libICE.x86_64 0:1.0.8-7.el7 will be installed —> Package libSM.x86_64 0:1.2.1-7.el7 will be installed —> Package libpath_utils.x86_64 0:0.2.1-24.el7 will be installed —> Package libtalloc.x86_64 0:2.1.1-1.el7 will be installed —> Package libtevent.x86_64 0:0.9.21-3.el7 will be installed –> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================================================================================  Package                                                        Arch                             Version                                          Repository                            Size  oracle-rdbms-server-12cR1-preinstall                           x86_64                           1.0-4.el7                                        ol7_latest                            18 k Installing for dependencies: bind-libs                                                      x86_64                           32:9.9.4-18.el7_1.5                              ol7_latest                           1.0 M bind-utils                                                     x86_64                           32:9.9.4-18.el7_1.5                              ol7_latest                           198 k compat-libcap1                                                 x86_64                           1.10-7.el7                                       ol7_latest                            17 k compat-libstdc++-33                                            x86_64                           3.2.3-72.el7                                     ol7_latest                           190 ….. …… …… …… ……  xorg-x11-utils                                                 x86_64                           7.5-13.1.el7                                     ol7_latest                           110 k xorg-x11-xauth                                                 x86_64                           1:1.0.7-6.1.el7                                  ol7_latest                            28 k Updating for dependencies: bind-libs-lite                                                 x86_64                           32:9.9.4-18.el7_1.5                              ol7_latest                           713 k bind-license                                                   noarch                           32:9.9.4-18.el7_1.5                              ol7_latest                            80 k Transaction Summary ============================================================================================================================================================================================= Install  1 Package  (+52 Dependent packages) Upgrade             (  2 Dependent packages) Total download size: 16 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/bind-libs-lite-9.9.4-18.el7_1.5.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY550 kB/s | 913 kB  00:00:27 ETA Public key for bind-libs-lite-9.9.4-18.el7_1.5.x86_64.rpm is not installed (1/55): bind-libs-lite-9.9.4-18.el7_1.5.x86_64.rpm                                                                                                                    | 713 kB  00:00:01 (2/55): bind-license-9.9.4-18.el7_1.5.noarch.rpm                                                                                                                      |  80 kB  00:00:00 (3/55): bind-utils-9.9.4-18.el7_1.5.x86_64.rpm                                                                                                                        | 198 kB  00:00:00 (4/55): bind-libs-9.9.4-18.el7_1.5.x86_64.rpm                                                                                                                         | 1.0 MB  00:00:02 (5/55): compat-libcap1-1.10-7.el7.x86_64.rpm                                                                                                                          |  17 kB  00:00:00 …… …… …… …… …… …… (51/55): rpcbind-0.2.0-26.el7.x86_64.rpm                                                                                                                              |  55 kB  00:00:00 (52/55): tcp_wrappers-7.6-77.el7.x86_64.rpm                                                                                                                           |  78 kB  00:00:00 (53/55): sysstat-10.1.5-7.el7.x86_64.rpm                                                                                                                              | 295 kB  00:00:00 (54/55): xorg-x11-utils-7.5-13.1.el7.x86_64.rpm                                                                                                                       | 110 kB  00:00:00 (55/55): xorg-x11-xauth-1.0.7-6.1.el7.x86_64.rpm                                                                                                                      |  28 kB  00:00:00 ——————————————————————————————————————————————————————————————— Total                                                                                                                                                        647 kB/s |  16 MB  00:00:25 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Importing GPG key 0xEC551F03:  Userid     : “Oracle OSS group (Open Source Software group) <build@oss.oracle.com>” Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03 Package    : 7:oraclelinux-release-7.1-1.0.5.el7.x86_64 (@anaconda/7.1) From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction   Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                                                                              1/57   Installing : libxcb-1.9-5.el7.x86_64                                                                                                                                                  2/57   Updating   : 32:bind-license-9.9.4-18.el7_1.5.noarch                                                                                                                                  3/57   Installing : libICE-1.0.8-7.el7.x86_64                                                                                                                                                4/57   …… …… …… …… …… ……. …… Installing : oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64                                                                                                                   54/57 Updating   : 32:bind-libs-lite-9.9.4-18.el7_1.5.x86_64                                                                                                                               55/57 Cleanup    : 32:bind-libs-lite-9.9.4-18.el7.x86_64                                                                                                                                   56/57  Cleanup    : 32:bind-license-9.9.4-18.el7.noarch                                                                                                                                     57/57 Verifying  : libXxf86misc-1.0.3-7.1.el7.x86_64                                                                                                                                        1/57 Verifying  : libdmx-1.1.3-3.el7.x86_64                                                                                                                                                2/57 Verifying  : libXmu-1.1.1-5.1.el7.x86_64                                                                                                                                              3/57 Verifying  : libXinerama-1.1.3-2.1.el7.x86_64                                                                                                                                         4/57 Verifying  : libtalloc-2.1.1-1.el7.x86_64                                                                                                                                             5/57  …… …… …… …… …… ……                                                                                                                           Verifying  : 32:bind-libs-lite-9.9.4-18.el7.x86_64                                                                                                                                   57/57 Installed: oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7 Dependency Installed:   bind-libs.x86_64 32:9.9.4-18.el7_1.5          bind-utils.x86_64 32:9.9.4-18.el7_1.5         compat-libcap1.x86_64 0:1.10-7.el7            compat-libstdc++-33.x86_64 0:3.2.3-72.el7   gcc-c++.x86_64 0:4.8.3-9.el7                  gssproxy.x86_64 0:0.3.0-10.el7                keyutils.x86_64 0:1.5.8-3.el7                 ksh.x86_64 0:20120801-22.el7_1.3   libICE.x86_64 0:1.0.8-7.el7                   libSM.x86_64 0:1.2.1-7.el7                    libX11.x86_64 0:1.6.0-2.1.el7                 libX11-common.noarch 0:1.6.0-2.1.el7 ….. …… …… Dependency Updated:   bind-libs-lite.x86_64 32:9.9.4-18.el7_1.5                                                      bind-license.noarch 32:9.9.4-18.el7_1.5 Complete! [root@racnode1 ~]# You can find a detailed log for these steps in /var/log/oracle-rdbms-server-12cR1-preinstall/backup/<timestamp>/orakernel.log:

11.  Install additional RPMs that will be used to install and administer the servers.

[root@racnode1 ~]# yum install -y tigervnc-server.x86_64 xclock man parted.x86_64 unzip.x86_64 xterm lsof bind  xorg-x11-twm

12. Uninstall NTP.

[root@racnode1 ~]#yum remove -y ntp

No Match for argument: ntp

No Packages marked for removal

[root@racnode1 ~]#

13.  Install VirtualBox Addons

[root@racnode1 cdrom]# pwd

/media/cdrom

[root@racnode1 mnt]# ./VBoxLinuxAdditions.run

Verifying archive integrity... All good.

Uncompressing VirtualBox 5.0.10 Guest Additions for Linux............

VirtualBox Guest Additions installer
Removing installed version 5.0.10 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]

Copying additional installer modules ...

Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[  OK  ]
Building the shared folder support module[  OK  ]
Building the OpenGL support module[  OK  ]
Doing non-kernel setup of the Guest Additions[  OK  ]
Starting the VirtualBox Guest Additions [  OK  ]
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.

[root@racnode1 mnt]# cd /mnt

[root@racnode1 mnt]# ls -ltr
total 51259
-r-xr-xr-x 1 root root      647 Aug 20 21:47 AUTORUN.INF
dr-xr-xr-x 2 root root     2048 Nov 11 04:02 OS2
dr-xr-xr-x 2 root root     2048 Nov 11 04:02 cert
dr-xr-xr-x 2 root root     2048 Nov 11 04:02 64Bit
dr-xr-xr-x 2 root root     2048 Nov 11 04:02 32Bit
-r-xr-xr-x 1 root root   316016 Nov 11 04:56 VBoxWindowsAdditions.exe
-r-xr-xr-x 1 root root     5519 Nov 11 04:57 runasroot.sh
-r-xr-xr-x 1 root root     6964 Nov 11 04:57 autorun.sh
-r-xr-xr-x 1 root root 10244320 Nov 11 04:57 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x 1 root root  7515597 Nov 11 04:57 VBoxLinuxAdditions.run
-r-xr-xr-x 1 root root 16949040 Nov 11 05:02 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x 1 root root 17440768 Nov 11 05:58 VBoxSolarisAdditions.pkg

[root@racnode1 mnt]#

Configure Bind DNS

 1. Enable BIND DNS to start at boot time.

[root@racnode1 ~]# chkconfig named on

Note: Forwarding request to 'systemctl enable named.service'.

ln -s '/usr/lib/systemd/system/named.service' '/etc/systemd/system/multi-user.target.wants/named.service'

2.  Change named directory permissions.

[root@racnode1 ~]# ls -ltr /var/named

total 16
-rw-r-----. 1 root  named  152 Jun 21  2007 named.localhost
-rw-r-----. 1 root  named  168 Dec 15  2009 named.loopback
-rw-r-----. 1 root  named  152 Dec 15  2009 named.empty
-rw-r-----. 1 root  named 2076 Jan 29  2013 named.ca

drwxrwx---. 2 named named    6 Sep  3 13:25 slaves
drwxrwx---. 2 named named    6 Sep  3 13:25 dynamic
drwxrwx---. 2 named named    6 Sep  3 13:25 data

[root@racnode1 ~]# touch /var/named/virtuallab
[root@racnode1 ~]# chmod 664 /var/named/virtuallab
[root@racnode1 ~]# chgrp named /var/named/virtuallab
[root@racnode1 ~]# chmod g+w /var/named
[root@racnode1 ~]# chmod g+w /var/named/virtuallab
[root@racnode1 ~]#

3.  Backup the BIND configuration file.

  [root@racnode1 ~]# ls -ltr /etc/named.conf

-rw-r-----. 1 root named 1582 Oct 30  2013 /etc/named.conf

[root@racnode1 ~]# ls -ltr /etc/named.conf*

-rw-r-----. 1 root named 1582 Oct 30  2013 /etc/named.conf
[root@racnode1 ~]# cp /etc/named.conf /etc/named.conf.org
[root@racnode1 ~]#

4. Change /etc/named.conf permissions.

[root@racnode1 ~]# chmod 664 /etc/named.conf

[root@racnode1 ~]#

Otherwise, the original protection may cause trouble in the restarting named step with write-protection errors in /var/log/messages. 

Run the following command or edit the /etc/named.conf file to change the named configuration manually

sed -i -e 's/listen-on .*/listen-on port 53 { 192.168.78.51; };/' \
-e 's/allow-query .*/allow-query     { 192.168.78.0\/24; localhost; };\n        allow-transfer  { 192.168.78.0\/24; };/' \
-e '$azone "virtuallab" {\n  type master;\n  file "virtuallab";\n};\n\nzone "in-addr.arpa" {\n  type master;\n  file "in-addr.arpa";\n};' \
/etc/named.conf 

options {       listen-on port 53 { 192.168.78.51; };       
listen-on-v6 port 53 { ::1; };       
directory       "/var/named";       
dump-file       "/var/named/data/cache_dump.db";       
statistics-file "/var/named/data/named_stats.txt";       
memstatistics-file "/var/named/data/named_mem_stats.txt";       
allow-query     { 192.168.78.0/24; localhost; };       
allow-transfer  { 192.168.78.0/24; };       
recursion yes;        

dnssec-enable yes;       
dnssec-validation yes;       
dnssec-lookaside auto;        

/* Path to ISC DLV key */       
bindkeys-file "/etc/named.iscdlv.key";        

managed-keys-directory "/var/named/dynamic";
}; 

logging {       channel default_debug {               
                  file "data/named.run";               
                       severity dynamic;       
        };
}; 

zone "." IN {       
       type hint;       
       file "named.ca"
;}; 

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key"; 

zone "virtuallab" {
 type master; 
 file "virtuallab";
}; 

zone "in-addr.arpa" { 
 type master; 
 file "in-addr.arpa";
};

5.  Create the zone file for the virtuallab domain on racnode1 by running the following command:

echo '$TTL 3H
@       IN SOA  racnode1        hostmaster      (
                                        101   ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
                NS      racnode1
                NS      racnode2
localhost       A       127.0.0.1
racnode1        A       192.168.78.51
racnode1-vip    A       192.168.78.61
racnode1-priv   A       172.16.100.61
racnode2        A       192.168.78.52
racnode2-vip    A       192.168.78.62
racnode2-priv   A       172.16.100.62
racnode-cluster-scan     A       192.168.78.251
racnode-cluster-scan     A       192.168.78.252
racnode-cluster-scan     A       192.168.78.253' \
> /var/named/virtuallab

[root@racnode1 etc]# cat /var/named/virtuallab

$TTL 3H
@       IN SOA  racnode1        hostmaster      (
                                        101   ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
                NS      racnode1
                NS      racnode2
localhost       A       127.0.0.1
racnode1        A       192.168.78.51
racnode1-vip    A       192.168.78.61
racnode1-priv   A       172.16.100.61
racnode2        A       192.168.78.52
racnode2-vip    A       192.168.78.62
racnode2-priv   A       172.16.100.62
racnode-cluster-scan     A       192.168.78.251
racnode-cluster-scan     A       192.168.78.252
racnode-cluster-scan     A       192.168.78.253
[root@racnode1 etc]#

6.  Create the reverse zone file racnode1.

Copy and paste below command as root:

echo '$TTL 3H
@       IN SOA  racnode1.virtuallab.      hostmaster.virtuallab. (
                                        101   ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
                NS      racnode1.virtuallab.
                NS      racnode2.virtuallab.

51.78.168.192   PTR     racnode1.virtuallab.
61.78.168.192   PTR     racnode1-vip.virtuallab.
61.100.16.172   PTR     racnode1-priv.virtuallab.
52.78.168.192   PTR     racnode2.virtuallab.
62.78.168.192   PTR     racnode2-vip.virtuallab.
62.100.16.172   PTR     racnode2-priv.virtuallab.
251.78.168.192  PTR     racnode-cluster-scan.virtuallab.
252.78.168.192  PTR     racnode-cluster-scan.virtuallab.
253.78.168.192  PTR     racnode-cluster-scan.virtuallab.' \
> /var/named/in-addr.arpa

[root@racnode1 etc]# cat /var/named/in-addr.arpa
cat: /var/named/in-addr.arpa: No such file or directory

[root@racnode1 etc]# echo '$TTL 3H
> @     IN SOA  racnode1.virtuallab.     hostmaster.virtuallab.  (
>                                         101   ; serial
>                                         1D      ; refresh
>                                         1H      ; retry
>                                         1W      ; expire
>                                         3H )    ; minimum
>                 NS      racnode1.virtuallab.
>                 NS      racnode2.virtuallab.
> 
> 51.78.168.192   PTR     racnode1.virtuallab.
> 61.78.168.192   PTR     racnode1-vip.virtuallab.
> 61.100.16.172   PTR     racnode1-priv.virtuallab.
> 52.78.168.192   PTR     racnode2.virtuallab.
> 62.78.168.192   PTR     racnode2-vip.virtuallab.
> 62.100.16.172   PTR     racnode2-priv.virtuallab.
> 251.78.168.192  PTR     racnode-cluster-scan.virtuallab.
> 252.78.168.192  PTR     racnode-cluster-scan.virtuallab.
> 253.78.168.192  PTR     racnode-cluster-scan.virtuallab.' \
> > /var/named/in-addr.arpa

[root@racnode1 etc]# cat /var/named/in-addr.arpa

$TTL 3H
@       IN SOA  racnode1.virtuallab.      hostmaster.virtuallab. (
                                        101   ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
                NS      racnode1.virtuallab.
                NS      racnode2.virtuallab.

51.78.168.192   PTR     racnode1.virtuallab.
61.78.168.192   PTR     racnode1-vip.virtuallab.
61.100.16.172   PTR     racnode1-priv.virtuallab.
52.78.168.192   PTR     racnode2.virtuallab.
62.78.168.192   PTR     racnode2-vip.virtuallab.
62.100.16.172   PTR     racnode2-priv.virtuallab.
251.78.168.192  PTR     racnode-cluster-scan.virtuallab.
252.78.168.192  PTR     racnode-cluster-scan.virtuallab.
253.78.168.192  PTR     racnode-cluster-scan.virtuallab.

[root@racnode1 etc]#

7.  Generate the rndc.key file.

[root@racnode1 etc]# rndc-confgen -a -r /dev/urandom
wrote key file "/etc/rndc.key"
[root@racnode1 etc]# chgrp named /etc/rndc.key
[root@racnode1 etc]# chmod g+r /etc/rndc.key
[root@racnode1 etc]# ls -lrta /etc/rndc.key
-rw-r----- 1 root named 77 Nov 24 21:50 /etc/rndc.key

8.  Check that the parameter PEERDNS is set to no in /etc/sysconfig/network-scripts/ifcfg- -enp0s9 to prevent the resolv.conf from being overwritten by the dhcp client, also make sure  DEFROUTE=no, PEERROUTES=no

[root@racnode1 ]#cat /etc/sysconfig/network-scripts/ifcfg-enp0s9

TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=no
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s9
UUID=0c76e053-3487-479b-bf5f-18bb26b4d154
DEVICE=enp0s9
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no

[root@racnode1 etc]#

9.  Restart the named service

[root@racnode1 etc]# service named restart
Redirecting to /bin/systemctl restart  named.service
[root@racnode1 etc]#

10. Restart network service

[root@racnode1 etc]# service network restart
Restarting network (via systemctl):                      [  OK  ]

11.  Change /etc/resolv.conf and check nslookup nodes and SCAN ips working fine.

root@racnode1 ~]# cat /etc/resolv.conf

# Generated by NetworkManager
search gateway virtuallab
nameserver 192.168.78.51
nameserver 192.168.78.52
nameserver 10.0.0.138

[root@racnode1 ~]# nslookup racnode1
Server:         192.168.78.51
Address:        192.168.78.51#53

Name:   racnode1.virtuallab
Address: 192.168.78.51

[root@racnode1 ~]# nslookup racnode2
Server:         192.168.78.51
Address:        192.168.78.51#53

Name:   racnode2.virtuallab
Address: 192.168.78.52

[root@racnode1 ~]# nslookup racnode-cluster-scan
Server:         192.168.78.51
Address:        192.168.78.51#53

Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.252
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.253
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.251

[root@racnode1 ~]# nslookup racnode-cluster-scan
Server:         192.168.78.51
Address:        192.168.78.51#53

Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.253
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.252
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.251

[root@racnode1 ~]# nslookup racnode-cluster-scan
Server:         192.168.78.51
Address:        192.168.78.51#53

Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.252
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.253
Name:   racnode-cluster-scan.virtuallab
Address: 192.168.78.251

[root@racnode1 ~]#

Prepare Linux for Oracle

1.  Double check the required RPMs
 (https://docs.oracle.com/database/121/CWLIN/prelinux.htm#CEGCECCC)

the following packages (or later versions) must be installed:

binutils-2.23.52.0.1-12.el7.x86_64 
compat-libcap1-1.10-3.el7.x86_64 
gcc-4.8.2-3.el7.x86_64 
gcc-c++-4.8.2-3.el7.x86_64 
glibc-2.17-36.el7.i686 
glibc-2.17-36.el7.x86_64 
glibc-devel-2.17-36.el7.i686 
glibc-devel-2.17-36.el7.x86_64 
libaio-0.3.109-9.el7.i686 
libaio-0.3.109-9.el7.x86_64 
libaio-devel-0.3.109-9.el7.i686 
libaio-devel-0.3.109-9.el7.x86_64 
ksh
make-3.82-19.el7.x86_64 
libXi-1.7.2-1.el7.i686 
libXi-1.7.2-1.el7.x86_64 
libXtst-1.2.2-1.el7.i686 
libXtst-1.2.2-1.el7.x86_64 
libgcc-4.8.2-3.el7.i686 
libgcc-4.8.2-3.el7.x86_64 
libstdc++-4.8.2-3.el7.i686 
libstdc++-4.8.2-3.el7.x86_64 
libstdc++-devel-4.8.2-3.el7.i686 
libstdc++-devel-4.8.2-3.el7.x86_64 
sysstat-10.1.5-1.el7.x86_64

Check  the install required package:

# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" |grep libstdc

Some i686 packages are missing, to install

[root@racnode1 yum.repos.d]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" |grep libstdc
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
compat-libstdc++-33-3.2.3-72.el7 (x86_64)
[root@racnode1 yum.repos.d]# yum install libstdc++-4.8.3-9.el7.i686

Resolving Dependencies
--> Running transaction check
---> Package libstdc++.i686 0:4.8.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                       Arch                     Version                         Repository                      Size
=============================================================================================================================
Installing:
 libstdc++                     i686                     4.8.3-9.el7                     ol7_latest                     307 k

Transaction Summary
=============================================================================================================================
Install  1 Package

Total download size: 307 k
Installed size: 992 k
Is this ok [y/d/N]: y
Downloading packages:
libstdc++-4.8.3-9.el7.i686.rpm                                                                       | 307 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libstdc++-4.8.3-9.el7.i686                                                                                1/1
  Verifying  : libstdc++-4.8.3-9.el7.i686                                                                                1/1

Installed:
  libstdc++.i686 0:4.8.3-9.el7

Complete!

[root@racnode1 yum.repos.d]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" |grep libstdc
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-4.8.3-9.el7 (i686)
libstdc++-devel-4.8.3-9.el7 (x86_64)
compat-libstdc++-33-3.2.3-72.el7 (x86_64)
[root@racnode1 yum.repos.d]# yum install libstdc++-devel-4.8.3-9.el7.i686
Resolving Dependencies
--> Running transaction check
---> Package libstdc++-devel.i686 0:4.8.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
Package                           Arch                   Version                         Repository                    Size
=============================================================================================================================
Installing:
libstdc++-devel                   i686                   4.8.3-9.el7                     ol7_latest                   1.5 M

Transaction Summary
=============================================================================================================================
Install  1 Package

Total download size: 1.5 M

Installed size: 7.8 M

Is this ok [y/d/N]: y
Downloading packages:
libstdc++-devel-4.8.3-9.el7.i686.rpm                                                                  | 1.5 MB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction

 Installing : libstdc++-devel-4.8.3-9.el7.i686                                                                          1/1

Verifying  : libstdc++-devel-4.8.3-9.el7.i686                                                                          1/1

Installed:

libstdc++-devel.i686 0:4.8.3-9.el7

Complete

2. Installing the cvuqdisk RPM for Linux

If you do not use an Oracle Preinstallation RPM, then you must install the cvuqdisk RPM. Without cvuqdisk, Cluster Verification Utility cannot discover shared disks, and you receive the error message “Package cvuqdisk not installed” when you run Cluster Verification Utility. Use the cvuqdisk rpm for your hardware (for example, x86_64).

To install the cvuqdisk RPM, complete the following procedure:

Locate thecvuqdisk RPM package, which is in the directory rpm on the Oracle Grid Infrastructure installation media. If you have already installed Oracle Grid Infrastructure, then it is located in the directory grid_home/cv/rpm.

  • Copy the cvuqdisk package to each node on the cluster. You should ensure that each node is running the same version of Linux.
  • Log in as root.
  • Use the following command to find if you have an existing version of thecvuqdisk package:
# rpm -qi cvuqdisk

If you have an existing version, then enter the following command to deinstall the existing version:

# rpm -e cvuqdisk
  • Set the environment variable CVUQDISK_GRP to point to the group that will own cvuqdisk, typically oinstall. For example:
    # CVUQDISK_GRP=oinstall; export CVUQDISK_GRP
  • In the directory where you have saved the cvuqdisk rpm, use the following command to install thecvuqdisk package:
# rpm -iv package

For example:

# rpm -iv cvuqdisk-1.0.9-1.rpm

3.  Install ifconfig package

Ifcocnfig is replaced by ip already.

#ip addr

To install ifconfig :

[root@racnode1 bin]# yum install net-tools

4.  Create users ,groups and directories.

[root@racnode1 etc]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

[root@racnode1 etc]# groupadd -g 54323 oper
[root@racnode1 etc]# groupadd -g 54324 backupdba
[root@racnode1 etc]# groupadd -g 54325 asmdba
[root@racnode1 etc]# groupadd -g 54326 dgdba
[root@racnode1 etc]# groupadd -g 54327 kmdba
[root@racnode1 etc]# groupadd -g 54328 asmadmin
[root@racnode1 etc]# groupadd -g 54329 asmoper

[root@racnode1 etc]# useradd -u 54322 -g oinstall -G asmadmin,asmdba grid
[root@racnode1 etc]# usermod -G dba,backupdba,dgdba,kmdba,asmdba,asmoper,vboxsf   oracle

[root@racnode1 etc]# id grid
uid=54322(grid) gid=54321(oinstall) groups=54325(asmdba),54328(asmadmin),54321(oinstall)

[root@racnode1 etc]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54322(dba),54321(oinstall)

[root@racnode1 etc]# usermod -G dba,backupdba,dgdba,kmdba,asmdba,asmoper,vboxsf oracle

[root@racnode1 etc]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54322(dba),54324(backupdba),54325(asmdba),54326(dgdba),54327(kmdba),54329(asmoper),54321(oinstall)

[root@racnode1 etc]# id grid
uid=54322(grid) gid=54321(oinstall) groups=54325(asmdba),54328(asmadmin),54321(oinstall)

[root@racnode1 etc]# mkdir -p  /u01/app/12.1.0/grid
[root@racnode1 etc]# mkdir -p /u01/app/grid
[root@racnode1 etc]# mkdir -p /u01/app/oracle
[root@racnode1 etc]# chown -R grid:oinstall /u01
[root@racnode1 etc]# chown oracle:oinstall /u01/app/oracle
[root@racnode1 etc]# chmod -R 775 /u01/

Put “umask 022” into .bash_profile

[root@racnode1 etc]# su - grid
[grid@racnode1 ~]$ echo $SHELL

/bin/bash

[grid@racnode1 ~]$ vi .bask_profile
[grid@racnode1 ~]$ exit
logout

[root@racnode1 etc]# su - oracle
[oracle@racnode1 ~]$ echo $SHELL

/bin/bash

[oracle@racnode1 ~]$ vi .bash_profile
[oracle@racnode1 ~]$

5.  Installation Owner Resource Limit Recommended Ranges

Resource Shell LimitResourceSoft LimitHard Limit
Open file descriptorsnofileat least 1024at least 65536
Number of processes available to a single usernprocat least 2047at least 16384
Size of the stack segment of the processstackat least 10240 KBat least 10240 KB, and at most 32768 KB
Maximum Locked Memory Limitmemlockat least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabledat least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled
[root@racnode1 etc]# cat /etc/security/limits.conf

# oracle user limit
#
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   10240
oracle              soft    stack   32768

# grid user
#
grid              soft    nproc   2047
grid              hard    nproc   16384
grid              soft    nofile  1024
grid              hard    nofile  65536
grid              soft    stack   10240
grid              soft    stack   32768

6.  Preventing Installation Errors Caused by Terminal Output Commands.

During an Oracle Grid Infrastructure installation, OUI uses SSH to run commands and copy files to the other nodes. During the installation, hidden files on the system (for example, .bashrc or .cshrc) will cause makefile and other installation errors if they contain terminal output commands.

To avoid this problem, you must modify these files in each Oracle installation owner user home directory to suppress all output on STDOUT or STDERR (for example, stty, xtitle, and other such commands) as in the following examples:

Bourne, Bash, or Korn shell:

if [ -t 0 ]; then   
 
   stty intr ^C

fi

C shell:

test -t 0 

if ($status == 0) then         

  stty intr ^C        

endif

7.   Install oracle asm packages.

[root@racnode1 etc]# yum install oracleasm-support

......
......
......
......
Installed:
  oracleasm-support.x86_64 0:2.1.8-3.el7

[root@racnode1 etc]# rpm -qa|grep -i oracleasm
oracleasm-support-2.1.8-3.el7.x86_64

Install kmod-oraceasm package in either way below :

# mount /dev/cdrom  /mnt
#cd /mnt
#cd Packages
# rpm -i kmod-oracleasm-2.0.8-8.el7.x86_64.rpm

OR

# yum install kmod-oraceasm

Create VirtualBox Shared Storage

1. Shutdown virtual server

 #shutdown –h now

2. Create New Disk:
In the VirtualBox Manager, select the machine racnode1, click Settings -> Storage. Select Controller SATA and click on the Add Hard Disk button: Click on Create New Disk:

Untitled

3.  Leave VDI (VirtualBox Disk Image) selected and click Next

Untitled

4.  For the shared storage, select Fixed size and click Next.

Untitled

5.  Change the location of the file to the folde previously created.

Enter asm1.vdi as disk name.

Enter 5.00Gb as disk size.

Click Create.

6. Now the disk is physically created with a size of 5Gb, so it can take more time to complete.

Untitled

7.  Repeat the steps to create three more disks:

asm2.vdi (5.00GB)

asm3.vdi (5.00GB)

asm4.vdi (5.00GB)

8.  Finally, four virtual disks should have been created for asm.

Click OK.

Untitled

9.  Make all the asm devices shareable: from VirtualBox Manager, click File -> Virtual Media Manager.

Untitled

10.  For each asm devices: right-click ->Modify, Select Shareable and click OK. Do it for the four asm devices.

Untitled

11.  Start the machine racnode1, you should see now four more disks named /dev/sd*:

[root@racnode1 ~]# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 48 Feb 15 18:35 /dev/sdd
brw-rw---- 1 root disk 8, 32 Feb 15 18:35 /dev/sdc
brw-rw---- 1 root disk 8,  0 Feb 15 18:35 /dev/sda
brw-rw---- 1 root disk 8, 64 Feb 15 18:35 /dev/sde
brw-rw---- 1 root disk 8,  2 Feb 15 18:35 /dev/sda2
brw-rw---- 1 root disk 8, 16 Feb 15 18:35 /dev/sdb
brw-rw---- 1 root disk 8,  1 Feb 15 18:35 /dev/sda1

12.  Once the new disks are visible , add a primary partition on each of them with fdisk.

[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 0x3173fa52.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-10485759, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):
Using default value 10485759
Partition 1 of type Linux and of size 5 GiB is set

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

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

13.  Repeat the same step for sdc, sdd and sde.

When finished, all disks have at least a partition:

[root@racnode1 ~]# ls -l /dev/sd?1
brw-rw---- 1 root disk 8, 65 Feb 15 18:46 /dev/sde1
brw-rw---- 1 root disk 8, 49 Feb 15 18:46 /dev/sdd1
brw-rw---- 1 root disk 8, 33 Feb 15 18:46 /dev/sdc1
brw-rw---- 1 root disk 8, 17 Feb 15 18:44 /dev/sdb1
brw-rw---- 1 root disk 8,  1 Feb 15 18:35 /dev/sda1

14.  Create ASM disks

[root@racnode1 /]# oracleasm createdisk ASM_DISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done

[root@racnode1 /]# oracleasm createdisk ASM_DISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done

[root@racnode1 /]# oracleasm createdisk ASM_DISK3 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@racnode1 /]# oracleasm createdisk ASM_DISK4 /dev/sde1
Writing disk header: done
Instantiating disk: done

[root@racnode1 /]# oracleasm listdisks
ASM_DISK1
ASM_DISK2
ASM_DISK3
ASM_DISK4

Clone VirtualBox VM

1. Shutdown the VM

[root@racnode1 /]# shutdown -h now

2.  Clone the disk racnode1.vdi from VirtualBox Manager, click File -> Virtual Media Manager.

Untitled

3.  Right-click on the disk racnode1.vdi and click Copy

4. Leave the file racnode1.vdi, click Next

Untitled

5.  Leave VDI as file type. Click Next

Untitled

6.  Leave Dynamically allocated. Click Next

Untitled

7.  Type in the full path or choose through the browse icon the Location for the disk file to be created. Again, it is better to use the common folder virtuallab previously created for all the virtual disks.

The file should be named racnode2.vdi.

Click Copy.

Untitled

8.  Click Close to exit from the Virtual Media Manager.

Untitled

Setup Second Linux VM

1. In VirtualBox, click New icon in the upper left corner to create the new VM.

2.  Type in racnode2 for the Name of the VM. Choose Linux for the Type and Oracle (64 bit) for the Version and click Next

Untitled

3.  Type 4096 in the Size field and click Next.

Untitled

4.  Select Use an existing virtual hard drive file and use the folder icon to locate the file racnode2.vdi previously created.  Click Create to complete the creation of the second VM.

Untitled

5.  There are now two virtual machines racnode2 being a clone of racnode1.

From the main screen, select the virtual machine racnode2 and click the Settings icon in the upper left hand corner.

Untitled

6.  Open theUSB sub-menu. Uncheck the Enable USB Controller check box.

Untitled

7.  Open the Network sub-menu. Under the Adapter 1 tab, change the Attached to: dropdown to Host-only Adapter.

Untitled

8. Choose the Adapter 2 tab. Check the box for Enable Network Adapter. Change the Attached to: dropdown to Internal Network and type the name rac-priv in the Name field

Untitled

9.   Choose the Adapter 3 tab. Check the box for Enable Network Adapter. Change the Attached to: dropdown to NAT.

Untitled

10.  Select the Shared Folders  Click Add Shared Folder.

Enter the path where you’ve downloaded the Oracle installation media and enter a name for your folder.

Check Auto-mount and click OK.

Untitled

11.  Open the Storage sub-menu.

Click on Controller SATA and then on Add Disk:

Untitled

12.  Click on Choose existing disk:

Untitled

13.  Select the disk asm1.vdi and click Open.

Untitled

14.  Repeat the operation to add all remaining asm disks.

Untitled

15.  Click on Ok to save the modifications.

16.  Review the summary of the new virtual machine.

Untitled

17.  Start the racnode2 VM

Configure Second Linux VM

1. Change host name from racnode1 to racnode2 for second VM.

To see current hostname details:
#hostnamectl

Change hostname to racnode2
#hostnamectl –static set-hostname racnode2.virtuallab
#hostnamectl –transient set-hostname racnode2.virtuallab

2. Network configuration using “nmtui” — Network Manager Text User Interface

#yum install NetworkManager-tui

#nmcli dev status

3.  Setup or change hostname by choosing “Set system hostname”

Untitled

4.  Setup network interfaces accordingly.

Untitled
Untitled
Untitled

4.  Remove the udev network rules file. It will be regenerated on the next reboot with the new MAC addresses.

[root@racnode2 ~]# rm -f /etc/udev/rules.d/70-persistent-net.rules

Remove the HWADDR and UUID lines in the network adapter configuration files.

[#sed -i -e '/HWADDR/d' -e '/UUID/d' /etc/sysconfig/network-scripts/ifcfg-enp*

5.  Open a session on racnode2.

6.  Stop the DNS service.

[root@racnode2 ~]# service named stop
Redirecting to /bin/systemctl stop  named.service

7.  Remove the actual DNS files

root@racnode2 ~]# cd /var/named
[root@racnode2 named]# ls -ltr
total 24
-rw-r----- 1 root named 152 Jun 21 2007 named.localhost
-rw-r----- 1 root named 168 Dec 15 2009 named.loopback
-rw-r----- 1 root named 152 Dec 15 2009 named.empty
-rw-r----- 1 root named 2076 Jan 29 2013 named.ca
drwxrwx---. 2 named named 6 Nov 20 17:05 slaves
-rw-rw-r-- 1 root named 814 Nov 24 21:46 virtuallab
-rw-r--r-- 1 root root 917 Nov 24 21:49 in-addr.arpa
drwxrwx---. 2 named named 47 Feb 15 19:19 data
drwxrwx---. 2 named named 58 Feb 16 11:03 dynamic
[root@racnode2 named]# mv in-addr.arpa in-addr.arpa.old
[root@racnode2 named]# mv virtuallab virtuallab.old
[root@racnode2 named]#

8.  Modify the file /etc/named.conf by using the following command:

sed -i -e 's/listen-on .*/listen-on port 53 { 192.168.78.52; };/' \
-e 's/type master;/type slave;\n masters {192.168.78.51; };/' \
/etc/named.conf

so that at the end it looks like this one :

[root@racnode2 named]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
 listen-on port 53 { 192.168.78.52; };
 listen-on-v6 port 53 { ::1; };
 directory "/var/named";
 dump-file "/var/named/data/cache_dump.db";
 statistics-file "/var/named/data/named_stats.txt";
 memstatistics-file "/var/named/data/named_mem_stats.txt";
 allow-query { 192.168.78.0/24; localhost; };
 allow-transfer { 192.168.78.0/24; };
 /*
 - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
 - If you are building a RECURSIVE (caching) DNS server, you need to enable
 recursion.
 - If your recursive DNS server has a public IP address, you MUST enable access
 control to limit queries to your legitimate users. Failing to do so will
 cause your server to become part of large scale DNS amplification
 attacks. Implementing BCP38 within your network would greatly
 reduce such attack surface
 */
 recursion yes;

dnssec-enable yes;
 dnssec-validation yes;
 dnssec-lookaside auto;

/* Path to ISC DLV key */
 bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";

pid-file "/run/named/named.pid";
 session-keyfile "/run/named/session.key";
};

logging {
 channel default_debug {
 file "data/named.run";
 severity dynamic;
 };
};

zone "." IN {
 type hint;
 file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

zone "virtuallab" {
 type slave;
 masters {192.168.78.51; };
 file "virtuallab";
};

zone "in-addr.arpa" {
 type slave;
 masters {192.168.78.51; };
 file "in-addr.arpa";
};
[root@racnode2 named]#

9.  Start the named service.

[root@racnode2 [root@racnode2 named]# service named start
Redirecting to /bin/systemctl start  named.service
[root@racnode2 named]#

10.  Check that both the master on racnode1 and slave on racnode2 DNS servers are working

[root@racnode2 ~]# dig @racnode1 racnode1.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode1-vip.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2-vip.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode1-priv.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2-priv.virtuallab
[root@racnode2 ~]# dig @racnode1 collabn-cluster-scan.virtuallab

[root@racnode2 ~]# dig @racnode2 racnode1.virtuallab
[root@racnode2 ~]# dig @racnode2 racnode2.virtuallab
[root@racnode2 ~]# dig @racnode2 racnode1-vip.virtuallab
[root@racnode2 ~]# dig @racnode2 racnode2-vip.virtuallab
[root@racnode2 ~]# dig @racnode2 racnode1-priv.virtuallab
[root@racnode2 ~]# dig @racnode2 racnode2-priv.virtuallab
[root@racnode2 ~]# dig @racnode2 collabn-cluster-scan.virtuallab

Please make sure :

a.  Double check that you have stopped IPTABLES.

b.  Port 53 is blocked or not to remote query, it can be tested by :

 #telnet racnode1(2) 53

c.   Make life easier, just turn off  firewalld.

[root@racnode2 named]# service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service

[root@racnode2 named]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@racnode2 named]#

after this, all below commands work fine.

[root@racnode2 ~]# dig @racnode1 racnode1.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode1-vip.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2-vip.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode1-priv.virtuallab
[root@racnode2 ~]# dig @racnode1 racnode2-priv.virtuallab
[root@racnode2 ~]# dig @racnode1 collabn-cluster-scan.virtuallab

VNC Server Setup

  1. Download VNC-Viewer for your desktop.
  2. Configure VNC Server with the oracle account (passwords won’t be displayed):
[root@racnode1 etc]# su - oracle
Last login: Tue Feb 2 20:37:31 AEDT 2016 on tty1
[oracle@racnode1 ~]$ vncserver :1

You will require a password to access your desktops.

Password:
Verify:
xauth: file /home/oracle/.Xauthority does not exist

New 'racnode1.virtuallab:1 (oracle)' desktop is racnode1.virtuallab:1

Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/racnode1.virtuallab:1.log

2.  Open a vncviewer on your laptop and fill the IP address of racnode1 followed by :1.

Untitled

3. Enter the password “virtuallab” when prompted:

Untitled

4. The graphical interface is ready for the Grid Infrastructure Installation.

Untitled

Install Grid Infrastructure (ASM)

1. Verify that the VirtualBox Shared folder containing the installation media is mounted correctly and that Oracle has access to it:

[root@racnode1 12.1.0.2]# pwd
/media/sf_Grid_and_Database/Linux X86_64/12.1.0.2
[root@racnode1 12.1.0.2]# ls -ltr
total 8662093
-rwxrwx--- 1 root vboxsf 646972897 Aug 25 2014 linuxamd64_12102_grid_2of2.zip
-rwxrwx--- 1 root vboxsf 1747043545 Aug 25 2014 linuxamd64_12102_grid_1of2.zip
-rwxrwx--- 1 root vboxsf 1673544724 Aug 25 2014 linuxamd64_12102_database_1of2.zip
-rwxrwx--- 1 root vboxsf 1014530602 Aug 25 2014 linuxamd64_12102_database_2of2.zip
drwxrwx--- 1 root vboxsf 4096 Nov 25 21:53 grid
drwxrwx--- 1 root vboxsf 0 Nov 25 22:27 database
-rwxrwx--- 1 root vboxsf 2838 Nov 28 12:48 README.txt
-rwxrwx--- 1 root vboxsf 567375160 Nov 28 13:29 linuxamd64_12102_gsm.zip
-rwxrwx--- 1 root vboxsf 499228127 Nov 28 13:45 linuxamd64_12102_examples.zip
-rwxrwx--- 1 root vboxsf 918555219 Nov 28 14:12 linuxamd64_12102_client.zip
-rwxrwx--- 1 root vboxsf 1802723467 Nov 28 14:35 ofm_webtier_linux_11.1.1.7.0_64_disk1_1of1.zip

2.   Once the package decompression is completed, you’ll end up with two directories, grid and database containing the installation files.

[oracle@collabn1 sf_12cR1]$ ls -l
total 6295549
drwxrwx---. 1 root vboxsf 0 Jul 3 06:38 database
drwxrwx---. 1 root vboxsf 0 Jun 10 08:15 grid
-rwxrwx---. 1 root vboxsf 1361028723 Jun 27 16:21 linuxamd64_12c_database_1of2.zip
-rwxrwx---. 1 root vboxsf 1116527103 Jun 27 16:12 linuxamd64_12c_database_2of2.zip
-rwxrwx---. 1 root vboxsf 1750478910 Jun 27 16:27 linuxamd64_12c_grid_1of2.zip
-rwxrwx---. 1 root vboxsf 201673595 Jun 27 15:23 linuxamd64_12c_grid_2of2.zip

3.  if it is not done yet, install the cvuqdisk package as root on both nodes.

[root@racnode1 12.1.0.2]# ls -ltr grid/rpm/cvuqdisk*
-rwxrwx--- 1 root vboxsf 8976 Jul 1 2014 grid/rpm/cvuqdisk-1.0.9-1.rpm
[root@racnode1 12.1.0.2]# ~]# rpm -Uvh grid/rpm/cvuqdisk-1.0.9-1.rpm
-bash: ~]#: command not found
[root@racnode1 12.1.0.2]# rpm -Uvh grid/rpm/cvuqdisk-1.0.9-1.rpm
Preparing... ################################# [100%]
 package cvuqdisk-1.0.9-1.x86_64 is already installed

4.   Start to install GI from the VNC remote session, run the installation of Grid Infrastructure as grid:

[grid@racnode1 sf_12.1.0.2]$ pwd
/media/sf_12.1.0.2
[grid@racnode1 sf_12.1.0.2]$

[grid@racnode1 ~]$ /media/sf_12.1.0.2/grid/runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 415 MB. Actual 24746 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3071 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-02-16_08-03-43PM. Please wait ...
[grid@racnode1 ~]$

5.   The Installation starts displaying a Splash Screen:

Untitled

6.  Leave Install and Configure Oracle Grid Infrastructure for a Cluster and click Next:

Untitled

7.  Leave Configure a Standard Cluster and click Next:

Untitled

8.  Leave Typical Installation and click Next:

Untitled

9.  In the SCAN Name box, enter racnode-cluster-scan.virtuallab

In the central box, only the first node is displayed. Click Add… and enter the network names of the second node:

  • Public Hostname: racnode2.virtuallab
  • Virtual Hostname:racnode2-priv.virtuallab
Untitled

In the mean time, you can setuo SSH connectivity…

10.  Click SSH connectivity…

Untitled

Enter the password of grid user and click Setup.

The setup of SSH equivalency is initiated.

Click OK when it’s completed.

Untitled

11.   Confirm SCAN Name . Click Yes.

Untitled

12.  Click on Specify Network Interfaces…

Check that the correct addresses are set:

  • Enp0s3 is marked as Public
  • Enp0s8 marked as Private
  • Enp0s9 is marked as Do Not Use

Click OK to close the Identify Network Interfaces window.

Finally, click Next

Untitled
Untitled

13.  Leave the default Oracle Base and Software Location.

In the Cluster Registry Storage Type combo box, select Oracle Automatic Storage Management

Enter password for SYSASM password.

Select asmadmin as OSASM group.

Click Next.

Untitled
Untitled

password is too weak  and Oracle raises an alert. Click Yes to continue:

Untitled

14.   Leave DATA as Disk Group Name.

Select External redundancy.

The Candidate Disks list is empty. Click on Change Discovery Path…

Enter /dev/oracleasm/disks in the Disk Discovery Path text field.

Click Ok.

Untitled

15.  Check two disks that will be immediately allocated to the new disk group.

Click Next

Untitled

16.  Leave the default Inventory Directory. Click Next

Untitled

17.  Check Automatically run configuration script and then Use “root” user credentials.

Enter the password of root and click Next.

Untitled

18.  It takes some time to complete the prerequisite checks.

Untitled

19.  If everything is correct, you will notice checks that have failed:

  • Physical Memory
  • swap Size
  • Device Checks for ASM
  • Task resolv.conf integrity

Check “Ignore All” and click Next.

Untitled
Untitled
Untitled
Untitled
Untitled

UDEV error has  no impact on installations

Untitled

20.  Click Yes to confirm that you want to skip some prerequisites.

Untitled

21.  The summary page appears. Optionally, click Save Response File and choose a location to have the response file saved for this installation session.

Untitled

22. Review the summary and click Install to start the installation.

Untitled

23.  The installation starts.

Untitled

24.  After a while, the installation asks for a confirmation before running some scripts as root. Click Yes to continue.

Untitled
Untitled

25.   The installation continues, again, it may take longtime to complete. Once it’s finished, click on Close to exit.

Untitled

Just found when reboot both virtual boxes, the /etc/rsolv.conf was updated, and nslookup does not work properly. So we have to make /etc/resolv.conf non-updatable by using chattr.

[root@racnode2 bin]#chattr +i /etc/resolv.conf
[root@racnode2 bin]#cat /etc/resolv.conf
# Generated by NetworkManager
search gateway virtuallab
nameserver 192.168.78.51
nameserver 192.168.78.52
nameserver 10.0.0.138

26.  You can get the status of the cluster components  after installation is complete.

[root@racnode1 bin]# ./srvctl start vip -vip racnode2
[root@racnode1 bin]# su - grid
Last login: Tue Feb 16 22:12:33 AEDT 2016 on pts/0
[grid@racnode1 ~]$
[grid@racnode1 ~]$
[grid@racnode1 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM1
The Oracle base has been set to /u01/app/grid
[grid@racnode1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
 ONLINE ONLINE racnode1 STABLE
 ONLINE ONLINE racnode2 STABLE
ora.LISTENER.lsnr
 ONLINE ONLINE racnode1 STABLE
 ONLINE ONLINE racnode2 STABLE
ora.asm
 ONLINE ONLINE racnode1 Started,STABLE
 ONLINE ONLINE racnode2 Started,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.LISTENER_SCAN1.lsnr
 1 ONLINE ONLINE racnode2 STABLE
ora.LISTENER_SCAN2.lsnr
 1 ONLINE ONLINE racnode1 STABLE
ora.LISTENER_SCAN3.lsnr
 1 ONLINE ONLINE racnode1 STABLE
ora.MGMTLSNR
 1 ONLINE ONLINE racnode1 169.254.146.121 172.
 16.100.61,STABLE
ora.cvu
 1 ONLINE ONLINE racnode1 STABLE
ora.mgmtdb
 1 ONLINE ONLINE racnode1 Open,STABLE
ora.oc4j
 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 racnode2 STABLE
ora.scan2.vip
 1 ONLINE ONLINE racnode1 STABLE
ora.scan3.vip
 1 ONLINE ONLINE racnode1 STABLE
--------------------------------------------------------------------------------

Install RAC Database Software

1. In a VNC session, run the installer as oracle user.

[oracle@racnode1 sf_TEST]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 27G 9.1G 18G 35% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 2.0G 635M 1.4G 31% /dev/shm
tmpfs 1.9G 8.5M 1.8G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 497M 245M 253M 50% /boot
none 932G 66G 867G 8% /media/sf_TEST
tmpfs 370M 0 370M 0% /run/user/0
[oracle@racnode1 sf_TEST]$ cd /media/sf_TEST
[oracle@racnode1 sf_TEST]$ ls
database
grid
linuxamd64_12102_client.zip
linuxamd64_12102_database_1of2.zip
linuxamd64_12102_database_2of2.zip
linuxamd64_12102_examples.zip
linuxamd64_12102_grid_1of2.zip
linuxamd64_12102_grid_2of2.zip
linuxamd64_12102_gsm.zip
ofm_webtier_linux_11.1.1.7.0_64_disk1_1of1.zip
README.txt
[oracle@racnode1 sf_TEST]$ cd database
[oracle@racnode1 database]$ ls
install response rpm runInstaller sshsetup stage welcome.html
[oracle@racnode1 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB. Actual 17779 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3071 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-02-17_09-40-01PM. Please wait ...[oracle@racnode1 database]
$

2.  Uncheck I wish to receive security updates via My Oracle Support and click Next.

Untitled

3.  Click Yes to confirm that you do not want to be informed about security updates.

Untitled

4.  Select Install database software only and click Next.

Untitled

5.  Select Oracle Real Application Clusters database installation and click Next.

Untitled

6.  Verify that all nodes are selected and click Next.

Untitled

7.  Click SSH connectivity to setup  passwordless connectivity.

Untitled

8.  Click Next to accept the default language selection.

Untitled

9.  Select Enterprise Edition and click Next.

Untitled

Oracle Base: /u01/app/oracle

Software location: /u01/app/oracle/product/12.1.0/dbhome_1

Click Next.

Untitled

10.  Given right OS groups.

Untitled

11. The installer checks all prerequisites.

Untitled

12.  Review the installation summary, optionally save a response file, and click Install.

Untitled

13.  The installation is under going……

Untitled

14.  Before completion, the installer asks to run a script on both nodes as root. DO NOT CLICK OK before root.sh run.

Untitled
[root@racnode1 ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

Performing root user operation.

The following environment variables are set as:
   ORACLE_OWNER= oracl
   ORACLE_HOME=  /u01/app/oracle/product/12.1.0/dbhome_1

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.

[root@racnode1 ~]#
[root@racnode2 bin]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12.1.0/dbhome_1

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.

[root@racnode2 bin]#

click OK on the previous window, then click Close to exit the Installer.

15.  Click OK on the previous window, then click Close to exit the Installer.

Untitled

Create New Disks and Create New Diskgroup FRA

1.Shutdown racnode1 VM

2. Choose SETTING ->Storage:

Untitled

3.  Choose “Create new disk”.

Untitled

4.  Click VDI( VirtualBox Disk Image ).

Untitled

5.   Check “Fixed Size”.

Untitled

6.  Gives size 5 GB.

Untitled

7.  Click Create.

Untitled

8.  Repeat same for asm6.vdi with 5GB size as well.

9.  Go to Oracle VM VirtualBox Manager : File ->virtual Media Manager

Untitled

10.  Make asm5.vdi “Shareable”.

Untitled

11.  Go to Oracle VM VirtualBox Manager ->racnode2 ->Settings ->storage –add hard disk.

Untitled

12.  Choose “Choose existing disk”.

Untitled

13.  Choose “asm5.vdi”.

Untitled
Untitled

14.  Repeat the same thing for asm6.vdi as well.

15. Create new partitions in /dev/sdf, /edv/sdg ( asm5.vdi,asm6.vdi )

on racnode 1  only (this has to be done only on one node. )

[root@racnode1 bin]# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 0 Feb 17 23:26 /dev/sda
brw-rw---- 1 root disk 8, 2 Feb 17 23:26 /dev/sda2
brw-rw---- 1 root disk 8, 1 Feb 17 23:26 /dev/sda1
brw-rw---- 1 root disk 8, 80 Feb 17 23:26 /dev/sdf
brw-rw---- 1 root disk 8, 96 Feb 17 23:26 /dev/sdg
brw-rw---- 1 root disk 8, 16 Feb 17 23:26 /dev/sdb
brw-rw---- 1 root disk 8, 48 Feb 17 23:26 /dev/sdd
brw-rw---- 1 root disk 8, 32 Feb 17 23:26 /dev/sdc
brw-rw---- 1 root disk 8, 64 Feb 17 23:26 /dev/sde
brw-rw---- 1 root disk 8, 17 Feb 17 23:26 /dev/sdb1
brw-rw---- 1 root disk 8, 33 Feb 17 23:26 /dev/sdc1
brw-rw---- 1 root disk 8, 49 Feb 17 23:26 /dev/sdd1
brw-rw---- 1 root disk 8, 65 Feb 17 23:26 /dev/sde1
[root@racnode1 bin]#
[root@racnode1 bin]# fdisk /dev/sdf
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 0x373e3026.

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 sector (2048-10485759, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):
Using default value 10485759
Partition 1 of type Linux and of size 5 GiB is set

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@racnode1 bin]# fdisk /dev/sdg
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 0xe5f3fc7c.

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 sector (2048-10485759, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):
Using default value 10485759
Partition 1 of type Linux and of size 5 GiB is set

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@racnode1 bin]# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 0 Feb 17 23:26 /dev/sda
brw-rw---- 1 root disk 8, 2 Feb 17 23:26 /dev/sda2
brw-rw---- 1 root disk 8, 1 Feb 17 23:26 /dev/sda1
brw-rw---- 1 root disk 8, 16 Feb 17 23:26 /dev/sdb
brw-rw---- 1 root disk 8, 48 Feb 17 23:26 /dev/sdd
brw-rw---- 1 root disk 8, 32 Feb 17 23:26 /dev/sdc
brw-rw---- 1 root disk 8, 64 Feb 17 23:26 /dev/sde
brw-rw---- 1 root disk 8, 17 Feb 17 23:26 /dev/sdb1
brw-rw---- 1 root disk 8, 33 Feb 17 23:26 /dev/sdc1
brw-rw---- 1 root disk 8, 49 Feb 17 23:26 /dev/sdd1
brw-rw---- 1 root disk 8, 65 Feb 17 23:26 /dev/sde1
brw-rw---- 1 root disk 8, 80 Feb 17 23:37 /dev/sdf
brw-rw---- 1 root disk 8, 81 Feb 17 23:37 /dev/sdf1
brw-rw---- 1 root disk 8, 96 Feb 17 23:37 /dev/sdg
brw-rw---- 1 root disk 8, 97 Feb 17 23:37 /dev/sdg1
[root@racnode1 bin]#

[root@racnode1 bin]# fdisk -l /dev/sdf

Disk /dev/sdf: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x373e3026

 Device Boot Start End Blocks Id System
/dev/sdf1 2048 10485759 5241856 83 Linux
[root@racnode1 bin]# fdisk -l /dev/sdg

Disk /dev/sdg: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xe5f3fc7c

 Device Boot Start End Blocks Id System
/dev/sdg1 2048 10485759 5241856 83 Linux
[root@racnode1 bin]# oracleasm listdisks
ASM_DISK1
ASM_DISK2
ASM_DISK3
ASM_DISK4
[root@racnode1 bin]# oracleasm createdisk ASM_DISK5 /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@racnode1 bin]# oracleasm createdisk ASM_DISK6 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@racnode1 bin]# oracleasm listdisks
ASM_DISK1
ASM_DISK2
ASM_DISK3
ASM_DISK4
ASM_DISK5
ASM_DISK6
[root@racnode1 bin]#

Execute the below steps on racnode2 to scan and list newly created oracleasm disk:
[root@racnode2 ~]# oracleasm listdisks
ASM_DISK1
ASM_DISK2
ASM_DISK3
ASM_DISK4
[root@racnode2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ASM_DISK5"
Instantiating disk "ASM_DISK6"
[root@racnode2 ~]# oracleasm listdisks
ASM_DISK1
ASM_DISK2
ASM_DISK3
ASM_DISK4
ASM_DISK5
ASM_DISK6
[root@racnode2 ~]#  

16.   Create diskgroup FRA.

[root@racnode1 bin]# su - grid
Last login: Wed Feb 17 20:49:36 AEDT 2016 on pts/0
[grid@racnode1 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM1
The Oracle base has been set to /u01/app/grid
[grid@racnode1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 17 23:45:31 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select path,header_status from v$asm_disk;

PATH HEADER_STATU
---------------------------------------- ------------
/dev/oracleasm/disks/ASM_DISK3 PROVISIONED
/dev/oracleasm/disks/ASM_DISK6 PROVISIONED
/dev/oracleasm/disks/ASM_DISK4 PROVISIONED
/dev/oracleasm/disks/ASM_DISK5 PROVISIONED
/dev/oracleasm/disks/ASM_DISK2 MEMBER
/dev/oracleasm/disks/ASM_DISK1 MEMBER

5 rows selected.

SQL> CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_DISK5','/dev/oracleasm/disks/ASM_DISK6';

Diskgroup created.

SQL> select path,header_status from v$asm_disk;

PATH HEADER_STATU
---------------------------------------- ------------
/dev/oracleasm/disks/ASM_DISK3 PROVISIONED
/dev/oracleasm/disks/ASM_DISK4 PROVISIONED
/dev/oracleasm/disks/ASM_DISK6 MEMBER
/dev/oracleasm/disks/ASM_DISK5 MEMBER
/dev/oracleasm/disks/ASM_DISK2 MEMBER
/dev/oracleasm/disks/ASM_DISK1 MEMBER

6 rows selected.

Create 12c RAC Database

1.Run the Database Configuration Assistant:

[oracle@racnode1 ~]$ id
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),996(vboxsf),54322(dba),54323(oper),54324(backupdba),54325(asmdba),54326(dgdba),54327(kmdba),54329(asmoper)

[oracle@racnode1 ~]$ /u01/app/oracle/product/12.1.0/dbhome_1/bin/dbca
DBCA 12c
DBCA 12c

2.  Create Database and click Next.

Create Database option
Create 12c database using dbca

3.  Select Create a database with default configuration.

Global Database Name: RACTEST.VIRTUALLAB

Storage Type: Automatic Storage Management (ASM)

Database Files Location: +DATA

Fast Recovery Area: +FRA

Database Character Set: AL32UTF8 – Unicode UTF-8 Universal character set

Administrative password: Password

Check Create As Container Database

Pluggable Database Name: PDB_A

specify PDB name, etc

4.  Click Next to start Prerequisite Checks.

 Prerequisite Checks
 Prerequisite Checks

5.  Review the summary page and click Finish.

Create Database Summary

6. Check the progress:

database creation processing

7.  The database creation is finished. Click Exit, then Close.

database creation completed successfully
Featured

Client Side Transparent Application Failover for Oracle RAC

TAF – Transparent Application Failover is a very useful feature in mission critical environment.

TAF – – Transparent Application Failover is a feature of the OCI driver, and TAF cannot be used with thin driver. The client side TAF can be configured through client connection definitions in TNS connect descriptors.

The tests are held under the following environment,  both 11gR2 database and client are used to test the behaviors of client side TAF by using SCAN.

                    GI: 12.1.0.2.0
4 nodes RAC: 11.2.0.4
Oracle Client: 11.2.0.4

The service name is RAC_TEST running on node1 and node4, while available nodes are node2 and node3.

$ srvctl status service -s RAC_TEST -d TESTDB
Service RAC_TEST is running on instance(s) TESTDB1,TESTDB4

There are two TYPES of TAF available, SESSION and SELECT.

SESSION: Session Failover re-creates the connections and sessions to the surviving instance.

SELECT: In addition to recreating the session, Select Failover also replays the queries that were in progress.

There are two METHODS in which TAF establishes the failover connection, BASIC and PRECONNECT.

BASIC: The second connection is re-established only after the first connection to the instance or service failed.

PRECONNECT: Two connections are established when the client logs in to the database. A login to database will create two connection at the same time. For this to work, clusterware actually starts two services. One main service and another shadow service.

Client Side TAF Configuration — BASIC

For non-TAF database connection, by query gv$session to get client side TAF connection details, which demonstrates the server side TAF is not configured. That is what we expected in this case.

SQL>select INST_ID,USERNAME,FAILOVER_TYPE,FAILOVER_METHOD,FAILED_OVER
from gv$session
where username='TESTUSER';

INST_ID USERNAME FAILOVER_TYPE FAILOVER_M FAILED_OVER ------- --------- -------------- ----------- -------------
4 TESTUSER NONE NONE NO

Use the following TNS entry to test client side TAF with BASIC method.

CLIENT_TAF =
( DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =CLU-SCAN)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = RAC_TEST)
(FAILOVER_MODE= (TYPE=select)(METHOD=basic)
(RETRIES=20)(DELAY=15))
)
)

1) Make a database connection by using TNS entry CLIENT_TAF, and run a long query :

SQL>select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
           FAILOVER_METHOD,FAILED_OVER 
      from gv$session 
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAI -------- ----- -------- --------- ------------- ----------- --- 4 70 11171 TESTUSER SELECT BASIC NO

2) Manually kill the session ( only works when session is ACTIVE, otherwise it is not working for killing from testing ).

SQL> alter system kill session '70,11171,@4';

System altered.

 Query the session status, we can see a new failed over session with different ‘SID, serial#’ created, and the query is still going until completed.

 SQL> select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
             FAILOVER_METHOD,FAILED_OVER 
from gv$session
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAILED_OVER -------- ---- ------- -------- ------------- --------- ------------ 4 366 14271 TESTUSER SELECT BASIC YES

3) Instead of killing session in step 2, we manually stop the service on node 4 to simulate instance crash. (  it works for both ACTIVE and INACTIVE sessions ).

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE  FAILOVER_M FAI
------- --- ------- -------- -------------- ---------- ---
4 70 11185 TETSUSER SELECT BASIC NO

Now stop the service on node4, expect the session will failover onto survival node1 .

$ srvctl stop service -s RAC_TEST -i TESTDB4 -d TESTDB -f
SQL> select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
FAILOVER_METHOD,FAILED_OVER
from gv$session
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAI
------- --- -------- --------- -------------- ---------- ---
1 367 8663 TETSUSER SELECT BASIC YES

restart the service on node4 for more tests.

$ srvctl start service -s RAC_TEST -i TESTDB4 -d TESTDB

Client Side TAF Configuration — PRECONNECT

Two tnsname entries are prepared with following contents:

PRIMARY=
( DESCRIPTION=(ADDRESS=
(PROTOCOL=tcp)(HOST=clu-scan)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=RAC_TEST)
(FAILOVER_MODE=(BACKUP=SECONDARY)(TYPE=select)
(METHOD=preconnect))
)
)

SECONDARY=(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=clu-scan)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=RAC_TEST)
(FAILOVER_MODE=
(BACKUP=PRIMARY)
(TYPE=select)
(METHOD=preconnect))
)
)

1) Make a database connection by using TNS entry above, and run a long query :

SQL> select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
FAILOVER_METHOD,FAILED_OVER,status
from gv$session
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAI STATUS
------- ---- ------ ---------- ------------ ----------- --- -------- 1 42 8485 TESTUSER NONE NONE NO ACTIVE 4 366 14375 TESTUSER SELECT PRECONNECT NO INACTIVE

2) Manually stop service RAC_TEST on node 4.

$ srvctl stop service -s RAC_TEST -i TESTDB4 -d TESTDB -f

3) The preconnected session takes over the session and continue the query until completion.

SQL> select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
FAILOVER_METHOD,FAILED_OVER,status
from gv$session
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAI STATUS ------- --- ------- ---------- ------------ ------------- --- -------- 1 42 8485 TESTUSER SELECT PRECONNECT YES ACTIVE

Restart service on node4 for next test.

$ srvctl start service -s RAC_TEST -i -i TESTDB4 -d TESTDB

4) if you kill this PRECONNECT session again , TAF still works again as preconnect.

SQL> alter system kill session '42,8485,@1';

System altered.
SQL> select INST_ID,sid,serial#,USERNAME,FAILOVER_TYPE,
FAILOVER_METHOD,FAILED_OVER,status
from gv$session
where username='TESTUSER';

INST_ID SID SERIAL# USERNAME FAILOVER_TYPE FAILOVER_M FAI STATUS
------- --- ------- --------- ------------ ----------- --- ------
4 265 1563 TESTUSER SELECT PRECONNECT YES ACTIVE

TAF – Transparent Application Failover is a very useful feature in mission critical environment, and it should be used whenever it is available and possible.

How to Move SQL Database Files to New Location

Move Database Files By SQL Script

1) Get database files details.

SELECT name, physical_name AS NewLocation, state_desc AS OnlineStatus
FROM sys.master_files
WHERE database_id = DB_ID(N'TestDatabase')
GO

2) Run the following SQL script to set a new location for SQL database files.

ALTER DATABASE TestDatabase   
    MODIFY FILE ( NAME = TestDatabase,   
                  FILENAME = 'C:\MSSQLDB\MSSQL15.MSSQLNODE1INST1\UserDB\Data\TestDatabase.mdf');  
GO
 
ALTER DATABASE TestDatabase   
    MODIFY FILE ( NAME = TestDatabase_log,   
                  FILENAME = 'C:\MSSQLDB\MSSQL15.MSSQLNODE1INST1\UserDB\Log\TestDatabase_log.ldf');  
GO

3) Run the following SQL script to take SQL database offline:

ALTER DATABASE TestDatabase SET OFFLINE; 
 GO

4) Move mdf and ldf files to the new location specified in the statement of step2.

5) Now database can be set online by running the following query.

ALTER DATABASE TestDatabase SET ONLINE;  
GO

6) To verify the results by running the following query.

SELECT name, physical_name AS NewLocation, state_desc AS OnlineStatus
FROM sys.master_files
WHERE database_id = DB_ID(N'TestDatabase')
GO

Move Database Files By using Detach and Attach Function

  1. Launch SSMS.
  2. Login to the SQL instance with an account that has the SysAdmin server role.
  3. Navigate to “Databases“.
  4. Right click the database that files to be moved to new location.
  5. Select “Properties“.
  6. In the Properties window, in the Select a Page panel, click “Files“.
  7. Record down the paths and filenames for the database.
  8. Click “OK”.
  9. Right click the same database again.
  10. Select “Tasks “, then click “Detach“.
  11. In the Detach Database window, check the box “Drop Connections“.
  12. Click “OK“.
  13. Launch Windows Explorer.
  14. Browse to the path recorded in step 7.
  15. Move the database’s files to the new location.
  16. Record down the paths where you have just moved the files to.
  17. Return to SSMS again.
  18. Right click “Databases
  19. Select “Attach“.
  20. In the Attach Databases window, click “Add“.
  21. Browse to the path you wrote down in step 16.
  22. Select the .mdf filename for the database.
  23. Click “OK”.
  24. If the other files are not found, click the ellipsis next to the filename that is not found.
  25. In the Locate Database Files window, “browse” to the location of the file for the database that you wrote down in step 16.
  26. Select the file.
  27. Click “OK”.
  28. In the Attach Databases window, click “OK”.

How to Configure SQL Server to Access USB Shared Folder in VirtualBox

In SQL Server Management Studio, you will only see the local drives available to SQL Server database engine. In this article we will take a look at the approach on how to configure SQL Server to access shared folder to perform database backup or restore commands, even further the SQL Server datafiles and logfiles can be stored on to shared folders in Oracle VirtualBox.

Install Guest Additions  

The first thing is to install guest additions if not yet as per following instructions.

Navagite to Devices->Optical Drive->Choose a disk file-> highlight “VboxGuestAdditions” file.
Then click Open.

VirtualBox Guest Addition

Double-click on this CD drive to launch the Oracle VM VirtualBox guest additional setup.

VirtualBox Guest Addition
Start guest additional installation
VirtualBox Guest Addition

Click Next and select the destination folder. It requires approx 1 MB space in the drive.

Destination folder
VirtualBox Guest Addition

In the next step, it shows the components to install.

Select components
VirtualBox Guest Addition

Reboot the VM to complete the guest additional feature for a VM.

Reboot VM
VirtualBox Guest Addition

  Set up VM Shared Folders

VM macine -> Settings->Shared Folders->Add New Shared Folder(+)->Choose Folder Path.

Click OK.

VirtualBox Shared Folder

Go to File Explorer, we can see the following expected network diagram.

Network VBOXSVR of Shared Folder

Enable xp_cmdshell Command in SQL Server

xp_cmdshell is disabled by default. so we need use sp_configure command to enable it as shown below:

EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO

EXEC sp_configure 'xp_cmdshell',1
GO
RECONFIGURE
GO

Define the Share Drive for SQL

Now we need define the shared folder with xp_cmdshell command of SQL server as below:

EXEC XP_CMDSHELL 'net use Z: \VBOXSVR\mssql'

To verify the new drive, we can use the below command that will show you all files in that newly mapped drive:

EXEC XP_CMDSHELL 'Dir Z:' 

To un-map the shared folder drive from SQL server by:

exec xp_cmdShell 'net use Z: /delete'

Test the Shared Folder Drive in SQL Server

Backup Database onto Shared Folder Drive from SSMS

SSMS backup database

SSMS backup database
SSMS backup database

Backup Database onto Shared Folder Drive by Running SQL Script

BACKUP DATABASE [AdventureWorks15] TO DISK = N'Z:\AdventureWorks15.bak'
WITH NOFORMAT, NOINIT, NAME = N'AdventureWorks15-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
Processed 25016 pages for database 'AdventureWorks15', file 'AdventureWorks15' on file 2.
100 percent processed.
Processed 296 pages for database 'AdventureWorks15', file 'AdventureWorks15_log' on file 2.
BACKUP DATABASE successfully processed 25312 pages in 8.847 seconds (22.352 MB/sec).
Completion time: 2020-09-21T18:07:50.3413113+10:00

Create a Database onto Shared Folder Drive

CREATE DATABASE [TestDatabase] ON (NAME = N'TestDatabase', FILENAME = N'Z:\TestDatabase.mdf', SIZE = 512MB, FILEGROWTH = 64MB) LOG ON (NAME = N'TestDatabase_log', FILENAME = N'Z:\TestDatabase_log.ldf', SIZE = 256MB, FILEGROWTH = 32MB) 
GO
Commands completed successfully.
Completion time: 2020-09-21T18:15:32.9791694+10:00

Restore Database onto Shared Folder Drive

Query the logical file names of the database from the previous backup.

RESTORE FILELISTONLY
FROM DISK = 'Z:\AdventureWorks15.bak'

Restore the backup to a new database by using the logicalname column of the previous step.

RESTORE DATABASE AdventureWorks15New
FROM DISK = 'Z:\AdventureWorks15.bak'
WITH MOVE 'AdventureWorks15' TO 'Z:\AdventureWorks15New.mdf',
MOVE 'AdventureWorks15_log' TO 'Z:\AdventureWorks15New_log.ldf'
Processed 25016 pages for database 'AdventureWorks15New', file 'AdventureWorks15' on file 1.
Processed 294 pages for database 'AdventureWorks15New', file 'AdventureWorks15_log' on file 1.
RESTORE DATABASE successfully processed 25310 pages in 5.330 seconds (37.097 MB/sec).
Completion time: 2020-09-21T18:29:04.4634020+10:00

So all works as expected. The shared folder now can be used to store backups, and also datafiles/logfiles of a SQL server.

ERROR: Unable to open policy //etc/selinux/targeted/policy/policy.31

When installing Oracle VirtualBox 6.1.4 Guest Addition on Linux, the following errors occur:

# mount /dev/cdrom /media/cdrom
# cd /media/cdrom

# ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 6.1.14 Guest Additions for Linux……..
VirtualBox Guest Additions installer
Removing installed version 6.1.4 of VirtualBox Guest Additions…
Copying additional installer modules …
Installing additional modules …
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
4.14.35-1902.10.7.el7uek.x86_64.
ERROR: Can't map '//etc/selinux/targeted/policy/policy.31': Invalid argument
ERROR: Unable to open policy //etc/selinux/targeted/policy/policy.31.
libsemanage.semanage_read_policydb: Error while reading kernel policy from /etc/selinux/targeted/active/policy.kern. (No such file or directory).
OSError: No such file or directory
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted

Check ‘//etc/selinux/targeted/policy/policy.31’ file exists but zero size.

#ls -ltr //etc/selinux/targeted/policy/policy.31
-rw-r--r-- 1 root root 0 May 1 6:03 //etc/selinux/targeted/policy/policy.31

SOLUTION

Install the latest package for “selinux-policy-targeted”.

# yum install selinux-policy-targeted

Then run VirtualBox Guest Additions installer successfully.

# ./VBoxLinuxAdditions.run uninstall


# ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 6.1.14 Guest Additions for Linux……..
VirtualBox Guest Additions installer
Copying additional installer modules …
Installing additional modules …
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
4.14.35-1902.10.7.el7uek.x86_64.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted

An internal error has occurred at the agent: “java.lang.IllegalStateException: getAgentSubstitutionMap(“cluster.ClusterName”) == null”

While testing a named credential in OEM 13c by following command with errors:

Here “CLU-RACTEST” is the GI cluster name.

$emcli test_named_credential -cred_names="SEC_RACTEST" -target_name="CLU-RACTEST" -target_type="cluster"

An internal error has occurred at the agent: "java.lang.IllegalStateException: getAgentSubstitutionMap("cluster.CLU-RACTEST") == null". Check the agent's error logs for details.

Run “emctl config agent listtargets”, it shows there is no ‘cluster’ target type listed for any of the monitoring agents.

The <AGENT_INST>/sysman/log/gcagent.log showed the below errors.

2020-09-11 14:20:12,572 [631842:5A0FE62C] WARN - target cluster.CLU-RACTEST does not exist
...
..
.
[159979801250001])] ERROR - remote target "cluster.CLU-RACTEST" has NO substitution properties; check that it is properly configured
2020-09-11 14:20:12,573 [631842:HTTP Listener-631842 - /emd/main/ (DispatchRequests OMS.console@17163@oemnode1=>[159979801250001])] ERROR - Critical error:
java.lang.IllegalStateException: getAgentSubstitutionMap("cluster.CLU-RACTEST") == null
at oracle.sysman.gcagent.jobs.JobRequestDriver.substitute(JobRequestDriver.java:2162)
at oracle.sysman.gcagent.jobs.JobRequestDriver.(JobRequestDriver.java:1500)
at oracle.sysman.gcagent.jobs.JobRequestDriver.(JobRequestDriver.java:1529)
at oracle.sysman.gcagent.dispatch.cxl.PerformOperationAction.satisfyRequest(PerformOperationAction.java:130)
...
..
.

SOLUTION

From the OEM Console, go to Cluster homepage -> Target Setup -> Monitoring Configuration.
Click on the Update button (no need to make any other changes).

This will push the cluster target details to the agent side.

Then run “emcli test_named_credential” successfully.

$emcli test_named_credential -cred_names="SEC_RACTEST" -target_name="CLU-RACTEST" -target_type="cluster"

Credentials "SEC_RACTEST:SYSMAN" tested successfully