Advertisement

Friday, May 31, 2019

Oracle Database: How to relocate tablespaces to different Diskgroup (except SYS)

in this blog, I list out steps for Oracle RAC relocating tablespaces to different diskgroups with partial downtime only 

Step1 - 
backup tablespaces to new diskgroup - 

run 
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
allocate channel c8 type disk;
backup as copy tablespace TB1,TB2,TB3 format '+DATA2';
}

test

Repeat for each tablespaces
1. SQL> 
     alter tablespace TB1 offline;
2. rman  
     switch tablespace TB1 to copy;
     run {
    allocate channel c1 type disk;
    recover tablespace TB1;
    }
3. SQL> 
    alter tablespace TB1 online;

This completes the relocation.
If you want to do it for datafile level (in case your tabelspace is large)
You can follow same steps (with minor modifications from tablespace to datafile )

No comments:
Write comments