1、primary上设置相关参数alter system set log_arcHive_config='dg_config=(orcl,orcla,orclb)' scope=both sid='*';a
1、primary上设置相关参数
alter system set log_arcHive_config='dg_config=(orcl,orcla,orclb)' scope=both sid='*';
alter system set log_archive_dest_1='LOCATioN=+ARCH/ORCL/ARCHIVELOG valid_for=(all_logfiles,all_roles) db_unique_name=orcl' scope=both sid='*';
alter system set log_archive_dest_2='service=orcla valid_for=(online_logfiles,primary_role) db_unique_name=orcla lgwr async ' scope=both sid='*';
alter system set log_archive_dest_3='service=orclb valid_for=(online_logfiles,primary_role) db_unique_name=orclb lgwr async' scope=both sid='*';
alter system set log_archive_dest_state_2='defer' scope=both sid='*';
alter system set log_archive_dest_state_3='defer' scope=both sid='*';
alter system set log_archive_max_processes=30 sid='*';
alter system set fal_server='orcla,orclb' scope=both sid='*';
alter system set fal_client='orcl' scope=both sid='*';
alter system set standby_file_management='auto';
alter system set db_file_name_convert='+ORADATA','+ORADATA' scope=spfile;
alter system set log_file_name_convert='+ORADATA','+ORADATA' scope=spfile;
2、添加standby redo
alter database add standby logfile thread 1 group 4('/data0/u01/app/oracle/oradata/ora11g/standby_redo04.log') size 50m;
alter database add standby logfile thread 1 group 5('/data0/u01/app/oracle/oradata/ora11g/standby_redo05.log') size 50m;
alter database add standby logfile thread 1 group 6('/data0/u01/app/oracle/oradata/ora11g/standby_redo06.log') size 50m;
alter database add standby logfile thread 1 group 7('/data0/u01/app/oracle/oradata/ora11g/standby_redo07.log') size 50m;
-
alter database add standby logfile thread 1 group 5 size 50m , group 6 size 50m , group 7 size 50m;
alter database add standby logfile thread 2 group 8 size 50m , group 9 size 50m , group 10 size 50m;
--
3、备库
安装软件, 配置环境变量
配置监听文件listener.ora和tnsnames.ora
--注意linstener.ora 中的SID_NAME指定的是$ORACLE_SID
DUPLICATE TARGET DATABASE
FOR STANDBY FROM ACTIVE DATABASE
DORECOVER
SPFILE SET "db_unique_name"="orcla" SET LOG_ARCHIVE_DEST_2="service=orcla ASYNC REGISTER
VALID_FOR=(online_logfile,primary_role)" SET FAL_CLIENT="orcla"
SET FAL_SERVER="orcl"
NOFILENAMECHECK;
针对以上过程,rman会自动拷贝server端的参数文件到standby端,然后启动到nomount状态,还原控制文件,并拷贝所有的数据文件、临时表空间和归档日志到备库。然后进行recovery
4、在primary端(standby端均可)登录rman
rman target sys/oracle@orcl auxiliary sys/oracle@orcla nocatalog
duplicate target database for standby from active database nofilenamecheck
ALTER DATABASE OPEN READ ONLY;
RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
sql> col DEST_NAME fORMat a30
SQL> col DESTINATION format a30
SQL> SELECT dest_name, status, destination FROM v$archive_dest;
参考--Http://www.cnblogs.com/Bccd/p/6362786.html
--结束END--
本文标题: duplicate在线创建物理备库
本文链接: https://lsjlt.com/news/37185.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0