Oracle DB Migrate oracle db files system to ASM Disk

** Myself
Migrate oracle db files to ASM
- install crs 1 instance
- create asm instance
- create asm disk and diskgroup(DATA)
- SQL> alter database backup controlfile to '/tmp/backcontrol.ctl';
- SQL> alter system set DB_CREATE_FILE_DEST='+DATA';
- SQL> alter system reset control_files scope=spfile sid='*';
- rman target /
- RMAN> shutdown immediate;
- RMAN> startup nomount;
- RMAN> restore controlfile from '/tmp/backcontrol.ctl';
- RMAN> alter database mount;
- RMAN> backup as copy database format '+DATA';
- RMAN> switch database to copy;
- RMAN> alter database open; --if not -- alter database open resetlog;
- SQL> create temporary tablespace temp01 tempfile size 100M;
- SQL> alter database default temporary tablespace temp01;
- SQL> drop tablespace temp;
- SQL> create temporary tablespace temp tempfile size 100M;
- SQL> alter database default temporary tablespace temp;
- SQL> drop tablespace temp01;
- SQL> alter database add logfile member '+DATA' to group 1;
- SQL> alter database add logfile member '+DATA' to group 2;
- SQL> alter database add logfile member '+DATA' to group 3;
- SQL> alter system switch logfile;
- SQL> alter system switch logfile;
- SQL> alter system switch logfile;
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo01.log';
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo02.log';
- SQL> alter system switch logfile;
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo03.log';
- SQL>
select name from v$controlfile
union
select name from v$datafile
union
select name from v$tempfile
union
select member from v$logfile
union
select filename from v$block_change_tracking
union
select name from v$flashback_database_logfile;

0 comments:

Loading