1、primary上设置相关参数
10年积累的成都网站建设、做网站经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站制作后付款的网站建设流程,更有海北州免费网站建设让你可以放心的选择与我们合作。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
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享名称:duplicate在线创建物理备库-创新互联
网站URL:http://scgulin.cn/article/esshe.html