Migrating to Oracle ASM with EM

Steps could be found at :
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_em.htm#OSTMG94276

In case you forgot to click the “View Status” in step 9, you can still access the following URL to retrieve job status:
https://%5Byour_server_id%5D:5500/em/console/jobs/jobsTable

What’s behind the scene

The operation was divided into two phases: preparation and migration.

In preparation, RMAN performs backup as copy and switches logfile:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

RMAN> run {
allocate channel dev1 type disk;
backup incremental level 0 as copy tag ‘ASM_Migration’
(tablespace SYSAUX format ‘+DATA’)
(tablespace SYSTEM format ‘+DATA’)
(tablespace UNDOTBS1 format ‘+DATA’)
(tablespace USERS format ‘+DATA’);
}

RMAN> sql ‘alter system archive log current’;

In migration, Oracle performs the following steps:
1) RMAN> set nocfau; <– set controlfile auto backup off
2) RMAN> run {
allocate channel dev1 type disk;
backup incremental level 1 for recover of copy with tag ‘ASM_Migration’ tablespace ‘SYSAUX’ , ‘SYSTEM’ , ‘UNDOTBS1’ , ‘USERS’ ;
recover copy of tablespace ‘SYSAUX’ , ‘SYSTEM’ , ‘UNDOTBS1’ , ‘USERS’ with tag ‘ASM_Migration’;
} <– recover backup copy during preparation stage
3) RMAN> sql ‘alter system archive log current’;
4) ALTER SYSTEM RESET control_files SCOPE=SPFILE SID=’*’; — remove control file entry in current spfile
5) RMAN> startup force nomount;
6) RMAN> restore controlfile from ‘/oradata/mydb/control01.ctl’;
7) create spfile in ASM and initxxx.ora in dbs directory
8) RMAN> switch tablespace ‘SYSAUX’ , ‘SYSTEM’ , ‘UNDOTBS1’ , ‘USERS’ to copy;
9) RMAN> change copy of database uncatalog; <– delete copy entry in control file
10)RMAN> recover tablespace ‘SYSAUX’ , ‘SYSTEM’ , ‘UNDOTBS1’ , ‘USERS’ ;
11) recreate temp and redo files

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s