Archive for July, 2013

Drop database in 11gR2 RAC & Updating OCR

July 24, 2013 Leave a comment

1. Login as oracle user and stop the database

srvctl stop database -d racdb


2. Start the first instance in mount state

srvctl start instance -d racdb -i racdb1


3. Set CLUSTER_DATABASE=FALSE and shut it down

alter system set cluster_database=false scope=spfile sid=’*’

shut immediate


4. Start the database in restrict mode

startup exclusive restrict mount

drop database;


To remove archivelogs and backups

RMAN> drop database including backups;


Updating OCR

Issue below commands to update OCR

srvctl remove database -d racdb


If there is any issue in removing database details from OCR due to unknown state, remove the resource using crsctl

crsctl delete resource ora.racdb.db

Categories: RAC Tags: ,

11gR2 CRSCTL commands

July 22, 2013 Leave a comment

To Get CRSCTL help

$crsctl -h

To Get Active Cluster Version
$crsctl query crs activeversion

To Get cluster version of given node
$crsctl query crs softwareversion [node_name]

Start/Stop CRS
#crsctl start crs
#crsctl stop crs
#/etc/init.d/init.ohasd run
#/etc/init.d/ stop

Enable/Disable CRS
#crsctl enable crs
#crsctl disable crs
#/etc/init.d/ enable
#/etc/init.d/ disable

To get cluster stack health status
$crsctl check crs

Check visibility of CRS across nodes
$crsctl check cluster -n node_name

Stop/Start Cluster
#crsctl start cluster -n node_name
#crsctl stop cluster -n node_name
#crsctl start cluster -all
#crsctl stop cluster -all

Check status of running deamons
$ps -ef | grep d.bin
$crsctl check cssd
$crsctl check crsd
$crsctl check evmd
$crsctl check oprocd
$crsctl check ctss

Query voting disk files
#crsctl query css votedisk

Add/Delete voting disks

For non-ASM
#crsctl add css votedisk <<PATH>>
#crsctl add css votedisk <<PATH>> -force — if Clusterware is not running
#crsctl delete css votedisk <<PATH>>
#crsctl delete css votedisk <<PATH>> -force — if Clusterware is not running

#crsctl replace votedisk <<DISK_GROUP_NAME>>

Set VD parameters
#crsctl set css misscount 100
#crsctl unset css misscount — — sets CSS parameter to its default
#crsctl get css disktimeout
#crsctl get css misscount
#crsctl get css reboottime

Working with resources
#crsctl start resource ora.DATA.dg
$crsctl status resource -t
$crsctl stat resource -t

Listing modules
#crsctl lsmodules crs
$crsctl lsmodules css
$crsctl lsmodules evm

Working with HAS
$crsctl start has (HAS – High Availability Services)
$crsctl stop has
$crsctl check has

OCR Modules — cannot be listed with crsctl lsmodules command

#crsctl debug statedump crs — dumps state info for crs objects
#crsctl debug statedump css — dumps state info for css objects
#crsctl debug statedump evm — dumps state info for evm objects
#crsctl debug log crs [module:level]{,module:level} …

–Turns on debugging for CRS
#crsctl debug log crs CRSEVT:5,CRSAPP:5,CRSTIMER:5,CRSRES:5,CRSRTI:1,CRSCOMM:2
#crsctl debug log css [module:level]{,module:level} …

— Turns on debugging for CSS
#crsctl debug log css CSSD:1
#crsctl debug log evm [module:level]{,module:level} …

— Turns on debugging for EVM
#crsctl debug log evm EVMCOMM:1
#crsctl debug trace crs — dumps CRS in-memory tracing cache
#crsctl debug trace css — dumps CSS in-memory tracing cache
#crsctl debug trace evm — dumps EVM in-memory tracing cache
#crsctl debug log res resource_name:level — turns on debugging for resources
#crsctl debug log res “”
#crsctl trace all_the_above_commands — tracing by adding a “trace” argument.
#crsctl trace check css

Categories: RAC Tags: ,
Oracle database internals by Riyaj

Discussions about Oracle performance tuning, RAC, Oracle internal & E-business suite.


Where all the Action Is !!!!

Pavan DBA's Blog

The DBA Knowledge Store

ORACLE-BASE - Latest Articles

Where all the Action Is !!!!