Friday, September 24, 2010

Migrating Databases To and From DISK with Recovery Manager



Migrated 600GB with this doc to another ocfs2 disk, with only one restart.
Migrating Databases To and From ASM with Recovery Manager
(Migration BACKUP as COPY doesn't work in 9i, only >=10g)

with rman

run {
allocate channel dev3 type disk;
allocate channel dev4 type disk;
allocate channel dev5 type disk;
BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE
FORMAT '/usr8/oracle/oradata/DWH/%U.dbf' TAG 'ORA_TO_MIGRATION';
}



backup incremental level 1 for recover of copy with tag 'ORA_TO_MIGRATION' database;
recover copy of database with tag 'ORA_TO_MIGRATION';


SHUTDOWN IMMEDIATE;
STARTUP MOUNT
switch database to copy;
recover database;

to migrate controlfile:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT
BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/opt/oracle/pre-ASM-controfile.ctl';

sysdba
alter system set control_files='/opt/oracle/oradata/AIRT/AIRT/controfile1.ctl','/opt/oracle/oradata/AIRT/AIRT/controfile2.ctl','/opt/oracle/oradata/AIRT/AIRT/controfile3.ctl' scope=spfile sid='*';

shutdown immediate
startup nomount

restore controlfile from '/opt/oracle/pre-ASM-controfile.ctl';

shutdown immediate
startup
alter database open resetlogs;


FALLBACK


SET DBID 1827102997;


RUN {
ALLOCATE channel c1 TYPE disk;

ALLOCATE channel c2 TYPE disk;
RESTORE CONTROLFILE FROM autobackup;
}


SHUTDOWN IMMEDIATE;

STARTUP MOUNT
restore controlfile from '/opt/oracle/pre-ASM-controfile.ctl';

alter database mount;

21 comments:

  1. Does your site have a contact page? I'm having trouble
    locating it but, I'd like to shoot you an email.
    I've got some suggestions for your blog you
    might be interested in hearing. Either way,
    great website and I look forward to seeing it grow over time.



    Look at my website: เครื่องดักยุง

    ReplyDelete
  2. Hmm it appears like your website ate my first comment (it was
    super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog.
    I too am an aspiring blog blogger but I'm still new to the whole thing.
    Do you have any suggestions for beginner
    blog writers? I'd definitely appreciate it.

    My blog post - DIY Security System DIY Security System DIY Security System

    ReplyDelete
  3. I loved as much as you'll receive carried out right here.
    The sketch is attractive, your authored material stylish.
    nonetheless, you command get bought an shakiness over that you wish
    be delivering the following. unwell unquestionably come more formerly again as exactly the same
    nearly a lot often inside case you shield this hike.


    Also visit my web page: seo

    ReplyDelete
  4. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading.

    ReplyDelete