ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORACLE 10g RAC 迁移共享存储

ORACLE 10g RAC 迁移共享存储

原创 Linux操作系统 作者:renjixinchina 时间:2011-09-09 15:28:23 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 批量生成AWR
下一篇: 表空间碎片检测
请登录后发表评论 登录
全部评论

注册时间:2011-01-30

  • 博文量
    373
  • 访问量
    2055689