Vous êtes sur la page 1sur 38

1) How does SCAN works?

Client Connected through SCAN name of the cluster (remember all three IP addresses round robin
resolves to same Host name (SCAN Name), here in this case our scan name is cluster01-
scan.cluster01.example.com

The request reaches to DNS server in your corp and then resolves to one of the node out of three. a.
If GNS (Grid Naming service or domain is configured) that is a subdomain configured in the DNS
entry for to resolve cluster address the request will be handover to GNS (gnsd)
Here in our case assume there is no GNS, now the with the help of SCAN listeners where end points
are configured to database listener.

Database Listeners listen the request and then process further.


In case of node addition, Listener 4, client need not to know or need not change any thing from their
tns entry (address of 4th node/instance) as they just using scan IP.
Same case even in the node deletion.

2) List some of the background process that used in ASM?

The following background processes are an integral part of Automatic Storage Management:
ARBn performs the actual rebalance data extent movements in an Automatic Storage Management
instance. There can be many of these processes running at a time, named ARB0, ARB1, and so on.

ASMB runs in a database instance that is using an ASM disk group. ASMB communicates with the
ASM instance, managing storage and providing statistics. ASMB can also run in the ASM instance.
ASMB runs in ASM instances when the ASMCMD cp command runs or when the database instance
first starts if the SPFILE is stored in ASM.

GMON maintains disk membership in ASM disk groups.

MARK marks ASM allocation units as stale following a missed write to an offline disk. This essentially
tracks which extents require resync for offline disks.

RBAL runs in both database and ASM instances. In the database instance, it does a global open of
ASM disks. In an ASM instance, it also coordinates rebalance activity for disk groups.

The processes described in the previous list are important for the ASM instance and should not be
modified. In addition to the processes listed in this section, there are additional processes that run in
both the ASM and database instances, such as database writer process (DBWn), log writer process
(LGWR), Process Monitor Process (PMON), and System Monitor Process (SMON).

3) The following list describes the SHUTDOWN modes and describes the behavior of the
ASM instance in each mode.

 NORMAL Clause

ASM waits for any in-progress SQL to complete before performing an orderly
dismount of all of the disk groups and shutting down the ASM instance. Before the
instance is shut down, ASM waits for all of the currently connected users to
disconnect from the instance. If any database instances are connected to the ASM
instance, then the SHUTDOWN command returns an error and leaves the ASM
instance running. NORMAL is the default shutdown mode.

 IMMEDIATE or TRANSACTIONAL Clause

ASM waits for any in-progress SQL to complete before performing an orderly
dismount of all of the disk groups and shutting down the ASM instance. ASM does
not wait for users currently connected to the instance to disconnect. If any database
instances are connected to the ASM instance, then theSHUTDOWN command returns
an error and leaves the ASM instance running. Because the ASM instance does not
contain any transactions, theTRANSACTIONAL mode is the same as
the IMMEDIATE mode.

 ABORT Clause

The ASM instance immediately shuts down without the orderly dismount of disk
groups. This causes recovery to occur upon the next ASM startup. If any database
instance is connected to the ASM instance, then the database instance aborts.
4) Accessing an ASM Instance

This section describes how to connect to an ASM instance. In the examples where you
provide a user name, you are prompted for a password.

Note:
The SYS user is created by default by DBCA during installation process with all three system
privileges.

Use the following statement to connect locally to an ASM instance using operating system
authentication:

sqlplus / AS SYSASM

Use the following statement to connect locally using password authentication:

sqlplus SYS AS SYSASM

Use the following statement to connect remotely using password authentication:

sqlplus sys@\"myhost.mydomain.com:1521/asm\" AS SYSASM

Use the following statement to connect to an ASM instance with SYSDBA privilege:

sqlplus / AS SYSDBA

The following is a sample SQL*Plus session for starting an ASM instance.

SQLPLUS /NOLOG
SQL> CONNECT SYS AS SYSASM
Enter password: sys_password
Connected to an idle instance.

SQL> STARTUP
ASM instance started

Total System Global Area 71303168 bytes


Fixed Size 1069292 bytes
Variable Size 45068052 bytes
ASM Cache 25165824 bytes
ASM disk groups mounted
Shutting down ASM instance

SQLPLUS /NOLOG
SQL> CONNECT SYS AS SYSASM
Enter password: sys_password
Connected.
SQL> SHUTDOWN NORMAL

5) What are types of ASM Mirroring?

Supported Default
Disk Group Type
MirroringLevels Mirroring Level

External redundancy Unprotected (None) Unprotected (None)

Two-wayThree-
Normal redundancy wayUnprotected Two-way
(None)

High redundancy Three-way Three-way

6) 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.

SQL> desc v$active_instances


Name Null? Type
----------------------------------------- -------- ----------------------------
INST_NUMBER NUMBER
INST_NAME VARCHAR2(60)
CON_ID NUMBER

SQL> select * from v$active_instances;


INST_NUMBER INST_NAME CON_ID
----------- ------------------------------------------------------------ ----------
1 amrdc1dbrprod01.albmolecular.com:+ASM1 0
2 amrdc1dbrprod02:+ASM2 0

7) What components in RAC must reside in shared storage?

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

8) 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.

9) 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.

Minimum 1 and maximum 15 copy of voting disk is possible.

10). 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. It’s store
information to manage Oracle cluster-ware and it’s component such as RAC database,
listener, VIP,Scan IP & Services.

Minimum 1 and maximum 5 copy of OCR is possible.


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

11) . 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>

12) How do we verify an existing current backup of OCR?

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

ocrconfig -showbackup

USAGE:
[oracle@amrdc1dbrprod01 ~]$ ocrconfig -help
Name:
ocrconfig - Configuration tool for Oracle Cluster/Local Registry.

Synopsis:
ocrconfig [option]
option:
[-local] -export <filename>
- Export OCR/OLR contents to a file
[-local] -import <filename> - Import OCR/OLR contents from a file
[-local] -upgrade [<user> [<group>]]
- Upgrade OCR from previous version
-downgrade [-version <version string>]
- Downgrade OCR to the specified version
[-local] -backuploc { <dirname> | +<diskgroupname> }
- Configure OCR/OLR backup location
[-local] -showbackuploc - Show OCR/OLR backup location
[-local] -showbackup [auto|manual] - Show OCR/OLR backup information
[-local] -manualbackup - Perform OCR/OLR backup
[-local] -restore <filename> - Restore OCR/OLR from physical backup
-replace <current filename> -replacement <new filename>
- Replace an OCR device or file <current filename> with <new filename>
-add <filename> - Add a new OCR device/file
-delete <filename> - Remove a OCR device/file
-overwrite - Overwrite OCR configuration on disk
-repair -add <filename> | -delete <filename> | -replace <current filename> -replacement
<new filename>
- Repair OCR configuration on the local node
-copy <source_filename> <destination_filename>
- Copy OCR physical backup from source to destination
-help - Print out this help information

13) . 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.

14). 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

15) .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

16) . 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

18. 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

[oracle@amrdc1dbrprod01 ~]$ srvctl config database -d uat


Database unique name: UAT
Database name:
Oracle home: /u03/app/oraprod/product/12.1.0
Oracle user: oraprod
Spfile: +DATA2/UAT/spfileuat.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA2
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: dba
Database instances: UAT1,UAT2
Configured nodes: amrdc1dbrprod01,amrdc1dbrprod02
Database is administrator managed
[oracle@amrdc1dbrprod01 ~]$

20) . What is GRD?

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

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

Process Name Functionality


Cluster:

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.(cluster ready service deamon)

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).

occsd.bin => Manages cluster node membership runs as oragrid user.Failure of this process
results in node restart.

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.

cssdmonitor => Monitors node hangs(via oprocd functionality) and monitors OCCSD
process hangs (via oclsomon functionality) and monitors vendor clusterware(via vmon
functionality).This is the multi threaded process that runs with elavated priority.

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

RAC Processess

GTX0-j (Global transaction process)


The process provides transparent support for XA global transactions in a RAC environment.
The database auto tunes the number of these processes based on the workload of XA global
transactions.

LMON (GESM)
This process monitors global enques and resources across the cluster and performs global
enqueue recovery operations. This is called as Global Enqueue Service Monitor.

LMD (GESD)
This process is called as global enqueue service daemon. This process manages incoming
remote resource requests within each instance.

LMS (GCS)
This process is called as Global Cache service process. This process maintains statuses of
datafiles and each cahed block by recording information in a Global Resource
Dectory(GRD).This process also controls the flow of messages to remote instances and
manages global data block access and transmits block images between the buffer caches of
different instances.This processing is a part of cache fusion feature.

LCK0(IEP)
This process is called as Instance enqueue process.This process manages non-cache fusion
resource requests such as libry and row cache requests.

RMSn: Oracle RAC Management Processes (RMSn)

The RMSn processes perform manageability tasks for RAC. Tasks accomplished by an RMSn
process include creation of resources related to Oracle RAC when new instances are added to the
clusters.

RSMN: Remote Slave Monitor manages background slave process creation and communication on
remote instances. These background slave processes perform tasks on behalf of a coordinating
process running in another instance.

ACMS: Atomic Controlfile to Memory Service (ACMS)

In RAC ACMS per-instance process ensure a distributed SGA memory update is either globally
committed if success or globally aborted if a failure occurs.

22). Can I stop all nodes in one command? Meaning that stopping whole cluster ?

In 10g its not possible, where in 11g it is possible

[root@pic1]# crsctl start cluster -all


[root@pic2]# crsctl stop cluster –all

crsctl check cluster -all; will chk cluster services on all nodes

[oracle@amrdc1dbrprod01 ~]$ crsctl check cluster -all


**************************************************************
amrdc1dbrprod01:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
amrdc1dbrprod02:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

23). CRS is not starting automatically after a node reboot, what you do to make it
happen?
crsctl enable crs (as root)

to disable

crsctl disable crs (as root)

Cluster commands

[oracle@rac1 ~]$ 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

cluster start/stop- login as root

crsctl stop crs


crsctl start crs

Check the status of the resourse on the cluster

[oracle@amrdc1dbrprod01 ~]$ crsctl status resource -t


--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.DATA1.dg
OFFLINE OFFLINE amrdc1dbrprod01 STABLE
ONLINE OFFLINE amrdc1dbrprod02 STABLE
ora.DATA2.dg
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.LISTENER.lsnr
OFFLINE OFFLINE amrdc1dbrprod01 STABLE
OFFLINE OFFLINE amrdc1dbrprod02 STABLE
ora.LISTENER_UAT.lsnr
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.OCRVOTE.dg
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.net1.network
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.ons
ONLINE ONLINE amrdc1dbrprod01 STABLE
ONLINE ONLINE amrdc1dbrprod02 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE amrdc1dbrprod01 169.254.3.182 10.0.1
25.1,STABLE
ora.amrdc1dbrprod01.vip
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.amrdc1dbrprod02.vip
1 ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.asm
1 ONLINE ONLINE amrdc1dbrprod01 Started,STABLE
2 ONLINE ONLINE amrdc1dbrprod02 Started,STABLE
ora.cvu
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.mgmtdb
1 ONLINE ONLINE amrdc1dbrprod01 Open,STABLE
ora.oc4j
1 ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.scan1.vip
1 ONLINE ONLINE amrdc1dbrprod02 STABLE
ora.scan2.vip
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.scan3.vip
1 ONLINE ONLINE amrdc1dbrprod01 STABLE
ora.uat.db
1 ONLINE ONLINE amrdc1dbrprod01 Open,STABLE
2 ONLINE ONLINE amrdc1dbrprod02 Open,STABLE
--------------------------------------------------------------------------------
[oracle@amrdc1dbrprod01 ~]$
Stop/status the database

[oracle@rac1 ~]$ srvctl stop database -d RACDB


[oracle@rac1 ~]$ srvctl status database -d RACDB
Instance RACDB1 is not running on node rac1
Instance RACDB2 is not running on node rac2

Start the database

[oracle@rac1 ~]$ srvctl start database -d RACDB


[oracle@rac1 ~]$ srvctl status database -d RACDB
Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2

Stop an instance

[oracle@rac1 ~]$ srvctl stop instance -i RACDB1 -d RACDB


[oracle@rac1 ~]$ srvctl status instance -i RACDB1 -d RACDB
Instance RACDB1 is not running on node rac1
Instance RACDB2 is running on node rac2

Start an instance

[oracle@rac1 ~]$ srvctl start instance -i RACDB1 -d RACDB


[oracle@rac1 ~]$ srvctl status database -d RACDB
Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2

Stop the listener on a Node

[oracle@rac1 ~]$ srvctl status listener -n rac1

Listener LISTENER is enabled on node(s): rac1


Listener LISTENER is not running on node(s): rac1

Start the listener on a Node

[oracle@rac1 ~]$ srvctl start listener -n rac1

Listener LISTENER is enabled on node(s): rac1

Listener LISTENER is running on node(s): rac1

Start/stop/status scan listener

Srvctl status/stop/start scan_listener

Srvctl status scan

Scan listener

Print Scan Listener status _ Helmut's RAC _ JEE Blog.html

How To start, stop and manage services in oracle RAC 11g


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

srvctl status service -d dbname


srvctl config service -d dbname
srvctl start service -d dbname -s servicename
srvctl stop service -d dbname -s servicename

srvctl relocate service -d dbname -s servicename -i instancename -t


newinstancename [-f]

http://oracledbabay.blogspot.de/2012/11/srvctl-commands-10g-rac-11g-r2-rac.html

http://oracledbabay.blogspot.de/2012/10/srvctl-commands-in-11gr2.html
Start/stop ASM

Since in 11gR2 OCR & voting disk reside in ASM

So you can not start/stop ASM. You need to use crsctl to start/stop cluster

Check the voting disk

[oracle@rac1 ~]$ crsctl query css votedisk

## STATE File Universal Id File Name Disk group

— —– —————– ——— ———

1. ONLINE 91b18024f9674f83bf5117d3c0996a05 (ORCL:VOL1) [DATA]

Located 1 voting disk(s).

Show OCR backup – the voting file (disk) is also backed up with the OCR backup

[root@rac1 bin]# ./ocrconfig -showbackup

rac1 2012/07/17 07:47:17 /u01/app/11.2.0/grid/cdata/rac-cluster/backup00.ocr

rac1 2012/07/17 03:47:15 /u01/app/11.2.0/grid/cdata/rac-cluster/backup01.ocr


rac1 2012/07/16 23:47:13 /u01/app/11.2.0/grid/cdata/rac-cluster/backup02.ocr

rac1 2012/07/16 19:47:11 /u01/app/11.2.0/grid/cdata/rac-cluster/day.ocr

rac1 2012/07/16 19:47:11 /u01/app/11.2.0/grid/cdata/rac-cluster/week.ocr

rac1 2012/03/23 11:30:19 /u01/app/11.2.0/grid/cdata/rac-


cluster/backup_20120323_113019.ocr

Take a manual backup of the OCR

[root@rac1 bin]# ./ocrconfig -manualbackup

rac1 2012/07/17 10:08:28 /u01/app/11.2.0/grid/cdata/rac-


cluster/backup_20120717_100828.ocr

rac1 2012/07/17 10:07:39 /u01/app/11.2.0/grid/cdata/rac-


cluster/backup_20120717_100739.ocr

rac1 2012/03/23 11:30:19 /u01/app/11.2.0/grid/cdata/rac-


cluster/backup_20120323_113019.ocr

Check the status of the OCR

[root@Rac1 ~]# cd /u01/app/11.2.0/grid/bin/

[root@Rac1 bin]# ./ocrcheck


Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 3044

Available space (kbytes) : 259076

ID : 9093549

Device/File Name : +DATA

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

The Oracle Interface Configuration Tool (oifcfg) is used define and administer network
interfaces such as the public and private interfaces.

The usage of oifcfg command is


Allocate/ Deallocate network interfaces to components

Direct components to use specific network interfaces

Display information of component network configuration

to start/stop/status of asm

srvctl stop asm -n rac1

srvctl stop asm -n rac2

To go to asmcd login with unix user(from which u hv installed cluster) & type asmcd

ASMCMD>lsdg - shows ASM disk groups, their disk usage

select name, state, type, total_mb, free_mb from v$asm_diskgroup;

sqlplus / as sysasm

alter diskgroup FRA1 drop disk 'FRA1_0002';

alter diskgroup FRA1 add disk '/dev/vx/rdsk/fra1dg/fra3';

alter diskgroup FRA1 mount;

New Facts:
We can store OCR And Voting disk on ASM or certified cluster file system.

We can dynamically add or replace voting disk & OCR.

Backup of Voting disk using “dd” command not supported.

Voting disk and OCR can be keep in same disk-group or different disk-group

Voting disk and OCR automatic backup kept together in a single file.

Automatic backup of Voting disk and OCR happen after every four hours, end of the day, end
of the week

You must have root or sudo privilege account to manage it.

Sequence of cluster shutting down


i) Shutdown the database on all nodes.
ii) Shutdown the cluster on all nodes(it will also shutdown the ASM as well)

Start Sequence of starting cluster

i) the cluster on all nodes .(it will start the ASM as well)
ii) Start the database on all nodes

In 11gR2 RAC , OCR & voting disk reside in ASM , so you can’t shutdown the
ASM directly by command

Network heartbeat:-

Each node in the cluster is “pinged” every second

 Nodes must respond in css_misscount time (defaults to 30 secs.)


– Reducing the css_misscount time is generally not supported
 Network heartbeat failures will lead to node evictions
 CSSD-log:
[date / time] [CSSD][1111902528]
clssnmPollingThread: node mynodename (5) at 75% heartbeat fatal, removal in 6.7
sec

Disk Heartbeat:-

Each node in the cluster “pings” (r/w) the Voting Disk(s) every second
 Nodes must receive a response in (long / short) diskTimeout time
– IF I/O errors indicate clear accessibility problems  timeout is irrelevant
 Disk heartbeat failures will lead to node evictions
 CSSD-log: …
[CSSD] [1115699552] >TRACE: clssnmReadDskHeartbeat:node(2) is down.
rcfg(1) wrtcnt(1) LATS(63436584) Disk lastSeqNo(1)

Now, we know with above possibilities (network, disk heartbeat failures can lead to node
eviction, but sometime when the server/occsd/resource request also makes the node get
evicted which are extreme cases)
On node reboot/crash, the init process on the OS spawns init.ohasd (as mentioned in the
/etc/inittab file), which in turn commence Oracle High Availability Service Daemon (ohasd).
The ohasd daemon is then responsible of starting off the other critical cluster daemon
processes.

The new oraagent and oraclerootagent layers then brings up Cluster Synchronization Daemon
(cssd), Cluster Ready Services (crsd), Event Manager Daemon (evmd) and other rest of
Cluster stack in addition to ASM, RDBMS instances and other resources on the cluster at
various levels.

What is a Server Pool?


Server pools enable the cluster administrator to create a policy which defines how Oracle
Clusterware allocates resources. An Oracle RAC policy-managed database runs in a server
pool. Oracle Clusterware attempts to keep the required number of servers in the server pool
and, therefore, the required number of instances of the Oracle RAC database. A server can be
in only one server pool at any time. However, a database can run in multiple server pools.
Cluster-managed services run in a server pool where they are defined as either UNIFORM
(active on all instances in the server pool) or SINGLETON (active on only one instance in the
server pool).

How do I define a service for a Policy-Managed Database?


When you define services for a policy-managed database, you define the service to a server
pool where the database is running. You can define the service as either UNIFORM (running
on all instances in the server pool) or SINGLETON (running on only one instance in the
server pool). For SINGLETON services, Oracle RAC chooses on which instance in the server
pool the service is active. If that instance fails, then the service fails over to another instance
in the server pool. A service can only run in one server pool.
Services for administrator-managed databases continue to be defined by the PREFERRED
and AVAILABLE definitions.

Administrator managed databases (similar to what we had prior to 11g R2)


. DBA defines which servers should the database run on
. DBA decides the servers (preferred/available nodes) on which services of the database
should run.
. DBA decides which instance of the database will run on which server.
. This database type would assign the instances to a child pool of the default pool available
Generic pool.

What are the different types of Server-Side Connection Load Balancing?


With server-side load balancing, the SCAN listener directs a connection request to the best
instance currently providing the service by using the load balancing advisory. The two types
of connection load balancing are:
· SHORT—Connections are distributed across instances based on the amount of time that the
service is used. Use the SHORT connection load balancing goal for applications that have
connections of brief duration. When using connection pools that are integrated with FAN, set
the connection load balancing goal to SHORT. SHORT tells the listener to use CPU-based
statistics.
· LONG—Connections are distributed across instances based on the number of sessions in each
instance, for each instance that supports the service. Use the LONG connection load
balancing goal for applications that have connections of long duration. This is typical for
connection pools and SQL*Forms sessions. LONG is the default connection load balancing
goal, and tells the listener to use session-based statistics.
How do I determine the “Master” node?
For the cluster synchronization service (CSS), the master can be found by searching
$GI_HOME/log/cssd/ocssd.log. For master of an enqueue resource with Oracle RAC, you
can select from v$ges_resource. There should be a master_node column.

Do I still need to backup my Oracle Cluster Registry (OCR) and Voting Disks?
You no longer have to back up the voting disk. The voting disk data is automatically backed
up in OCR as part of any configuration change and is automatically restored to any voting
disk added. If all voting disks are corrupted, however, you can restore.
Oracle Clusterware automatically creates OCR backups every four hours. At any one time,
Oracle Database always retains the last three backup copies of OCR. The CRSD process that
creates the backups also creates and retains an OCR backup for each full day and at the end
of each week. You cannot customize the backup frequencies or the number of files that
Oracle Database retains.
Should I configure Transparent Application Failure (TAF) in my service definition if using
Fast Connection Failure (FCF)?
Do not configure Transparent Application Failover (TAF) with Fast Connection Failover
(FCF) for JDBC clients as TAF processing will interfere with FAN ONS processing.

Can I use Fast Connection Failover (FCF) and Transparent Application Failover (TAF)
together?
No. Only one of them should be used at a time.

What is the status of Fast Connection Failover (FCF) with Universal Connection Pool
(UCP)?
FCF is now deprecated along with the Implicit Connection Caching in favor of using the
Universal Connection Pool (UCP) for JDBC.

Changing Public IP, VIP and SCAN IP in 11gR2 RAC

The IP change is as follows. The SCAN IP is set up in /etc/hosts (not supported by Oracle).
Name Old IP New IP
rhel6m1 192.168.0.85 192.168.0.93
rhel6m2 192.168.0.86 192.168.0.94
rhel6m-scan 192.168.0.91 192.168.0.92

The steps could be done parallel (on all nodes) or in a rolling fashion on each node. Steps executed on
one node is shown here and changes were done parallel on all nodes. Since the information modified
is stored in OCR it is better to take a manual backup of the OCR before proceeding.

1. First step is to change the VIP configuration. Current VIP configuration is


srvctl config nodeapps
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.89/192.168.0.0/255.255.255.0/eth0,
hosting node rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.90/192.168.0.0/255.255.255.0/eth0,
hosting node rhel6m2

2. Stop the database instance and the VIP resource


[oracle@rhel6m1 ~]$ srvctl stop instance -d std11g2 -i std11g21
[grid@rhel6m1 ~]$ srvctl stop vip -n node_name -f(not sure about command)
Or
srvctl stop nodeapps -n test1(it will stop node service on test1 node)
srvctl stop nodeapps -n test2

3. Verify VIP resource is down by using ifconfig on the OS and using crsctl
crsctl stat res -t

ora.rhel6m1.vip
OFFLINE OFFLINE
ora.rhel6m2.vip
OFFLINE OFFLINE

4. Add the new IP information to /etc/hosts (and DNS) and proceed to modifying the VIP. The modify
command must be run as root user
[root@rhel6m1 grid]#
srvctl modify nodeapps -n rhel6m1 –A 192.168.0.97/255.255.255.0/eth0

Verify that changes are taken effect


[grid@rhel6m2 ~]$ srvctl config nodeapps –n node_name -a
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.97/192.168.0.0/255.255.255.0/eth0,
hosting node rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.98/192.168.0.0/255.255.255.0/eth0,
hosting node rhel6m2

If the VIP is now on a different network then do not start VIP until public IP and SCAN IP is also
changed into the same network.

5. Next is to update the SCAN IP information.

Current SCAN IP configuration


srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.91

6. Stop the SCAN IP and the scan lister and verify it is stopped.
[root@rhel6m1 grid]# srvctl stop scan_listener

[root@rhel6m1 grid]# srvctl stop scan

[root@rhel6m1 grid]# srvctl status scan


SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running

[root@rhel6m1 grid]# srvctl status scan_listener


SCAN Listener MYLISTENER_SCAN1 is enabled
SCAN listener MYLISTENER_SCAN1 is not running
7. Now ask the Network team to modify Scan IP in DNS and (/etc/hosts )after that modify the SCAN
IP by executing the modify command as root user with the same SCAN name. (It is assumed that if
DNS is used, the SCAN name now resolve to new IPs) This will pick up the new IP and update cluster
records with the new SCAN IP.
[root@rhel6m1 grid]# srvctl modify scan -n rhel6m-scan

8. Verify the changes have taken effect


[root@rhel6m1 grid]# srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.92
If the SCAN IP is now on a different network than the public IP then don't start the SCAN IP until the
pubilc IP is also changed.

9. Updating public IP requires no cluster related work. Shutdown the cluster stack
[root@rhel6m1 grid]# crsctl stop crs

10. Change IP address on OS (eg. editing ifcfg-eth*) files and restart the network for the changes to
take effect. Once the IP changes are made it maybe worthwhile to do ssh between nodes using the new
IP so it is added to known host list and no prompts are shown during the ssh between the nodes. As
the final step restart the cluster stack with
# crsctl start crs

Modifying SCAN Configuration in Oracle 11g Release 2 RAC

Rename SCAN

The original name was "ol6-112-scan" and I want to rename it to "ol6-112-scan2".


Check the new name is configured in the DNS.

$ nslookup ol6-112-scan2
Server: 192.168.0.4
Address: 192.168.0.4#53

Name: ol6-112-scan2.localdomain
Address: 192.168.0.117
Name: ol6-112-scan2.localdomain
Address: 192.168.0.116
Name: ol6-112-scan2.localdomain
Address: 192.168.0.115

Display the current configuration using the following command as the oracle/grid
user.

$ export GRID_HOME=/u01/app/11.2.0.3/grid
$ $GRID_HOME/bin/srvctl config scan
SCAN name: ol6-112-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /ol6-112-scan/192.168.0.115
SCAN VIP name: scan2, IP: /ol6-112-scan/192.168.0.116
SCAN VIP name: scan3, IP: /ol6-112-scan/192.168.0.117
$

Turn off the SCAN and SCAN listeners using the following commands as the
oracle/grid user.

$ export GRID_HOME=/u01/app/11.2.0.3/grid
$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan

Modify the SCAN name using the following commands as the root user.

# export GRID_HOME=/u01/app/11.2.0.3/grid
# $GRID_HOME/bin/ srvctl modify scan -n ol6-112-scan2
# $GRID_HOME/bin/ crsctl modify type ora.scan_vip.type -attr
"ATTRIBUTE=SCAN_NAME, DEFAULT_VALUE=ol6-112-scan2"

Turn on the SCAN and SCAN listeners again using the following commands as
the oracle/grid user.

$ $GRID_HOME/bin/srvctl modify scan_listener -u


$ $GRID_HOME/bin/srvctl start scan_listener
Display the changed configuration.

$ $GRID_HOME/bin/srvctl config scan


SCAN name: ol6-112-scan2, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /ol6-112-scan2/192.168.0.115
SCAN VIP name: scan2, IP: /ol6-112-scan2/192.168.0.116
SCAN VIP name: scan3, IP: /ol6-112-scan2/192.168.0.117
$
What is dynamic mastering

IN RAC every block is mastered by an instance .mastering a block simply


means that instance keep track the state of the block until next
reconfiguration event..
if any of the node or any of the instance is out of from cluster then GRD
of that instance need to redistrubuited to the surviving nodes ..
Simlarly when any node added or join in cluster then GRD Portion of
existing instance or Node must be redistributed to create the GRD portion
of new instance or new node ..this is called dynamix resource
reconfiguration ..also you can called as Dynamix remastering ..the basic
concept behind is master a buffer cache resource on the instance where it
is mostely accessed ..

How to Stop/Start RAC components


In this article, I am going to explain how to stop/start rac components. Here is the my system:

My db version : 11.2.0.3
My Operating System : AIX 7.1
My servers hostname : node1-node2
My database name : TEST01
My instance name : TEST011-TEST012

Here is the some basic commands, for commands details&options please review Reference docs:

Checking CRS Status


[oracle@node1]</home/oracle> 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

[oracle@node2]</home/oracle> 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

Checking Node Status

[oracle@node1]</home/oracle> srvctl status nodeapps

VIP node1-vip is enabled


VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

[oracle@node2]</home/oracle> srvctl status nodeapps

VIP node1-vip is enabled


VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

Checking Clusterware Resource Status


[oracle@node1]</home/oracle> crsctl status resource -t

I will not paste result because output is not clear in that page

You can use below command which is not recommended for 11g and which is depreciated

[oracle@node1]</home/oracle> crs_stat -t
Name Type Target State Host
————————————————————
ora….DATA.dg ora….up.type ONLINE ONLINE node1
ora….ER.lsnr ora….er.type ONLINE ONLINE node1
ora….N1.lsnr ora….er.type ONLINE ONLINE node1
ora….N2.lsnr ora….er.type ONLINE ONLINE node2
ora.ORADATA.dg ora….up.type ONLINE ONLINE node1
ora.asm ora.asm.type ONLINE ONLINE node1
ora.cvu ora.cvu.type ONLINE ONLINE node2
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora….SM1.asm application ONLINE ONLINE node1
ora….11.lsnr application ONLINE ONLINE node1
ora….b11.gsd application OFFLINE OFFLINE
ora….b11.ons application ONLINE ONLINE node1
ora….b11.vip ora….t1.type ONLINE ONLINE node1
ora….SM2.asm application ONLINE ONLINE node2
ora….12.lsnr application ONLINE ONLINE node2
ora….b12.gsd application OFFLINE OFFLINE
ora….b12.ons application ONLINE ONLINE node2
ora….b12.vip ora….t1.type ONLINE ONLINE node2
ora….network ora….rk.type ONLINE ONLINE node1
ora.oc4j ora.oc4j.type ONLINE ONLINE node2
ora.ons ora.ons.type ONLINE ONLINE node1
ora.test01.db ora….se.type ONLINE ONLINE node1
ora….int.svc ora….ce.type ONLINE ONLINE node2
ora….int.svc ora….ce.type ONLINE ONLINE node2
ora….kis.svc ora….ce.type ONLINE ONLINE node2
ora….est.svc ora….ce.type ONLINE ONLINE node1
ora….ry.acfs ora….fs.type ONLINE ONLINE node1
ora.scan1.vip ora….ip.type ONLINE ONLINE node1
ora.scan2.vip ora….ip.type ONLINE ONLINE node2

Oracle High Availability Services

— disable/enable Oracle HAS.


Use the “crsctl enable/disable has” command to disable automatic startup of the Oracle High
Availability Services stack when the server boots up.

To can see current settings for Oracle High Availability Services stack when the server boots up,
follow:

[root@node1]crsctl config has


CRS-4622: Oracle High Availability Services autostart is enabled.

or

[root@node1]cat /etc/oracle/scls_scr/node1/root/ohasdstr
enable

So as you can see my current setting is enable.If your system shown disable than :

For Disable:
[root@node1]crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

[root@node1] crsctl config has


CRS-4621: Oracle High Availability Services autostart is disabled.

# cat /etc/oracle/scls_scr/node1/root/ohasdstr
disable

For Enable:
[root@node1]crsctl enable has
CRS-4621: Oracle High Availability Services autostart is enabled.

Check new setting:

[root@node1] crsctl config has


CRS-4621: Oracle High Availability Services autostart is enabled.

[root@node1] cat /etc/oracle/scls_scr/node1/root/ohasdstr


enable

Stop the Oracle clusterware stack


You can use below commands:

With root user:

crsctl stop crs or crsctl stop has

[root@node1]crsctl stop has


CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘node1′
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘node1′
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘node1′
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN2.lsnr’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.test01.db’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN3.lsnr’ on ‘node1′
CRS-2677: Stop of ‘ora.LISTENER_SCAN2.lsnr’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.scan2.vip’ on ‘node1′
CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.node1.vip’ on ‘node1′
CRS-2677: Stop of ‘ora.LISTENER_SCAN3.lsnr’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.scan3.vip’ on ‘node1′
CRS-2677: Stop of ‘ora.node1.vip’ on ‘node1′ succeeded
CRS-2672: Attempting to start ‘ora.node1.vip’ on ‘node2′
CRS-2677: Stop of ‘ora.scan2.vip’ on ‘node1′ succeeded
CRS-2672: Attempting to start ‘ora.scan2.vip’ on ‘node2′
CRS-2677: Stop of ‘ora.scan3.vip’ on ‘node1′ succeeded
CRS-2672: Attempting to start ‘ora.scan3.vip’ on ‘node2′
CRS-2676: Start of ‘ora.node1.vip’ on ‘node2′ succeeded
CRS-2677: Stop of ‘ora.test01.db’ on ‘node1′ succeeded
CRS-2676: Start of ‘ora.scan2.vip’ on ‘node2′ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN2.lsnr’ on ‘node2′
CRS-2676: Start of ‘ora.scan3.vip’ on ‘node2′ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN3.lsnr’ on ‘node2′
CRS-2676: Start of ‘ora.LISTENER_SCAN2.lsnr’ on ‘node2′ succeeded
CRS-2676: Start of ‘ora.LISTENER_SCAN3.lsnr’ on ‘node2′ succeeded
CRS-2673: Attempting to stop ‘ora.ons’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.eons’ on ‘node1′
CRS-2677: Stop of ‘ora.ons’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘node1′
CRS-2677: Stop of ‘ora.net1.network’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.eons’ on ‘node1′ succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘node1′ has completed
CRS-2677: Stop of ‘ora.crsd’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘node1′
CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.gpnpd’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.evmd’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.ctssd’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘node1′
CRS-2677: Stop of ‘ora.cssd’ on ‘node1′ succeeded
CRS-2673: Attempting to stop ‘ora.diskmon’ on ‘node1′
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘node1′
CRS-2677: Stop of ‘ora.gipcd’ on ‘node1′ succeeded
CRS-2677: Stop of ‘ora.diskmon’ on ‘node1′ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘node1′ has
completed
CRS-4133: Oracle High Availability Services has been stopped.

Start the Oracle clusterware stack

You can use below commands:

With root user:


crsctl start crs or crsctl start has

[root@node1] crsctl start crs


CRS-4123: Oracle High Availability Services has been started.

Start the Oracle Database


To start all Oracle RAC instances for a database:
[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl start database -d db_name

PS: db_name is the name of the databasethis command is starting all the instances

Stop the Oracle Database


To shut down all Oracle RAC instances for a database:
[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl stop database -d db_name

PS: db_name is the name of the databasethis command is starting all the instances

Start the Oracle Instance:

[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl start instance –d db_name


–i instance_name

Stop the Oracle Instance:

[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl stop instance –d db_name


–i instance_name
Stop/Start Listener-SCAN_LISTENER

srvctl stop/start listener -n node1
srvctl stop/start listener -n node2
srvctl stop scan_listener

Stop ASM

srvctl stop asm [-o stop_options] [-f]


srvctl stop asm -n node1
In 11gr2 you can stop all resouces as below

<CRS_HOME>/bin/crsctl stop has

or you can stop in the following sequence

stop or relocate service using srvctl


stop instnace using srvctl
stop asm using srvctl
stop nodeapps using srvctl
stop cluster resources as root - <CRS_HOME>/bin/crsctl stop has

To start

<CRS_HOME>/bin/crsctl start has - it should bring all resources automatically

verify the services status and start or relocate it back.

cd $GRID_HOME/bin
./crsctl stop cluster -all

What is the difference between Crash recovery and Instance recovery?

When an instance crashes in a single node database on startup a crash recovery takes place. In a

RAC enviornment the same recovery for an instance is performed by the surviving nodes called

Instance recovery.

How do you determine what protocol is being used for Interconnect traffic?

One of the ways is to look at the database alert log for the time period when the database was started

up.

What methods are available to keep the time synchronized on all nodes in the cluster?

Either the Network Time Protocol(NTP) can be configured or in 11gr2, Cluster Time Synchronization

Service (CTSS) can be used.

Where does the Clusterware write when there is a network or Storage missed heartbeat?

The network ping failure is written in $CRS_HOME/log


How do we know which database instances are part of a RAC cluster?

You can query the V$ACTIVE_INSTANCES view to determine the member instances of the RAC

cluster.

What components of the Grid should I back up?

The backups should include OLR, OCR and ASM Metadata.

Is there an easy way to verify the inventory for all remote nodes

You can run the opatch lsinventory -all_nodes command from a single node to look at the inventory

details for all nodes in the cluster.

Q How you will backup your RAC Database?


Backup strategy of RAC Database:
An RAC Database consists of
1)OCR
2)Voting disk &
3)Database files, controlfiles, redolog files & Archive log files

Q 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).

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


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

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 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

45. How many alert logs exist in a RAC environment?


A- One for each instance.

. What is the Cluster Verification Utiltiy (cluvfy)?


The Cluster Verification Utility (CVU) is a validation tool that you can use to check all the important
components that need to be verified at different stages of deployment in a RAC environment.

OLR

In Oracle Clusterware 11g Release 2 an additional component related to the OCR called the Oracle
Local Registry (OLR) is installed on each node in the cluster. The OLR is a local registry for node
specific resources. THe OLR is not shared by other nodes in the cluster. It is installed and configured
when Oracle clusterware is installed.

Purpose of OLR
————–
It is the very first file that is accessed to startup clusterware when OCR is stored on ASM. OCR
should be accessible to find out the resources which need to be started on a node. If OCR is on ASM,
it can’t be read until ASM (which itself is a resource for the node and this information is stored in
OCR) is up. To resolve this problem, information about the resources which need to be started on a
node is stored in an operating system file which is called Oracle Local Registry or OLR. Since OLR is
a file an operating system file, it can be accessed by various processes on the node for read/write
irrespective of the status of the clusterware (up/down). Hence, when a node joins the cluster, OLR
on that node is read, various resources ,including ASM are started on the node . Once ASM is up ,
OCR is accessible and is used henceforth to manage all the clusterware resources. If OLR is
missing or corrupted, clusterware can’t be started on that node!

Where is OLR located?


———————
The OLR file is located in the grid_home/cdata/<hostname>.olr . The location of OLR is stored in
/etc/oracle/olr.loc.and used by OHASD .

What does OLR contain?


———————-
The OLR stores
– version of clusterware
- clusterware configuration
- configuration of various resources which need to be started on the node
etc.

To manually back up OLR:


# ocrconfig –local –manualbackup

To view the contents of the OLR backup file:


#ocrdump -local -backupfile olr_backup_file_name
To change the OLR backup location
#ocrconfig -local -backuploc new_olr_backup_path

To restore OLR:
# crsctl stop crs
# ocrconfig -local -restore file_name
# ocrcheck -local
# crsctl start crs
$ cluvfy comp olr

You can view the status of the OLR file on each node by using the ocrcheck command with the –local
parameter as seen here:
#ocrcheck -local

With Oracle grid infrastructure 11g release 2 (11.2), Oracle Automatic Storage Management (Oracle ASM)
and Oracle Clusterware are installed into a single home directory, which is referred to as the Grid
Infrastructure home

In 11.2 grid infrastructure, the Oracle Clusterware Component Log Files are all
situated in the $GRID_HOME/log/<hostname>
For instance, if my host name is tzdev1rac, all my Oracle Clusterware Component Log
Files (for 11.2) are situated in $GRID_HOME/log/tzdev1rac:

pwd
/oracle/grid/11.2/log/tzdev1rac ($GRID_HOME = /oracle/grid/11.2)

How to check ASM instance status

[oracle@localhost opt]$ $ORACLE_HOME/bin/./srvctl status ASM


ASM is not running.
[oracle@localhost opt]$

In additionally you can get information

[oracle@oraserver ~]$ export ORACLE_SID=+ASM


[oracle@oraserver ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Nov 22 15:04:33 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options

SQL> select status from v$instance;

STATUS
------------
STARTED

SQL> desc v$asm_diskgroup


Name Null? Type
----------------------------------------- -------- ------------------
----------
GROUP_NUMBER NUMBER
NAME VARCHAR2(30)
SECTOR_SIZE NUMBER
BLOCK_SIZE NUMBER
ALLOCATION_UNIT_SIZE NUMBER
STATE VARCHAR2(11)
TYPE VARCHAR2(6)
TOTAL_MB NUMBER
FREE_MB NUMBER
REQUIRED_MIRROR_FREE_MB NUMBER
USABLE_FILE_MB NUMBER
OFFLINE_DISKS NUMBER
UNBALANCED VARCHAR2(1)
COMPATIBILITY VARCHAR2(60)
DATABASE_COMPATIBILITY VARCHAR2(60)

SQL> select name,state from v$asm_diskgroup;


NAME STATE
------------------------------ -----------
DGR1 MOUNTED
DGR2 MOUNTED

SQL>

Also check you have available free space your disk groups?

2. If it is 11gR2 then how i can check for the grid installation?

ASM installation available only within Grid infrastructure(RAC or Standalone) ,

[oracle@amrdc1dbrprod01 ~]$ crsctl -help


Usage: crsctl add - add a resource, type or other entity
crsctl check - check the state or operating status of a service, resource, or other entity
crsctl config - display automatic startup configuration
crsctl debug - display or modify debug state
crsctl delete - delete a resource, type or other entity
crsctl disable - disable automatic startup
crsctl discover - discover DHCP server
crsctl enable - enable automatic startup
crsctl eval - evaluate operations on resource or other entity without performing them
crsctl get - get an entity value
crsctl getperm - get entity permissions
crsctl lsmodules - list debug modules
crsctl modify - modify a resource, type or other entity
crsctl query - query service state
crsctl pin - make the leases of specified nodes immutable
crsctl relocate - relocate a resource, server or other entity
crsctl replace - change the location of voting files
crsctl release - release a DHCP lease
crsctl request - request a DHCP lease or an action entry point
crsctl setperm - set entity permissions
crsctl set - set an entity value
crsctl start - start a resource, server or other entity
crsctl status - get status of a resource or other entity
crsctl stop - stop a resource, server or other entity
crsctl unpin - make the leases of previously pinned nodes mutable
crsctl unset - unset an entity value, restoring its default
[oracle@amrdc1dbrprod01 ~]$

Vous aimerez peut-être aussi