Monday, 24 August 2015

CRSCTL commands in Oracle 11g Release 2


How to shutdown CRS on all nodes and Disable CRS as ROOT user:
-------------------------------------------------------------
#crsctl stop crs
#crsctl disable crs

How to Enable CRS and restart CRS on all nodes as ROOT user:
-----------------------------------------------------------
#crsctl enable crs
#crsctl start crs

How to check VIP status is ONLINE / OFFLINE:
----------------------------------------
$crs_stat or
$crsctl stat res -t ------> 11gr2

How to Check current Version of Clusterware:
-------------------------------------------
$crsctl query crs activeversion

$crsctl query crs softwareversion [node_name]

How to Start & Stop CRS and CSS:
-------------------------------
$crsctl start crs
$crsctl stop crs

#/etc/init.d/init.crs start
#/etc/init.d/init.crs stop

#/etc/init.d/init.cssd stop
#/etc/init.d/init.cssd start

How to Enable & Disable CRS:
---------------------------
$crsctl enable crs
$crsctl disable crs

#/etc/init.d/init.crs enable
#/etc/init.d/init.crs disable

How to Check current status of CRS:
----------------------------------
$crsctl check crs

$crsctl check cluster [-node node_name]

How to Check CSS, CRS and EVMD:
------------------------------
$crsctl check cssd

$crsctl check crsd

$crsctl check evmd

How to List the Voting disks currently used by CSS:
--------------------------------------------------
$crsctl check css votedisk

$crsctl query css votedisk

How to Add and Delete any voting disk:
-------------------------------------
$crsctl add css votedisk <PATH>

$crsctl delete css votedisk <PATH>

How to start clusterware resources:
----------------------------------
$crsctl start resources

$crsctl stop resources

RMAN Backup of Database

How to take RMAN backup with and without incremental level.

RMAN INCREMENTAL BACKUP LEVEL 0

$ rman target /
RMAN> show all;
RMAN>
run
{
allocate channel ch1 type disk;
allocate channel ch2 type disk;
backup incremental level 0 database format '/path/%d_%T_%t_%s_%p.dbf';
backup archivelog all format '/path/%d_%T_%t_%s_%p.arc' not backed up 1 times;;
backup current controlfile format '/path/%d_%T_%t_%s_%p.ctl';
release channel ch1;
release channel ch2;
}
RMAN>

RMAN INCREMENTAL BACKUP LEVEL 1

$ rman target /
RMAN> show all;
RMAN>
run
{
allocate channel ch1 type disk;
allocate channel ch2 type disk;
backup incremental level 1 database format '/path/%d_%T_%t_%s_%p.dbf';
backup archivelog all format '/path/%d_%T_%t_%s_%p.arc' not backed up 1 times;
backup current controlfile format '/path/%d_%T_%t_%s_%p.ctl';
release channel ch1;
release channel ch2;
}
RMAN>


RMAN BACKUP OF DATABASE (WITHOUT USING LEVEL 0)

$ rman target /
RMAN> show all;
RMAN>
run
{
allocate channel ch1 type disk;
allocate channel ch2 type disk;
backup database format '/path/%d_%T_%t_%s_%p.dbf';
backup archivelog all format '/path/%d_%T_%t_%s_%p.arc;
backup current controlfile format '/path/%d_%T_%t_%s_%p.ctl';
release channel ch1;
release channel ch2;
}
RMAN>

NOTE :-

If you have taken the RMAN full backup using the command ‘Backup database’, where as a level 0 backup is physically identical to a full backup. The only difference is that the level 0 backup is recorded as an incremental backup in the RMAN repository so it can be used as the parent for a level 1 backup. Simply the ‘full backup without level 0’ can not be considered as a parent backup from which you can take level 1 backup.


Incremental backup levels :-

Level 0 – full backup that can be used for subsequent incrementals
RMAN> backup incremental level 0 database;

Differential Level 1–only the blocks that have changed since the last backup (whether it is level 0 or level 1)
RMAN> backup incremental level 1 differential database;

Cumulative Level 1 – all changes since the last level 0 incremental backup
RMAN> backup incremental level 1 cumulative database;

A full backup cannot be used for a cumulative level 1 backup.
A cumulative level 1 backup must be done on top of an incremental level 0 backup.