利用DATAGUARD迁移大数据量的单实例至RAC环境(附DG之GAP修复)v10-副本26

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

利用Dataguard迁移单实例至RAC环境第一章概述1.0实验目的本文档以xx局数据质量平台(xx.xx.xx.xx)迁移至RAC环境,通过11gDataguard迁移的模拟测试。并附加测试以xx局在归档缺失下DataguardGap修复案例背景的实验(另文档描述)。拟通过该实验能够更了解整个迁移、修复存在的风险及提出相关的优化建议。1.1环境拓扑文档控制序号更改人版本号日期备注1培植V1.02013-04-29编写第二章DATAGUARD环境迁移2.0RMAN恢复方式搭建STANDBY2.0.1主库的备份1、开启归档startupmountalterdatabasearchivelog;2、开启强制日志ALTERDATABASEFORCELOGGING;3、检查日志模式SQLselectname,log_mode,force_loggingfromgv$database;NAMELOG_MODEFOR------------------------ORCLARCHIVELOGYES4、数据库全库备份run{allocatechannelc1typedisk;allocatechannelc2typedisk;backupdatabaseformat'/u01/rmanbak/Full_%U.bak';backuparchivelogallformat'/u01/rmanbak/ARC_%U.bak';backupdevicetypediskformat'/u01/rmanbak/standby_%U.ctl'currentcontrolfileforstandby;releasechannelc1;releasechannelc2;}5、备份片的生成情况,并拷贝备份集至rac的节点一[oracle@gfs3~]$ls-lrt/u01/rmanbaktotal1982188-rw-r-----1oracleoinstall510877696Jan1817:38Full_02oud3b6_1_1.bak-rw-r-----1oracleoinstall660815872Jan1817:38Full_01oud3b6_1_1.bak-rw-r-----1oracleoinstall98304Jan1817:38Full_04oud3d9_1_1.bak-rw-r-----1oracleoinstall9830400Jan1817:38Full_03oud3d8_1_1.bak-rw-r-----1oracleoinstall838291968Jan1817:39ARC_05oud3dr_1_1.bak-rw-r-----1oracleoinstall9830400Jan1817:40standby_06oud3fu_1_1.ctl拷贝备份集至RAC节点上:[oracle@gfs3u01]$scp-rrmanbak192.168.1.10:/u012.0.2Dataguard的配置1、主库参数文件配置(需备份好原来的参数文件)*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'*.audit_trail='db'*.compatible='11.2.0.0.0'*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl'*.db_block_size=8192*.db_domain=''*.db_name='orcl'*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'*.db_recovery_file_dest_size=4322230272*.diagnostic_dest='/u01/app/oracle'*.dispatchers='(PROTOCOL=TCP)(SERVICE=orclXDB)'*.log_archive_format='%t_%s_%r.dbf'*.memory_target=451936256*.open_cursors=300*.processes=300*.remote_login_passwordfile='none'*.service_names='orcl'*.sessions=335*.undo_tablespace='UNDOTBS1'*.FAL_CLIENT='primary'*.FAL_SERVER='standby'*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcl_st)'*.LOG_ARCHIVE_DEST_1='LOCATION=/archVALID_FOR=(ALL_LOGFILES,ALL_ROLES)DB_UNIQUE_NAME=orcl'*.LOG_ARCHIVE_DEST_2='SERVICE=standbyLGWRASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES)DB_UNIQUE_NAME=orcl_st'*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'*.LOG_ARCHIVE_MAX_PROCESSES=6*.LOG_FILE_NAME_CONVERT='+DATA/orcl/DATAFILE/','/u01/app/oracle/oradata/orcl/'*.DB_FILE_NAME_CONVERT='+DATA/orcl/DATAFILE/','/u01/app/oracle/oradata/orcl/'*.remote_login_passwordfile='EXCLUSIVE'*.STANDBY_FILE_MANAGEMENT='AUTO'2、备库参数文件的配置(RAC环境需注意标红部分)orcl1.__oracle_base='/u01/app/oracle'orcl2.__oracle_base='/u01/app/oracle'*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'*.audit_trail='db'*.cluster_database=TRUE*.cluster_database_instances=2*.compatible='11.2.0.0.0'*.control_files='+DATA/orcl/controlfile/control01.ctl','+DATA/orcl/controlfile/control02.ctl'*.db_block_size=8192*.db_create_file_dest='+DATA'*.db_name='orcl'*.db_recovery_file_dest='+DATA'*.db_recovery_file_dest_size=48318382080*.diagnostic_dest='/u01/app/oracle'*.dispatchers='(PROTOCOL=TCP)(SERVICE=orclXDB)'orcl1.instance_number=1orcl2.instance_number=1*.log_archive_format='%t_%s_%r.dbf'*.memory_target=797152000*.nls_language='AMERICAN'*.open_cursors=300*.processes=350*.remote_listener='grid-scan:1521'*.remote_login_passwordfile='exclusive'*.session_cached_cursors=545*.sessions=280orcl1.thread=1orcl2.thread=2*.undo_management='AUTO'orcl2.undo_tablespace='UNDOTBS2'orcl1.undo_tablespace='UNDOTBS1'*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcl_st)'*.LOG_ARCHIVE_DEST_1='LOCATION=/arch1VALID_FOR=(ALL_LOGFILES,ALL_ROLES)DB_UNIQUE_NAME=orcl_st'orcl1.LOG_ARCHIVE_DEST_2='SERVICE=primaryLGWRASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES)DB_UNIQUE_NAME=orcl'*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'*.LOG_ARCHIVE_MAX_PROCESSES=6*.LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl/','+DATA/orcl/DATAFILE/'*.DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl/','+DATA/orcl/DATAFILE/'*.remote_login_passwordfile='EXCLUSIVE'*.STANDBY_FILE_MANAGEMENT='AUTO'*.FAL_CLIENT='standby'*.FAL_SERVER='primary'3、建立备库的spfile创建备库spfile:SQLcreatespfile='+DATA/orcl/spfileorcl.ora'frompfile;Gfs1节点上echoSPFILE='+DATA/orcl/spfileorcl.ora'$ORACLE_HOME/dbs/initorcl1.oraGfs2节点上echoSPFILE='+DATA/orcl/spfileorcl.ora'$ORACLE_HOME/dbs/initorcl2.ora创建密码文件:从主库拷贝密码文件至备库,并更名如下:$mv$ORACLE_HOME/dbs/orapworcl$ORACLE_HOME/dbs/orapworcl1$mv$ORACLE_HOME/dbs/orapworcl$ORACLE_HOME/dbs/orapworcl22.0.3STANDBY的初始化1、恢复控制文件RMANrestorestandbycontrolfilefrom'/home/oracle/rmanbak/standby_06oud3fu_1_1.ctl';Startingrestoreat2014-04-2522:33:28usingtargetdatabasecontrolfileinsteadofrecoverycatalogallocatedchannel:ORA_DISK_1channelORA_DISK_1:SID=37instance=orcl1devicetype=DISKchannelORA_DISK_1:restoringcontrolfilechannelORA_DISK_1:restorecomplete,elapsedtime:00:00:01outputfilename=+DATA/orcl/controlfile/control01.ctloutputfilename=+DATA/orcl/controlfile/control

1 / 26
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功