DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Monday, March 21, 2016

Steps for Migrating to ASM using RMAN

Please follow the below steps to convert a NON-ASM  to ASM .

SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

SQL > shutdown immediate;

SQL > exit;

Please add the below in pfile and save.

$vi $ORACLE_HOME/dbs/initprod.ora

DB_CREATE_FILE_DEST='+disk_group_1'
DB_CREATE_ONLINE_LOG_DEST_1='+disk_group_1'
CONTROL_FILES='+disk_group_1'
LOG_ARCHIVE_DEST_1='LOCATION=+DATA'

$sqlplus "/ as sysdba"

SQL> startup nomount pfile=$ORACLE_HOME/dbs/initprod.ora

SQL> create spfile from pfile;

SQL > shutdown immediate;

$rman target /

RMAN > startup nomount

RMAN > restore controlfile from '/opt/oracle/oradata/prod/control01.ctl'; (using old controlfile)

RMAN > alter database mount;

RMAN > backup as copy database format '+disk_group_1';

RMAN > switch database to copy; (It will remove old and update new information in control file)

RMAN > alter database open;

SQL > alter database enable block change tracking;

SQL > alter database add logfile group 4;

SQL > alter database add logfile group 5;

SQL > alter database add logfile group 6;

SQL > alter system switch logfile;

SQL > select * from v$log;

SQL > alter database drop logfile group 1;

SQL > alter system switch logfile;

SQL > select * from v$log;

SQL > alter database drop logfile group 2;

SQL > alter system switch logfile;

SQL > select * from v$log;

SQL > alter database drop logfile group 3;

SQL > create temporary tablespace temp1;

SQL > alter database default temporary tablespace temp1;

SQL > drop tablespace temp including contents and datafiles;

No comments: