Showing posts with label olsnodes commands. Show all posts
Showing posts with label olsnodes commands. Show all posts

June 28, 2023

50 frequently asked Oracle DBA RAC Interview Questions Part2 [ 2023 ]

Oracle RAC Interview Questions/FAQs Part2 [2023]

22. What is split-brain syndrome?
Answer:
Split brain will arise when two or more instances attempt to control a cluster database. In a two-node environment, one instance attempts to manage updates simultaneously while the other instance attempts to manage updates.

23. What are various IPs used in RAC? Or How many IPs do we need in RAC?

Answer:
Public IP, Private IP, Virtual IPSCAN IP

24. What is the use of virtual IP (VIP)?

Answer:
When a node fails, the VIP associated with it is automatically failed over to some other node and the 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.

Without using VIPs or FAN, clients connected to a node that died 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.

25. What is the use of SCAN IP (SCAN name) and will it provide load balancing?

Answer:
Single Client Access Name (SCAN) was introduced in Oracle Real Application Clusters (RAC) 11g Release 2, feature that provides a single name for clients to access an Oracle Database running in a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster.

26. How many SCAN listeners will be running?

Answer:
Three SCAN listeners only, irrespective of the number of nodes in the cluster.

27. What is FAN?

Answer:
Applications can use Fast Application Notification (FAN) to enable rapid failure detection, balancing of connection pools after failures, and re-balancing of connection pools when failed components are repaired. The FAN process uses system events that Oracle publishes when cluster servers become unreachable or if network interfaces fail.

28. What is FCF?

Answer:
Fast Connection Failover (FCF) provides high availability to FAN integrated clients, such as clients that use JDBC, OCI, or ODP.NET. If you configure the client to use fast connection failover, then the client automatically subscribes to FAN events and can react to database UP and DOWN events. In response, Oracle gives the client a connection to an active instance that provides the requested database service.

29. What is TAF and TAF policies?

Answer:
Transparent Application Failover (TAF) - A runtime failover for high availability environments, such as Real Application Clusters, TAF refers to the failover and re-establishment of application-to-service connections. It enables client applications to automatically reconnect to the database if the connection fails, and optionally resume a SELECT statement that was in progress. This reconnect happens automatically from within the Oracle Call Interface (OCI) library.

30. How will you upgrade the RAC database?

Answer:

31. What are rolling patches and how to apply them?

Answer:

32. How to add/remove a node?

Answer:

33. What are nodeapps?

Answer:
VIP, listener, ONS, GSD

34. What is gsd (Global Service Daemon)?

Answer:

35. How to do load balancing in RAC?

Answer:

36. What are the uses of services? How to find out the services in the cluster?

Answer:
Applications should use the services to connect to the Oracle database. Services define rules and characteristics (unique name, workload balancing, failover options, and high availability) to control how users and applications connect to database instances.

37. How to find out the nodes in the cluster (or) how to find out the master node?

Answer: 
To find out which is the master node, use any one of the below.
i) # olsnodes -- Which ever displayed first, is the master node of the cluster.
ii) select MASTER_NODE from v$ges_resource;
iii) check ocssd.log file and search for "master node number".
iv) oclumon manage -get master        (From Oracle RAC 12c)
v) ocrconfig -manualbackup

https://satya-racdba.blogspot.com/2019/01/oracle-rac-master-node.html

38. How to know the public IPs, private IPs, VIPs in RAC?

Answer:
olsnodes -n -p -i
node1-pub       1       node1-prv       node1-vip
node2-pub       2       node2-prv       node2-vip

39. What utility is used to start DB/instance?

Answer:
srvctl start database –d database_name
srvctl start instance –d database_name –i instance_name

40. How can you shutdown a single instance?

Answer:
Change cluster_database=false
srvctl stop instance –d database_name –i instance_name



March 24, 2022

How to find out the master node ?


How to find out the nodes in RAC cluster (or) 
How to find out the master node in Oracle RAC?

There are several ways to find out which is the master node or all the nodes which are part of Oracle RAC cluster.

Use any one of the below.

i) oclumon manage -get master        (in Oracle RAC 12c)


ii) select MASTER_NODE from v$ges_resource;


iii) ocrconfig -manualbackup


iv) check ocssd.log file and search for "master node number".

$ grep "master node number/u01/app/crs/11.2.0.4/log/`hostname -s`/cssd/ocssd.log




Related Oracle Articles: cluster name of Oracle RAC cluster  Oracle RAC Interview Questions Part3

August 17, 2020

cluster name of Oracle RAC cluster

How to find out cluster name of Oracle RAC cluster ?


The cluster name is case-insensitive, must be unique across environment, must be no more than 15 characters in length, must be alphanumeric and may contain hyphens (-). Underscore characters (_) are not allowed. But installation script/OUI will not fail, even if you provide more than 15 characters in cluster name.

1) cemutlo utility can be used to find out Oracle RAC Cluster name.

$GRID_HOME/bin/cemutlo -n

e.g.:
/u01/app/11.2/grid/bin/cemutlo -n

Below command will give number of characters in Oracle RAC Cluster name.
/u01/app/11.2/grid/bin/cemutlo -n|wc -c

Usage: ./cemutlo.bin [-n] [-w]
where:
-n prints the cluster name
-w prints the clusterware version in the following format: major_version:minor_version:vendor_info

2) olsnodes utility can be used to find out Oracle RAC Cluster name.
olsnodes -c



Related Oracle RAC Articles: ocrdump commands in RAC   oclumon commands

January 6, 2018

olsnodes commands in Oracle RAC

Oracle RAC 11g / 12c OLSNODES commands

Provides list of nodes and other information for all nodes participating in the cluster.

olsnodes [node_name] [-g] [-i] [-l] [-n] [-p] [-s] [-t] [-v]    ==> in Oracle RAC 11g

# olsnodes [ [ [-n] [-i] [-s] [-t] [ | -l [-p]] ] | [-c] | [-a] ] [-g] [-v] ==> in Oracle RAC 12c

node_name -- displays information for the particular node

g -- more details (turn on logging)

i -- with VIP

l -- local node name

n -- with node number (with the node name)

p -- private interconnect

s -- status of the node (ACTIVE or INACTIVE)

t -- type of the node (PINNED or UNPINNED)

v -- verbose, Run in debug mode

c -- clusterware name (From 12c Oracle RAC)

a -- print active node roles of the nodes in the cluster (From 12c Oracle RAC)



How to find out nodes in the Oracle RAC cluster?
# olsnodes             -- will list nodes in the cluster

# olsnodes -n

# olsnodes node44 -v

# olsnodes -n -p -i
node1-pub 1 node1-prv node1-vip
node2-pub 2 node2-prv node2-vip


# olsnodes -i
node1 178.192.1.1
node2 178.192.2.1
node3 178.192.3.1
node4 178.192.4.1

# olsnodes -c

$ olsnodes -n -i -s -t

$ olsnodes -s -t -v


How to find out the nodes in the cluster (or) how to find out the master node?

# olsnodes     - Whichever is displayed first, is the master node of the cluster.

Related Oracle Articles:    oifcfg commands RAC    onsctl commands RAC    srvctl commands RAC