Tuesday, March 11, 2014

Checkpoints in Oracle

Information about checkpoints in oracle.

PURPOSE OF CHECKPOINTS
   Database blocks are temporarily stored in Database buffer cache. As blocks are read, they are stored in DB buffer cache so that if any user accesses them later, they are available in memory and need not be read from the disk. When we update any row, the buffer in DB buffer cache corresponding to the block containing that row is updated in memory. Record of the change made is kept in redo log buffer . On commit, the changes we made are written to the disk thereby making them permanent. But where are those changes written? To the datafiles containing data blocks? No !!! The changes are recorded in online redo log files by flushing the contents of redo log buffer to them.This is called write ahead logging.  If the instance crashed right now, the DB buffer cache will be wiped out but on restarting the database, Oracle will apply the changes recorded in redo log files to the datafiles.
    Why doesn’t Oracle write the changes to datafiles right away when we commit the transaction? The reason is simple. If it chose to write directly to the datafiles, it will have to physically locate the data block in the datafile first and then update it which means that after committing, user has to wait until DBWR searches for the block and then writes it before he can issue next command. This will bring down the performance drastically. That is where the role of redo logs comes in. The writes to the redo logs are sequential writes – LGWR just dumps the info in redologs to log files sequentially and synchronously so that the user does not have to wait for long. Moreover, DBWR will always write in units of Oracle blocks whereas LGWR will write only the changes made. Hence,  write ahead logging also improves performance by reducing the amount of data written synchronously. When will the changes be applied to the datablocks in datafiles? The data blocks in the datafiles will be updated by the DBWR asynchronously in response to certain triggers. These triggers are called checkpoints.
  Checkpoint is a synchronization event at a specific point in time which causes some / all dirty blocks to be written to disk thereby guaranteeing that blocks dirtied prior to that point in time get written.
  Whenever dirty blocks are written to datafiles, it allows oracle
- to reuse a redo log : A redo log can’t be reused until DBWR writes all the dirty blocks protected by that logfile to disk. If we attempt to reuse it before DBWR has finished its checkpoint, we get the following message in alert log : Checkpoint not complete.
- to reduce instance recovery time : As the memory available to a database instance increases, it is possible to have database buffer caches as large as several million buffers. It requires that the database checkpoint advance frequently to limit recovery time, since infrequent checkpoints and large buffer caches can exacerbate crash recovery times significantly.
- to free buffers for reads : Dirtied blocks can’t be used to read new data into them until they are written to disk. Thus DBWrR writes dirty blocks from the buffer cache, to make room in the cache.
Type of Checkpoints  in Oracle :
- Full checkpoint
- Thread checkpoint
- File checkpoint
- Parallel Query checkpoint
- Object checkpoint
- Log switch checkpoint
_ Incremental checkpoint

Whenever a checkpoint is triggered :
- DBWR writes some /all dirty blocks to datafiles
- CKPT process updates the control file and datafile headers
                     
 FULL CHECKPOINT
- Writes block images to  the database for all dirty buffers from all instances.
- Statistics updated
  . DBWR checkpoints
  . DBWR checkpoint buffers written
  . DBWR thread checkpoint buffers written
- Caused by :
  . Alter system checkpoint [global]
  . ALter database begin backup
  . ALter database close
  . Shutdown [immediate]
- Controlfile and datafile headers are updated
  . Checkpoint_change#
                 
  THREAD CHECKPOINT
- Writes block images to the database for all dirty buffers from one instance
- Statistics updated
  . DBWR checkpoints
  . DBWR checkpoint buffers written
  . DBWR thread checkpoint buffers written
- Caused by :
  . Alter system checkpoint local
- Controlfile and datafile headers are updated
  . Checkpoint_change#

FILE CHECKPOINT
  When a tablespace is put into backup mode or take it offline, Oracle writes all the dirty blocks from the tablespace to disk before changing the state of the tablespace.
- Writes block images to the database for all dirty buffers for all files of a tablespace from all instances
- Statistics updated
  . DBWR checkpoints
  . DBWR tablespace checkpoint buffers written
  . DBWR checkpoint buffers written
- Caused by :
  . Alter tablespace xxx offline
  . Alter tablespace xxx begin backup
  . Alter tablespace xxx read only
- Controlfile and datafile headers are updated
  . Checkpoint_change#
                  
PARALLEL QUERY CHECKPOINT
   Parallel query often results in direct path reads (Full tablescan or index fast full scan). This means that blocks are read straight into the session’s PGA, bypassing the data cache; but that means if there are dirty buffers in the data cache, the session won’t see the most recent versions of the blocks unless they are copied to disk before the query starts – so parallel queries start with a checkpoint.
- Writes block images to the database for all dirty buffers belonging to objects accessed by the query from all instances.
- Statistics updated
  . DBWR checkpoints
  . DBWR checkpoint buffers written
- Caused by :
  . Parallel Query
  . Parallel Query component of Parallel DML (PDML) or Parallel DDL (PDDL)
- Mandatory for consistency
- Controlfile and datafile headers are updated
  . Checkpoint_change#
OBJECT CHECKPOINT
  When an object is dropped/truncated, the session initiates an object checkpoint telling DBWR to copy any dirty buffers for that object to disk and the state of those buffers is changed to free.
- Writes block images to the database for all dirty buffers belonging to an object from all instances.
- Statistics updated
  . DBWR checkpoints
  . DBWR object drop buffers written
- Caused by dropping or truncating a segment:
  . Drop table XXX
  . Drop table XXX Purge
  . Truncate table xxx
  . Drop index xxx
- Mandatory for media recovery purposes
- Controlfile and datafile headers are updated
  . Checkpoint_change#
               
LOG SWITCH CHECKPOINT

- Writes the contents of the  dirty buffers whose information is protected by a redo log to the database .
- Statistics updated
  . DBWR checkpoints
  . DBWR checkpoint buffers written
  . background checkpoints started
  . background checkpoints completed
- Caused by log switch
- Controlfile and datafile headers are updated
  . Checkpoint_change#
                  
INCREMENTAL CHECKPOINT
  Prior to Oracle 8i, only well known checkpoint was log switch checkpoint. Whenever LGWR filled an online logfile, DBWR would go into a frenzy writing data blocks to disks, and when it had finished, Oracle would update each data file header block with the SCN to show that file was updated up to that point in time.
   Oracle 8i introduced incremental checkpointing which triggered DBWR to write some dirty blocks from time to time so as to advance the checkpoint and reduce the instance recovery time.
Incremental checkpointing has been implemented using two algorithms :
- Ageing algorithm
- LRU/TCH algorithm
                                               
AGEING ALGORITHM
This strategy involves writing changed blocks that have been dirty for the longest time and  is called aging writes. This algorithm relies on the CKPT Q running thru the cache and buffers being linked to the end of this list the first time they are made dirty.
   .The LRU list contains all the buffers – free / pinned / dirty. Whenever a buffer in LRU list is dirtied, it is placed in CKPT Q as well i.e. a buffer can  simultaneously have pointers in both LRU list and CKPT Q but the buffers in CKPT Q are arranged in the order in which they were dirtied.Thus,  checkpoint queue contains dirty blocks in the order of SCN# in which they were dirtied
  Every 3 secs DBWR wakes up and checks if there are those many  dirty buffers in CKPT Q which need to br written so as to satisfy instance recovery requirement..
If those many or more dirty buffers are not found,
   DBWR goes to sleep
else (dirty buffers found)
  .CKPT target RBA is calculated based on
   - The most recent RBA
   - log_checkpoint_interval
   - log_checkpoint_timeout
   - fast_start_mttr_target
   - fast_start_io_target
   - 90% of the size of the smallest redo log file
  . DBWR walks the CKPT Q from the low end (dirtied earliest) of the redo log file collecting buffers for writing to disk until it reaches the buffer that is more recent than the target RBA. These buffers are placed in write list-main.
  . DBWR walks the write list-main and checks all the buffers
    – If changes made to the buffer have already been written to redo log files
        . Move those buffers to write-aux list
      else
        . Trigger LGWR to write changes to those buffers to redo logs
        . Move those buffers to write-aux list
  . Write buffers from write-aux list to disk
  . Update checkpoint RBA in SGA
  . Delink those buffers from CKPT Q
  . Delink those buffers from write-aux list
- Statistics Updated :
   . DBWR checkpoint buffers written
- Controlfile updated every 3 secs by CKPT
   . Checkpoint progress record
  As sessions link buffers to one end of the list, DBWR can effectively unlink buffers from the other end and copy them to disk. To reduce contention between DBWR and foreground sessions, there are two linked lists in each working set so that foreground sessions can link buffers to one while DBWR is unlinking them from the other.
                                                          
LRU/TCH ALGORITHM
 LRU/TCH algorithm writes the cold dirty blocks to disk that are on the point of being pushed out of cache.
  As per ageing algorithm, DBWR will wake up every 3 seconds to flush dirty blocks to disk. But if blocks get dirtied at a fast pace during those 3 seconds and a server process needs some free buffers, some buffers need to be flushed to the disk to make room. That’s when LRU/TCH algorithm is used to write those dirty buffers which are on the cold end of the LRU list.
   Whenever a server process needs some free buffers to read data, it scans the LRU list from its cold end to look for free buffers.
While searching
  If unused buffers found
    Read blocks from disk into the buffers and link them to the corresponding hash bucket
  if it finds some clean buffers (contain data but not dirtied or dirtied and have been flushed to disk),
      if they are the candidates to be aged out (low touch count)
          Read blocks from disk into the buffers and link them to the corresponding hash bucket
      else (have been accessed recently and should not be aged out)
         Move them to MRU end depending upon its touch count.
  If it finds dirty buffers (they are already in CKPT Q),
     Delink them from LRU list
     Link them  to the write-main list (Now these buffers are in CKPT Q and write-main list)
  The server process scans a threshold no. of buffers (_db_block_max_scan_pct = 40(default)). If it does not find required no. of free buffers,
   It triggers DBWR to dirty blocks in write-mainlist to disk
 . DBWR walks the write list-main and checks all the buffers
    – If changes made to the buffer have already been written to redo log files
           . Move those buffers to write-aux list
       else
          . Trigger LGWR to write changes to those buffers to redo logs
          . Move those buffers to write-aux list
  . Write buffers from write-aux list to disk
  . Delink those buffers from CKPT Q and w rite-aux list
  . Link those buffers to LRU list as free buffers
 Note that
- In this algorithm, the dirty blocks are delinked from LRU list before linking them to write-main list in contrast to ageing algorithm where the blocks can be simultaneously be in both CKPT Q and LRU list.
- In this algorithm, checkpoint is not advanced because it may be possible that the dirty blocks on the LRU end may actually not be the ones which were dirtied earliest. They may be there because the server process did not move them to the MRU end earlier. There might be blocks present in CKPT Q which were dirtied earlier than the blocks in question.


References book :
Essential Internals  for DBA’s and Developers By Jonathan Lewis
 

Saturday, March 8, 2014

RACcheck (RAC Configuration Audit Tool)

RACcheck (RAC Configuration Audit Tool)

RACcheck is a RAC Configuration Audit tool designed to check various important configuration settings within a Real Application Clusters (RAC), Oracle Clusterware (CRS), Automatic Storage Management (ASM) and Grid Infrastructure environment. The tool audits configuration settings within the following categories:
•             OS kernel parameters
•             OS packages
•             Many other OS configuration settings important to RAC.
•             CRS/Grid Infrastructure
•             RDBMS
•             ASM
•             Database parameters

Many other database configuration settings important to RAC 11.2.0.3 Upgrade Readiness assessment
Please note that this script has to be executed by Database Owner. (in my case it is oracle)

$ ./raccheck
$ ./raccheck -v            -v - returns the version of the tool.
$ ./raccheck -a            -a - performs all checks, best practice and Database/Clusterware patch/OS recommendations.
$ ./raccheck -a -o v      -o - for invoking various optional functionality.
$ ./raccheck -a -o verbose
$ ./raccheck -a -c ASM       -c - for use when checking individual components, for only ASM component checks.
$ ./raccheck -a -c ASM -o verbose
$ ./raccheck -a -c ACFS      -c - for use when checking individual components, for only ACFS component checks.
$ ./raccheck -b      -b - best practice recommendations only.
$ ./raccheck -p      -p - database/clusterware patch recommendations only.
$ ./raccheck -f       -f - offline, performs analysis for all.
$ ./raccheck -m     -m - suppresses the Maximum Availability Architecture (MAA) Scorecard which is enabled by default in RACcheck.
$ ./raccheck -u -o pre      -u - performs pre-upgrade readiness checks for 11.2.0.3.
$ ./raccheck -u -o post    -u - performs post-upgrade readiness checks for 11.2.0.3.
$ ./raccheck -s    -s - run RACcheck silently, unattended execution when the Oracle user can SUDO to root without a password.
$ ./raccheck -S    -S - run RACcheck silently, unattended execution without the root password and root privileged collections/audits.

Related Links :  

New features in Oracle 9i/10g/11g Real Application Cluster




Friday, March 7, 2014

New features in Oracle 9i/10g/11g Real Application Cluster


Oracle RAC New features

Oracle 9i RAC
·                     OPS (Oracle Parallel Server) was renamed as RAC
·                     CFS (Cluster File System) was supported
·                     OCFS (Oracle Cluster File System) for Linux and Windows
·                     watchdog timer replaced by hangcheck timer

Oracle 10g R1 RAC
·                     Cluster Manager replaced by CRS
·                     ASM introduced
·                     Concept of Services expanded
·                     ocrcheck introduced
·                     ocrdump introduced
·                     AWR was instance specific

Oracle 10g R2 RAC
·                     CRS was renamed as Clusterware
·                     asmcmd introduced
·                     CLUVFY introduced
·                     OCR and Voting disks can be mirrored
·                     Can use FAN/FCF with TAF for OCI and ODP.NET
·                      

Oracle 11g R1 RAC
·                     Oracle 11g RAC parallel upgrades - Oracle 11g have rolling upgrade features whereby RAC database can be upgraded without any downtime.
·                     Hot patching - Zero downtime patch application.
·                     Oracle RAC load balancing advisor - Starting from 10g R2 we have RAC load balancing advisor utility. 11g RACload balancing advisor is only available with clients who use .NET, ODBC, or the Oracle Call Interface (OCI).
·                     ADDM for RAC - Oracle has incorporated RAC into the automatic database diagnostic monitor, for cross-node advisories. The script addmrpt.sql run give report for single instance, will not report all instances in RAC, this is known as instance ADDM. But using the new package DBMS_ADDM, we can generate report for all instances of RAC, this known as database ADDM.
·                     Optimized RAC cache fusion protocols - moves on from the general cache fusion protocols in 10g to deal with specific scenarios where the protocols could be further optimized.
·                     Oracle 11g RAC Grid provisioning - The Oracle grid control provisioning pack allows us to "blow-out" a RAC node without the time-consuming install, using a pre-installed "footprint".

Oracle 11g R2 RAC
·                     We can store everything on the ASM. We can store OCR & voting files also on the ASM.
·                     ASMCA
·                     Single Client Access Name (SCAN) - eliminates the need to change tns entry when nodes are added to or removed from the Cluster. RAC instances register to SCAN listeners as remote listeners. SCAN is fully qualified name. Oracle recommends assigning 3 addresses to SCAN, which create three SCAN listeners.
·                     Clusterware components: crfmond, crflogd, GIPCD.
·                     AWR is consolidated for the database.
·                     11g Release 2 Real Application Cluster (RAC) has server pooling technologies so it’s easier to provision and manage database grids. This update is geared toward dynamically adjusting servers as corporations manage the ebb and flow between data requirements for datawarehousing and applications.
·                     By default, LOAD_BALANCE is ON.
·                     GSD (Global Service Deamon), gsdctl introduced.
·                     GPnP profile.
·                     Cluster information in an XML profile.
·                     Oracle RAC OneNode is a new option that makes it easier to consolidate databases that aren’t mission critical, but need redundancy.
·                     raconeinit - to convert database to RacOneNode.
·                     raconefix - to fix RacOneNode database in case of failure.
·                     racone2rac - to convert RacOneNode back to RAC.
·                     Oracle Restart - the feature of Oracle Grid Infrastructure's High Availability Services (HAS) to manage associated listeners, ASM instances and Oracle instances.
·                     Oracle Omotion - Oracle 11g release2 RAC introduces new feature called Oracle Omotion, an online migration utility. This Omotion utility will relocate the instance from one node to another, whenever instance failure happens.
·                     Omotion utility uses Database Area Network (DAN) to move Oracle instances. Database Area Network (DAN) technology helps seamless database relocation without losing transactions.
·                     Cluster Time Synchronization Service (CTSS) is a new feature in Oracle 11g R2 RAC, which is used to synchronize time across the nodes of the cluster. CTSS will be replacement of NTP protocol.
·                     Grid Naming Service (GNS) is a new service introduced in Oracle RAC 11g R2. With GNS, Oracle Clusterware (CRS) can manage Dynamic Host Configuration Protocol (DHCP) and DNS services for the dynamic node registration and configuration.
·                     Cluster interconnect: Used for data blocks, locks, messages, and SCN numbers.
·                     Oracle Local Registry (OLR) - From Oracle 11gR2 "Oracle Local Registry (OLR)" something new as part of Oracle Clusterware. OLR is node’s local repository, similar to OCR (but local) and is managed by OHASD. It pertains data of local node only and is not shared among other nodes.
·                     Multicasting is introduced in 11gR2 for private interconnect traffic.
·                     I/O fencing prevents updates by failed instances, and detecting failure and preventing split brain in cluster. When a cluster node fails, the failed node needs to be fenced off from all the shared disk devices or diskgroups. This methodology is called I/O Fencing, sometimes called Disk Fencing or failure fencing.
·                     Re-bootless node fencing (restart)‏ - instead of fast re-booting the node, a graceful shutdown of the stack is attempted.
·                     Clusterware log directories: acfs*
·                     HAIP (IC VIP).
·                     Redundant interconnects: NIC bonding, HAIP.
·                     RAC background processes: DBRM – Database Resource Manager, PING – Response time agent.
·                     Virtual Oracle 11g RAC cluster - Oracle 11g RAC supports virtualization.

Source: Internet

Related Pages :

New features in Oracle 12c RAC - Clusterware   Oracle 11g New Features.  how to deinstall the failed 11gR2 grid infrastructure

Tuesday, March 4, 2014

TEMP, Session and UNDO Tablespace Administration


TEMP Tablespace :

SELECT tablespace_name, SUM(bytes_used), SUM(bytes_free)
FROM   V$temp_space_header
GROUP  BY tablespace_name;


Free space in a temporary tablespace.

select * from (select a.tablespace_name,
sum(a.bytes/1024/1024) allocated_mb
from dba_temp_files a
where a.tablespace_name = upper('&&temp_tsname') group by a.tablespace_name) x,
(select sum(b.bytes_used/1024/1024) used_mb,
sum(b.bytes_free/1024/1024) free_mb
from v$temp_space_header b
where b.tablespace_name=upper('&&temp_tsname') group by b.tablespace_name);


find out which SQL statement is using up space in a sort segment.

select s.sid || ',' || s.serial# sid_serial, s.username,
o.blocks * t.block_size / 1024 / 1024 mb_used, o.tablespace,
o.sqladdr address, h.hash_value, h.sql_text
from v$sort_usage o, v$session s, v$sqlarea h, dba_tablespaces t
where o.session_addr = s.saddr
and o.sqladdr = h.address (+)
and o.tablespace = t.tablespace_name
order by s.sid;



select file_name,sum(bytes)/1024/1024 from dba_temp_files where tablespace_name='TEMP' group by file_name;

select file_name, sum(bytes/1024/1024/1024),tablespace_name from dba_temp_files where tablespace_name='TEMP'group by file_name, tablespace_name ; 

UNDO tablespace

set lines 150
select to_char(begin_time,'hh24:mi dd-mon-yyyy') "START",
       to_char(end_time,'hh24:mi dd-mon-yyyy') "END",
       unxpstealcnt,
       expstealcnt,
       activeblks,
       unexpiredblks,
       expiredblks,
       tuned_undoretention
from v$undostat
order by end_time;

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

set lines 150
select to_char(begin_time,'hh24:mi dd-mon-yyyy') "START",
       to_char(end_time,'hh24:mi dd-mon-yyyy') "END",
       undoblks,
       expblkreucnt,
       ssolderrcnt,
       nospaceerrcnt,
       activeblks,
       unexpiredblks,
       expiredblks,
       tuned_undoretention
from v$undostat
order by end_time;

 

Show all connected users

set lines 100 pages 999
col ID format a15
select username , sid , serial# , status, last_call_et "Last Activity" from v$session
where username is not null
order by status desc, last_call_et desc 


2. Time since last user activity

set lines 100 pages 999
select username, floor(last_call_et / 60) "Minutes", status from v$session where username is not null order by last_call_et


3. Sessions sorted by logon time


set lines 100 pages 999
set linesize 200
col ID format a15col osuser format a15
col login_time format a14
select username, osuser, sid , serial# , status, to_char(logon_time, 'hh24:mi dd/mm/yy') login_time, last_call_et from v$session where username is not null order by login_time



4. Show user info including os pid


col "SID/SERIAL" format a10
col username format a15col
osuser format a15col
program format a40
select s.sid , s.serial# , s.username, s.osuser, p.spid "OS PID", s.program from v$session s, v$process p Where s.paddr = p.addr order by to_number(p.spid)



5. Show a users current sql

Select sql_text from v$sqlarea where (address, hash_value) in(select sql_address, sql_hash_value from v$session where username like '&username')


6. Session status associated with the specified os process id 


select s.username, s.sid, s.serial#, p.spid, last_call_et, status from V$SESSION s, V$PROCESS p where s.PADDR = p.ADDR and p.spid='&pid'

8. Display any long operations

set lines 100 pages 999
col username format a15
col message format a40
col remaining format 9999
select username, to_char(start_time, 'hh24:mi:ss dd/mm/yy') started, time_remaining remaining, message from v$session_longops
where time_remaining = 0 order by time_remaining desc


9. List open cursors per user

set pages 999
select sess.username, sess.sid, sess.serial#, stat.value cursors from v$sesstat stat, v$statname sn, v$session sess where sess.username is not null
and sess.sid = stat.sid and stat.statistic# = sn.statistic#
and sn.name = 'opened cursors current' order by value

Number of connection for the particular user from host

column username format a20
column machine  format a30
column session_count format 9,999
set lines 100
set pages 100
select username, machine, count(*) session_count
from v$session
where username = 'username'
and upper(machine) like 'hostname%'
group by username, machine
order by username, machine;


UNDO Tablespace Usage


select a.process, a.program, a.module, a.machine, b.USED_UREC, c.sql_text
from v$sql c, v$session a, v$transaction b
where b.addr = a.taddr
and a.sql_address = c.address
and a.sql_hash_value = c.hash_value
order by b.USED_UREC;

SELECT s.sid , s.username , t.used_ublk
FROM v$transaction t
, v$session s
WHERE 1 = 1
AND t.ses_addr = s.saddr

column username format a15;
column segment_name format a15;

SELECT s.sid , s.username , t.used_ublk, round((t.used_ublk*8)/1024) size_in_MB_8kb_Block_size, round((t.used_ublk*16)/1024
) size_in_MB_16kb_Block_size
FROM v$transaction t
, v$session s
WHERE 1 = 1
AND t.ses_addr = s.saddr;

SELECT distinct rpad(s.sid,3) "SID",S.USERNAME,
E.SEGMENT_NAME,
T.START_TIME "Start",
rpad(T.STATUS,9) "Status",
round((t.used_ublk*8)/1024) "Size(MB)"
--T.USED_UBLK||' Blocks and '||T.USED_UREC||' Records' "Rollback Usage"
FROM DBA_DATA_FILES DF,
DBA_EXTENTS E,
V$SESSION S,
V$TRANSACTION T
WHERE DF.TABLESPACE_NAME = E.TABLESPACE_NAME AND
DF.FILE_ID = UBAFIL AND
S.SADDR = T.SES_ADDR AND
T.UBABLK BETWEEN E.BLOCK_ID AND E.BLOCK_ID+E.BLOCKS AND
E.SEGMENT_TYPE in( 'ROLLBACK','TYPE2 UNDO');


Thursday, August 15, 2013

clscfg commands in Oracle RAC


CLSCFG: -- Oracle cluster configuration tool, in Oracle Real Application Cluster(RAC)
clscfg -help or clscfg -h
clscfg -install -- creates a new configuration
clscfg -add     -- adds a node to the configuration
clscfg -delete -- deletes a node from the configuration
clscfg -upgrade     -- upgrades an existing configuration
clscfg -downgrade -- downgrades an existing configuration
clscfg -local       -- creates a special single-node configuration for ASM
clscfg -concepts -- brief listing of terminology used in the other modes
clscfg -trace       -- may be used in conjunction with any mode above for tracing


cluvfy commands in Oracle RAC

CLUVFY: Cluster Verification Utility

cluvfy [-help] or cluvfy -h

cluvfy stage {-pre|-post} stage_name stage_specific_options [-verbose]


Valid stage options and stage names are:
        -post hwos    :  post-check for hardware and operating system
        -pre  cfs       :  pre-check for CFS setup
        -post cfs       :  post-check for CFS setup
        -pre  crsinst  :  pre-check for CRS installation
        -post crsinst  :  post-check for CRS installation
        -pre  hacfg   :  pre-check for HA configuration
        -post hacfg   :  post-check for HA configuration
        -pre  dbinst   :  pre-check for database installation
        -pre  acfscfg  :  pre-check for ACFS Configuration.
        -post acfscfg  :  post-check for ACFS Configuration.
        -pre  dbcfg   :  pre-check for database configuration
        -pre  nodeadd :  pre-check for node addition.
        -post nodeadd :  post-check for node addition.
        -post nodedel  :  post-check for node deletion.

cluvfy stage -post hwos -n node_list [-verbose]
./runcluvfy.sh stage -post hwos -n node1,node2 -verbose
-- Installation checks after hwos - Hardware and Operating system installation 
cluvfy stage -pre cfs -n node_list [-verbose]
cluvfy stage -post cfs -n node_list [-verbose]
-- Installation checks before/after Cluster File System
cluvfy stage -pre crsinst -n node_list [-c ocr_location] [-r {10gR1|10gR2|11gR1|11gR2}] [-q voting_disk] [-osdba osdba_group] [-orainv orainventory_group] [-verbose]
cluvfy stage -pre crsinst -n node1,node2,node3
./runcluvfy.sh stage -pre crsinst -n all -verbose
cluvfy stage -post crsinst -n node_list [-verbose]
-- Installation checks before/after CRS installation
cluvfy stage -pre dbinst -n node_list [-r {10gR1|10gR2|11gR1|11gR2}] [-osdba osdba_group] [-orainv orainventory_group] [-verbose]
cluvfy stage -pre dbcfg -n node_list -d oracle_home [-verbose]
-- Installation checks before/after DB installation/configuration
====================================

cluvfy comp component_name component_specific_options [-verbose]

Valid components are:
        nodereach : checks reachability between nodes
        nodecon    : checks node connectivity
        cfs         : checks CFS integrity
        ssa        : checks shared storage accessibility
        space     : checks space availability
        sys        : checks minimum system requirements
        clu         : checks cluster integrity
        clumgr   : checks cluster manager integrity
        ocr        : checks OCR integrity
        olr        : checks OLR integrity
        ha        : checks HA integrity
        crs        : checks CRS integrity
        nodeapp   : checks node applications existence
        admprv    : checks administrative privileges
        peer        : compares properties with peers
        software  : checks software distribution
        asm        : checks ASM integrity
        acfs        : checks ACFS integrity
        gpnp       : checks GPnP integrity
        gns         : checks GNS integrity
        scan        : checks SCAN configuration
        ohasd      : checks OHASD integrity
        clocksync  : checks Clock Synchronization
        vdisk        : check Voting Disk Udev settings

cluvfy comp nodereach -n node_list [-srcnode node] [-verbose]
cluvfy comp nodecon -n node_list [-i interface_list] [-verbose]
cluvfy comp nodecon -n node1,node2,node3 –i eth0 -verbose
cluvfy comp nodeapp [-n node_list] [-verbose]

cluvfy comp peer [-refnode node] -n node_list [-r {10gR1|10gR2|11gR1|11gR2}] [-orainv orainventory_group] [-osdba osdba_group] [-verbose]
cluvfy comp peer -n node1,node2 -r 10gR2 -verbose

cluvfy comp crs [-n node_list] [-verbose]
cluvfy comp cfs [-n node_list] -f file_system [-verbose]
cluvfy comp cfs -f /oradbshare –n all -verbose

cluvfy comp ocr [-n node_list] [-verbose]
cluvfy comp clu -n node_list -verbose
cluvfy comp clumgr [-n node_list] [-verbose]

cluvfy comp sys [-n node_list] -p {crs|database} [-r {10gR1|10gR2|11gR1|11gR2}] [-osdba osdba_group] [-orainv orainventory_group] [-verbose]
cluvfy comp sys -n node1,node2 -p crs -verbose

cluvfy comp admprv [-n node_list] [-verbose] |-o user_equiv [-sshonly] |-o crs_inst [-orainv orainventory_group] |-o db_inst [-orainv orainventory_group] [-osdba osdba_group] |-o db_config -d oracle_home

cluvfy comp ssa [-n node_list] [-s storageID_list] [-verbose]
cluvfy comp space [-n node_list] -l storage_location -z disk_space{B|K|M|G} [-verbose]
cluvfy comp space -n all -l /home/dbadmin/products –z 2G -verbose