oracle 11g rac 恢复到单机
环境介绍:
10.204.101.45和46是11.2.0.4.0的rac环境,变成单机恢复到测试环境10.204.16.155(双方都是linux系统)
101.45-racdb1
101.46-racdb2
补充:
通过查看v$db_transportable_platform可以看到跨平台恢复是否支持:
AIX 支持的平台恢复:
linux 支持的平台恢复:
一、16.155环境准备
1、安装数据库软件
2、安装nbu:
二、恢复
1、新建参数文件:
到101.45上面把参数文件down下来修改下,修改后内容如下:
cd $ORACLE_HOME/dbs/
a
racdb.__db_cache_size=369098752
racdb.__java_pool_size=16777216
racdb.__large_pool_size=33554432
racdb.__oracle_base='/oracle/app/oracle'
racdb.__pga_aggregate_target=553648128
racdb.__sga_target=1056964608
racdb.__shared_io_pool_size=0
racdb.__shared_pool_size=620756992
racdb.__streams_pool_size=0
linux安装oracle 11g*.audit_file_dest='/oracle/app/admin/racdb/adump'
*.audit_trail='FALSE'
#*.cluster_database=true //单机去掉
*patible='11.2.0.4.0'
*.control_files='/oracle/app/oradata/l'
*.db_block_size=8192
*.db_create_file_dest='/oracle/app'
*.db_domain=''
*.db_name='racdb'
*.diagnostic_dest='/oracle/app'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=racdbXDB)'
racdb.instance_number=1
racdb.log_archive_dest_1='LOCATION=/oracle/arch'
*.memory_target=1606418432
*.open_cursors=300
*.processes=500
*.remote_login_passwordfile='exclusive'
*.sessions=555
racdb.thread=1
racdb.undo_tablespace='UNDOTBS1'
注意事项:
1>把racdb2的删除掉,把racdb1替换成racdb
2>把涉及到路径的替换成实际环境的,有些目录得手工创建。
3>把集参数注释掉,如下:
*.cluster_database=true
*.remote_listener='racscan:1521'
2、启动到nomount状态
3、恢复控制文件:
bplist -C rac1 -t 4 -R -l / (查看rac1客户端的备份集)
通过这个查到控制文件的备份集是/cntrl_91_1_924801775
run{
allocate channel d1 type sbt;
SEND 'NB_ORA_CLIENT=RAC1';
restore controlfile from '/cntrl_91_1_924801775';
release channel d1;
}
4、启动到mount状态;
5、还原和恢复数据库
原racdb数据库使用ASM进行磁盘管理,恢复服务器为文件系统管理,需要多数据文件进行格式转换:
vi restore.sh
chmod a+x restore.sh
nohup ./restore.sh &
restore.sh里的内容如下:
#!/bin/sh
. ~/.bash_profile
rman target / <<eof
run {
allocate channel c1 type sbt;
allocate channel c2 type sbt;
SEND 'NB_ORA_CLIENT=RAC1';
set until time ='2016-10-09 17:21:46';
set newname for datafile '+DATADG/racdb/datafile/system.256.888664431' to '/oracle/app/oradata/racdb/system.256.888664431';
set newname for datafile '+DATADG/racdb/datafile/sysaux.257.888664431' to '/oracle/app/oradata/racdb/sysaux.257.888664431';
set newname for datafile '+DATADG/racdb/datafile/undotbs1.258.888664431' to '/oracle/app/oradata/racdb/undotbs1.258.888664431';
set newname for datafile '+DATADG/racdb/datafile/users.259.888664431' to '/oracle/app/oradata/racdb/users.259.888664431';
set newname for datafile '+DATADG/racdb/datafile/undotbs2.264.888664621' to '/oracle/ap
p/oradata/racdb/undotbs2.264.888664621';
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论