Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, November 21, 2022

How SID is different from Service name in Oracle:

 In short: SID = the unique name of your DB, ServiceName = the alias used when connecting.

SERVICE_NAMES specifies one or more names by which clients can connect to the instance. The instance registers its service names with the listener. When a client requests a service, the listener determines which instances offer the requested service and routes the client to the appropriate instance.


SID, DB Name, DB Domain, Global Database Name, Service Name, Service Alias and Instance Name in Oracle ?

SID = identifies the database instance (database name + instance number). So if your database name is somedb and your instance number is 3, then your SID is somedb3.

DB Name = Name of the database (database can be shared b/t multiple instances)

DB Domain = Usually the same as your company domain (somecompany.com)

Global Database Name = Database name + database domain (somedb.somecompany.com)

Service Name = A "connector" to one or more instances. It is often useful to create additional service names in a RAC environment since the service can be modified to use particular SIDs as primary or secondary connections, or to not use certain SIDs at all.

Service Alias = An alias to the service name (just like a CNAME, etc). Say you make your service name something meaningful to the dba, but perhaps it's a bit esoteric. Create a service alias and name it something that will be meaningful to the user.

Instance name = same as SID

Thursday, August 4, 2022

Start up sequence:

The operating system starts ohasd (how):

Once the Operating system starts and finish the boot scrap process it reads /etc/init.d file via the initialisation daemon (INIT daemon >>) called init or init.d. The init tab file is the one it triggers oracle high availability service daemon

INIT daemon is very first daemon to be start  at the time of the operating system boot, we can say it  is system and service manager for the oracle linuxor any linux flavor. This services are start and stop through script which is stored in the /etc/init.d directory .

OHASD:-

Oracle High Availability Daemon   is the introduced in oracle 11g which is manage all clusterware resources , it is  responsible to start and monitor all local oracle clusterware daemon. We can say it is anchor for the all the process .

cat /etc/inittab|grep init.ohasd

h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null

HAS startup sequence:

– /etc/inittab

– /etc/init.d/init.ohasd

– /etc/rc.d/init.d/ohasd

– $GRID_HOME/bin/ohasd.bin

“/etc/init.d/init.ohasd” is started at runlevel 3 (networked, multi-user mode) or runlevel 5 (runlevel 3 + GUI).Logs present under “$GRID_HOME/log/<host_name>“.

/etc/inittab >>/etc/init.d/init.ohasd>>>/etc/rc.d>init.d/ohasd>>$GRID_HOME/ohasd.bin

“crsctl disable crs” updates a flag in “/etc/orale/scls_scr/<host_name>/root/ohasdstr“.

This file either contains “enable” or “disable” without any carriage return.

If “disable“, “/etc/rc.d/init.d/ohasd” will not startup.

nohup /etc/init.d/init.ohasd run &

 ohasd starts agents(whic all agent):

cssdagent - Agent responsible for spawning CSSD. >>> CSSD 

orarootagent - Agent responsible for managing all root owned ohasd resources.

         CRSD - Primary daemon responsible for managing cluster resources.

         CTSSD - Cluster Time Synchronization Services Daemon

         Diskmon

         ACFS (ASM Cluster File System) Drivers

oraagent - Agent responsible for managing all oracle owned ohasd resources.

         MDNSD - Used for DNS lookup

         GIPCD - Used for inter-process and inter-node communication

         GPNPD - Grid Plug & Play Profile Daemon

         EVMD - Event Monitor Daemon

         ASM - Resource for monitoring ASM instances  

cssdmonitor - Monitors CSSD and node health (along wth the cssdagent).

         CSSDmonitor

to start up daemons (gipcd, mdnsd, gpnpd, ctssd, ocssd,crsd, evmd asm etc), and 

crsd starts agents Which)

orarootagent - Agent responsible for managing all root owned crsd resources.

            Network resource - To monitor the public network

            SCAN VIP(s) - Single Client Access Name Virtual IPs

            Node VIPs - One per node

            ACFS Registery - For mounting ASM Cluster File System

            GNS VIP (optional) - VIP for GNS

oraagent - Agent responsible for managing all oracle owned crsd resources.

           ASM Resouce - ASM Instance(s) resource

           Diskgroup - Used for managing/monitoring ASM diskgroups.

           DB Resource - Used for monitoring and managing the DB and instances

           SCAN Listener - Listener for single client access name, listening on SCAN VIP

           Listener - Node listener listening on the Node VIP

           Services - Used for monitoring and managing services

           ONS - Oracle Notification Service

           eONS - Enhanced Oracle Notification Service

           GSD - For 9i backward compatibility

           GNS (optional) - Grid Naming Service - Performs name resolution

that start user resources (database, SCAN, listener etc).

http://rafik-dba.blogspot.com/2019/02/oracle-rac-startup-sequence.html

http://oracle-help.com/oracle-rac/rac-11gr2-clusterware-startup-sequence/

Thursday, July 28, 2022

All Explaination

 http://dbaparadise.com/2021/01/what-is-local-undo-mode/

==============

Four Ways to Startup or Shutdown Your 19c Database:

There you have the 4 tools: SQLPLUS, RMAN, Cloud Control, SRVCTL!

=================

What Is Local Undo Mode:

12c database (release 1)>>shared undo mode>>undo tablespace was shared by all the PDBs within the same CDB, meaning there was only one UNDO tablespace for the instances.

with 12cR2, the local undo mode was introduced>>each PDB has their own UNDO tablespaces.This is required by a few Oracle features, ie. hot cloning.

Here are some of features that I came across, that require local undo mode: PDB hot cloning, creating refreshable PDBs, near zero downtime PDB relocation, proxy PDBs.

If the database (the CDB) is created with DBCA, then local undo mode is the default mode. If the database (the CDB) is created with the CREATE DATABASE statement, then shared undo mode is the default.

In the latter case, you need to use the undo_mode_clause and specify LOCAL UNDO ON explicitly, if you want to create a database with local undo mode.

How to determine what undo mode the database is in? The answer is in the database_properties view

col property_name for A20

col property_value for A20

 select property_name, property_value  from database_properties where property_name like '%UNDO%';

Another method:

select con_id, tablespace_name from cdb_tablespaces where contents like '%UNDO%' order by 1;

How to switch to local undo mode?

it requires an outage.

sqlplus / as sysdba

shutdown immediate;

startup upgrade

 alter database local undo on;

 shutdown immediate;

startup;

To switch to shared undo mode

sqlplus / as sysdba

shutdown immediate;

startup upgrade;

alter database local undo off;

 shutdown immediate;

startup;

Note that the local undo tablespace inside the PDBs will not be dropped by Oracle and it will not be used either. For clarity purposes it is recommended to drop them manually after you switch the database to shared undo mode.

======================

MAX_PDBS parameter:

Introduced in 12cR2.

To limit the number of pluggable databases (PDBs) one can create in a CDB or in an application root container. 

the PDB$SEED, Application Seed and Application Root are ignored from the count.

By default this parameter’s value is 4098

Why would you want to limit the number of PDBs a user can create in the CDB?

One of the reasons is licensing!

In 12c version you can have 1 user created PDB, without paying for the Multitenant option. In 19c you can have up to 3 user created PDBs in a CDB, without paying for the Multitenant option.

Once the parameter is set, if you will try to create another PDB, by accident, you will receive an error: ORA-65010: maximum number of pluggable databases created.

alter system set MAX_PDBS=3 scope=both;

==================

How To Use Datapump Between Different Database Releases:

What if the source database is 12.2 and the target database version is 11.2?>> Use Vesion version=12.1

What if the versions are the same, but the compatible parameter of the target database is lower?

Once you find out the target version/compatible parameter, running a datapump export job with the appropriate version will be easy, as Oracle is providing you with an export datapump parameter called VERSION to facilitate this process.

An export datapump dumpfile created by a lower version of Oracle will always be compatible with a higher version of Oracle.

======================

active duplicate :

Duplicating from an active database doesn’t require any RMAN backup to be taken from the source database. Actually, it reads all database structure from the source database that needs to be mounted or opened during the duplication.Although this method seems easy as we don’t need to backup source database or make it accessible for auxiliary instance anymore, it has its own disadvantages as well.

Two big disadvantages of the ACTIVE database duplication method are:

Negative performance impact on the source database. This impact applies to the whole duplication time.

High network traffic on the connection between the source and target databases.

 RMAN>run{

            DUPLICATE TARGET DATABASE TO HRPRD

            FROM ACTIVE DATABASE;

           }

1- Prepare auxiliary instance HRPRD1 on prd-db-01:

2- Enable status registration for HRPRD1 to run LISTENER:

3- Add following TNS entries to BOTH auxiliary and target tnsnames.ora file:

4- Ceate a password file for auxiliary instance HRPRD1 on prd-db-01:

5- Test connectivity to auxiliary and target instances from BOTH hosts using TNS:

6- On the auxiliary host, start RMAN and run the DUPLICATE command:

7- When step 6 finishes successfully, start HRPRD database using srvctl. You need to enable the second thread as well:

==============================

pdb restricted mode.

Here we use OPEN FORCE to leave restricted mode and go back to normal READ WRITE.

alter pluggable database ORCLPDB open force;

https://dbalifeeasy.com/category/oracle/cdbpdb/

Under the guidance of Oracle Support for specific purpose, the following instructions can be followed to open seed database “PDB$SEED” in “READ WRITE” mode.

Set hidden parameter “_oracle_script” at session level

SQL> alter session set "_oracle_script"=TRUE;

https://dbalifeeasy.com/2018/01/22/how-to-remove-pdb-from-restricted-mode/

SQL> select INST_ID,NAME,OPEN_MODE,RESTRICTED 

     from gv$pdbs order by 1,2;

Check PDB_PLUG_IN_VIOLATIONS.

select status, message, action 

     from   pdb_plug_in_violations 

     where  status !='RESOLVED';

===================================

 

 

Sunday, July 24, 2022

mod_wl_ohs.conf file – Oracle APPS 12.2

Basic use of the file (Text Based) is for redirecting the http requests to the concerned Managed/admin server for particular context root.

If in your environment any one says i am trying to hit Test and it goes to Prod/some where you need to lookout here first.

Entry would look like below :

<IfModule weblogic_module> 

<Location path>            

SetHandler weblogic-handler

WebLogicHost host

WeblogicPort port

</Location>

</IfModule>

Saturday, July 23, 2022

Friday, July 22, 2022

R12 E-Business Suite Concurrent Processing Script Cpadmin.sh Command Line Utility Which Consolidates Existing CP Tools Into A Single Menu-Based Shell Script (Doc ID 2319585.1)


R12 E-Business Suite Concurrent Processing Script Cpadmin.sh Command Line Utility Which Consolidates Existing CP Tools Into A Single Menu-Based Shell Script (Doc ID 2319585.1)

ADOP CUTOVER (Reducing Time):

What can I do to reduce the time required for cutover?

It is important to distinguish between the time needed for the whole cutover phase, and the downtime period within the phase.

The actual downtime (during which users cannot log in) is significantly shorter than the whole phase.

To help reduce the overall time taken by cutover, you can do three things:

  • Run the finalize phase explicitly, to obviate the need for cutover to do so.
  • Shut down the concurrent managers before running cutover, to avoid having to wait for concurrent requests to complete. Alternatively, ensure no long-running concurrent jobs are submitted while a patching cycle is in progress.
  • Ensure you are using the maximum number of parallel workers your system will support.

How To Run An Empty Patching Cycle Without Applying A Patch? (Doc ID 2316218.1)

 GOAL:

On: 12.2 version, Online Patching 

Can a cutover be run, from fs1 to fs2 outside of patching cycle? For testing purposes, without applying any patch, can a cutover to switch filesystem from fs1 to fs2?

How to execute empty patching cycle, without applying any patch?

SOLUTION:

The syntax to run an empty patch cycle is:

Quick Version:

$ cd <EBS_ROOT>

$ source EBSapps.env run

$ adop phase=prepare,finalize,cutover

$ source EBSapps.env run

$ adop phase=cleanup

Complete Version:

$ cd <EBS_ROOT>

$ source EBSapps.env run

$ adop phase=prepare

$ adop phase=actualize_all

$ adop phase=finalize finalize_mode=full

$ adop phase=cutover

$ source EBSapps.env run

$ adop phase=cleanup cleanup_mode=full

Thursday, July 21, 2022

Oracle 11G New Features




http://www.oracle-base.com/articles/11g/Articles11g.php

Troubleshooting: CRS fails to start:

Run flashgrid-cluster command to confirm that all nodes are up and no nodes are shown as Inaccessible.

Kill all ohasd.bin reboot processes on the database nodes where CRS fails to start:

ps -ef | grep "ohasd.bin reboot" | grep -v grep | awk '{print $2}' | xargs kill -9

Start CRS: crsctl start crs -wait



https://blog.pythian.com/services-not-starting-automatically-with-crs-after-reboot/

http://www.dba-oracle.com/t_rac_crs_start_failure.htm

http://www.dbaref.com/troubleshooting-rac-issues/howtotroubleshootgridinfrastructurestartupissues

https://www.thegeekdiary.com/troubleshooting-oracle-rac-node-evictions-reboots-11-2-and-above/

How to Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]

Grid Infrastructure clusterware startup sequence, please refer to note 1053147.1

http://blog.itpub.net/21980353/viewspace-2141629/

https://dbamarco.wordpress.com/tag/clusters-2/


https://www.hhutzler.de/blog/troubleshooting-clusterware-startup-problems/

OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) (Doc ID 428681.1)

OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) (Doc ID 428681.1)

Rename Diskgroup having OCR , Vote File , ASM SPILE (Doc ID 1335975.1)

Move OCR , Vote File , ASM SPILE to new Diskgroup (Doc ID 1638177.1)

 Move OCR , Vote File , ASM SPILE to new Diskgroup (Doc ID 1638177.1)


Basic steps to move to  the new diskgroup :

1) Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files.

2) Ensure that the new diskgroup is mounted on all cluster nodes.

3) Move OCR and Vote file from <Current diskgroup> to <CRS>.

4) Change ASM SPFILE location from <current diskgroup> to <CRS> Diskgroup.

5) Mount new <CRS> diskgroup in all nodes and restart CRS in all Nodes to Startup CRS using New SPFILE from <CRS> Diskgroup.

6) Verify mount of disks and diskgroups.

7) Ensure ALL Cluster Resources are started successfully .

8)  Modify OCR backup location

=============

EXAMPLES: Detailed steps with commands to rename the diskgroup :

1) Create New CRS diskgroup

Login as SYSASM using SQLPLUS into ASM instance on one node and run below command:

Sample Command:

SQL> create diskgroup CRS normal redundancy disk 'ORCL:DISK4' ,'ORCL:DISK5' ,'ORCL:DISK6'

attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0';

Diskgroup created.

Make sure the diskgroup is mounted on all the nodes.

NOTE:

If the diskgroup you are moving the OCR to is not online on all nodes, then the ocr.loc file on those nodes where the Diskgroup is not online will not be updated.

This will prevent CRS from restarting on those nodes that the diskgroup is not online.  And the ocr.loc file may need manual intervention.

2)Ensure that the new diskgroup is mounted on all cluster nodes:

SQL> alter diskgroup CRS mount;

SQL> select name, state, type from v$asm_diskgroup;

3) Move OCR and Vote file from <Current diskgroup> to <CRS>

$ORACLE_HOME/bin/bin/ocrconfig -add +CRS

$ORACLE_HOME/bin/bin/ocrconfig -delete +DATA

$ORACLE_HOME/bin/crsctl replace votedisk +CRS

Sample Command Output:

[root@test ~]# $ORACLE_HOME/bin/ocrconfig -add +CRS

[root@test ~]# $ORACLE_HOME/bin/ocrconfig -delete +DATA

[grid@test ~]# $ORACLE_HOME/bin/crsctl replace votedisk +CRS

Successful addition of voting disk 9d351cfdbef64facbfe2d1519880ef33.

Successful addition of voting disk 302c23b19e864f92bfa68eda9045e5cc.

Successful addition of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b.

Successful deletion of voting disk 32f7d65cf17d4fa3bf2932998251635f.

Successful deletion of voting disk 10c31fb0891d4f5abfb38ef34cd49f4d.

Successful deletion of voting disk 7d6f7d6480554f01bfc2621a3adb8f5f.

Successfully replaced voting disk group with +CRS.

CRS-4266: Voting file(s) successfully replaced

[root@test ~]# $ORACLE_HOME/bin/crsctl query css votedisk

## STATE File Universal Id File Name Disk group

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

1. ONLINE 9d351cfdbef64facbfe2d1519880ef33 (ORCL:DISK4) [CRS]

2. ONLINE 302c23b19e864f92bfa68eda9045e5cc (ORCL:DISK5) [CRS]

3. ONLINE 6eeca4920acb4f8fbf6ec5a4e2b8ea7b (ORCL:DISK6) [CRS]

Located 3 voting disk(s).

[root@test ~]# $ORACLE_HOME/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 2804

Available space (kbytes) : 259316

ID : 1778064925

Device/File Name : +CRS

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

4) Change ASM SPFILE location from <Current diskgroup> to <CRS> Diskgroup.

Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:

SQL> create pfile='/tmp/init/init' from spfile;

SQL> create spfile='+CRS' from pfile='/tmp/init/init';

Now GPNPTOOL will get updated with new ASM SPFILE location.

That can be verified by below command :  (As grid user or root)

$ORACLE_HOME/bin/gpnptool get

5)Mount diskgroup in all RAC nodes:

SQL> alter diskgroup CRS mount;

Restart CRS in all nodes to startup CRS using new SPFILE from <CRS> diskgroup :

$> crsctl stop crs

$> crsctl start crs 

6) Verify the mount of the diskgroup and its disks:

SQL> set line 1000

SQL> set pages 599

SQL> col path format a30

SQL> select name,path,group_number,header_status,total_mb,free_mb from v$asm_disk;

NAME PATH GROUP_NUMBER HEADER_STATU TOTAL_MB FREE_MB

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

DATA1 ORCL:DATA1 2 MEMBER 15109 9982

DATA2 ORCL:DATA2 2 MEMBER 15109 9982

DATA3 ORCL:DATA3 1 MEMBER 15109 9982

DATA4 ORCL:DATA4 3 MEMBER 15109 9982

DISK4 ORCL:DISK4 3 MEMBER 860 576

DISK5 ORCL:DISK5 3 MEMBER 668 376

DISK6 ORCL:DISK6 3 MEMBER 668 372

SQL> select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup;

NAME STATE USABLE_FILE_MB TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB

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

DATA MOUNTED 9982 15109 9982 0

CRS MOUNTED 552 2448 1400 296

7) Ensure ALL Cluster resources are started successfully using below sample commands :

$ORACLE_HOME/bin/crsctl stat res -init -t

$ORACLE_HOME/bin/crsctl check cluster -all

$ORACLE_HOME/bin/crsctl stat res -t 

8) Modify the backup location for the OCR

ocrconfig -backuploc <new location>


https://dbaclass.com/article/how-to-move-voting-disk-to-another-asm-disk/

12c-asm-new-features:

 12c Database : ASM Enhancements : Password files in ASM Disk group

ASM version 11.2 allowed ASM spfile to be placed in a disk group.

In 12c we can also put ASM password file in an ASM disk group.

ASM : ASMCMD in 12c:

New ASMCMD commands, now ASMCMD has the ability to do password file management, patches on asm instances, and version

pwcopy Copies a password file to the specified location. pwcreate Creates a password file at the specified location. pwdelete Deletes a password file at the specified location. pwget Returns the location of the password file. pwmove […]

12c Database : ASM Enhancements : OCR backup to disk group

Oracle Cluster Registry (OCR) backup in ASM disk group

Before to 12c the ocr backup is located in the master node local disk at GRID_HOME/cdata/backup, but if OCR is corrupted and you have to restore you will need to find the master node and initiate the restore option.

Storing the OCR backup in an […]

Tuesday, July 12, 2022

Oracle RAC VIP and SCAN IPs

 VIPs:

A VIP is a Virtual IP address, and should be defined in DNS and not assigned to any host or interface.When you install GRID/ASM home, you'll specify the VIP names that were assigned in DNS. When Oracle Clusterware starts up, it will assign a VIP to each node in the cluster. The idea is, if a node goes down (crashes), clusterware can immediately re-assign that VIP to a new (surviving) node. This way, you avoid TCP timeout issues.

SCAN:

A SCAN (Single Client Access Name) is a special case of VIP. The SCAN should also be defined in DNS, and not assigned to any host or interface. There should be three IPs associated with the SCAN name in DNS, and the DNS entry should be defined so that one of the three IPs is returned each time DNS is queried, in a round robin fashion.

At clusterware startup time, each of the three VIPs that make up the SCAN will be assigned to a different node in the cluster. (Except in the special case of a two node cluster, one of the nodes wil have a 2 SCAN VIPs assigned to it.) The point of the SCAN, is that no matter how many nodes are added to or removed from the cluster, all the Net Service Name definitions in your tnsnames.ora (or LDAP equivalent) will not need to ever change, because they all refer to the SCAN, which doesn't change, regardless of how many node additions or drops are made to the cluster.


For example, in the three node cluster, you may have:


Physical and virtual hostnames/IPs assigned as follows:


Hostname    Physical IP    Virtual hostnmae   Virtual IP

rac1        10.1.1.1       rac1-vip           10.1.1.4

rac2        10.1.1.2       rac2-vip           10.1.1.5

rac3        10.1.1.3       rac3-vip           10.1.1.6

Additionally, you may have the SCAN defined as: rac-scan with three IPs, 10.1.1.7, 10.1.1.8, 10.1.1.9. Again, the DNS definition would be defined so those IPs are served up in a round robin order.

Note that the SCAN VIPs, Host VIPs, and the Physical IPs are all in the same subnet.

Finally, though you didn't ask about it, to complete the picture, you'd also need one private, non-routable IP assigned per host, and that IP would be associated with the private interconnect. So, you may have something like:

rac1-priv  172.16.1.1

rac2-priv  172.16.1.2

rac3-priv  172.16.1.3

Note that the '-priv' addresses should not be in DNS, only in the /etc/hosts file of each host in the RAC cluster. (They are private, non-routable, and only clusterware will ever know about or use those addresses, so adding to DNS doesn't make sense.)

Note also, that '-priv' and physical IP/hostname definitions should go in /etc/hosts, and the physical IPs and VIPs should be in DNS. So, physical IPs in both DNS and /etc/hosts, VIPs only in DNS, '-priv' addresses only in /etc/hosts.


https://stackoverflow.com/questions/30219464/oracle-rac-vip-and-scan-ips

http://oracledbadmins.blogspot.com/2016/06/f.html


Friday, July 1, 2022

FORCE LOGGING Mode in Oracle:

 Force = even if someone says nologging, then we will log the *normal* redo information

=In Force logging mode Oracle database must write the redo records even when NOLOGGING is used with DDL Statements.

=It will force the write of REDO records even when no-logging is specified.

=If we write the NOLOGGING option with DDLs command then our database will not generate redo for that DDLs but in case of Dataguard or media recovery has negative impact of it. So before implement Dataguard or standby server we need to enable the FORCE LOGGING mode of the Oracle Database.So every changes should be recorded and updated in standby server while syncing.

  • Force Logging is enable at tablespace and database level.
  • Force logging option is by default there for undo tablespace.
  • Force logging is not applicable for TEMP tablespace.

Suplemental = we log *more* than the normal redo information into the redo logs so that GG has more to work with.

NOLOGGING can be used to minimize the amount of redo generated by Oracle. Only the following operations can make use of nologging:

SQL*Loader in direct mode

INSERT /*+APPEND*/ ...

CTAS

ALTER TABLE statements (move/add/split/merge partitions)

CREATE INDEX

ALTER INDEX statements (move/add/split/merge partitions)

starting with 18c you have 2 more possibilities 

STANDBY NOLOGGING FOR LOAD PERFORMANCE
STANDBY NOLOGGING FOR DATA AVAILABILITY

Monday, June 20, 2022

OLSNODES command in RAC:

 The olsnodes command provides the list of nodes and other information for all nodes participating in the cluster.You can use this command to quickly check that your cluster is operational, and all nodes are registered as members of the cluster. This command also provides an easy method for obtaining the node numbers.

oracle@vgeb07hr:/dev/mapper [+ASM1]# olsnodes -h

Syntax:

olsnodes [[-n] [-i] [-s] [-t] [node_name | -l [-p]] | [-c]] [-g] [-v]

Command Description

-n Lists all nodes participating in the cluster and includes the assigned node numbers.

-i Lists all nodes participating in the cluster and includes the Virtual Internet Protocol (VIP) address assigned to each node.

-s Displays the status of the node: active or inactive.

-t Displays node type: pinned or unpinned.

node_name Displays information for a particular node.

-l [-p] Lists the local node and includes the private interconnect for the local node. The -p option is only valid when you specify along with the -l option.

-c Displays the name of the cluster.

-g Logs cluster verification information with more details.

-v Logs cluster verification information in verbose mode. Use in debug mode and only at the direction of My Oracle Support.

To find all node in clusters:

# olsnodes -i -n -s -t

To find local node name with private interconnect.

 olsnodes -l -p

To find cluster name:

olsnodes -c

Refrence:

http://oracle-help.com/oracle-rac/olsnodes-command-rac/

https://dbaclass.com/article/olsnodes-commands-rac/

Sunday, June 19, 2022

Interview Question/Answer-Application 11i/R12/R12.2:

 Why do you need GUEST/ORACLE To connect to database?

GUEST account is used to obtain the decrypted value of the apps password for internal processes (i.e. when there is a need to connect as apps internally).

when the account gets locked/end-dated then you will see a blank page when you try to login to the instance.In that scenario you will have to correct this situation from the back-end as you will not be able to login to the application.

*******

The GUEST user account is used in the application internally ( it is an application user). One of the major needs of this account is when there is a need to decrypt the APPS password (which is stored in an encrypted format in the apps tables). In order to decrypt the APPS password, the GUEST username/password is used to accomplish this task (using “Guest User Password” profile option).

GUEST account is used to obtain the decrypted value of the apps password for internal processes (i.e. when there is a need to connect as apps internally).

when the account gets locked/end-dated then you will see a blank page when you try to login to the instance.In that scenario you will have to correct this situation from the back-end as you will not be able to login to the application.

You will not find much details about the GUEST account documented anywhere ( may be coz of security reasons).

Key points :

s_guest_user is GUEST and s_guest_pwd is EXPORT in adconfig xml file.

select fnd_web_sec.validate_login(‘GUEST’,’ORACLE’) FROM DUAL;  ( to validate if guest user is corrrect)

select fnd_profile.value(‘GUEST_USER_PWD’) from dual; (to find the current guest user password)

Check the GUEST/ORACLE password is present in DBC file at $FND_TOP/secure directory as well as at $FND_TOP/secure/SID_hostname directory.

What happen if “alter user apps identified by password” is fired for apps user?

We cannot change apps password through alter user statement because Oracle Application use APPS PASSWORD to encrypt end users password in FND_USER and oracle users password in FND_ORACLE_USERID. So using FNDCPASS to change password of APPS, changes the column encrypted_oracle_password in these two tables, but alter dont do this actions. FNDCPASS update DBA_USERS table as well.While when you run alter user apps identified by password it will update only DBA_USERS.

If you have mistakenly did used alter user, you may see below error:

APP-FND-01496: Cannot access application ORACLE password

Cause: Application Object Library was unable access your ORACLE password.

It is very difficult to recover the application at this stage.

What is Actualize all, How it works?

When the number of old database editions reaches 25 or more, we should consider dropping all old database editions by running the adop actualize_all.

What is difference between finalize_mode=full & finalize_mode=quick ?

$ adop phase=finalize

$ adop phase=finalize finalize_mode=quick == This is Default Mode

$ adop phase=finalize finalize_mode=full    

Finalize can be run in 2 modes: “QUICK” or “FULL”

FULL gathers database dictionary statistics (not transaction tables statistics)

QUICK skips gathering database dictionary statistics.

How to change weblogic password from Backend in EBS 12.2.x?

On EBS 12.2.X environments , if you are on R12.AD.C.Delta.7 and R12.TXK.C.Delta.7 or later, we can change Weblogic admin server password using the below script.

1. Startup admin server. Do not start any other services

$. ./EBSapps.env RUN

$ cd $ADMIN_SCRIPTS_HOME

$adadminsrvctl.sh start

2. Run the below script  

perl $FND_TOP/patch/115/bin/txkUpdateEBSDomain.pl -action=updateAdminPassword

[The script will prompt for Current and New Weblogic Password and restarts Weblogic admin server using the new password.]

3. Run fs_clone to propagate the changes to the alternate file system (Patch File system).

How to Update APPS password in EBS Datasource (EBS 12.2.x)?

 From EBS 12.2.x versions, whenever we change apps password we need to update the new apps password in EBS Datasource.

Otherwise managed servers wont come up.

Steps to update apps password in Weblogic datasource for EBS 12.2x, post AD-TXK 7:

1. Start Only Admin server,Do not start any other services

$. ./EBSapps.env RUN

$ cd $ADMIN_SCRIPTS_HOME

$adadminsrvctl.sh start

2. Update apps password in Datasource from backend:

$perl $FND_TOP/patch/115/bin/txkManageDBConnectionPool.pl

When prompted select the "updateDSPassword" option.

Sample screen output:

perl $FND_TOP/patch/115/bin/txkManageDBConnectionPool.pl

Please select from list of valid options

        updateDSPassword - Update WebLogic Datasource Password

        updateDSJdbcUrl  - Update WebLogic Datasource Connection String

Enter Your Choice : updateDSPassword

Enter the full path of Applications Context File [DEFAULT -]:

Enter weblogic admin server password:

Enter the APPS user password:

Note: We can also update the apps password in EBS Datasource from Weblogic console. 


What if we missed to run adpreclone.pl and copy completed?

What will happened to scheduled request if submitted used end dated?

How to monitor CM with OEM?

What do do if patch fails in relinking?

what is batch size in adpatch?

While applying a patch, the patch may contain scripts that update data in batches. This prompt allows you to specify how many rows will be updated at a time. It is recommended that you accept the default unless you know your system well.If you enter a negative or an invalid number, adpatch will use the default value (in this case a value of 1000).

(Or)

The Batch Size refers to the number of rows to commit at a time when cerrtain scripts run.If we dno't enter a specific value, Auto Patch takes the default, Which is normall set to a relatively smaller value to accommodate systems with a small rollback segment.

+++++++++++++Doc ID 1311402.1+++++++++++

What is the difference between CPU patch and PSU patch.Can we apply CPU patch over psu patch?

patch conflict

Different types of Patch Conflicts - Superset/Subset/Duplicate/Bug/File [ID 563656.1]

Patch:

Patch is a piece of software or code designed to fix the problems of the existing software.  These fixes can be security vulnerability fixes or bug fixes.In certain cases the patches increases or enhances the functionality of the software as well

Interim patch:

Interim patches are also known as “one of patches”. Interim patches are released in between the release of CPU or PSU patch to fix a specific issue. These patches generally address specific bug’s fixes for a specific customer and should not be applied unless specified by Oracle support services.

Critical patch update (CPU):

These are the cumulative patches consisting of security fixes. 

Patch set update (PSU):

These are quarterly cumulative patches that contain security fixes as well as additional fixes sometimes, PSU includes feature enhancements as well.  So we can say that PSU includes the security fixes of the CPU plus additional fixes.PSUs contain CPUs plus other bug fixes. Which path your choose (CPUs only or PSUs only) depends on your requirements and needs. Systems that store sensitive information and/or are exposed to the internet (or are more susceptible to attack) will need to go the CPU route (where patches are released on a quarterly basis).

Once the PSU is applied only PSUs can be applied in future quarters until the database is upgraded to knew base version

Can we apply CPU patch over psu patch?

Depend.

But OPATCH ultilty handle with confilct of patchset installed.

Patch Conflicts

All patches may not be compatible with one another. For example, if a patch has been applied, all the bugs fixed by that patch could reappear after another patch is applied. This is called a conflict situation. OPatch detects such situations and raises an error when a it detects a conflict.

http://docs.oracle.com/cd/B19306_01/em.102/b16227/oui8_opatch.htm

Logo change in EBS:

https://www.funoracleapps.com/2023/01/how-to-changeadd-custom-logo-at-top-of.html

What are the high level steps for upgrading 11i to R12.1.3?

Restart the failed patch from place you left

adop phase=apply patches=patch restart=yes

Restart the failed patch from beginning

adop phase=apply patches=patch abandon=yes

Ignore Failed Patch and Apply New Patch

adop phase=apply patches=NewPatch abandon=yes

Reapply a previously applied Patch 

adop phase=apply options=forceapply patches=patch

How to abort a patching cycle

adop phase=abort

Post step run below command

adop phase=cleanup cleanup_mode=full

adop phase=fs_clone

If the system crashes and unable to proceed the patch then what to do

We will see error as 

Error: Unable to continue as already another user is using adzdoptl.pl.

Previous session exist, cannot continue as per user input

Steps:

➢ Run the following statement to find out the session that is in running state:

 select adop_session_id from ad_adop_sessions where status='R';

➢ Set the status to Completed 'C' for that session to re- try the phase that was interrupted

 update ad_adop_sessions set status='C' where status='R’

ADOP question : https://www.funoracleapps.com/2021/11/ebs-122-adop-interview-questions.html



Undo Tablespace/Undo Management in Oracle:

Oracle Database keeps records of actions of transactions, before they are committed and Oracle needs this information to rollback or undo the changes to the database. These records are called rollback or undo records.

These records are used to:

Rollback transactions - when a ROLLBACK statement is issued, undo records are used to undo changes that were made to the database by the uncommitted transaction.

Recover the database - during database recovery, undo records are used to undo any uncommitted changes applied from the redolog to the datafiles.

Provide read consistency - undo records provide read consistency by maintaining the before image of the data for users who are accessing the data at the same time that another user is changing it.

UNDO_RETENTION:

This value specifies the amount of time, undo is kept in the tablespace.The parameter undo_retention to set the amount of time you want undo information retained in the database.

The default value for the UNDO_RETENTION parameter is 900.

If an active transaction requires undo space and the undo tablespace does not have available space, then the system starts reusing unexpired undo space (if retention is not guaranteed). This action can potentially cause some queries to fail with the ORA-01555 "snapshot too old" error message.

UNDO_MANAGEMENT = AUTO

Friday, June 17, 2022

ADOP Interview Questions:

 Does Online Patching increase the network port requirements on an Oracle E-Business Suite instance?

Yes. Online patching requires an additional set of network ports for the Oracle WebLogic Server managed servers on the second file system. During the cutover phase, the managed servers run simultaneously on the patch file system and run file system for a brief period, in a rolling transition process.

What is Actualize all, How it works?

When the number of old database editions reaches 25 or more, we should consider dropping all old database editions by running the adop actualize_all.

How to execute an empty patching cycle?


adop fails a lot, especially when you’re building a regression test environment.  Remember the old DOS days when you yanked out the floppy disk but still had a: on the screen and DOS said (a)bort, (r)etry, (f)ail?  And abort and fail always seemed like the same thing, but somehow they weren’t?  Same thing with adop, only it calls them abandon and restart.

adop defaults to abandon=no restart=yes if not specified, but to me, that’s still a bit unclear.  For example, what the heck would abandon=yes restart=no do?  Here’s what I came up with

(1) abandon and cleanup (I strongly urge you to do a full cleanup, or you may be asking for trouble)

adop phase=abort,cleanup cleanup_mode=full

adop phase=fs_clone

(2) fix the problem via whatever means (adctrl in the patch environment, drop the index the patch is trying to re-create, etc) and retry from where it failed

adop phase=apply patches=17020683 restart=yes [abandon=no is implied and not required]

(3) fix what’s wrong but retry from the beginning of the patch, or try a new patch (why you would do the latter, I have no idea)

adop phase=apply patches=17020683 abandon=yes [restart=yes is implied and not required]   (same patch)

adop phase=apply patches=17893964,18497540 abandon=yes          (new patch)


Wednesday, June 8, 2022

what happens in cutover phase of adop in R12.2:

 Cutover phase of adop is downtime phase of Online patching cycle. Once cutover is complete, it is not possible to revert to the previous edition.

Cutover phase  of adop has following steps:

1.Shut down internal concurrent manager: 

cm_wait=<maximum_minutes_to_wait> 

$FND_TOP/bin/txkADOPCutOverPhaseCtrlScript.pl script

2.Shut down application tier services:

$FND_TOP/bin/txkADOPCutOverPhaseCtrlScript.pl script


3.Cutover database: Promote patch database edition to become the new run database edition, using adzdpmgr.pl script.

This task is performed by $FND_TOP/bin/txkADOPCutOverPhaseCtrlScript.pl script 


4.Cutover file system: Promote patch file system to become the new run file system, switching the $FILE_EDITION values in the patch and run enviroments. The current patch APPL_TOP becomes the new run APPL_TOP, and the current run APPL_TOP becomes the new patch APPL_TOP.This task is completed by Autoconfig.


5.Terminate old database sessions: Terminate any database connections to the old run edition of the database.

This task is performed by $FND_TOP/bin/txkADOPCutOverPhaseCtrlScript.pl script


6.Start application tier services: Application tier services are restarted, on the new run edition. The system is now available again to users.

This task is performed by $FND_TOP/bin/txkADOPCutOverPhaseCtrlScript.pl script


Refrence:

https://techgoeasy.com/happens-cutover-phase-adop-r12-2/

How to rollback the patch after failed cutover phase in R12.2:

There may be scenario  when  cutover phase failed . It is possible to go back to previous state of cutover(rollback the patch) ,if flashback database is either enabled in the database or we have taken full backup prior to cutover:

We having Flashback enabled in the database:

SQL>select FLASHBACK_ON from v$database;

Scenario1:

You are running an Online Patching cycle:

$ adop phase=prepare

$ adop phase=apply patches=99999999

$ adop phase=finalize

$ adop phase=cutover

Cutover fails, and you need to go back to the state of the system before you ran the cutover phase.

If you had not run the cutover phase, you would have been able to roll back the patch by running the adop abort phase. However, this is not possible once cutover has been run.

Two main parts to rollback the patch:

(1) Database Restore : Here we can use either Flashback or database restore technique.

Flashing Back the Database:

First, shut down the database, then start it up in mount state:

SQL>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.

Restore the flashback to the specified time.

SQL>flashback database to time to_data(<time before teh cutover>;

Start the database in read-only mode:

Shut down the database, start it up in mount state, then open it with the resetlogs option:

SQL>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.

Database mounted.

SQL>alter database open resetlogs;

Database altered.

2) Filesystem restore:

check  whether cutover failed before the file systems were switched. referring to the cutover logs.

Case 1:

If  cutover failed before the file systems were switched,then clean shutdown of any services that are running. Then restart all the services using the normal startup script.

Case 2 :

If cutover failed after the file systems were switched:

Shut down services started from new run file system, in multi-node environment, repeat  on all nodes.

Switch file systems back onall nodes:

$ perl $AD_TOP/patch/115/bin/txkADOPCutOverPhaseCtrlScript.pl \

-action=ctxupdate \

-contextfile=<full path to new run context file> \

-patchcontextfile=<full path to new patch file system context file> \

-outdir=<full path to out directory>

Start up all services from the old run file system.

After the restore is complete:

For example:

$ adop phase=prepare

$ adop phase=apply patches=9999999

$ adop phase=abort

$ adop phase=cleanup cleanup_mode=full

$ adop phase=fs_clone

$ adop phase=abort,cleanup cleanup_mode=full


Refrence:

https://techgoeasy.com/rollback-patch-cutover-phase-r12-2/

Tuesday, June 7, 2022

Upgrade Oracle Grid from 12c to 19c:12C (12.1.0.2) to 19C (19.7.0) :

 Steps to upgrade Grid

1.Review the pre-upgrade checklist.

2.Download 19c Grid software.

3.Run the Orachk readiness assessment.

4.Apply mandatory 19c patches.

5.Run the cluster verification utility.

6.Dry-run upgrade.

7.Upgrade Grid.

8.Verify Grid upgrade.

1.Review the pre-upgrade checklist.

According to the Oracle Document 2539751.1, you must apply the 28553832 patch in the 12C Grid home directory as a prerequisite:

[grid@norlathrac01 OPatch]$ ./opatch lsinventory |grep -i 28553832

28553832, 20883009, 21678268

2.Download 19c Grid software.

You can download the 19c Grid software from the following link:

https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html

Create a directory on both the RAC (Real Application Cluster) nodes:

mkdir -p /u01/app/grid/product/19.3.0/grid

Copy the 19c grid software to the first node of RAC and unzip it.:

cd /u01/app/grid/product/19.3.0/grid

unzip -q <19c Grid Software location >

3.Run the Orachk readiness assessment.

According to Oracle document 1457357.1, the user that owns Grid needs to run the Orachk tool.

Make sure to download the latest version of Orachk from document 1457357.1 , then run the following commands:

cd /u01/app/grid/product/19.3.0/grid/suptools/orachk

export GRID_HOME= /u01/app/grid/product/19.3.0/grid

export RAT_PROMPT_WAIT_TIMEOUT=15

export RAT_ORACLE_HOME=/u01/app/grid/12.1.0

export RAT_DB=12.1.0.2.0

cd /u01/app/grid/product/19.3.0/grid/suptools/orachk

./orachk -u -o pre -profile clusterware,asm

This process generates an HTML report.Make sure to review the report for all failed, critical, and warning checks and resolve them before you move to the next step.

4.Apply mandatory 19c patches.

You need to apply the mandatory patch 30899722 in the 19c home directory, as recommended by this Oracle Documant:

[grid@norlathrac01 grid]$ pwd

/u01/app/grid/product/19.3.0/grid

[grid@norlathrac01 grid]$ ./gridSetup.sh -silent -applyRU

Execute the following command on node [norlathrac01] as root:

/u01/app/grid/product/19.3.0/grid/root.sh 

Successfully Setup Software.

Finally, it asks to run root.sh. Do not run the script yet because you need to run it at the end of the upgrade.

After applying the patch, run the following command and make sure the command shows as supported:

[grid@norlathrac01 bin]$ pwd

/u01/app/grid/product/19.3.0/grid/usm/install/Oracle/EL7UEK/x86_64/4.1.12-112.16.4/4.1.12-112.16.4-x86_64/bin

[grid@norlathrac01 bin]$ ./acfsdriverstate -orahome /u01/app/grid/product/19.3.0/grid supported

ACFS-9200: Supported

5.Run the cluster verification utility.

Log in as the Grid OS owner user and run the following commands:

[grid@norlathrac01 ~]$ cd /u01/app/grid/product/19.3.0/grid/

[grid@norlathrac01 grid]$ ./runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome /u01/app/grid/12.1.0 -dest_crshome /u01/app/grid/product/19.3.0/grid -dest_version 19.0.0.0.0 -fixup -verbose

This operation should pass all the following checks:

Verifying node application existence ...PASSED

Verifying check incorrectly sized ASM disks ...PASSED

Verifying ASM disk group free space ...PASSED

Verifying network configuration consistency checks ...PASSED

Verifying file system mount options for path GI_HOME ...PASSED

Verifying /boot mount ...PASSED

Verifying OLR Integrity ...PASSED

Verifying Verify that the ASM instance was configured using an existing ASM parameter file. ...PASSED

Verifying User Equivalence ...PASSED

Verifying RPM Package Manager database ...INFORMATION (PRVG-11250)

Verifying Network interface bonding status of private interconnect network interfaces ...PASSED

Verifying /dev/shm mounted as temporary file system ...PASSED

Verifying file system mount options for path /var ...PASSED

Verifying DefaultTasksMax parameter ...PASSED

Verifying zeroconf check ...PASSED

Verifying ASM filter driver configuration ...PASSED

verifying Systemd login manager IPC parameter ...PASSED

Verifying Kernel retpoline support ...PASSED

6.Dry-run upgrade.

As mentioned earlier, Oracle introduced this new feature in 19c Grid. You can execute a dry-run upgrade before the actual upgrade. Dry-run upgrades verify all the steps similar to a real upgrade without making any real changes. Run the following commands:

unset ORACLE_BASE

unset ORACLE_HOME

unset ORACLE_SID

cd /u01/app/grid/product/19.3.0/grid 

gridsetup.sh -dryRunForUpgrade 

Finally, the process prompts you to run rootupgrade.sh. Run this on only a local node.

7.Upgrade Grid.

In the earlier step, our dry-run upgrade was a success. Now, you can go for the real upgrade.

Before starting the real upgrade, run the following command to bring down the Grid services and ensure that the remaining services are running on the cluster servers. Make sure cluster upgrade status is normal:

[grid@norlathrac01 bin]$ ./crsctl query crs activeversion -f

Oracle Clusterware active version on the cluster is [12.1.0.2.0]. The cluster upgrade

state is [NORMAL]. The cluster active patch level is [2653232555].

cd /u01/app/grid/product/19.3.0/grid

unset ORACLE_BASE

 unset ORACLE_HOME

 unset ORACLE_SID 

./gridSetup.sh 

Run rootupgrade.sh first on the local node and then on the remote node.

At this point, the process upgrades Grid to 19c, and all the cluster services are running.

8.Verify Grid upgrade.

Atter Grid upgrades, run the following commands to verify the upgraded version of Grid:

[grid@norlathrac01 bin]$ crsctl query crs activeversion

Oracle clusterware active version on the cluster is [19.0.0.0.0]

[grid@norlathrac01 bin]$

[grid@norlathrac01 bin]$ ./crsctl query crs softwareversion

Oracle Clusterware version on node [norlathrac03] is [19.0.0.0.0]

Verify all the CRS services are running on both the cluster nodes:

[grid@norlathrac01 bin]$ crsctl check crs

CRS-4638: Oracle high availability services is online

CRS-4537: Cluster ready services is online

CRS-4529: Cluster synchronization services is online

CRS-4533: Event manager is online


Refrence:

https://docs.rackspace.com/blog/upgrade-oracle-grid-from-12c-to-19c/

https://docs.oracle.com/en/database/oracle/oracle-database/19/cwsol/applying-patches-during-oracle-grid-infrastructure-install-or-upgrade.html#GUID-D10C7B8D-A120-48A2-8237-36809D0DB21E

Monday, June 6, 2022

Enabling SSL or TLS in Oracle E-Business Suite Release 12.2

 The main steps for setting up SSL on the application tier are outlined below:

3.1 Set Your Environment

3.2 Create a Wallet

3.3 Create a Certificate Request

3.4 Submit the Certificate Request to a Certificate Authority

3.5 Import Server Certificate to the Wallet

3.6 Modify the Oracle HTTP Server Wallet

3.7 Modify the OPMN Wallet

3.8 Fusion Middleware Control Console

3.9 Update the JDK Cacerts File

3.10 Update the Context File and Config Files

3.11 Run AutoConfig

3.12 Customizations (Optional)

3.13 Restart the Application Tier Services

3.14 Synchronization Between Run and Patch File System

3.15 Renewing Revoked or Expired Certificates

Enable SSL for EBS R12.1:

1.Create New Wallet

2.Create a Certificate Request

3.Upload Certificate to Wallet

4.Modify the OPMN wallet

5.Import certs to cacerts

6.Update the Context File

7.Settings for DB Tier

What is SSL certificates?

SSL stands for Secure Sockets Layer, 

It refers to a protocol for encrypting and securing communications that take place on the Internet.

SSL was replaced by an updated protocol called TLS (Transport Layer Security) 

The main use case for SSL/TLS is securing communications between a client and a server, but it can also secure email, VoIP, and other communications over unsecured networks.

TLS vs SSL

Both TLS and SSL are protocols. help in securely authenticate and transport data on the Internet. 

TLS, short for Transport Layer Security, and SSL, short for Secure Socket Layers, are both cryptographic protocols that encrypt data and authenticate a connection when moving data on the Internet.

The main difference between Secure Socket Layer and Transport Layer Security is that, in SSL (Secure Socket Layer), the Message digest is used to create a master secret and It provides the basic security services which are Authentication and confidentiality. while In TLS (Transport Layer Security), a Pseudo-random function is used to create a master secret. 

 TLS is actually just a more recent version of SSL. It fixes some security vulnerabilities in the earlier SSL protocols.


How Do TLS and SSL Work to Secure Data?

Here’s the high-level process for how both SSL and TLS work.

When you install an SSL/TLS certificate on your web server (often just called an “SSL certificate), it includes a public key and a private key that authenticate your server and let your server encrypt and decrypt data.

When a visitor goes to your site, their web browser will look for your site’s SSL/TLS certificate. Then, the browser will perform a “handshake” to check the validity of your certificate and authenticate your server. If the SSL certificate is not valid, your users may be faced with the “your connection is not private” error, which could cause them to leave your website.

Once a visitor’s browser determines that your certificate is valid and authenticates your server, it essentially creates an encrypted link between it and your server to securely transport data.

This is also where HTTPS comes in (HTTPS stands for “HTTP over SSL/TLS”).

HTTP, and the more recent HTTP/2, are application protocols that play an essential role in transferring information over the Internet.

With plain HTTP, that information is vulnerable to attacks. But when you use HTTP over SSL or TLS (HTTPS), you encrypt and authenticate that data during transport, which makes it secure.

This is why you can safely process credit card details over HTTPS but not over HTTP, and also why Google Chrome is pushing so hard for HTTPS adoption..

Why the SSL certificate is required for Oracle EBS R12 what impact he does business

How to implement / configure SSL on Oracle EBS R12 (Server DMZ, HTTP Server etc.,)

What are the pre-requisites and studies required for SSL Certication

How to replace the SSL Certification expiring in force with a New Server DMZ

Refrences:

https://balajiabhi.blogspot.com/2009/08/configuring-ssl-in-1211-step-by-step.html

https://www.funoracleapps.com/2013/03/enable-ssl-for-ebs-r121.html

http://dbafix.blogspot.com/2019/08/enabling-ssl-or-tls-in-oracle-e.html

Enabling SSL or TLS in Oracle E-Business Suite Release 12.2 (Doc ID 2143101.1)

Enabling TLS in Oracle E-Business Suite Release 12.1 (Doc ID 376700.1)

Enabling TLS in Oracle E-Business Suite Release 12.2 (Doc ID 1367293.1)

How to Create a New Wallet and Add a Signed Certficate Using orapki (Doc ID 331092.1)

Friday, June 3, 2022

DMZ setup on Oracle EBS R12

Highlighted steps :

1. Copy the Application to the DMZ server

2. Clone the Application Tier using adcfgclone.pl

3. Run the txkChangeProfH.sql under FND_TOP/patch/115/sql

@txkChangeProfH.sql SERVRESP

4. Run the Autoconfig all nodes

1. Database.

2. DMZ.

3. Internal Application server.

5. Change the profile Node Trust Level at the Server level to "External".

6. Change the profile Responsibility Trust Level at the desired responsibility level to "External".

7. Test both the DMZ and Internal URL's.

1.Pre-Clone Steps on Internal Server:

Run adpreclone.pl on MINEJand MINEZ with applcrp3 and oracrp3 users.

Take a backup of /d21/applcrp/CRP3 folder on MINEJ

Restore the Backup into MINE8 server under /d21 mount point.

Setup Host File:

Put the following entries in the Hosts File (/etc/hosts).

Change the owner Ship of /d21/oracrp3 folder and the file under it to applcrp3

Creating External Web Tier:

Create XML file for External Server:

Run adpreclone.pl to add the MINE8 server as a node to CRP3:

CONTEXT_FILE configuration:

Modify the following CONTEXT_FILE parameters:

s_applcsf

s_applptmp

s_appltmp

s_formshost

s_chronosURL

s_external_url

s_webentryhost

s_login_page

Run AutoConfig on al l the Nodes(Database,DMZ,Internal Application server.).

Configuring MINE8 for DMZ

Run the script txkChangeProfH.sql for the Profile option setup:

@$FND_TOP/patch/115/sql/txkChangeProfH.sql SERVRESP

Update Node Trust Level

Set the value of this profile option to External at the server level. The site level value should remain set to Normal.

Update List of Responsibility:

To change the value of the Responsibility Trust Level profile option at the responsibility level for a particular responsibility, 

Environment Name: VISPRD

Machine: 

Database/Conc/Admin Node: dbprd

Internal web/Form Node: appintprd

External Web Node: appextprd

Pre-Clone Steps on Internal Server

Run adpreclone.pl on appintprdand dbprd with applVISPRD and oraVISPRD users.

As oraVISPRD user:

cd $ORACLE_HOME/appsutil/scripts/VISPRD_dbprd

perl adpreclone.pl dbTier

As applVISPRD user:

cd $ADMIN_SCRIPTS_HOME

perl adpreclone.pl appsTier

Take a backup of /u01/applcrp/VISPRD folder on appintprd

Restore the Backup into appextprd server under /u01 mount point.

Setup Host File:

Put the following entries in the Hosts File (/etc/hosts)

10.211.16.92            dbprd.sonapglobal.com dbprd

10.223.18.72           appintprd.bn.sonap.net appintprd.bn

Change the owner Ship of /u01/oraVISPRD folder and the file under it to applVISPRD

cd /u01

chown –R oraVISPRD:dba oraVISPRD

Creating External Web Tier

Note:          Your steps should be more specific than the examples shown.

Create XML file for External Server:

su – applVISPRD

cd /u01/applVISPRD/VISPRD/apps/apps_st/comn/clone/bin

perl adclonectx.pl contextfile=/u01/applVISPRD/VISPRD/inst/apps/VISPRD_appintprd/appl/admin/VISPRD_appintprd.xml

Enter the APPS password: sonapVISPRD

Target System Hostname (virtual or normal) [appextprd]:

Do you want the inputs to be validated (y/n) [n]? :

Target System Database SID: VISPRD

Target System Database Server Node [appextprd]: dbprd

Target System Base Directory: /u01/oraVISPRD/VISPRD

Target System Forms ORACLE_HOME Directory [/u01/oraVISPRD/VISPRD/apps/tech_st/10.1.2]:

Target System Web ORACLE_HOME Directory [/u01/oraVISPRD/VISPRD/apps/tech_st/10.1.3]:

Target System APPL_TOP Mountpoint [/u01/oraVISPRD/VISPRD/apps/apps_st/appl]:

Target System COMMON_TOP Directory [/u01/oraVISPRD/VISPRD/apps/apps_st/comn]:

Target System Instance Home Directory [/u01/oraVISPRD/VISPRD/inst]:

Username for the Applications File System Owner [applVISPRD]:

Group for the Applications File System Owner [dba]:

Target System Root Service [enabled]:

Target System Web Entry Point Services [enabled]:

Target System Web Application Services [enabled]:

Target System Batch Processing Services [disabled]:

Target System Other Services [enabled]:

Do you want to preserve the Display [appintprd:0.0] (y/n)? : n

Target System Display [appextprd:0.0]:

Do you want the the target system to have the same port values as the source system (y/n) [y]? : n

Target System Port Pool [0-99]: 1

Choose a value which will be set as APPLPTMP value on the target node [1]: 2

New context path and file name [/u01/oraVISPRD/VISPRD/inst/apps/VISPRD_appextprd/appl/admin/VISPRD_appextprd.xml]:

Cross Check if the Context File generated is correct or not, check with following command if the respective components are enabled on appextprd:

grep –i status $CONTEXT_FILE

Run adpreclone.pl to add the appextprd server as a node to VISPRD:

su - applVISPRD

cd /u01/applVISPRD/VISPRD/apps/apps_st/comn/clone/bin

perl adcfgclone.pl appsTier /u01/applVISPRD/VISPRD/inst/apps/VISPRD_appextprd/appl/admin/VISPRD_appextprd.xml

Enter the APPS password:

Check the logfile for any error.

 CONTEXT_FILE configuration:

Modify the following CONTEXT_FILE parameters:

Context File Variable

Existing Value

New Value

s_applcsf

/u01/applVISPRD/VISPRD/inst/apps/VISPRD_appextprd/logs/appl/conc

/u01/applVISPRD/VISPRD/conc

s_appltmp

/u01/applVISPRD/VISPRD/inst/apps/VISPRD_appextprd/temp

/VISPRD_appltmp

s_applptmp

/u01/applVISPRD/VISPRD/inst/apps/VISPRD_appextprd/ptemp

/VISPRD_applptmp

s_formshost

appextprd

VISPRDext

s_chronosURL

http://appextprd.sonapglobal.com:8001/oracle_smp_chronos/oracle_smp_chronos_sdk.gif

http://VISPRDext.sonapglobal.com:8001/oracle_smp_chronos/oracle_smp_chronos_sdk.gif

s_external_url

http://appextprd.sonapglobal.com:8001

http://VISPRDext.sonapglobal.com:8001

s_webentryhost

appextprd

VISPRDext

s_login_page

http://appextprd.sonapglobal.com:8001/OA_HTML/AppsLogin

http://VISPRDext.sonapglobal.com:8001/OA_HTML/AppsLogin


Run AutoConfig on al l the Nodes.

Configuring appextprd for DMZ  

Run the script txkChangeProfH.sql for the Profile option setup:

# sonapssh dbprd

$ su – applVISPRD

$ sqlplus appUpdate Hierarchy Types/sonapVISPRD @$FND_TOP/patch/115/sql/txkChangeProfH.sql SERVRESP

Run AutoConfig on all nodes.

q   Update Node Trust Level

To change the value of the Node Trust Level profile option value to External for a particular node, perform the following steps:

1.       Login to Oracle E-Bsonapness Suite as sysadmin user sonapng the internal URL

2.       Select the System Administrator Responsibility

3.       Select Profile / System

4.       From the 'Find system profile option Values' window, select the server and get the valie appextprd into it.

5.       Query for %NODE%TRUST%. You will see a profile option named 'Node Trust Level'. The value for this profile option at the site level will be Normal. Leave this setting unchanged.

6.       Set the value of this profile option to External at the server level. The site level value should remain set to Normal

q   Update List of Responsibility

To change the value of the Responsibility Trust Level profile option at the responsibility level for a particular responsibility, perform the following steps:

7.       Login to Oracle E-Bsonapness Suite as sysadmin user sonapng the internal URL

8.       Select System Administrator Responsibility

9.       Select Profile / System

10.    From the 'Find system profile option Values' window, select the responsibility that you want to make available to users logging in via the external web tier

11.    Query for %RESP%TRUST%. You will see a profile option named 'Responsibility trust level'. The value for this profile option at site level will be Normal.  Leave this setting unchanged.

12.    Set the value of this profile option for the chosen responsibility to External at the responsibility level. The site-level value should remain Normal.

13.    Repeat for all responsibilities that you want to make available from the external web tier.


List of Responsibilities which can be enabled on External Server is as followed:


Product Name

Externally Accessible Responsibilites

Additional Profile Options

iSupplier


POS Supplier Guest User

Plan to Pay Supplier View

Plan, Source, Pay Supplier View

Source to Pay Supplier View

Supplier Profile Manager

Procure to Pay Supplier View

POS: External URL

POS: Internal URL

Oracle Sourcing

Sourcing Supplier

PON: External Applications Framework Agent

PON: External login URL

Oracle iProcurement

Self Registered Employee Default Responsibility

Self Registered New User Default Responsibility 



q   Enable Oracle E-Business Suite Application Server Security

1.       Set the value of Application Server Security Authentication (s_appserverid_authentication) to SECURE, in the CONTEXT_FILE on all the nodes.

2.       Run AutoConfig on each Applications middle tier to complete the configuration.

3.       After AutoConfig completes successfully, restart Oracle HTTP Server and OC4J processe

q   Increase JVM Size

Change the following JVM parameter in the CONTEXT_FILE as mentioned in the below table:

Note: Take a backup of Context File before Changing.


Variable

Exisiting Value

New Value

s_oacore_jvm_start_options

-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M

-server -verbose:gc –Xmx1024M –Xms521M -XX:MaxPermSize=256M


q   Run Autoconfig

Run AutoConfig from ADMIN_SCRIPTS_HOME sonapng adautocfg.sh.


Enable SSL Login

Note:Include a subset of test steps that will confirm that the customization has been installed properly.

Reference

Metalink Document: “Oracle E-Bsonapness Suite R12 Configuration in a DMZ” Document ID: 380490.1


http://knoworacleappsdba.blogspot.com/2012/04/dmz-setup-on-oracle-ebs-r12.html

Sunday, May 1, 2022

Summary of Possible Reasons and Solutions for the Problem Where All Concurrent Requests Stuck in Pending Phase

 *** ***

Application Install - Version: 11.5 to 12.2

goal: Summary of Possible Reasons and Solutions for the Problem Where All 

Concurrent Requests Stuck in Pending Phase

fact: Oracle Application Object Library

fix:

Below are several different possible solutions to the problem where concurrent requests are stuck in pending status:

1.  When shutting down the concurrent managers are there any FNDLIBR processes still running at the OS level?   If so, do a kill -9 on them, then restart the concurrent managers.

2.  Try Relinking $FND_TOP.

3.  Rebuild the concurrent manager views.  As applmgr run the following from the OS:

This is non-destructive.

Concurrent Manager views can be rebuilt by running the following command at the command line:

Ensure that concurrent managers are shutdown.

FNDLIBR FND FNDCPBWV {apps_user}/{apps_password} {SYSADMIN} 'System Administrator' {SYSADMIN}

Restart the concurrent managers.

4.  The Profile Option 'Concurrent: OPS Request Partitioning' may be set incorrectly. This profile option should always be set to

OFF, regardless of whether you are running OPS(RAC) or not, because the profile is obsolete.

5.  The System Profile Option: Concurrent Active Requests is possibly to 0.

        a.  Log into Oracle Applications as SYSADMIN.

        b.  Select System Administrator responsibility.

        c.  Navigate to PROFILE > SYSTEM.

        d.  Query for %CONC%ACTIVE%.

        e.  Change the profile option for 'Concurrent: Active Request Limit' to Null (blank).

        f.  Exit Oracle Applications and log in again for the change to take affect.

        g.  Run a new concurrent request.

6.  The Concurrent managers were brought down, while an outstanding request was still running in the background.  In which case, update the

FND_CONCURRENT_REQUESTS table as follows:

sql> 

update fnd_concurrent_requests

set status_code='X', phase_code='C'

where status_code='T';

sql> commit;

7.   The control_code for concurrent_queue_name = 'FNDCRM' is 'N' in the FND_CONCURRENT_QUEUES table,  which means 'Target node/queue unavailable'.

This value should be NULL (CRM is running; target and actual process amount are the same), or 'A' ('Activate concurrent manager' control status).

Set the control_code to 'A' in fnd_concurrent_queues for the Conflict Resolution Manager:

       a.  Logon to Oracle Applications database server as 'applmgr'.

       b.  Verify the Applications environment is setup correctly ($ORACLE_HOME and $ORACLE_SID).

       c.  Logon to SQL*Plus as '{APPS_user}' and run the following SQL statement:

            update fnd_concurrent_queues

            set control_code = 'A'

            where concurrent_queue_name = 'FNDCRM';

            commit;

       d.  Verify the status of the concurrent managers through the  Concurrent -> Manager -> Administer form.  

If the CRM is still not active, bounce (deactivate, activate) the Internal Concurrent Manager.  This is done through the Concurrent > Manager >  Administer form

from the 'System Administrator' responsibility. It can also be done through the CONCSUB command at the command level.       

Setting the control_code to 'A' in the fnd_concurrent_queues table for the Conflict Resolution Manager indicates that this concurrent manager 

is to be activated with the parameter values specified through this table for this manager (MAX_PROCESSES, CACHE_SIZE, etc).

8.  What is the cache size?   Try increasing the cache size then stop/restart the concurrent managers.

If concurrent requests are rarely prioritized and there are managers that service short-running requests, consider setting the cache size to 

equal at least twice the number of target processes.  This increases the throughput of the concurrent managers by attempting to avoid any sleep time.  

For example:

If more than one manager or worker processes the same type of requests with only a small cache size, it may be unable to process any jobs in a 

single processing cycle, because other processes have already run the cached requests.

When this happens, it is important to note that the manager will sleep before refreshing its cache.  To increase manager throughput where there 

are sufficient requests of the required type in the queue, increase the cache size to improve the chance of the manager finding work to process 

and thus avoid having to enter a sleep phase.

TIP: Ensure that the system is not resource-constrained before attempting to increase the rate of concurrent processing in this way, otherwise, 

these changes may actually reduce concurrent processing throughput because jobs take longer to run.

Summary of Possible Reasons and Solutions for the Problem Where All Concurrent Requests Stuck in Pending Phase (Doc ID 182154.1)

Saturday, April 30, 2022

Long running concurrent request in R12.2:

 Before proceeding further Collect following basis level of information to development team:

1 Oracle seeded program/Custom program?

2 How much time it used earlier?

3 Is there any recent code change done in concurrent program?

4 Is this program fetching higher data compare to last run?

5 Does this job running any specific time/ It can be run any time?

6 Does this job fetching data using DB link?

7 Does the problem happen on both the test and production instance?

meanwhile we need to start basic sanity check in our environment.

Verify the status of the concurrent program:

select REQUEST_ID,phase_code,status_code,ORACLE_SESSION_ID from apps.fnd_concurrent_requests where request_id=’1234567’;

Find which concurrent manger ran a specific concurrent request:

select b.USER_CONCURRENT_QUEUE_NAME from fnd_concurrent_processes a,fnd_concurrent_queues_vl b, fnd_concurrent_requests c where a.CONCURRENT_QUEUE_ID = b.CONCURRENT_QUEUE_ID and a.CONCURRENT_PROCESS_ID = c.controlling_manager and c.request_id ='856272604';

Verify the actual and target of the CM:

Verify the concurrent manager status

Find SID for the concurrent request use below query:

set lines 200

set pages 200

col USERNAME for a10

col MODULE for a25

col ACTION for a25

col PROGRAM for a18

SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID,d.EVENT FROM apps.fnd_concurrent_requests a, apps.fnd_concurrent_processes b, v$process c, v$session d WHERE a.controlling_manager = b.concurrent_process_id AND c.pid = b.oracle_process_id AND b.session_id=d.audsid AND a.request_id = &Request_ID AND a.phase_code = 'R';

Find any blocking session for concurrent request use below query and verify concurrent program SID:

select (select username from v$session where sid=a.sid) blocker, a.sid, ' is blocking ' "IS BLOCKING", (select username from v$session where sid=b.sid) blockee,b.sid from v$lock a, v$lock b where a.block = 1 and b.request > 0 and a.id1 = b.id1 and a.id2 = b.id2;

If any blocking session there use below query to find the concurrent request id 

SELECT s.inst_id,a.request_id,s.sid,s.serial#,c.spid FROM apps.fnd_concurrent_requests a, gv$process c, gv$session s WHERE s.sid in ('&sid') AND s.paddr = c.addr AND a.oracle_process_id = c.spid AND a.phase_code = UPPER ('R');

Find client identifier and module, action for concurrent request

Then check with module owner with the concurrent request

select sid,serial#,USERNAME,CLIENT_IDENTIFIER,status,LAST_CALL_ET/60,SQL_HASH_VALUE,module,action,program from v$session where sid='&n';

Find which sql query is running 

select sql_text from v$sql where hash_value='12345678';

Find stale value of the tables which is used by the concurrent program:

select table_name, stale_stats, last_analyzed from dba_tab_statistics where stale_stats='YES';

You may have to run the gather stats against those tables which are having stale value.

Use OEM and monitor session ID

If development team ask tkprof,AWR,ASH report please generate and analysis.  

Tuesday, April 19, 2022

users with sysdba can login to database without password!

 connect / as sysdba


They logged into the OS didn't they - they provided a password then!

"as sysdba" is extremely powerful, it uses OS AUTHENTICATION, it does not require database authentication (it is used to login before there is a "database" or even an "instance"!)

/ as sysdba - connect to LOCAL instance as specified in the environment variables ORACLE_HOME + ORACLE_SID

sys/a@fstest as sysdba - connect OVER A NETWORK to a remote database, using the credentials sys/a - eg: resolve (using the tnsnames.ora or whatever naming you are using) fstest to a REMOTE MACHINE and connect to it.

won't use the password file, it uses OS authentication.

orapwd - the password file used for remote authentication - won't help you here at all, it would be used over the network, but not for local connections.

"as sysdba" is extremely powerful, it uses OS AUTHENTICATION, it does not require database authentication (it is used to login before there is a "database" or even an "instance"!)

remove them from the DBA group (the ability to connect / as sysdba goes away)

grant them sysdba (this will put them into the password file - you need to have remote login password file set up - you might have to use orapwd to create an empty one if you don't have one yet).

When Oracle is installed on a Windows OS it creates a local group named 'ora_dba -- Oracle DBA Group' and the local user 'Administrator' with its member by default.The membership of this local group grants its members the privilege to connect as sysdba without password -- as they are authenticated at OS level.

When you connect as sysdba issuing a ‘CONNECT / AS SYSDBA’, Oracle checks if your account is a member of the os group ‘ORA_sid_DBA’ or ‘ORA_DBA’ group.

Operating System Group UNIX User Group Windows User Group

OSDBA                  dba            ORA_DBA

OSOPER                  oper            ORA_OPER

This is why REMOTE_OS_AUTHENT MUST always be set to FALSE otherwise anyone with his laptop can connect as a privileged user.

Password file:

initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE to exclusive, shared, or none.

exclusive specifies that only one instance can use the password file and that the password file contains names other than SYS. 

 shared. It specifies that multiple instances (for example, an Oracle RAC environment) can use the password file. 

none specifies that Oracle Database ignores the password file.


=========

Let’s say we want to create a database user who logs in with their OS account. To do so, we will use the “external authentication” option offered by oracle.

Check the value of the os_authent_prefix parameter

SQL> show parameter os_authent_prefix

NAME                                 TYPE        VALUE

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

os_authent_prefix                    string      ops$

The ops$ value is the prefix that oracle will use for each OS account.As we can see, our user is prefixed with ops$. Oracle uses the prefix to recognize OS users when they attempt to connect. It is also a way for Oracle to separate a database account and an OS account.

Let’s create the external user account in the database

SQL> create user ops$xxxx identified externally;

Give the necessary privileges

SQL> grant connect, resource, create session to ops$xxxx;

Let’s create the user named xxxx and his password.

[root@dbserver ~]# useradd -g oinstall -G dba,oper,asmdba xxxx

[root@dbserver ~]# passwd xxxx

Open a new session and connect with the new operating system (os) user created “xxxx”

login as: xxxx

xxxx@192.168.54.10's password

Load the  database

[xxxx@dbserver ~]$  . oraenvoracle database 11

ORACLE_SID = [xxxx] ? achats

ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID xxxx.

You can set ORACLE_BASE manually if it is required.

Resetting ORACLE_BASE to its previous value or ORACLE_HOME

The Oracle base has been set to /u01/app/oracle/product/12.1.0/db

Here, our target database is called achats

Connect to database

[xxxx@dbserver ~]$ sqlplus /

SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 23 09:47:48 2019

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 Partitioning, Automatic Storage Management, OLAP, Advanced Analytics

and Real Application Testing options

SQL>

Now the os user named “xxxx” can connect to the database without being asked for a password.

Monday, April 18, 2022

Interview questions - Upgrade

 What happens when you give "STARTUP UPGRADE"?

$sqlplus "/as sysdba"

SQL> STARTUP UPGRADE

Note: The UPGRADE keyword enables you to open a database based on an earlier Oracle Database release. It also restricts logons to AS SYSDBAsessions, disables system triggers, and performs additional operations that prepare the environment for the upgrade.

You might be required to use the PFILE option to specify the location of your initialization parameter file.

Once the database is started in upgrade mode, only queries on fixed views execute without errors until after the catupgrd.sql script is run. Before running catupgrd.sql, queries on any other view or the use of PL/SQL returns an error.



Friday, April 15, 2022

Interview Questions and Answers - RAC

 What is RAC?

Allows multiple instances to access a single database.
A Cluster is a feature of High Availability, where it eliminates single point of failure.

Why do we have to create odd number of voting disk?

As far as voting disks are concerned, a node must be able to access strictly more than half of the voting disks at any time. So if you want to be able to tolerate a failure of n voting disks, you must have at least 2n+1 configured. (n=1 means 3 voting disks). You can configure up to 32 voting disks, providing protection against 15 simultaneous disk failures.

Oracle recommends that customers use 3 or more voting disks in Oracle RAC 10g Release 2. Note: For best availability, the 3 voting files should be physically separate disks. It is recommended to use an odd number as 4 disks will not be any more highly available than 3 disks, 1/2 of 3 is 1.5...rounded to 2, 1/2 of 4 is 2, once we lose 2 disks, our cluster will fail with both 4 voting disks or 3 voting disks.

Does the cluster actually check for the vote count before node eviction? If yes, could you expain this process briefly?

Yes. If you lose half or more of all of your voting disks, then nodes get evicted from the cluster, or nodes kick themselves out of the cluster

How does OCSSD starts first if voting disk & OCR resides in ASM Diskgroups?

You might wonder how CSSD, which is required to start the clustered ASM instance, can be started if voting disks are stored in ASM?

This sounds like a chicken-and-egg problem:

without access to the voting disks there is no CSS, hence the node cannot join the cluster.

But without being part of the cluster, CSSD cannot start the ASM instance.

To solve this problem the ASM disk headers have new metadata in 11.2:

you can use kfed to read the header of an ASM disk containing a voting disk.

The kfdhdb.vfstart and kfdhdb.vfend fields tell CSS where to find the voting file. This does not require the ASM instance to be up.

Once the voting disks are located, CSS can access them and joins the cluster.

What is gsdctl in RAC? list gsdctl commands in Oracle RAC?

GSDCTL stands for Global Service Daemon Control, we can use gsdctl commands to start, stop, and obtain the status of the GSD service on any platform.

The options for gsdctl are:-

$ gsdctl start -- To start the GSD service

$ gsdctl stop  -- To stop the GSD service

$ gsdctl stat  -- To obtain the status of the GSD service

Log file location for gsdctl:

$ ORACLE_HOME/srvm/log/gsdaemon_node_name.log

What is Oracle RAC One Node?

Oracle RAC one Node is a single instance running on one node of the cluster while the 2nd node is in cold standby mode. If the instance fails for some reason then RAC one node detect it and restart the instance on the same node or the instance is relocate to the 2nd node incase there is failure or fault in 1st node. The benefit of this feature is that it provides a cold failover solution and it automates the instance relocation without any downtime and does not need a manual intervention. Oracle introduced this feature with the release of 11gR2 (available with Enterprise Edition).

What is RAC and how is it different from non RAC databases?

Oracle Real Application clusters allows multiple instances to access a single database, the instances will be running on multiple nodes.

In Real Application Clusters environments, all nodes concurrently execute transactions against the same database.

Real Application Clusters coordinates each node's access to the shared data to provide consistency and integrity.

What are the advantages of RAC (Real Application Clusters)?

Reliability - if one node fails, the database won't fail

Availability - nodes can be added or replaced without having to shutdown the database

Scalability - more nodes can be added to the cluster as the workload increases

What is Cache Fusion?

Oracle RAC is composed of two or more instances. When a block of data is read from datafile by an instance within the cluster and another instance is in need of the same block, it is easy to get the block image from the instance which has the block in its SGA rather than reading from the disk. To enable inter instance communication Oracle RAC makes use of interconnects. The Global Enqueue Service (GES) monitors and Instance enqueue process manages the cache fusion.

What command would you use to check the availability of the RAC system?

crs_stat -t -v (-t -v are optional)

How do we verify that RAC instances are running?

SQL>select * from V$ACTIVE_INSTANCES;

The query gives the instance number under INST_NUMBER column,host_:instancename under INST_NAME column.

How can you connect to a specific node in a RAC environment?

tnsnames.ora ensure that you have INSTANCE_NAME specified in it.

Which is the "MASTER NODE" in RAC?

The node with the lowest node number will become master node and dynamic remastering of the resources will take place.

To find out the master node for particular resource, you can query v$ges_resource for MASTER_NODE column.

To find out which is the master node, you can see ocssd.log file and search for "master node number".when the first master node fails in the cluster the lowest node number will become master node.

What components in RAC must reside in shared storage?

All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shred storage.

Give few examples for solutions that support cluster storage?

·ASM (automatic storage management),

·Raw disk devices,

·Network file system (NFS),

·OCFS2 and

·OCFS (Oracle Cluster Fie systems).

What are Oracle Cluster Components?

1.Cluster Interconnect (HAIP)

2.Shared Storage (OCR/Voting Disk)

3.Clusterware software

4.Oracle Kernel Components

What are Oracle RAC Components?

VIP, Node apps etc.

What are Oracle Kernel Components?

Basically Oracle kernel need to switched on with RAC On option when you convert to RAC, that is the difference as it facilitates few RAC bg process like LMON,LCK,LMD,LMS etc.

How to turn on RAC?

# link the oracle libraries

$ cd $ORACLE_HOME/rdbms/lib

$ make -f ins_rdbms.mk rac_on

# rebuild oracle

$ cd $ORACLE_HOME/bin

$ relink oracle

Disk architechture in RAC?

SAN (Storage Area Networks) - generally using fibre to connect to the SAN

NAS (Network Attached Storage) - generally using a network to connect to the NAS using either NFS, ISCSI

What is Oracle Clusterware?

The Clusterware software allows nodes to communicate with each other and forms the cluster that makes the nodes work as a single logical server.

The software is run by the Cluster Ready Services (CRS) using the Oracle Cluster Registry (OCR) that records and maintains the cluster and node membership information and the voting disk which acts as a tiebreaker during communication failures. Consistent heartbeat information travels across the interconnect to the voting disk when the cluster is running.

Real Application Clusters

Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide a highly scalable and available database solution for all your business applications. Oracle RAC provides the foundation for enterprise grid computing.

Oracle’s Real Application Clusters (RAC) option supports the transparent deployment of a single database across a cluster of servers, providing fault tolerance from hardware failures or planned outages. Oracle RAC running on clusters provides Oracle’s highest level of capability in terms of availability, scalability, and low-cost computing.

One DB opened by multipe instances so the the db ll be Highly Available if an instance crashes.

Cluster Software. Oracles Clusterware or products like Veritas Volume Manager are required to provide the cluster support and allow each node to know which nodes belong to the cluster and are available and with Oracle Cluterware to know which nodes have failed and to eject then from the cluster, so that errors on that node can be cleared.

Oracle Clusterware has two key components Cluster Registry OCR and Voting Disk.

The cluster registry holds all information about nodes, instances, services and ASM storage if used, it also contains state information ie they are available and up or similar.

The voting disk is used to determine if a node has failed, i.e. become separated from the majority. If a node is deemed to no longer belong to the majority then it is forcibly rebooted and will after the reboot add itself again the the surviving cluster nodes.

What are the Oracle Clusterware key components?

Oracle Clusterware has two key components Cluster Registry OCR and Voting Disk.

What is Voting Disk and OCR?

Voting Disk:

Oracle RAC uses the voting disk to manage cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The voting disk must reside on shared disk.

A node must be able to access more than half of the voting disks at any time.

For example, if you have 3 voting disks configured, then a node must be able to access at least two of the voting disks at any time. If a node cannot access the minimum required number of voting disks it is evicted, or removed, from the cluster.

Oracle Cluster Registry (OCR) 

The cluster registry holds all information about nodes, instances, services and ASM storage if used, it also contains state information ie they are available and up or similar.

The OCR must reside on shared disk that is accessible by all of the nodes in your cluster.

What are the administrative tasks involved with voting disk?

Following administrative tasks are performed with the voting disk :

1) Backing up voting disks

2) Recovering Voting disks

3) Adding voting disks

4) Deleting voting disks

5) Moving voting disks

Can you add voting disk online? Do you need voting disk backup?

Yes,  as per documentation, if you have multiple voting disk you can add online, but if you have only one voting disk , by that cluster will be down as its lost you just need to start crs in exclusive mode and add the votedisk using

crsctl add votedisk <path>

What is the Oracle Recommendation for backing up voting disk?

Oracle recommends us to use the dd command to backup the voting disk with a minimum block size of 4KB.

How do we backup voting disks?

1) Oracle recommends that you back up your voting disk after the initial cluster creation and after we complete any node addition or deletion procedures.

2) First, as root user, stop Oracle Clusterware (with the crsctl stop crs command) on all nodes. Then, determine the current voting disk by issuing the following command:

crsctl query votedisk css

3) Then, issue the dd or ocopy command to back up a voting disk, as appropriate.

Give the syntax of backing up voting disks:-

On Linux or UNIX systems:

dd if=voting_disk_name of=backup_file_name

where,

voting_disk_name is the name of the active voting disk

backup_file_name is the name of the file to which we want to back up the voting disk contents

On Windows systems, use the ocopy command:

copy voting_disk_name backup_file_name

How do we verify an existing current backup of OCR?

We can verify the current backup of OCR using the following command : ocrconfig -showbackup

You have lost OCR disk, what is your next step?

The cluster stack will be down due to the fact that cssd is unable to maintain the integrity, this is true in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd still up and running. You can add the ocr back by restoring the automatic backup or import the manual backup,

What are the major RAC wait events?

In a RAC environment the buffer cache is global across all instances in the cluster and hence the processing differs.The most common wait events related to this are gc cr request and gc buffer busy

GC CR request :the time it takes to retrieve the data from the remote cache

Reason: RAC Traffic Using Slow Connection or Inefficient queries (poorly tuned queries will increase the amount of data blocks requested by an Oracle session. The more blocks requested typically means the more often a block will need to be read from a remote instance via the interconnect.)

GC BUFFER BUSY: It is the time the remote instance locally spends accessing the requested data block.

What do you do if you see GC CR BLOCK LOST in top 5 Timed Events in AWR Report? 

This is most likely due to a fault in interconnect network.

Check netstat -s

if you see "fragments dropped" or "packet reassemblies failed" , Work with your system administrator find the fault with network.

How do you troubleshoot node reboot?

Please check metalink ...

Note 265769.1 Troubleshooting CRS Reboots

Note.559365.1 Using Diagwait as a diagnostic to get more information for diagnosing Oracle Clusterware Node evictions.

Srvctl cannot start instance, I get the following error PRKP-1001 CRS-0215, however sqlplus can start it on both nodes? How do you identify the problem?

Set the environmental variable SRVM_TRACE to true.. And start the instance with srvctl. Now you will get detailed error stack.

What are Oracle Clusterware processes for 10g on Unix and Linux?

Cluster Synchronization Services (ocssd) — Manages cluster node membership and runs as the oracle user; failure of this process results in cluster restart.

Cluster Ready Services (crsd) — The crs process manages cluster resources (which could be a database, an instance, a service, a Listener, a virtual IP (VIP) address, an application process, and so on) based on the resource's configuration information that is stored in the OCR. This includes start, stop, monitor and failover operations. This process runs as the root user

Event manager daemon (evmd) —A background process that publishes events that crs creates.

Process Monitor Daemon (OPROCD) —This process monitor the cluster and provide I/O fencing. OPROCD performs its check, stops running, and if the wake up is beyond the expected time, then OPROCD resets the processor and reboots the node. An OPROCD failure results in Oracle Clusterware restarting the node. OPROCD uses the hangcheck timer on Linux platforms.

RACG (racgmain, racgimon) —Extends clusterware to support Oracle-specific requirements and complex resources. Runs server callout scripts when FAN events occur.

What are Oracle database background processes specific to RAC?

Oracle RAC is composed of two or more database instances. They are composed of Memory structures and background processes same as the single instance database.Oracle RAC instances use two processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle RAC instances are composed of following background processes:

ACMS—Atomic Controlfile to Memory Service (ACMS)

GTX0-j—Global Transaction Process

LMON—Global Enqueue Service Monitor

LMD—Global Enqueue Service Daemon

LMS—Global Cache Service Process

LCK0—Instance Enqueue Process

RMSn—Oracle RAC Management Processes (RMSn)

RSMN—Remote Slave Monitor

To ensure that each Oracle RAC database instance obtains the block that it needs to satisfy a query or transaction, Oracle RAC instances use two processes, the Global Cache Service (GCS) and the Global Enqueue Service (GES). The GCS and GES maintain records of the statuses of each data file and each cached block using a Global Resource Directory (GRD). The GRD contents are distributed across all of the active instances.

What is GRD?

GRD stands for Global Resource Directory. The GES and GCS maintains records of the statuses of each datafile and each cahed block using global resource directory.This process is referred to as cache fusion and helps in data integrity.

What is ACMS?

ACMS stands for Atomic Controlfile Memory Service.In an Oracle RAC environment ACMS is an agent that ensures a distributed SGA memory update(ie)SGA updates are globally committed on success or globally aborted in event of a failure.

What is SCAN listener?

A scan listener is something that additional to node listener which listens the incoming db connection requests from the client which got through the scan IP, it got end points configured to node listener where it routes the db connection requests to particular node listener.

SCAN IP can be disabled if not required. However SCAN IP is mandatory during the RAC installation. Enabling/disabling SCAN IP is mostly used in oracle apps environment by the concurrent manager (kind of job scheduler in oracle apps).

Steps to disable the SCAN IP,

i.  Do not use SCAN IP at the client end.

ii. Stop scan listener

    srvctl stop scan_listener

iii.Stop scan

    srvctl stop scan (this will stop the scan vip's)

iv. Disable scan and disable scan listener

    srvctl disable scan

What are the different network components are in 10g RAC?

public, private, and vip components

Private interfaces is for intra node communication.

VIP is all about availability of application. When a node fails then the VIP component fail over to some other node, this is the reason that all applications should based on vip components means tns entries should have vip entry in the host list

What is an interconnect network?

An interconnect network is a private network that connects all of the servers in a cluster. The interconnect network uses a switch/multiple switches that only the nodes in the cluster can access.

What is the use of cluster interconnect?

Cluster interconnect is used by the Cache fusion for inter instance communication.

How can we configure the cluster interconnect?

· Configure User Datagram Protocol (UDP) on Gigabit Ethernet for cluster interconnects.

· On UNIX and Linux systems we use UDP and RDS (Reliable data socket) protocols to be used by Oracle Clusterware.

· Windows clusters use the TCP protocol.

What is the purpose of Private Interconnect?

Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and daemon communication between the the clustered nodes. This communication is based on the TCP protocol.

RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP). Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of participating nodes in the cluster.

What is a virtual IP address or VIP?

A virtual IP address or VIP is an alternate IP address that the client connections use instead of the standard public IP address. To configure VIP address, we need to reserve a spare IP address for each node, and the IP addresses must use the same subnet as the public network.

What is the use of VIP?

If a node fails, then the node's VIP address fails over to another node on which the VIP address can accept TCP connections but it cannot accept Oracle connections.

Why do we have a Virtual IP (VIP) in Oracle RAC?

Without using VIPs or FAN, clients connected to a node that did will often wait for a TCP timeout period (which can be up to 10 min) before getting an error. As a result, you don't really have a good HA solution without using VIPs.

When a node fails, the VIP associated with it is automatically failed over to some other node and new node re-arps the world indicating a new MAC address for the IP. Subsequent packets sent to the VIP go to the new node, which will send error RST packets back to the clients. This results in the clients getting errors immediately.

Give situations under which VIP address failover happens?

VIP addresses failover happens when the node on which the VIP address runs fails; all interfaces for the VIP address fails, all interfaces for the VIP address are disconnected from the network.

What is the significance of VIP address failover?

When a VIP address failover happens, Clients that attempt to connect to the VIP address receive a rapid connection refused error .They don't have to wait for TCP connection timeout messages.

What is the use of a service in Oracle RAC environment?

Applications should use the services feature to connect to the Oracle database. Services enable us to define rules and characteristics to control how users and applications connect to database instances.

What are the characteristics controlled by Oracle services feature?

The characteristics include a unique name, workload balancing, failover options, and high availability.

What enables the load balancing of applications in RAC?

Oracle Net Services enable the load balancing of application connections across all of the instances in an Oracle RAC database.

What are the types of connection load-balancing?

Connection Workload management is one of the key aspects when you have RAC instances as you want to distribute the connections to specific nodes/instance or those have less load.

There are two types of connection load-balancing:

1.Client Side load balancing (also called as connect time load balancing)

2.Server side load balancing (also called as Listener connection load balancing)

What is the difference between server-side and client-side connection load balancing?

Client-side balancing happens at client side where load balancing is done using listener.In case of server-side load balancing listener uses a load-balancing advisory to redirect connections to the instance providing best service.

Client Side load balancing:- Oracle client side load balancing feature enables clients to randomize the connection requests among all the available listeners based on their load.

An tns entry that contains all nodes entries and use load_balance=on (default its on) will use the connect time load balancing or client side load balancing.

Sample Client Side TNS Entry:-

    finance =

    (DESCRIPTION =

         (ADDRESS = (PROTOCOL = TCP)(HOST = myrac2-vip)(PORT = 2042))

         (ADDRESS = (PROTOCOL = TCP)(HOST = myrac1-vip)(PORT = 2042))

         (ADDRESS = (PROTOCOL = TCP)(HOST = myrac3-vip)(PORT = 2042))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

         (SERVER = DEDICATED)

         (SERVICE_NAME = FINANCE) (FAILOVER=ON)

    (FAILOVER_MODE =  (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5))

    )

    )

Server side load balancing:- This improves the connection performance by balancing the number of active connections among multiple instances and dispatchers. In a single instance environment (shared servers), the listener selects the least dispatcher to handle the incoming client requests. In a rac environments, PMON is aware of all instances load and dispatchers , and depending on the load information PMON redirects the connection to the least loaded node.

In a RAC environment, *.remote_listener parameter which is a tns entry containing all nodes addresses need to set to enable the load balance advisory updates to PMON.

Sample Tns entry should be in an instances of RAC cluster,

    local_listener=LISTENER_MYRAC1

    remote_listener = LISTENERS_MYRACDB

What are the administrative tools used for Oracle RAC environments?

Oracle RAC cluster can be administered as a single image using the below

·       OEM (Enterprise Manager),

·       SQL*PLUS,

·       Server control (SRVCTL),

·       Cluster Verification Utility (CLUVFY),

·       DBCA,

·       NETCA

Name some Oracle Clusterware tools and their uses?

·OIFCFG - allocating and deallocating network interfaces.

·OCRCONFIG - Command-line tool for managing Oracle Cluster Registry.

·OCRDUMP - Identify the interconnect being used.

·CVU - Cluster verification utility to get status of CRS resources.


What is the difference between CRSCTL and SRVCTL?

crsctl manages clusterware-related operations:

    Starting and stopping Oracle Clusterware

    Enabling and disabling Oracle Clusterware daemons

    Registering cluster resources

srvctl manages Oracle resource–related operations:

    Starting and stopping database instances and services

    Also from 11gR2 manages the cluster resources like network,vip,disks etc

How do we remove ASM from a Oracle RAC environment?

We need to stop and delete the instance in the node first in interactive or silent mode.After that asm can be removed using srvctl tool as follows:

srvctl stop asm -n node_name

srvctl remove asm -n node_name

We can verify if ASM has been removed by issuing the following command:

srvctl config asm -n node_name

How do we verify that an instance has been removed from OCR after deleting an instance?

Issue the following srvctl command:

srvctl config database -d database_name

cd CRS_HOME/bin

./crs_stat

What are the modes of deleting instances from ORacle Real Application cluster Databases?

We can delete instances using silent mode or interactive mode using DBCA(Database Configuration Assistant).

What are the background process that exists in 11gr2 and functionality?

Process Name     Functionality

crsd     •The CRS daemon (crsd) manages cluster resources based on configuration information that is stored in Oracle Cluster Registry (OCR) for each resource. This includes start, stop, monitor, and failover operations. The crsd process generates events when the status of a resource changes.

cssd     •Cluster Synchronization Service (CSS): Manages the cluster configuration by controlling which nodes are members of the cluster and by notifying members when a node joins or leaves the cluster. If you are using certified third-party clusterware, then CSS processes interfaces with your clusterware to manage node membership information. CSS has three separate processes: the CSS daemon (ocssd), the CSS Agent (cssdagent), and the CSS Monitor (cssdmonitor). The cssdagent process monitors the cluster and provides input/output fencing. This service formerly was provided by Oracle Process Monitor daemon (oprocd), also known as OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware restarting the node.

diskmon     •Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for Oracle Exadata Storage Server. As Exadata storage can be added to any Oracle RAC node at any point in time, the diskmon daemon is always started when ocssd is started.

evmd     •Event Manager (EVM): Is a background process that publishes Oracle Clusterware events

mdnsd     •Multicast domain name service (mDNS): Allows DNS requests. The mDNS process is a background process on Linux and UNIX, and a service on Windows.

gnsd     •Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and external DNS servers. The GNS process performs name resolution within the cluster.

ons     •Oracle Notification Service (ONS): Is a publish-and-subscribe service for communicating Fast Application Notification (FAN) events

oraagent     •oraagent: Extends clusterware to support Oracle-specific requirements and complex resources. It runs server callout scripts when FAN events occur. This process was known as RACG in Oracle Clusterware 11g Release 1 (11.1).

orarootagent     •Oracle root agent (orarootagent): Is a specialized oraagent process that helps CRSD manage resources owned by root, such as the network, and the Grid virtual IP address

oclskd     •Cluster kill daemon (oclskd): Handles instance/node evictions requests that have been escalated to CSS

gipcd     •Grid IPC daemon (gipcd): Is a helper daemon for the communications infrastructure

ctssd     •Cluster time synchronisation daemon(ctssd) to manage the time syncrhonization between nodes, rather depending on NTP

Under which user or owner the process will start?

Component                     Name of the Process         Owner

Oracle High Availability Service         ohasd                 init, root

Cluster Ready Service (CRS)             Cluster Ready Services         root

Cluster Synchronization Service (CSS)         ocssd,cssd monitor, cssdagent     grid owner

Event Manager (EVM)                 evmd, evmlogger         grid owner

Cluster Time Synchronization Service (CTSS)     octssd                 root

Oracle Notification Service (ONS)         ons, eons             grid owner

Oracle Agent                     oragent             grid owner

Oracle Root Agent                 orarootagent             root

Grid Naming Service (GNS)             gnsd                 root

Grid Plug and Play (GPnP)             gpnpd                 grid owner

Multicast domain name service (mDNS)         mdnsd                 grid owner

What is the major difference between 10g and 11g RAC?

There is not much difference between 10g and 11gR (1) RAC. But there is a significant difference in 11gR2.

Prior to 11gR1(10g) RAC, the following were managed by Oracle CRS

    Databases

    Instances

    Applications

    Node Monitoring

    Event Services

    High Availability

From 11gR2(onwards) its completed HA stack managing and providing the following resources as like the other cluster software like VCS etc.

    Databases

    Instances

    Applications

    Cluster Management

    Node Management

    Event Services

    High Availability

    Network Management (provides DNS/GNS/MDNSD services on behalf of other traditional services) and SCAN – Single Access Client Naming method, HAIP

    Storage Management (with help of ASM and other new ACFS filesystem)

    Time synchronization (rather depending upon traditional NTP)

    Removed OS dependent hang checker etc, manages with own additional monitor process

What is hangcheck timer? 

The hangcheck timer checks regularly the health of the system. If the system hangs or stop the node will be restarted automatically.

There are 2 key parameters for this module:

-> hangcheck-tick: this parameter defines the period of time between checks of system health. The default value is 60 seconds; Oracle recommends setting it to 30seconds.

-> hangcheck-margin: this defines the maximum hang delay that should be tolerated before hangcheck-timer resets the RAC node.

State the initialization parameters that must have same value for every instance in an Oracle RAC database?

Some initialization parameters are critical at the database creation time and must have same values.Their value must be specified in SPFILE or PFILE for every instance.The list of parameters that must be identical on every instance are given below:

ACTIVE_INSTANCE_COUNT

ARCHIVE_LAG_TARGET

COMPATIBLE

CLUSTER_DATABASE

CLUSTER_DATABASE_INSTANCE

CONTROL_FILES

DB_BLOCK_SIZE

DB_DOMAIN

DB_FILES

DB_NAME

DB_RECOVERY_FILE_DEST

DB_RECOVERY_FILE_DEST_SIZE

DB_UNIQUE_NAME

INSTANCE_TYPE (RDBMS or ASM)

PARALLEL_MAX_SERVERS

REMOTE_LOGIN_passWORD_FILE

UNDO_MANAGEMENT

What is RAC? What is the benefit of RAC over single instance database?

In Real Application Clusters environments, all nodes concurrently execute transactions against the same database. Real Application Clusters coordinates each node's access to the shared data to provide consistency and integrity.

Benefits:

Improve response time

Improve throughput

High availability

Transparency

Advantages of RAC (Real Application Clusters)

Reliability - if one node fails, the database won't fail

Availability - nodes can be added or replaced without having to shutdown the database

Scalability - more nodes can be added to the cluster as the workload increases

What is a virtual IP address or VIP?

A virtual IP address or VIP is an alternate IP address that the client connections use instead of the standard public IP address. To configure VIP address, we need to reserve a spare IP address for each node, and the IP addresses must use the same subnet as the public network.

What is the use of VIP?

If a node fails, then the node's VIP address fails over to another node on which the VIP address can accept TCP connections but it cannot accept Oracle connections.

Give situations under which VIP address failover happens:-

VIP addresses failover happens when the node on which the VIP address runs fails, all interfaces for the VIP address fails, all interfaces for the VIP address are disconnected from the network.

Using virtual IP we can save our TCP/IP timeout problem because Oracle notification service maintains communication between each nodes and listeners.

What is the significance of VIP address failover?

When a VIP address failover happens, Clients that attempt to connect to the VIP address receive a rapid connection refused error .They don't have to wait for TCP connection timeout messages.

What is voting disk?

Voting Disk is a file that sits in the shared storage area and must be accessible by all nodes in the cluster. All nodes in the cluster registers their heart-beat information in the voting disk, so as to confirm that they are all operational. If heart-beat information of any node in the voting disk is not available that node will be evicted from the cluster. The CSS (Cluster Synchronization Service) daemon in the clusterware maintains the heart beat of all nodes to the voting disk. When any node is not able to send heartbeat to voting disk, then it will reboot itself, thus help avoiding the split-brain syndrome.

For high availability, Oracle recommends that you have a minimum of three or odd number (3 or greater) of votingdisks.

Voting Disk - is file that resides on shared storage and Manages cluster members.  Voting disk reassigns cluster ownership between the nodes in case of failure.

The Voting Disk Files are used by Oracle Clusterware to determine which nodes are currently members of the cluster. The voting disk files are also used in concert with other Cluster components such as CRS to maintain the clusters integrity.

Oracle Database 11g Release 2 provides the ability to store the voting disks in ASM along with the OCR. Oracle Clusterware can access the OCR and the voting disks present in ASM even if the ASM instance is down. As a result CSS can continue to maintain the Oracle cluster even if the ASM instance has failed.

How many voting disks are you maintaining ?

http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/TopicID/RACR2ARC6/Default.aspx

By default Oracle will create 3 voting disk files in ASM.

Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You should always configure an odd number of voting disks >= 3. This is because loss of more than half your voting disks will cause the entire cluster to fail.

You should plan on allocating 280MB for each voting disk file. For example, if you are using ASM and external redundancy then you will need to allocate 280MB of disk for the voting disk. If you are using ASM and normal redundancy you will need 560MB.

Why we need to keep odd number of voting disks ?

Oracle expects that you will configure at least 3 voting disks for redundancy purposes. You should always configure an odd number of voting disks >= 3. This is because loss of more than half your voting disks will cause the entire cluster to fail.

What are Oracle RAC software components?

Oracle RAC is composed of two or more database instances. They are composed of Memory structures and background processes same as the single instance database.Oracle RAC instances use two processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle RAC instances are composed of following background processes:

ACMS—Atomic Controlfile to Memory Service (ACMS)

GTX0-j—Global Transaction Process

LMON—Global Enqueue Service Monitor

LMD—Global Enqueue Service Daemon

LMS—Global Cache Service Process

LCK0—Instance Enqueue Process

RMSn—Oracle RAC Management Processes (RMSn)

RSMN—Remote Slave Monitor

What is TAF?

TAF (Transparent Application Failover) is a configuration that allows session fail-over between different nodes of a RAC database cluster.

Transparent Application Failover (TAF). If a communication link failure occurs after a connection is established, the connection fails over to another active node. Any disrupted transactions are rolled back, and session properties and server-side program variables are lost. In some cases, if the statement executing at the time of the failover is a Select statement, that statement may be automatically re-executed on the new connection with the cursor positioned on the row on which it was positioned prior to the failover.

After an Oracle RAC node crashes—usually from a hardware failure—all new application transactions are automatically rerouted to a specified backup node. The challenge in rerouting is to not lose transactions that were "in flight" at the exact moment of the crash. One of the requirements of continuous availability is the ability to restart in-flight application transactions, allowing a failed node to resume processing on another server without interruption. Oracle's answer to application failover is a new Oracle Net mechanism dubbed Transparent Application Failover. TAF allows the DBA to configure the type and method of failover for each Oracle Net client.

TAF architecture offers the ability to restart transactions at either the transaction (SELECT) or session level.

What are the requirements for Oracle Clusterware?

1. External Shared Disk to store Oracle Cluster ware file (Voting Disk and Oracle Cluster Registry - OCR)

2. Two netwrok cards on each cluster ware node (and three set of IP address) -

Network Card 1 (with IP address set 1) for public network

Network Card 2 (with IP address set 2) for private network (for inter node communication between rac nodes used by clusterware and rac database)

IP address set 3 for Virtual IP (VIP) (used as Virtual IP address for client connection and for connection failover)

3. Storage Option for OCR and Voting Disk - RAW, OCFS2 (Oracle Cluster File System), NFS, …..

Which enable the  load balancing of applications in RAC?

Oracle Net Services enable the load balancing of application connections across all of the instances in an Oracle RAC database.

How to find location of OCR file when CRS is down?

If you need to find the location of OCR (Oracle Cluster Registry) but your CRS is down.

When the CRS is down:

Look into “ocr.loc” file, location of this file changes depending on the OS:

On Linux: /etc/oracle/ocr.loc

On Solaris: /var/opt/oracle/ocr.loc

When CRS is UP:

Set ASM environment or CRS environment then run the below command:

ocrcheck

In 2 node RAC, how many NIC’s are r using ?

2 network cards on each clusterware node

Network Card 1 (with IP address set 1) for public network

Network Card 2 (with IP address set 2) for private network (for inter node communication between rac nodes used by clusterware and rac database)

In 2 node RAC, how many IP’s are r using ?

6 - 3 set of IP address

## eth1-Public:  2

## eth0-Private: 2

## VIP: 2

How to find IP’s information in RAC ?

Edit the /etc/hosts file as shown below:

# Do not remove the following line, or various programs

# that requires network functionality will fail.

127.0.0.1               localhost.localdomain localhost

## Public Node names

 192.168.10.11          node1-pub.hingu.net     node1-pub

192.168.10.22          node2-pub.hingu.net     node2-pub

## Private Network (Interconnect)

 192.168.0.11            node1-prv               node1-prv

192.168.0.22            node2-prv               node2-prv

## Private Network (Network Area storage)

 192.168.1.11            node1-nas               node1-nas

192.168.1.22            node2-nas               node2-nas

192.168.1.33            nas-server              nas-server

## Virtual IPs

 192.168.10.111          node1-vip.hingu.net     node1-vip

192.168.10.222          node2-vip.hingu.net     node2-vip

What is difference between RAC ip addresses ?

Public IP adress is the normal IP address typically used by DBA and SA to manage storage, system and database. Public IP addresses are reserved for the Internet.

Private IP address is used only for internal clustering processing (Cache Fusion) (aka as interconnect). Private IP addresses are reserved for private networks.

VIP is used by database applications to enable fail over when one cluster node fails. The purpose for having VIP is so client connection can be failover to surviving nodes in case there is failure

Can application developer access the private ip ?

No. private IP address is used only for internal clustering processing (Cache Fusion) (aka as interconnect)

35. How to stop whole cluster with single command

crsctl stop cluster (possible only from 11gr2), please note crsctl commands becomes global now, if you do not specify node specifically the command executed globally for example

crsctl stop crs (stops in all crs resource in all nodes)

crsctl stop crs –n <ndeoname) (stops only in specified node)

36. CRS is not starting automatically after a node reboot, what you do to make it happen?

42. Can you add voting disk online? Do you need voting disk backup?

Yes,  as per documentation, if you have multiple voting disk you can add online, but if you have only one voting disk , by that cluster will be down as its lost you just need to start crs in exclusive mode and add the votedisk using

crsctl add votedisk <path>

43. You have lost OCR disk, what is your next step?

The cluster stack will be down due to the fact that cssd is unable to maintain the integrity, this is true in 10g, From 11gR2 onwards, the crsd stack will be down, the hasd still up and running. You can add the ocr back by restoring the automatic backup or import the manual backup,

What happens when ocssd fails, what is node eviction? how does node eviction happens? For all answer will be same.

http://db.geeksinsight.com/2012/12/27/oracle-rac-node-evictions-11gr2-node-eviction-means-restart-of-cluster-stack-not-reboot-of-node/

 why we required to maintain odd number of voting disks?

Odd number of disk are to avoid split brain, When Nodes in cluster can't talk to each other they run to lock the Voting disk and whoever lock the more disk will survive, if disk number are even there are chances that node might lock 50% of disk (2 out of 4) then how to decide which node to evict.

whereas when number is odd, one will be higher than other and each for cluster to evict the node with less number


Good one for RAC> https://dbaclass.com/article/oracle-rac-interview-questions/