0% found this document useful (0 votes)
33 views2 pages

Migrating A Oracle Database From Non-ASM To ASM

Migrating a Oracle Database From Non-ASM to ASM

Uploaded by

Gaurav Saxena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Migrating A Oracle Database From Non-ASM To ASM

Migrating a Oracle Database From Non-ASM to ASM

Uploaded by

Gaurav Saxena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Migrating a Oracle Database From Non-ASM to ASM

Pre-Steps

Check the Asm instance is Running

select INSTANCE_NAME,VERSION,DATABASE_STATUS from v$instance;

select NAME,STATE,TOTAL_MB,PATH from v$asm_disk;

We are going to migrate the below database “ORCL” and Disk Group Name is “+DATA”

SQL> select name from v$database;


NAME
———
ORCL

SQL> select name from v$datafile;


NAME
——————————————–
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/example01.dbf

SQL> select name from v$controlfile;


NAME
—————————————–
/u01/app/oracle/oradata/orcl/control01.ctl
/u01/app/oracle/fast_recovery_area/orcl/control02.ctl

SQL> select member from v$logfile;


MEMBER
—————————————
/u01/app/oracle/oradata/orcl/redo03.log
/u01/app/oracle/oradata/orcl/redo02.log
/u01/app/oracle/oradata/orcl/redo01.log

Migration steps:

Step1:-Login in to Orcl Database change the below parameters

SQL> create pfile ='/backup/pfile.ora' from spfile;


SQL> ALTER SYSTEM SET control_files=’+DATA’ scope=spfile;
System altered.

SQL> shut immediate


Step2:-Startup the orcl database in NOMOUNT mode

SQL> startup nomount

Step3:-Connect to Rman Session to copy the controlfile from local filesystem to ASM
Diskgroup “+DATA”

[oracle@oracleasm ~]$ export ORACLE_SID=orcl


[oracle@oracleasm ~]$ rman target /
RMAN> RESTORE CONTROLFILE FROM '/u01/app/oracle/oradata/orcl/control01.ctl';
RMAN> ALTER DATABASE MOUNT;

RMAN> SELECT NAME FROM V$CONTROLFILE;


NAME
———————————————–
+DATA/orcl/controlfile/current.280.978517795

RMAN> BACKUP AS COPY DATABASE FORMAT '+DATA';

RMAN> SWITCH DATABASE TO COPY;

Step6:-Tempfile relocating to ASM diskgroup

RMAN> RUN
{
SET NEWNAME FOR TEMPFILE ‘/U01/APP/ORACLE/ORADATA/ORCL/TEMP01.DBF’ TO ‘+DATA’;
SWITCH TEMPFILE ALL;
}

STEP7:-CONNECT TO SQL*PLUS AND OPEN THE DATABASE.

SQLPLUS ‘/AS SYSDBA’

SQL> ALTER DATABASE OPEN;


DATABASE ALTERED.

STEP8:-ONE BY ONE DROP AND RE-CREATE THE ONLINE REDO LOGFILES TO ASM DISKGROUP
“+DATA”

SQL> ALTER DATABASE ADD LOGFILE GROUP 1 SIZE 50M;

ALTER DATABASE DROP LOGFILE GROUP 2;

SQL> ALTER SYSTEM CHECKPOINT;

SQL> alter system switch logfile;

Successfully completed the Migrating a Oracle Database From Non-ASM to ASM

Reference:-

https://lnkd.in/gQS5A9i4

You might also like