rac 转单机

简介: rac 转单机

RAC数据库迁移到本地

1,数据库启动到mount状态,复制数据文件!

$$ startup mount copy datafile 1 to '/oradata/data/system.256.835309449'; copy datafile 2 to '/oradata/data/sysaux.257.835309449'; copy datafile 3 to '/oradata/data/undotbs1.258.835309451'; copy datafile 4 to '/oradata/data/users.259.835309451'; copy datafile 5 to '/oradata/data/undotbs2.264.835309617'; copy datafile 6 to '/oradata/data/undotbs3.265.835309619'; copy datafile 7 to '/oradata/data/undotbs4.266.835309619'; copy datafile 8 to '/oradata/data/itreasury.dbf'; copy datafile 9 to '/oradata/data/itreasury2.dbf'; copy datafile 10 to '/oradata/data/itreasury3.dbf'; copy datafile 11 to '/oradata/data/itreasury4.dbf'; copy datafile 12 to '/oradata/data/itreasury5.dbf'; copy datafile 13 to '/oradata/data/itreasury6.dbf'; copy datafile 14 to '/oradata/data/itreasury7.dbf'; copy datafile 15 to '/oradata/data/itreasury8.dbf'; copy datafile 16 to '/oradata/data/system01.dbf'; copy datafile 17 to '/oradata/data/itreasury1.dbf'; copy datafile 18 to '/oradata/data/itreasury9.dbf'; copy datafile 19 to '/oradata/data/itreasury10.dbf'; copy datafile 20 to '/oradata/data/sysaux.287.840290013'; copy datafile 21 to '/oradata/data/users01.dbf'; copy datafile 22 to '/oradata/data/ogg.304.1030128099'; switch database to copy; $$

2,复制控制文件到本地,并更改控制文件位置

$$ copy current controlfile to '/oradata/data/ctl01.ctl'; alter system set control_files='/oradata/data/ctl01.ctl' scope=spfile; $$

3,更改spfile到本地,并重启数据库

create pfile='/oradata/data/pfile.bak' from spfile;
startup mount pfile='/oradata/data/pfile.bak'

4,更改tempfile文件位置
alter database rename file '+DATADG/orcl/tempfile/temp.262.874700019' to '+newdata';
alter database rename file '+DATA/db/tempfile/temp.263.835309539' to '/oradata/data/tmp1.dbf';
alter database rename file '+DATA/db/tempfile/temp.286.840289257' to '/oradata/data/tmp2.dbf';
alter database rename file '+DATA/db/tempfile/temp.297.938962957' to '/oradata/data/tmp3.dbf';
alter database rename file '+DATA/db/tempfile/dbtemp.298.938976505' to '/oradata/data/tmp4.dbf';
alter database rename file '+DATA/db/tempfile/temp.299.938976833' to '/oradata/data/tmp5.dbf';
alter database rename file '+DATA/db/tempfile/temp.300.958492795' to '/oradata/data/tmp6.dbf';
alter database rename file '+DATA/db/tempfile/temp.301.958496011' to '/oradata/data/tmp7.dbf';

5,更改redo文件到本地
alter database add logfile thread 1 group 101 '/oradata/data/redo101' size 50m;
alter database add logfile thread 1 group 102 '/oradata/data/redo102' size 50m;
alter database add logfile thread 4 group 41 '/oradata/data/redo41' size 50m;
alter database add logfile thread 4 group 42 '/oradata/data/redo42' size 50m;
alter database add logfile thread 3 group 31 '/oradata/data/redo31' size 50m;
alter database add logfile thread 3 group 32 '/oradata/data/redo32' size 50m;
alter database add logfile thread 2 group 21 '/oradata/data/redo21' size 50m;
alter database add logfile thread 2 group 22 '/oradata/data/redo22' size 50m;
alter system switch logfile;
alter system checkpoint;

删除多余redo文件

alter database disable thread 3;
alter database drop logfile group 3;
alter database drop logfile group 4;
alter database drop logfile group 5;
alter database drop logfile group 6;
alter database drop logfile group 7;
alter database drop logfile group 8;`

检查redo文件位置

select 'alter database drop logfile member '''||member||''';' from v$logfile where member like '%online%';

相关文章
|
数据库 数据安全/隐私保护
使用rman把单机的备份集恢复到RAC的方法
环境准备 在ASM磁盘组里面创建相应的目录
209 0
|
数据库
rac 转换单机
rac 转换单机
147 0
|
数据库
|
Oracle 关系型数据库 数据库
RAC到单机搭建DataGuard
一、环境信息 1、服务器:Cetnos 7.22、数据库版本:11.2.0.43、RAC -> 单机 二、环境准备      目标是搭建RAC到单机的Activity DataGuard,首先RAC环境是准备完善的,接下来需要搭建一个单机环境。
1976 0
|
Oracle 关系型数据库 数据库
把oracle rac 转化为单机数据库
1. Stop database and CRS on both node $ srvctl stop database -d mydb # crsctl stop crs 2.
4209 0
|
Oracle 关系型数据库 测试技术
zt: 在linux上单机模拟Oracle 10g RAC集群(OCFS+ASM)
http://www.itpub.net/579479.html 本想做个安装记录,把遇到的错误和解决办法写下来,以备以后操作时参考,但在写的过程中阴错阳差地对付着把系统装上了,所以就当个安装说明吧,不过其中还有个错误(在下面有记录),感觉应该对使用有影响,所以以后还要想办法修正。
1416 0
|
3月前
|
运维 Oracle 前端开发
Oracle 11g RAC集群日常运维命令总结
Oracle 11g RAC集群日常运维命令总结
93 2
|
3月前
|
Oracle 关系型数据库
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
分布式锁设计问题之Oracle RAC保证多个节点写入内存Page的一致性如何解决
|
4月前
|
存储 负载均衡 Oracle