DG_三大模式切換
===================================
1 最大效能模式MAXIMUM PERFORMANCE ------預設模式
===================================
一 最大效能模式特點
192.168.1.181
SQL> select database_role,protection_mode,protection_level from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1
VALID
LOG_ARCHIVE_DEST_2
VALID
SQL> show parameter log_archive
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string dg_config=(orcl,db01)
log_archive_dest_1 string location=/home/oracle/arch_orc
l valid_for=(all_logfiles,all_
roles) db_unique_name=orcl
log_archive_dest_2 string service=db_db01
LGWR ASYNC val
id_for=(online_logfiles,primar
y_roles) db_unique_name=db01
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 31
Next log sequence to archive 33
Current log sequence 33
192.168.1.183
SQL> select database_role,protection_mode,protection_level from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1
VALID
LOG_ARCHIVE_DEST_2
VALID
SQL> show parameter log_archive
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string dg_config=(db01,orcl)
log_archive_dest_1 string location=/home/oracle/arch_db0
1 valid_for=(all_logfiles,all_
roles) db_unique_name=db01
log_archive_dest_2 string service=db_orcl
LGWR ASYNC val
id_for=(online_logfiles,primar
y_roles) db_unique_name=orcl
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 31
Next log sequence to archive 33
Current log sequence 33
192.168.1.181
SQL> alter system switch logfile;
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 32
Next log sequence to archive 34
Current log sequence 34
192.168.1.183
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_db01
Oldest online log sequence 32
Next log sequence to archive 0
Current log sequence 34
===================================
2 最大效能模式--切換到-->最大高可用 (預設是最大效能模式---MAXIMUM PERFORMANCE)
===================================
192.168.1.181
SQL> select DATABASE_ROLE,PROTECTION_MODE,PROTECTION_LEVEL from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=db_db01
LGWR ASYNC val
id_for=(online_logfiles,primar
y_roles) db_unique_name=db01
192.168.1.181
SQL> shutdown immediate
192.168.1.183
SQL> alter database recover managed standby database cancel;
SQL> shutdown immediate
192.168.1.181
SQL> startup mount;
SQL>
alter database set standby database to maximize availability;
SQL> alter system set log_archive_dest_2='service=db_db01
LGWR SYNC valid_for=(online_logfiles,primary_roles) db_unique_name=db01' scope=spfile;
192.168.1.183
SQL> startup nomount
SQL> alter database mount standby database;
SQL> alter system set log_archive_dest_2='service=db_orcl
LGWR SYNC valid_for=(online_logfiles,primary_roles) db_unique_name=orcl' scope=spfile;
SQL> shutdown immediate
SQL> startup nomount
SQL> alter database mount standby database;
192.168.1.181
SQL> startup
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1
VALID
LOG_ARCHIVE_DEST_2
VALID
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=db_db01 LGWR SYNC vali
d_for=(online_logfiles,primary
_roles) db_unique_name=db01
SQL> select database_role,protection_level,protection_mode from v$database;
DATABASE_ROLE PROTECTION_LEVEL PROTECTION_MODE
---------------- -------------------- --------------------
PRIMARY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 34
Next log sequence to archive 36
Current log sequence 36
192.168.1.183
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1 VALID
LOG_ARCHIVE_DEST_2 VALID
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=db_orcl LGWR SYNC vali
d_for=(online_logfiles,primary
_roles) db_unique_name=orcl
SQL> select database_role,protection_level,protection_mode from v$database;
DATABASE_ROLE PROTECTION_LEVEL PROTECTION_MODE
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_db01
Oldest online log sequence 35
Next log sequence to archive 0
Current log sequence 36
192.168.1.181
SQL> alter system switch logfile;
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 35
Next log sequence to archive 37
Current log sequence 37
192.168.1.183
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_db01
Oldest online log sequence 36
Next log sequence to archive 0
Current log sequence 37
===================================
3 最大高可用--切換到-->最保護能模式
===================================
DG最大保護模式Maximum protection
192.168.1.181
SQL> shutdown immediate
192.168.1.183
SQL> shutdown immediate
192.168.1.181
SQL> alter database set standby database to maximize protection;
SQL> shutdown immediate
192.168.1.183
SQL> startup nomount
SQL> alter database mount standby database;
192.168.1.181
SQL> startup
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1 VALID
LOG_ARCHIVE_DEST_2 VALID
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=db_db01
LGWR SYNC vali
d_for=(online_logfiles,primary
_roles) db_unique_name=db01
SQL> select database_role,protection_level,protection_mode from v$database;
DATABASE_ROLE PROTECTION_LEVEL PROTECTION_MODE
---------------- -------------------- --------------------
PRIMARY MAXIMUM PROTECTION MAXIMUM PROTECTION
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 37
Next log sequence to archive 39
Current log sequence 39
192.168.1.183
SQL> col dest_name for a25
SQL> select dest_name,status from v$archive_dest_status;
DEST_NAME STATUS
------------------------- ---------
LOG_ARCHIVE_DEST_1 VALID
LOG_ARCHIVE_DEST_2 VALID
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=db_db01
LGWR SYNC vali
d_for=(online_logfiles,primary
_roles) db_unique_name=db01
SQL> select database_role,protection_level,protection_mode from v$database;
DATABASE_ROLE PROTECTION_LEVEL PROTECTION_MODE
---------------- -------------------- --------------------
PRIMARY MAXIMUM PROTECTION MAXIMUM PROTECTION
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_db01
Oldest online log sequence 37
Next log sequence to archive 0
Current log sequence 39
192.168.1.181
SQL> alter system switch logfile;
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_orcl
Oldest online log sequence 38
Next log sequence to archive 40
Current log sequence 40
192.168.1.183
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/arch_db01
Oldest online log sequence 37
Next log sequence to archive 0
Current log sequence 40
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-1355291/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Win10怎樣切換平板模式_win10如何切換到平板模式Win10模式
- 快速切換至Kotlin for Android模式KotlinAndroid模式
- win10怎麼切換到桌面模式_win10平板模式和桌面模式的切換教程Win10模式
- KindEditor如何切換成簡單模式??模式
- 深色模式適配和主題切換模式
- 網頁黑夜模式白天模式切換 html+css+js網頁模式HTMLCSSJS
- win10安全模式切換正常模式的方法Win10模式
- win10平板模式無法切換如何處理_win10平板模式切換不了怎麼解決Win10模式
- vxe-table 一鍵切換編輯模式、只讀模式模式
- redis sentinel哨兵模式安裝部署和切換Redis模式
- idea 中maven檢視 切換離線模式IdeaMaven模式
- 使用RecyclerView展示資料(可切換列表模式)View模式
- 微星筆記本怎麼切換啟動模式?微星筆記本bios設定啟動模式切換的教程筆記模式iOS
- win10一鍵切換夜晚模式怎麼操作_win10怎麼實現夜間模式快速切換Win10模式
- 程式切換(上下文切換)
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- flutter 暗黑模式切換過渡動畫實現Flutter模式動畫
- 將Debian從Legacy切換為UEFI啟動模式模式
- docker Redis單機主從哨兵模式切換失敗DockerRedis模式
- 幻燈片放映模式切換windows terminal背景圖片模式Windows
- 棧切換
- python 爬蟲 自動切換 learnku 的白天 / 夜間模式Python爬蟲模式
- win10平板模式怎麼切換電腦模式 win10怎麼退出平板模式到桌面模式Win10模式
- Win10怎麼切換到黑暗模式_win10暗黑模式怎麼開Win10模式
- Win10平板模式如何切換_win10系統退出平板模式的教程Win10模式
- 切換java版本Java
- 切換UNDO(zt)
- 切換 PHP 版本PHP
- ubuntu切換源Ubuntu
- Git分支切換Git
- win10系統切換到快捷更新模式的方法Win10模式
- 已解決 phpstudy切換nts模式出現的No input file specifiedPHP模式
- 可自動切換 learnku 夜間 / 白天模式的 python 指令碼模式Python指令碼
- 一鍵切換夜間模式、隱藏桌面,試試One Switch模式
- 原來還可以這麼切換到正常編輯器的模式模式
- EDBPPAS(Oracle相容版)Oracle與PostgreSQL相容模式的引數配置切換OracleSQL模式
- Emacs月月積累(二):視窗、緩衝區和常用模式切換Mac模式
- dg_閃回資料庫實驗資料庫
- jdk 多版本切換JDK