ORACLE 10g RAC 遷移共享儲存

renjixinchina發表於2011-09-09

1.      遷移voting

檢查crsctl query css votedisk

1    兩臺機器停crs程式

/sbin/init.d/init.crs stop

2    備份voting

dd if=/dev/rdisk/disk20 of=/u01/app/oracle/voting1.dmp

3       新增voting

---授許可權

./crsctl add css votedisk  /dev/rdisk /?

4       啟動crs /sbin/init.d/init.crs start

crsctl check crs

(5)   停止crs /sbin/init.d/init.crs stop

(6)   除老vote delete css votedisk  /dev/rdisk/disk20

(7)   再次啟動檢查/sbin/init.d/init.crs start

2.      遷移ocr

ocrconfig -export /tmp/ocrfile.dmp

/sbin/init.d/init.crs stop

/opt/oracle/ocr.loc 修改兩個節點

ocrconfig -import /tmp/ocrfile.dmp

/sbin/init.d/init.crs start

3.      遷移ASM

alter database backup controlfile to '+DATA1';

alter system set control_files='+DATA1/xnh/controlfile/controlfile01.ctl','+DATA1/xnh/controlfile/controlfile02.ctl'  SCOPE=SPFILE;

srvctl stop database -d xnh;

srvctl start database -d xnh -o nomount;

restore controlfile to '+DATA1/xnh/controlfile/controlfile01.ctl' from '+DATA/xnh/controlfile/current.261.741293653'

restore controlfile to '+DATA1/xnh/controlfile/controlfile02.ctl' from '+DATA/xnh/controlfile/current.261.741293653';

alter database mount

select name from v$controlfile

 

    alter database add logfile thread 1 group 5 '+DATA1' size 300m;

    alter database add logfile thread 1 group 6 '+DATA1' size 300m;

    alter database add logfile thread 2 group 7 '+DATA1' size 300m;

    alter database add logfile thread 2 group 8 '+DATA1' size 300m;

 

    alter system switch logfile

    select group#,status  from v$log

  

    alter database drop logfile group 1;

    alter database drop logfile group 2;

    alter database drop logfile group 3;

    alter database drop logfile group 4;

   

4.      遷移spfile

create pfile='/u01/app/oracle/pfilexnh10g.ora' from spfile;

 

srvctl stop database -d xnh;

 

startup pfile='/u01/app/oracle/pfilexnh10g.ora'

create spfile='+DATA1/xnh/spfilexnh.ora' from pfile='/u01/app/oracle/pfilexnh10g.ora';

5.      修改引數

srvctl modify database -d xnh -p '+DATA1/xnh/spfilexnh.ora'

srvctl stop database -d xnh;

srvctl start database -d xnh -o nomount;

 

alter system set db_create_file_dest='+DATA1' scope=spfile;

alter system set db_recovery_file_dest='+DATA1' scope=spfile;

alter system set log_archive_dest_1='LOCATION=+DATA1/xnh/' scope=spfile;

6.      檢測

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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15747463/viewspace-772488/,如需轉載,請註明出處,否則將追究法律責任。

相關文章