十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
搭建参见文章http://snowhill.blog.51cto.com/339421/1923591,搭好后,做switch over:
创新互联建站是一家集网站建设,喀左企业网站建设,喀左品牌网站建设,网站定制,喀左网站建设报价,网络营销,网络优化,喀左网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。1 检查参数fal_server,fal_client,log_archive_dest_2,log_file_name_convert,data_file_name_convert,
standby_file_management
源:
fal_server=standby
fal_cleint=db
alter system set db_file_name_convert='/data','+data' scope=spfile; alter system set log_file_name_convert='/data','+data' scope=spfile;standby:
fal_server=db
fal_client=standby
standby_file_management=auto
2 切换前rac需关闭至一个实例
3 检查是否有gap
4 切换:
源:
SQL> alter database commit to switchover to standby with session shutdown;这里切换后,源端全自动shutdown abort;
--standby
SQL>select name,open_mode,DATABASE_ROLE,PROTECTION_MODE,switchover_status from v$database; NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE SWITCHOVER_STATUS --------- -------------------- ---------------- -------------------- -------------------- DB READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM AVAILABILITY TO PRIMARYSQL>alter system set log_archive_dest_2="service=db lgwr sync affirm valid_for=(all_logfiles,all_roles) db_unique_name=db" scope=both; SQL>alter system set log_archive_dest_state_2=enable; SQL>alter database commit to switchover to primary with session shutdown;--源
SQL>startup mount SQL>alter system set log_archive_dest_state_2=defer; SQL>select name, LOG_MODE, OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database NAME LOG_MODE OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME --------- ------------ -------------------- ---------------- -------------------- ------------------------------ DB ARCHIVELOG MOUNTED PHYSICAL STANDBY RECOVERY NEEDED db SQL> alter database recover managed standby database cancel; SQL> alter database open; SQL> alter database recover managed standby database using current logfile disconnect; SQL> select name, LOG_MODE, OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database; NAME LOG_MODE OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME --------- ------------ -------------------- ---------------- -------------------- ------------------------------ DB ARCHIVELOG READ ONLY WITH APPLY PHYSICAL STANDBY TO PRIMARY db--standby
SQL>alter system set log_archive_dest_2="service=db lgwr sync affirm valid_for=(all_logfiles,all_roles) db_unique_name=db" scope=both;SQL>alter system set log_archive_dest_state_2=enable scope=both;另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。