Sunday, April 03, 2011

How to Change 11gR2 ASM parameter in Non-RAC environment


Steps :
1.      shutdown listener 
2.      shutdown databases
3.      change ASM parameter
4.      shutdown ASM as sysasm
5.      mount ASM
6.      check changed parameter
7.      startup databases as sysasm
8.      check connectivity


Change ASM parameter

sqlplus / as sysasm
  > show parameter proc
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
processes                            integer     100

> alter system set processes=800 scope=spfile;
System altered.

>  show parameter proc
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
processes                            integer     100

Shutdown ASM

> shutdown immediate
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown

Mount ASM

> startup mount
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size                  2225792 bytes
Variable Size             256539008 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled

Check changed parameter

>  show parameter proc
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
processes                            integer     800
> exit

 
Hope this helps! Rupam

Friday, April 01, 2011

RMAN Restore Datafile



Steps:
1. identify datafile#  to be recoved
2. plug in the value the restore script
3. execute restore.sh

# rman_file_recover.cmd
run {
  allocate channel t1 type sbt;
  restore datafile 4;
  recover datafile 4;
}

# restore.sh
. ~/.profile
ORACLE_SID=demo;ORAENV_ASK=NO;. oraenv;ORAENV_ASK=YES
cd /ora01/oracle/admin/BACKUP/WKBP
rman nocatalog target / cmdfile rman_file_recover.cmd
status=$?
exit $status
Hope this helps!Rupam

RMAN Restore block



Steps:
1. identify file# and block# to be recoved
2. plug in the value the restore script
3. execute restore.sh

# rman_block_recover.cmd
run {
  allocate channel t1 type sbt;
  BLOCKRECOVER DATAFILE 19 BLOCK 1833660;
}

# restore.sh
. ~/.profile
ORACLE_SID=demo;ORAENV_ASK=NO;. oraenv;ORAENV_ASK=YES
cd /ora01/oracle/admin/BACKUP/WKBP
rman nocatalog target / cmdfile rman_block_recover.cmd
status=$?
exit $status

Hope this helps!Rupam

RMAN commands : quick reference guide


RMAN> list backupset;
RMAN> list backupset of database;
RMAN> list backupset of database completed before '22-NOV-00';
RMAN> list backupset of archivelog all;
RMAN> list backupset of tablespace users;
RMAN> list backupset of datafile 1;

RMAN> list backup summary;
RMAN> list backup;
RMAN> list backup of controlfile;
RMAN> list backup of tablespace SYSTEM;
RMAN> list backup by file;
RMAN> list backup of archivelog all ;

RMAN> list copy of database;
RMAN> list copy of database archivelog all;

RMAN> allocate channel for maintenance type disk;
RMAN> configure channel device type disk clear ;

RMAN> report need backup days=2 database;
RMAN> report need backup days=10 tablespace TEMP;
RMAN> report need backup days=4 datafile 'D:\ORACLE\ORADATA\OR816\TEMP01.DBF';
RMAN> report schema;
RMAN> report obsolete;

RMAN> crosscheck backup;
RMAN> crosscheck backupset;
RMAN> crosscheck copy;
RMAN> crosscheck archivelog all;
RMAN> crosscheck controlfilecopy '/ora01/oracle/admin/BACKUP/demo/demo_controlfile_bak_03-15-11_19:59:11' ;

RMAN> delete noprompt expired backup ;
RMAN> delete noprompt obsolete;
RMAN> delete archivelog all;
RMAN> delete expired archivelog all;
RMAN> delete archivelog all completed before 'sysdate -1';
RMAN> delete noprompt archivelog until time 'sysdate - 1';
RMAN> delete archivelog all backed up 1 times to device type disk completed before 'sysdate-1';

Hope this helps! Rupam

Wednesday, March 23, 2011

crosscheck controlfilecopy




Problem :

while deleting obsolete backup files, following warning is thrown
"RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status"