您好,登錄后才能下訂單哦!
搭建參見文章http://snowhill.blog.51cto.com/339421/1923591,搭好后,做switch over:
1 檢查參數(shù)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需關(guān)閉至一個實例
3 檢查是否有g(shù)ap
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 PRIMARY
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; 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;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。