【DATAGUARD】物理dg配置客戶端無縫切換 (八.1)--Data Guard Broker 的配置

Appleses發表於2016-01-30

DATAGUARD】物理dg配置客戶端無縫切換 (八.1)--Data Guard Broker 的配置

1.1  BLOG文件結構圖

wpsEC9D.tmp 

 

 

1.2  前言部分

 

1.2.1  導讀

各位技術愛好者,看完本文後,你可以掌握如下的技能,也可以學到一些其它你所不知道的知識,~O(∩_∩)O~:

 Data Guard Broker 的配置

Fast-Start Failover 的配置

Oracle DataGuard 之客戶端TAF 配置

④ 使用DGMGRL 來管理資料庫

 物理dg管理和維護的一些sql

⑥ DataGuard 客戶端特級配置

 

注意:本篇BLOG中程式碼部分需要特別關注的地方我都用黃色背景和紅色字型來表示,比如下邊的例子中,thread 1的最大歸檔日誌號為33thread 2的最大歸檔日誌號為43是需要特別關注的地方。

  List of Archived Logs in backup set 11

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

  ---- ------- ---------- ------------------- ---------- ---------

  1    32      1621589    2015-05-29 11:09:52 1625242    2015-05-29 11:15:48

  1    33      1625242    2015-05-29 11:15:48 1625293    2015-05-29 11:15:58

  2    42      1613951    2015-05-29 10:41:18 1625245    2015-05-29 11:15:49

  2    43      1625245    2015-05-29 11:15:49 1625253    2015-05-29 11:15:53

 

 

 

 

 

本文如有錯誤或不完善的地方請大家多多指正,ITPUB留言或QQ皆可,您的批評指正是我寫作的最大動力。

1.2.2  實驗環境介紹

 

 專案

主庫

dg

db 型別

單例項

單例項

db version

11.2.0.3

11.2.0.3

db 儲存

FS type

FS type

ORACLE_SID

oradg11g

oradgphy

db_name

oradg11g

oradg11g

主機IP地址:

192.168.59.130

192.168.59.130

OS版本及kernel版本

RHEL6.5 64位,2.6.32-504.16.2.el6.x86_64

RHEL6.5 64位,2.6.32-504.16.2.el6.x86_64

OS hostname

rhel6_lhr

rhel6_lhr

 

 

 

1.2.3  相關參考文章連結

 

dg的系列文章參考:

【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫(一): http://blog.itpub.net/26736162/viewspace-1448197/
【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫(二 ):  http://blog.itpub.net/26736162/viewspace-1448207/
【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫(三 ):  http://blog.itpub.net/26736162/viewspace-1481972/
【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫 (四)--新增一個物理dg節點 :http://blog.itpub.net/26736162/viewspace-1484878/

【DATAGUARD】物理dg的switchover切換(五) http://blog.itpub.net/26736162/viewspace-1753111/

【DATAGUARD】物理dg的failover切換(六)   http://blog.itpub.net/26736162/viewspace-1753130/

【DATAGUARD】物理dg在主庫丟失歸檔檔案的情況下的恢復(七)  http://blog.itpub.net/26736162/viewspace-1780863/

 

 

 

1.2.4  本文簡介

 

本篇blog是基於cuug的公開課內容,我自己進行實踐的操作,影片可以參考:http://blog.itpub.net/26736162/viewspace-1624453/ ,簡介我就不多寫了,把cuug的內容直接copy過來吧,覺得還是比較有用的。

 

這個技術如果你不知道,不能算是ORACLE高手

這個技術如果你不知道,就不能說你會DataGuard

這個技術如果你不知道,......

 

本次網路課程,研究當主備庫發生切換時,如何在主庫啟動一個service,保證客戶端的連線能夠繼續,而且還能夠繼續select查詢操作,而不管主備庫是在哪臺伺服器上;同時保證新的客戶連線沒有任何的問題。本課程網路上的例子不多,陳老師花了將近一年的時間人肉搜尋,最近才找到,急不可待的要分享給大家。

 

1DataGuard的配置(快速)

2、建立service

3、建立觸發器

4、主備庫切換測試

 

由於內容較多,我打算分為4個章節來共享給大家,貼個圖,不要奇怪,還有一個章節是實驗過程中配到的問題解決。

wpsECAE.tmp 

 

 

1.3  相關知識點掃盲

 

   oracle Data Guard,以最低成本實現最高的資料保護。在硬體上沒有特殊要求,普通PC機即可實現。

簡單的來說,Data Guard,就是自動建立和維護生產資料庫(或主資料庫)的一個或多個事務一致的副本(備用資料庫)。如果主資料庫不可用(因為故障、維護或者災難),那麼可以啟用一個備用資料庫並使之承擔主資料庫的角色。然而,在配置完成Data Guard後,若需要實現主備資料庫間的切換,需要在主資料庫及備用資料庫上分別輸入多個命令,切換步驟稍顯麻煩。所以,一般情況下,DBA會將整個切換過程編輯成指令碼,以便自動執行,進行狀態切換。當然,oracle 也提供了工具Data Guard Broker,僅在控制端輸入一個命令就能方便實現主備資料庫間的切換。

Data Guard Broker的基礎上,配置並啟用Fast-Start Failover,就能自動檢測發現主機故障,實現主備切換,故障轉移。

 

Data Guard Broker是建立在Data Guard基礎上的一個對Data Guard配置,集中管理操作的一個平臺。Broker的推出是為了簡化DG複雜的管理過程,它最大的作用就是集中化的統一管理。

配置Data Guard Broker使用到的客戶端工具是DGMGRL。它是一個命令列管理工具。

 

 

1.4  實驗部分

 

1.4.1  實驗目標

 

Data Guard Broker 的配置並完成實驗。

 

 

1.4.2  前提條件

注意前提條件,Data Guard已經成功配置完成。

1. 設定primarystandby啟動時引數檔案為spfile

2. 配置DG_BROKER_CONFIG_FILEn
DG_BROKER_CONFIG_FILEn代表2個引數,分別為DG_BROKER_CONFIG_FILE1DG_BROKER_CONFIG_FILE2,它們是Data Guard Broker的配置檔名。它們都有預設值(windows下是在ORACLE_HOME/database目錄下,linux下是在ORACLE_HOME/dbs目錄下),所以一般我們可以不進行特別設定。

3. 設定listener
Data Guard Broker
環境中,需要在listener.ora靜態新增一個service_namedb_unique_name_DGMGRL.db_domain的註冊。這個service_name會在DGMGRL重啟資料庫的時候用到。透過DGMGRL重啟資料庫時DMON程式會先將資料庫關閉,然後DGMGRL用此service_name透過listener連線到資料庫,發出啟動命令。

4. 設定DG_BROKER_STARTTRUE
這一步是啟動Data Guard Broker monitor
DMON)程式,需要在2個資料庫上面執行下面的命令
alter system set dg_broker_start=true scope=both;

 

主庫操作:

[oracle@rhel6_lhr lhr]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on 星期一 9月 28 10:17:04 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

連線到:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

10:17:04 SQL> show parameter name

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert                 string      oradglg, oradg11g

db_name                              string      oradg11g

db_unique_name                       string      oradg11g

global_names                         boolean     FALSE

instance_name                        string      oradg11g

lock_name_space                      string

log_file_name_convert                string      oradglg, oradg11g

processor_group_name                 string

service_names                        string      oradg11g

10:17:08 SQL> show parameter spfile

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/spfileoradg11g.o

                                                 ra

10:17:14 SQL>  show parameter DG_BROKER_CONFIG_FILE

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_config_file1               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr1oradg11g.dat

dg_broker_config_file2               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr2oradg11g.dat

10:20:43 SQL> set line 9999

10:20:44 SQL> col name format a10

10:20:44 SQL> col FS_FAILOVER_OBSERVER_HOST format a20

10:20:44 SQL> select dbid,name,current_scn,protection_mode,protection_level,database_role,force_logging,open_mode,switchover_status from v$database;

 

      DBID NAME       CURRENT_SCN PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    FOR OPEN_MODE            SWITCHOVER_STATUS

---------- ---------- ----------- -------------------- -------------------- ---------------- --- -------------------- --------------------

1403587593 ORADG11G       2336836 MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PRIMARY          YES READ WRITE           TO STANDBY

 

已用時間:  00: 00: 00.01

10:20:44 SQL> SELECT d.DBID,

10:20:44   2         d.DB_UNIQUE_NAME,

10:20:44   3         d.FORCE_LOGGING,

10:20:44   4         d.FLASHBACK_ON,

10:20:44   5         d.FS_FAILOVER_STATUS,

10:20:44   6         d.FS_FAILOVER_CURRENT_TARGET,

10:20:44   7         d.FS_FAILOVER_THRESHOLD,

10:20:44   8         d.FS_FAILOVER_OBSERVER_PRESENT,

10:20:44   9         d.FS_FAILOVER_OBSERVER_HOST

10:20:44  10    FROM v$database d;

 

      DBID DB_UNIQUE_NAME                 FOR FLASHBACK_ON       FS_FAILOVER_STATUS     FS_FAILOVER_CURRENT_TARGET     FS_FAILOVER_THRESHOLD FS_FAIL FS_FAILOVER_OBSERVER

---------- ------------------------------ --- ------------------ ---------------------- ------------------------------ --------------------- ------- --------------------

1403587593 oradg11g                       YES YES                DISABLED                                                                  0

 

已用時間:  00: 00: 00.00

10:20:45 SQL>

10:20:45 SQL> ! ps -ef|grep dmon

oracle    7936  7895  0 10:21 pts/4    00:00:00 /bin/bash -c  ps -ef|grep dmon

oracle    7938  7936  0 10:21 pts/4    00:00:00 grep dmon

 

10:21:17 SQL> show parameter dg_broker

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_config_file1               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr1oradg11g.dat

dg_broker_config_file2               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr2oradg11g.dat

dg_broker_start                      boolean     FALSE

10:21:39 SQL> show parameter dg_broker_start

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_start                      boolean     FALSE

10:21:53 SQL> alter system set dg_broker_start=true scope=both;

 

系統已更改。

 

已用時間:  00: 00: 00.02

10:21:56 SQL> ! ps -ef|grep dmon

oracle    7975     1  0 10:21 ?        00:00:00 ora_dmon_oradg11g

oracle    7976  7895  0 10:22 pts/4    00:00:00 /bin/bash -c  ps -ef|grep dmon

oracle    7978  7976  0 10:22 pts/4    00:00:00 grep dmon

 

10:22:02 SQL>

10:22:02 SQL> show parameter dg_broker_start

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_start                      boolean     TRUE

10:23:48 SQL> set line 9999

10:23:58 SQL> col name format a10

10:23:58 SQL> col FS_FAILOVER_OBSERVER_HOST format a20

10:23:58 SQL> select dbid,name,current_scn,protection_mode,protection_level,database_role,force_logging,open_mode,switchover_status from v$database;

 

      DBID NAME       CURRENT_SCN PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    FOR OPEN_MODE            SWITCHOVER_STATUS

---------- ---------- ----------- -------------------- -------------------- ---------------- --- -------------------- --------------------

1403587593 ORADG11G       2337043 MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PRIMARY          YES READ WRITE           TO STANDBY

 

已用時間:  00: 00: 00.01

10:23:58 SQL> SELECT d.DBID,

10:23:58   2         d.DB_UNIQUE_NAME,

10:23:58   3         d.FORCE_LOGGING,

10:23:58   4         d.FLASHBACK_ON,

10:23:58   5         d.FS_FAILOVER_STATUS,

10:23:58   6         d.FS_FAILOVER_CURRENT_TARGET,

10:23:58   7         d.FS_FAILOVER_THRESHOLD,

10:23:58   8         d.FS_FAILOVER_OBSERVER_PRESENT,

10:23:58   9         d.FS_FAILOVER_OBSERVER_HOST

10:23:58  10    FROM v$database d;

 

      DBID DB_UNIQUE_NAME                 FOR FLASHBACK_ON       FS_FAILOVER_STATUS     FS_FAILOVER_CURRENT_TARGET     FS_FAILOVER_THRESHOLD FS_FAIL FS_FAILOVER_OBSERVER

---------- ------------------------------ --- ------------------ ---------------------- ------------------------------ --------------------- ------- --------------------

1403587593 oradg11g                       YES YES                DISABLED                                                                  0

 

已用時間:  00: 00: 00.00

10:24:00 SQL>

 

告警日誌:

Mon Sep 28 10:21:56 2015

ALTER SYSTEM SET dg_broker_start=TRUE SCOPE=BOTH;

Mon Sep 28 10:21:56 2015

DMON started with pid=37, OS id=7975

Starting Data Guard Broker (DMON)

Mon Sep 28 10:22:04 2015

INSV started with pid=38, OS id=7984

 

備庫操作:

 

[oracle@rhel6_lhr ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on 星期一 9月 28 10:25:25 2015

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

連線到:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

10:25:25 SQL> show parameter name

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert                 string      oradg11g, oradgphy

db_name                              string      oradg11g

db_unique_name                       string      oradgphy

global_names                         boolean     FALSE

instance_name                        string      oradgphy

lock_name_space                      string

log_file_name_convert                string      oradg11g, oradgphy

processor_group_name                 string

service_names                        string      oradgphy

10:25:27 SQL>  show parameter spfile

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/spfileoradgphy.o

                                                 ra

10:25:35 SQL> show parameter DG_BROKER_CONFIG_FILE

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_config_file1               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr1oradgphy.dat

dg_broker_config_file2               string      /u01/app/oracle/product/11.2.0

                                                 /dbhome_1/dbs/dr2oradgphy.dat

10:25:43 SQL> set line 9999

10:25:51 SQL> col name format a10

10:25:51 SQL> col FS_FAILOVER_OBSERVER_HOST format a20

10:25:51 SQL> select dbid,name,current_scn,protection_mode,protection_level,database_role,force_logging,open_mode,switchover_status from v$database;

SELECT d.DBID,

       d.DB_UNIQUE_NAME,

       d.FORCE_LOGGING,

       d.FLASHBACK_ON,

       d.FS_FAILOVER_STATUS,

 

      DBID NAME       CURRENT_SCN PROTECTION_MODE      PROTECTION_LEVEL     DATABASE_ROLE    FOR OPEN_MODE            SWITCHOVER_STATUS

---------- ---------- ----------- -------------------- -------------------- ---------------- --- -------------------- --------------------

1403587593 ORADG11G       2337499 MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE  PHYSICAL STANDBY YES READ ONLY WITH APPLY NOT ALLOWED

 

已用時間:  00: 00: 00.11

10:25:52 SQL> 10:25:52   2  10:25:52   3  10:25:52   4  10:25:52   5  10:25:52   6         d.FS_FAILOVER_CURRENT_TARGET,

10:25:52   7         d.FS_FAILOVER_THRESHOLD,

10:25:52   8         d.FS_FAILOVER_OBSERVER_PRESENT,

10:25:52   9         d.FS_FAILOVER_OBSERVER_HOST

10:25:52  10    FROM v$database d;

 

      DBID DB_UNIQUE_NAME                 FOR FLASHBACK_ON       FS_FAILOVER_STATUS     FS_FAILOVER_CURRENT_TARGET     FS_FAILOVER_THRESHOLD FS_FAIL FS_FAILOVER_OBSERVER

---------- ------------------------------ --- ------------------ ---------------------- ------------------------------ --------------------- ------- --------------------

1403587593 oradgphy                       YES NO                 DISABLED                                                                  0

 

已用時間:  00: 00: 00.00

10:25:56 SQL>  ! ps -ef|grep dmon

oracle    7975     1  0 10:21 ?        00:00:00 ora_dmon_oradg11g

oracle    8461  8410  0 10:26 pts/5    00:00:00 /bin/bash -c  ps -ef|grep dmon

oracle    8463  8461  0 10:26 pts/5    00:00:00 grep dmon

 

10:26:07 SQL>  show parameter dg_broker_start

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

dg_broker_start                      boolean     FALSE

10:26:39 SQL> alter system set dg_broker_start=true scope=both;

 

系統已更改。

 

已用時間:  00: 00: 00.05

10:26:46 SQL>  ! ps -ef|grep dmon

oracle    7975     1  0 10:21 ?        00:00:00 ora_dmon_oradg11g

oracle    8481     1  0 10:26 ?        00:00:00 ora_dmon_oradgphy

oracle    8501  8410  0 10:26 pts/5    00:00:00 /bin/bash -c  ps -ef|grep dmon

oracle    8503  8501  0 10:26 pts/5    00:00:00 grep dmon

 

10:26:50 SQL>

 

1.4.2.1  配置db_domain 和  listener tnsnames

目標: 配置db_domain 和 靜態的listener listener中的GLOBAL_DBNAMEdb_unique_name_DGMGRL.db_domain

 

主備庫:

14:05:05 SQL>  show parameter db_domain 

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_domain                            string

14:13:46 SQL> alter system set db_domain='lhr.com' scope=spfile;

 

 

 

主備庫listener的配置,注意紅色的為新新增的內容:

[oracle@rhel6_lhr admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 28-9月 -2015 15:05:27

 

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

 

正在連線到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521)))

LISTENER 的 STATUS

------------------------

別名                      LISTENER

版本                      TNSLSNR for Linux: Version 11.2.0.3.0 - Production

啟動日期                  28-9月 -2015 14:32:08

正常執行時間              0 天 0 小時 33 分 18 秒

跟蹤級別                  off

安全性                    ON: Local OS Authentication

SNMP                      OFF

監聽程式引數檔案          /u01/app/grid/11.2.0/network/admin/listener.ora

監聽端點概要...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.59.130)(PORT=1521)))

服務摘要..

服務 "+ASM" 包含 1 個例項。

  例項 "+ASM", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "PLSExtProc" 包含 1 個例項。

  例項 "PLSExtProc", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "ora11g" 包含 1 個例項。

  例項 "ora11g", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradg11g" 包含 1 個例項。

  例項 "oradg11g", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradg11g.lhr.com" 包含 2 個例項。

  例項 "oradg11g", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

  例項 "oradg11g", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "oradg11gXDB.lhr.com" 包含 2 個例項。

  例項 "oradg11g", 狀態 READY, 包含此服務的 1 個處理程式...

  例項 "oradgphy", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "oradg11g_DGB.lhr.com" 包含 1 個例項。

  例項 "oradg11g", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "oradg11g_DGMGRL.lhr.com" 包含 1 個例項。

  例項 "oradg11g", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradglg" 包含 1 個例項。

  例項 "oradglg", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradgphy" 包含 1 個例項。

  例項 "oradgphy", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradgphy.lhr.com" 包含 2 個例項。

  例項 "oradgphy", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

  例項 "oradgphy", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "oradgphy_DGB.lhr.com" 包含 1 個例項。

  例項 "oradgphy", 狀態 READY, 包含此服務的 1 個處理程式...

服務 "oradgphy_DGMGRL.lhr.com" 包含 1 個例項。

  例項 "oradgphy", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "oradgss" 包含 1 個例項。

  例項 "oradgss", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

服務 "orclasm.lhr.com" 包含 1 個例項。

  例項 "orclasm", 狀態 UNKNOWN, 包含此服務的 1 個處理程式...

命令執行成功

[oracle@rhel6_lhr admin]$ more /u01/app/grid/11.2.0/network/admin/listener.ora

# listener.ora Network Configuration File: /u01/app/grid/11.2.0/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = orclasm.lhr.com)

      (SID_NAME = orclasm)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    )

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

      (PROGRAM = extproc)

    )

  (SID_DESC =

    (GLOBAL_DBNAME = oradg11g)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradg11g)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradgphy)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradgphy)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradglg)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradglg)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradgss)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradgss)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = ora11g)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= ora11g)

  )

    (SID_DESC =

    (GLOBAL_DBNAME = oradg11g.lhr.com)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradg11g)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradgphy.lhr.com)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradgphy)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradg11g_DGMGRL.lhr.com)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradg11g)

  )

  (SID_DESC =

    (GLOBAL_DBNAME = oradgphy_DGMGRL.lhr.com)

    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME= oradgphy)

  )

  )

 

LOGGING_LISTENER = OFF

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    )

  )

 

ADR_BASE_LISTENER = /u01/app/grid

 

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON

 

#TRACE_LEVEL_LISTENER = OFF

[oracle@rhel6_lhr admin]$

 

主備庫tnsnames的配置,注意紅色的為新新增的內容:

[oracle@rhel6_lhr admin]$ more tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

tns_oradg11g_DGMGRL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradg11g_DGMGRL.lhr.com)

    )

  )

tns_oradgphy_DGMGRL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradgphy_DGMGRL.lhr.com)

    )

  )

 

tns_oradg11g =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradg11g)

    )

  )

tns_oradgphy =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradgphy)

    )

  )

tns_oradglg =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.130)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oradglg)

    )

  )

 

 

1.4.3  dgmgrl中配置broker並啟用


[oracle@rhel6_lhr ~]$ dgmgrl

DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production

 

Copyright (c) 2000, 2009, Oracle. All rights reserved.

 

歡迎使用 DGMGRL, 要獲取有關資訊請鍵入 "help"。

DGMGRL> help

 

可使用以下命令:

 

add            在中介配置中新增備用資料庫

connect        連線到 Oracle 資料庫例項

convert        將資料庫從一種型別轉換為另一種

create         建立中介配置

disable        禁用配置, 資料庫或快速啟動故障轉移

edit           編輯配置, 資料庫或例項

enable         啟用配置, 資料庫或快速啟動故障轉移

exit           退出程式

failover       將備用資料庫更改為主資料庫

help           顯示命令的說明和語法

quit           退出程式

reinstate      將標記為恢復的資料庫更改為可行的備用資料庫

rem            DGMGRL 會忽略註釋

remove         刪除配置, 資料庫或例項

show           顯示有關配置, 資料庫或例項的資訊

shutdown       關閉當前正在執行的 Oracle 資料庫例項

sql            執行 SQL 語句

start          啟動快速啟動故障轉移觀察程式

startup        啟動 Oracle 資料庫例項

stop           停止快速啟動故障轉移觀察程式

switchover     在主資料庫和備用資料庫之間切換角色

 

使用 "help <command>" 可以檢視各個命令的語法

 

DGMGRL> connect sys/lhr@tns_oradg11g_dgmgrl

已連線。

DGMGRL>

DGMGRL> show configuration

ORA-16532: Data Guard 中介配置不存在

 

配置詳細資料不能由 DGMGRL 確定

DGMGRL> help create 

 

建立中介配置

 

語法:

 

  CREATE CONFIGURATION <configuration name> AS

    PRIMARY DATABASE IS <database name>

    CONNECT IDENTIFIER IS <connect identifier>;

 

DGMGRL> create configuration 'fsf_oradg11g_lhr' as

> primary database is 'oradg11g'

> connect identifier is tns_oradg11g_dgmgrl;

已建立配置 "fsf_oradg11g_lhr", 其中主資料庫為 "oradg11g"

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradg11g - 主資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

DISABLED

 

DGMGRL> add database 'oradgphy' as

> connect identifier is tns_oradgphy_dgmgrl

> maintained as physical;

已新增資料庫 "oradgphy"

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradg11g - 主資料庫

    oradgphy - 物理備用資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

DISABLED

 

DGMGRL>

 

DGMGRL> enable configuration

已啟用。

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradg11g - 主資料庫

    oradgphy - 物理備用資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

SUCCESS

 

DGMGRL>

 

DGMGRL>

DGMGRL> show database verbose oradg11g

 

資料庫 - oradg11g

 

  角色:            PRIMARY

  預期狀態:        TRANSPORT-ON

  例項:

    oradg11g

 

  屬性:

    DGConnectIdentifier             = 'tns_oradg11g_dgmgrl'

    ObserverConnectIdentifier       = ''

    LogXptMode                      = 'ASYNC'

    DelayMins                       = '0'

    Binding                         = 'OPTIONAL'

    MaxFailure                      = '0'

    MaxConnections                  = '1'

    ReopenSecs                      = '300'

    NetTimeout                      = '30'

    RedoCompression                 = 'DISABLE'

    LogShipping                     = 'ON'

    PreferredApplyInstance          = ''

    ApplyInstanceTimeout            = '0'

    ApplyParallel                   = 'AUTO'

    StandbyFileManagement           = 'AUTO'

    ArchiveLagTarget                = '0'

    LogArchiveMaxProcesses          = '4'

    LogArchiveMinSucceedDest        = '1'

    DbFileNameConvert               = 'oradgphy, oradg11g'

    LogFileNameConvert              = 'oradgphy, oradg11g'

    FastStartFailoverTarget         = ''

    InconsistentProperties          = '(monitor)'

    InconsistentLogXptProps         = '(monitor)'

    SendQEntries                    = '(monitor)'

    LogXptStatus                    = '(monitor)'

    RecvQEntries                    = '(monitor)'

    SidName                         = 'oradg11g'

    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6_lhr)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(INSTANCE_NAME=oradg11g)(SERVER=DEDICATED)))'

    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'

    AlternateLocation               = ''

    LogArchiveTrace                 = '0'

    LogArchiveFormat                = '%t_%s_%r.dbf'

    TopWaitEvents                   = '(monitor)'

 

資料庫狀態:

SUCCESS

 

DGMGRL>  show database verbose oradgphy

 

資料庫 - oradgphy

 

  角色:            PHYSICAL STANDBY

  預期狀態:        APPLY-ON

  傳輸滯後:        0 秒

  應用滯後:        0 秒

  實時查詢:        ON

  例項:

    oradgphy

 

  屬性:

    DGConnectIdentifier             = 'tns_oradgphy_dgmgrl'

    ObserverConnectIdentifier       = ''

    LogXptMode                      = 'ASYNC'

    DelayMins                       = '0'

    Binding                         = 'optional'

    MaxFailure                      = '0'

    MaxConnections                  = '1'

    ReopenSecs                      = '300'

    NetTimeout                      = '30'

    RedoCompression                 = 'DISABLE'

    LogShipping                     = 'ON'

    PreferredApplyInstance          = ''

    ApplyInstanceTimeout            = '0'

    ApplyParallel                   = 'AUTO'

    StandbyFileManagement           = 'AUTO'

    ArchiveLagTarget                = '0'

    LogArchiveMaxProcesses          = '4'

    LogArchiveMinSucceedDest        = '1'

    DbFileNameConvert               = 'oradg11g, oradgphy'

    LogFileNameConvert              = 'oradg11g, oradgphy'

    FastStartFailoverTarget         = ''

    InconsistentProperties          = '(monitor)'

    InconsistentLogXptProps         = '(monitor)'

    SendQEntries                    = '(monitor)'

    LogXptStatus                    = '(monitor)'

    RecvQEntries                    = '(monitor)'

    SidName                         = 'oradgphy'

    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6_lhr)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=oradgphy_DGMGRL.lhr.com)(INSTANCE_NAME=oradgphy)(SERVER=DEDICATED)))'

    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'

    AlternateLocation               = ''

    LogArchiveTrace                 = '0'

    LogArchiveFormat                = '%t_%s_%r.dbf'

    TopWaitEvents                   = '(monitor)'

 

資料庫狀態:

SUCCESS

 

DGMGRL>

DGMGRL>

 

 

主庫告警日誌:

 

Mon Sep 28 15:20:28 2015

NSV1 started with pid=30, OS id=25660

Mon Sep 28 15:20:54 2015

ALTER SYSTEM SET log_archive_config='dg_config=(oradg11g,oradgphy)' SCOPE=BOTH;

Mon Sep 28 15:20:57 2015

ALTER SYSTEM SET log_archive_dest_2='service="tns_oradgphy_dgmgrl"','LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="oradgphy" net_timeout=30','valid_for=(all_logfiles,primary_role)' SCOPE=BOTH;

ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='oradg11g';

ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='oradg11g';

ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH SID='*';

ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_max_processes=4 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH SID='*';

ALTER SYSTEM SET db_file_name_convert='oradgphy','oradg11g' SCOPE=SPFILE;

ALTER SYSTEM SET log_file_name_convert='oradgphy','oradg11g' SCOPE=SPFILE;

ALTER SYSTEM ARCHIVE LOG

Mon Sep 28 15:20:57 2015

NSA2 started with pid=34, OS id=25706

 

 

備庫告警日誌:

 

NSV0 started with pid=21, OS id=25696

Mon Sep 28 15:20:57 2015

ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='oradgphy';

ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='oradgphy';

ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH SID='*';

ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_max_processes=4 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH SID='*';

ALTER SYSTEM SET db_file_name_convert='oradg11g','oradgphy' SCOPE=SPFILE;

ALTER SYSTEM SET log_file_name_convert='oradg11g','oradgphy' SCOPE=SPFILE;

ALTER SYSTEM SET fal_server='tns_oradg11g_dgmgrl' SCOPE=BOTH;

Mon Sep 28 15:21:01 2015

Primary database is in MAXIMUM PERFORMANCE mode

RFS[4]: Assigned to RFS process 25708

RFS[4]: Selected log 4 for thread 1 sequence 145 dbid 1403587593 branch 886695024

 

 

1.4.4  測試Data Guard Broker 功能

在配置broker完成後,我們就可以利用broker完成switchover了。在DGMGRL中只需要簡單的一個命令。
switchover to standby-database
(standby-database: 此引數是db_unique_name,大小寫敏感。如果名稱是大寫的,需要用引號。表示切換standby-database為主機,原主機轉換為備機狀態)

 

 

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradg11g - 主資料庫

    oradgphy - 物理備用資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

SUCCESS

 

DGMGRL> switchover to oradgphy;

立即執行切換, 請稍候...

新的主資料庫 "oradgphy" 正在開啟...

操作要求關閉例項 "oradg11g" (在資料庫 "oradg11g" 上)

正在關閉例項 "oradg11g"...

ORACLE 例程已經關閉。

操作要求啟動例項 "oradg11g" (在資料庫 "oradg11g" 上)

正在啟動例項 "oradg11g"...

ORACLE 例程已經啟動。

資料庫裝載完畢。

資料庫已經開啟。

切換成功, 新的主資料庫為 "oradgphy"

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradgphy - 主資料庫

    oradg11g - 物理備用資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

SUCCESS

 

DGMGRL>

 

 

再切換一次,回到最初狀態:

DGMGRL> switchover to oradg11g;

立即執行切換, 請稍候...

新的主資料庫 "oradg11g" 正在開啟...

操作要求關閉例項 "oradgphy" (在資料庫 "oradgphy" 上)

正在關閉例項 "oradgphy"...

ORACLE 例程已經關閉。

操作要求啟動例項 "oradgphy" (在資料庫 "oradgphy" 上)

正在啟動例項 "oradgphy"...

ORACLE 例程已經啟動。

資料庫裝載完畢。

資料庫已經開啟。

切換成功, 新的主資料庫為 "oradg11g"

DGMGRL> show configuration

 

配置 - fsf_oradg11g_lhr

 

  保護模式:        MaxPerformance

  資料庫:

    oradg11g - 主資料庫

    oradgphy - 物理備用資料庫

 

快速啟動故障轉移: DISABLED

 

配置狀態:

SUCCESS

 

DGMGRL>

 

第一次切換的時候告警日誌情況:

主庫告警日誌:

 

 

 

Mon Sep 28 15:26:24 2015

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY [Process Id: 23943] (oradg11g)

Mon Sep 28 15:26:24 2015

Thread 1 advanced to log sequence 146 (LGWR switch)

  Current log# 2 seq# 146 mem# 0: /u01/app/oracle/oradata/oradg11g/redo02.log

Mon Sep 28 15:26:24 2015

Stopping background process CJQ0

Stopping background process QMNC

Stopping Job queue slave processes, flags = 27

Mon Sep 28 15:26:27 2015

Archived Log entry 501 added for thread 1 sequence 145 ID 0x5495956b dest 1:

Waiting for Job queue slaves to complete

Job queue slave processes stopped

All dispatchers and shared servers shutdown

CLOSE: killing server sessions.

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

Active process 25846 user 'oracle' program 'oracle@rhel6_lhr (W000)'

CLOSE: all sessions shutdown successfully.

Waiting for all non-current ORLs to be archived...

All non-current ORLs have been archived.

Waiting for all FAL entries to be archived...

All FAL entries have been archived.

Waiting for dest_id 2 to become synchronized...

Active, synchronized Physical Standby switchover target has been identified

Switchover End-Of-Redo Log thread 1 sequence 146 has been fixed

Switchover: Primary highest seen SCN set to 0x0.0x262c94

ARCH: Noswitch archival of thread 1, sequence 146

ARCH: End-Of-Redo Branch archival of thread 1 sequence 146

ARCH: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2

ARCH: Standby redo logfile selected for thread 1 sequence 146 for destination LOG_ARCHIVE_DEST_2

Archived Log entry 502 added for thread 1 sequence 146 ID 0x5495956b dest 1:

ARCH: Archiving is disabled due to current logfile archival

Primary will check for some target standby to have received alls redo

Final check for a synchronized target standby. Check will be made once.

Archive destination LOG_ARCHIVE_DEST_3 invalidated

DB_UNIQUE_NAME oradglg is not in the Data Guard configuration

Archive destination LOG_ARCHIVE_DEST_4 invalidated

DB_UNIQUE_NAME oradgss is not in the Data Guard configuration

LOG_ARCHIVE_DEST_2 is a potential Physical Standby switchover target

Active, synchronized target has been identified

Target has also received all redo

Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/oradg11g/oradg11g/trace/oradg11g_rsm0_23943.trc

Clearing standby activation ID 1419089259 (0x5495956b)

The primary database controlfile was created using the

'MAXLOGFILES 16' clause.

There is space for up to 13 standby redo logfiles

Use the following SQL commands on the standby database to create

standby redo logfiles that match the primary database:

ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;

ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;

Archivelog for thread 1 sequence 146 required for standby recovery

Switchover: Primary controlfile converted to standby controlfile succesfully.

Switchover: Complete - Database shutdown required

Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN

Mon Sep 28 15:26:37 2015

Performing implicit shutdown abort due to switchover to physical standby

Shutting down instance (abort)

License high water mark = 8

USER (ospid: 26018): terminating the instance

Instance terminated by USER, pid = 26018

Mon Sep 28 15:26:38 2015

Instance shutdown complete

ORA-1092 : opitsk aborting process

Mon Sep 28 15:26:38 2015

Starting ORACLE instance (normal)

LICENSE_MAX_SESSION = 0

LICENSE_SESSIONS_WARNING = 0

Picked latch-free SCN scheme 3

Archive destination LOG_ARCHIVE_DEST_3 invalidated

DB_UNIQUE_NAME oradglg is not in the Data Guard configuration

Archive destination LOG_ARCHIVE_DEST_4 invalidated

DB_UNIQUE_NAME oradgss is not in the Data Guard configuration

Autotune of undo retention is turned on.

IMODE=BR

ILAT =27

LICENSE_MAX_USERS = 0

SYS auditing is disabled

Starting up:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options.

ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1

System name:    Linux

Node name:      rhel6_lhr

Release:        2.6.32-504.16.2.el6.x86_64

Version:        #1 SMP Tue Apr 21 08:37:59 PDT 2015

Machine:        x86_64

VM name:        VMWare Version: 6

Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileoradg11g.ora

System parameters with non-default values:

  processes                = 150

  memory_target            = 300M

  memory_max_target        = 400M

  control_files            = "/u01/app/oracle/oradata/oradg11g/control01.ctl"

  control_files            = "/u01/app/oracle/flash_recovery_area/oradg11g/control02.ctl"

  db_file_name_convert     = "oradgphy"

  db_file_name_convert     = "oradg11g"

  log_file_name_convert    = "oradgphy"

  log_file_name_convert    = "oradg11g"

  db_block_size            = 8192

  compatible               = "11.2.0.0.0"

  log_archive_dest_1       = "LOCATION=USE_DB_RECOVERY_FILE_DEST db_unique_name=oradg11g valid_for=(ALL_LOGFILES,ALL_ROLES)"

  log_archive_dest_2       = "service="tns_oradgphy_dgmgrl""

  log_archive_dest_2       = "LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="oradgphy" net_timeout=30"

  log_archive_dest_2       = "valid_for=(all_logfiles,primary_role)"

  log_archive_dest_3       = "SERVICE=tns_oradglg LGWR ASYNC db_unique_name=oradglg valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE)"

  log_archive_dest_4       = "SERVICE=tns_oradgss LGWR ASYNC db_unique_name=oradgss valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE)"

  log_archive_dest_state_1 = "ENABLE"

  log_archive_dest_state_2 = "ENABLE"

  log_archive_dest_state_3 = "defer"

  log_archive_dest_state_4 = "defer"

  log_archive_min_succeed_dest= 1

  fal_client               = "oradg11g"

  fal_server               = "tns_oradgphy_dgmgrl"

  log_archive_trace        = 0

  log_archive_config       = "dg_config=(oradg11g,oradgphy)"

  log_archive_format       = "%t_%s_%r.dbf"

  log_archive_max_processes= 4

  archive_lag_target       = 0

  db_recovery_file_dest    = "/u01/app/oracle/flash_recovery_area"

  db_recovery_file_dest_size= 4122M

  standby_file_management  = "AUTO"

  undo_tablespace          = "UNDOTBS1"

  remote_login_passwordfile= "EXCLUSIVE"

  db_domain                = "lhr.com"

  global_names             = TRUE

  dispatchers              = "(PROTOCOL=TCP) (SERVICE=oradg11gXDB)"

  audit_file_dest          = "/u01/app/oracle/admin/oradg11g/adump"

  audit_trail              = "DB"

  db_name                  = "oradg11g"

  db_unique_name           = "oradg11g"

  open_cursors             = 300

  dg_broker_start          = TRUE

  diagnostic_dest          = "/u01/app/oracle"

Mon Sep 28 15:26:38 2015

PMON started with pid=2, OS id=26102

Mon Sep 28 15:26:38 2015

PSP0 started with pid=3, OS id=26104

Mon Sep 28 15:26:39 2015

Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST

destination database instance is 'started' not 'mounted'

Mon Sep 28 15:26:39 2015

VKTM started with pid=4, OS id=26112 at elevated priority

VKTM running at (1)millisec precision with DBRM quantum (100)ms

Mon Sep 28 15:26:39 2015

GEN0 started with pid=5, OS id=26116

Mon Sep 28 15:26:39 2015

DIAG started with pid=6, OS id=26118

Mon Sep 28 15:26:40 2015

DBRM started with pid=7, OS id=26120

Mon Sep 28 15:26:40 2015

DIA0 started with pid=8, OS id=26122

Mon Sep 28 15:26:40 2015

MMAN started with pid=9, OS id=26124

Mon Sep 28 15:26:40 2015

DBW0 started with pid=10, OS id=26126

Mon Sep 28 15:26:40 2015

LGWR started with pid=11, OS id=26128

Mon Sep 28 15:26:40 2015

CKPT started with pid=12, OS id=26130

Mon Sep 28 15:26:40 2015

SMON started with pid=13, OS id=26132

Mon Sep 28 15:26:40 2015

RECO started with pid=14, OS id=26134

Mon Sep 28 15:26:40 2015

MMON started with pid=15, OS id=26136

Mon Sep 28 15:26:40 2015

MMNL started with pid=16, OS id=26138

starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...

starting up 1 shared server(s) ...

ORACLE_BASE from environment = /u01/app/grid

Mon Sep 28 15:26:40 2015

DMON started with pid=19, OS id=26145

Mon Sep 28 15:26:40 2015

alter database  mount

ARCH: STARTING ARCH PROCESSES

Mon Sep 28 15:26:44 2015

ARC0 started with pid=22, OS id=26157

ARC0: Archival started

ARCH: STARTING ARCH PROCESSES COMPLETE

ARC0: STARTING ARCH PROCESSES

Successful mount of redo thread 1, with mount id 1419115888

Allocated 3981120 bytes in shared pool for flashback generation buffer

Starting background process RVWR

Mon Sep 28 15:26:45 2015

ARC1 started with pid=23, OS id=26159

Mon Sep 28 15:26:45 2015

RVWR started with pid=24, OS id=26161

Mon Sep 28 15:26:45 2015

ARC2 started with pid=25, OS id=26163

Mon Sep 28 15:26:45 2015

ARC3 started with pid=26, OS id=26165

ARC1: Archival started

ARC2: Archival started

ARC1: Becoming the 'no FAL' ARCH

ARC1: Becoming the 'no SRL' ARCH

ARC2: Becoming the heartbeat ARCH

Physical Standby Database mounted.

Lost write protection disabled

ARC2: Becoming the active heartbeat ARCH

Completed: alter database  mount

alter database  open

Data Guard Broker initializing...

Data Guard Broker initialization complete

AUDIT_TRAIL initialization parameter is changed to OS, as DB is NOT compatible for database opened with read-only access

Beginning standby crash recovery.

Serial Media Recovery started

Managed Standby Recovery starting Real Time Apply

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_145_c0ktx3cj_.arc

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_146_c0ktx6mn_.arc

Identified End-Of-Redo (switchover) for thread 1 sequence 146 at SCN 0x0.262c94

Resetting standby activation ID 0 (0x0)

Incomplete Recovery applied until change 2501780 time 09/28/2015 15:26:30

Completed standby crash recovery.

SMON: enabling cache recovery

Mon Sep 28 15:26:46 2015

RFS[1]: Assigned to RFS process 26177

RFS[1]: Opened log for thread 1 sequence 148 dbid 1403587593 branch 886695024

Archived Log entry 504 added for thread 1 sequence 148 rlc 886695024 ID 0x54960fb7 dest 2:

Dictionary check beginning

Mon Sep 28 15:26:46 2015

RFS[2]: Assigned to RFS process 26179

RFS[2]: Opened log for thread 1 sequence 147 dbid 1403587593 branch 886695024

Archived Log entry 505 added for thread 1 sequence 147 rlc 886695024 ID 0x54960fb7 dest 2:

Dictionary check complete

Database Characterset is ZHS16GBK

No Resource Manager plan active

replication_dependency_tracking turned off (no async multimaster replication found)

Physical standby database opened for read only access.

RFS[2]: Selected log 4 for thread 1 sequence 149 dbid 1403587593 branch 886695024

Completed: alter database  open

Archived Log entry 506 added for thread 1 sequence 149 ID 0x54960fb7 dest 1:

Mon Sep 28 15:26:46 2015

db_recovery_file_dest_size of 4122 MB is 6.96% used. This is a

user-specified limit on the amount of space that will be used by this

database for recovery-related files, and does not reflect the amount of

space available in the underlying filesystem or ASM diskgroup.

Mon Sep 28 15:26:46 2015

Primary database is in MAXIMUM PERFORMANCE mode

RFS[3]: Assigned to RFS process 26185

RFS[3]: Selected log 4 for thread 1 sequence 150 dbid 1403587593 branch 886695024

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

Starting Data Guard Broker (DMON)

Mon Sep 28 15:26:48 2015

INSV started with pid=30, OS id=26191

Mon Sep 28 15:26:51 2015

NSV1 started with pid=31, OS id=26199

Mon Sep 28 15:26:55 2015

RSM0 started with pid=32, OS id=26208

ALTER SYSTEM SET log_archive_dest_state_1='ENABLE' SCOPE=BOTH;

ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='oradg11g';

ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='oradg11g';

ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH SID='*';

ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_max_processes=4 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH SID='*';

ALTER SYSTEM SET db_file_name_convert='oradgphy','oradg11g' SCOPE=SPFILE;

ALTER SYSTEM SET log_file_name_convert='oradgphy','oradg11g' SCOPE=SPFILE;

ALTER SYSTEM SET fal_server='tns_oradgphy_dgmgrl' SCOPE=BOTH;

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE  THROUGH ALL SWITCHOVER DISCONNECT  USING CURRENT LOGFILE

Attempt to start background Managed Standby Recovery process (oradg11g)

Mon Sep 28 15:26:59 2015

MRP0 started with pid=33, OS id=26214

MRP0: Background Managed Standby Recovery process started (oradg11g)

started logmerger process

Mon Sep 28 15:27:04 2015

Managed Standby Recovery starting Real Time Apply

Parallel Media Recovery started with 2 slaves

Waiting for all non-current ORLs to be archived...

All non-current ORLs have been archived.

Clearing online redo logfile 1 /u01/app/oracle/oradata/oradg11g/redo01.log

Clearing online log 1 of thread 1 sequence number 150

Clearing online redo logfile 1 complete

Clearing online redo logfile 2 /u01/app/oracle/oradata/oradg11g/redo02.log

Clearing online log 2 of thread 1 sequence number 146

Mon Sep 28 15:27:05 2015

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE  THROUGH ALL SWITCHOVER DISCONNECT  USING CURRENT LOGFILE

Clearing online redo logfile 2 complete

Clearing online redo logfile 3 /u01/app/oracle/oradata/oradg11g/redo03.log

Clearing online log 3 of thread 1 sequence number 149

Clearing online redo logfile 3 complete

Mon Sep 28 15:27:07 2015

RFS[3]: Selected log 5 for thread 1 sequence 151 dbid 1403587593 branch 886695024

Mon Sep 28 15:27:07 2015

Archived Log entry 507 added for thread 1 sequence 150 ID 0x54960fb7 dest 1:

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_147_c0ktxp86_.arc

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_148_c0ktxp70_.arc

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_149_c0ktxpgt_.arc

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADG11G/archivelog/2015_09_28/o1_mf_1_150_c0ktycgh_.arc

Media Recovery Waiting for thread 1 sequence 151 (in transit)

Recovery of Online Redo Log: Thread 1 Group 5 Seq 151 Reading mem 0

  Mem# 0: /u01/app/oracle/oradata/oradg11g/standby_redo05.log

 

 

 

 

 

備庫告警日誌:

 

 

 

Mon Sep 28 15:26:24 2015

Archived Log entry 128 added for thread 1 sequence 145 ID 0x5495956b dest 1:

Mon Sep 28 15:26:24 2015

Media Recovery Waiting for thread 1 sequence 146

Mon Sep 28 15:26:30 2015

RFS[6]: Assigned to RFS process 25998

RFS[6]: Selected log 4 for thread 1 sequence 146 dbid 1403587593 branch 886695024

Mon Sep 28 15:26:30 2015

Archived Log entry 129 added for thread 1 sequence 146 ID 0x5495956b dest 1:

Mon Sep 28 15:26:30 2015

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

MRP0: Background Media Recovery cancelled with status 16037

Errors in file /u01/app/oracle/diag/rdbms/oradgphy/oradgphy/trace/oradgphy_pr00_24252.trc:

ORA-16037: user requested cancel of managed recovery operation

Managed Standby Recovery not using Real Time Apply

Recovery interrupted!

Mon Sep 28 15:26:31 2015

MRP0: Background Media Recovery process shutdown (oradgphy)

Managed Standby Recovery Canceled (oradgphy)

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

Database not available for switchover

  End-Of-REDO archived log file has not been recovered

  Incomplete recovery SCN:0:2481770 archive SCN:0:2501780

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH LAST SWITCHOVER NODELAY

Media Recovery Start: Managed Standby Recovery (oradgphy)

started logmerger process

Mon Sep 28 15:26:32 2015

Managed Standby Recovery not using Real Time Apply

Parallel Media Recovery started with 2 slaves

Media Recovery Log /u01/app/oracle/flash_recovery_area/ORADGPHY/archivelog/2015_09_28/o1_mf_1_146_c0ktx6n6_.arc

Identified End-Of-Redo (switchover) for thread 1 sequence 146 at SCN 0x0.262c94

Resetting standby activation ID 1419089259 (0x5495956b)

Media Recovery End-Of-Redo indicator encountered

Media Recovery Applied through change 2501780

Media Recovery Complete: End-Of-REDO (oradgphy)

Attempt to set limbo arscn 0:2501780 irscn 0:2501780

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH LAST SWITCHOVER NODELAY

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN

ALTER DATABASE SWITCHOVER TO PRIMARY (oradgphy)

Maximum wait for role transition is 15 minutes.

krsv_proc_kill: Killing 2 processes (all RFS)

All dispatchers and shared servers shutdown

CLOSE: killing server sessions.

CLOSE: all sessions shutdown successfully.

Mon Sep 28 15:26:34 2015

SMON: disabling cache recovery

Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/oradgphy/oradgphy/trace/oradgphy_rsm0_24244.trc

SwitchOver after complete recovery through change 2501780

Online log /u01/app/oracle/oradata/oradgphy/redo01.log: Thread 1 Group 1 was previously cleared

Online log /u01/app/oracle/oradata/oradgphy/redo02.log: Thread 1 Group 2 was previously cleared

Online log /u01/app/oracle/oradata/oradgphy/redo03.log: Thread 1 Group 3 was previously cleared

Standby became primary SCN: 2501778

AUDIT_TRAIL initialization parameter is changed back to its original value as specified in the parameter file.

Switchover: Complete - Database mounted as primary

Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN

Mon Sep 28 15:26:36 2015

idle dispatcher 'D000' terminated, pid = (17, 1)

ALTER DATABASE OPEN

Data Guard Broker initializing...

Mon Sep 28 15:26:37 2015

Assigning activation ID 1419120567 (0x54960fb7)

Mon Sep 28 15:26:37 2015

ARC3: Becoming the 'no SRL' ARCH

Thread 1 advanced to log sequence 148 (thread open)

ARC0: Becoming the 'no SRL' ARCH

Thread 1 opened at log sequence 148

  Current log# 2 seq# 148 mem# 0: /u01/app/oracle/oradata/oradgphy/redo02.log

Successful open of redo thread 1

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

SMON: enabling cache recovery

Archived Log entry 130 added for thread 1 sequence 147 ID 0x54960fb7 dest 1:

ARC3: Becoming the 'no SRL' ARCH

Mon Sep 28 15:26:37 2015

NSA2 started with pid=17, OS id=26022

Mon Sep 28 15:26:37 2015

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

[24244] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:21508174 end:21508224 diff:50 (0 seconds)

Dictionary check beginning

TNS-12537: TNS:connection closed

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

    nt main err code: 507

        ns secondary err code: 12560

 

    nt main err code: 507

TNS-00507: Connection closed

        nt secondary err code: 0

 

    nt OS err code: 0

TNS-00507: Connection closed

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

    nt main err code: 507

   

TNS-00507: Connection closed

    nt secondary err code: 0

    nt OS err code: 0

Dictionary check complete

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

SMON: enabling tx recovery

Database Characterset is ZHS16GBK

Starting background process SMCO

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

    nt main err code: 507

   

TNS-00507: Connection closed

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

    nt main err code: 507

   

TNS-00507: Connection closed

    nt secondary err code: 0

    nt OS err code: 0

Error 12537 received logging on to the standby

FAL[server, ARC3]: Error 12537 creating remote archivelog file 'tns_oradg11g_dgmgrl'

FAL[server, ARC3]: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance oradgphy - Archival Error. Archiver continuing.

Mon Sep 28 15:26:37 2015

SMCO started with pid=26, OS id=26033

 

 

***********************************************************************

 

Fatal NI connect error 12537, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGMGRL.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:37

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12537

   

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

    nt main err code: 507

   

TNS-00507: Connection closed

    nt secondary err code: 0

    nt OS err code: 0

Error 12537 received logging on to the standby

PING[ARC2]: Heartbeat failed to connect to standby 'tns_oradg11g_dgmgrl'. Error is 12537.

No Resource Manager plan active

Starting background process QMNC

Mon Sep 28 15:26:37 2015

QMNC started with pid=27, OS id=26036

LOGSTDBY: Validating controlfile with logical metadata

LOGSTDBY: Validation complete

Completed: ALTER DATABASE OPEN

ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='oradgphy';

ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='oradgphy';

Starting background process CJQ0

Mon Sep 28 15:26:37 2015

CJQ0 started with pid=32, OS id=26050

ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH SID='*';

ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_max_processes=4 SCOPE=BOTH SID='*';

ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH SID='*';

ALTER SYSTEM SET db_file_name_convert='oradg11g','oradgphy' SCOPE=SPFILE;

ALTER SYSTEM SET log_file_name_convert='oradg11g','oradgphy' SCOPE=SPFILE;

ARC2: STARTING ARCH PROCESSES

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;

ALTER SYSTEM ARCHIVE LOG

Mon Sep 28 15:26:38 2015

ARC4 started with pid=28, OS id=26052

ARC4: Archival started

ARC2: STARTING ARCH PROCESSES COMPLETE

PING[ARC2]: Heartbeat failed to connect to standby 'tns_oradg11g_dgmgrl'. Error is 16058.

Thread 1 advanced to log sequence 149 (LGWR switch)

  Current log# 3 seq# 149 mem# 0: /u01/app/oracle/oradata/oradgphy/redo03.log

Archived Log entry 131 added for thread 1 sequence 148 ID 0x54960fb7 dest 1:

Mon Sep 28 15:26:41 2015

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(INSTANCE_NAME=oradg11g)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:41

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(INSTANCE_NAME=oradg11g)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:41

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(INSTANCE_NAME=oradg11g)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:41

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:42

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:42

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

 

 

***********************************************************************

 

Fatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.59.130)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oradg11g_DGB.lhr.com)(CID=(PROGRAM=oracle)(HOST=rhel6_lhr)(USER=grid))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.3.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production

  Time: 28-SEP-2015 15:26:42

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12564

   

TNS-12564: TNS:connection refused

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

ARC3: Becoming the 'no SRL' ARCH

Mon Sep 28 15:26:44 2015

ARC0: Becoming the 'no SRL' ARCH

Shutting down archive processes

ARCH shutting down

ARC4: Archival stopped

Mon Sep 28 15:26:46 2015

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';

ARC0: Becoming the 'no SRL' ARCH

ARC3: Becoming the 'no SRL' ARCH

Thread 1 advanced to log sequence 150 (LGWR switch)

  Current log# 1 seq# 150 mem# 0: /u01/app/oracle/oradata/oradgphy/redo01.log

ARC3: Becoming the 'no SRL' ARCH

Archived Log entry 134 added for thread 1 sequence 149 ID 0x54960fb7 dest 1:

ARC0: Becoming the 'no SRL' ARCH

ARC0: Standby redo logfile selected for thread 1 sequence 149 for destination LOG_ARCHIVE_DEST_2

******************************************************************

LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2

******************************************************************

LNS: Standby redo logfile selected for thread 1 sequence 150 for destination LOG_ARCHIVE_DEST_2

Mon Sep 28 15:27:05 2015

ALTER SYSTEM ARCHIVE LOG

Mon Sep 28 15:27:05 2015

Thread 1 cannot allocate new log, sequence 151

Checkpoint not complete

  Current log# 1 seq# 150 mem# 0: /u01/app/oracle/oradata/oradgphy/redo01.log

Mon Sep 28 15:27:07 2015

ARC3: Becoming the 'no SRL' ARCH

Thread 1 advanced to log sequence 151 (LGWR switch)

  Current log# 2 seq# 151 mem# 0: /u01/app/oracle/oradata/oradgphy/redo02.log

Archived Log entry 137 added for thread 1 sequence 150 ID 0x54960fb7 dest 1:

Mon Sep 28 15:27:07 2015

LNS: Standby redo logfile selected for thread 1 sequence 151 for destination LOG_ARCHIVE_DEST_2

 

 

 

 

 

至此,Data Guard Broker配置結束。

 

 

 

 

 

1.5  總結

 

本篇為第一節,請檢視第二節: Fast-Start Failover 的配置

 





About Me

.............................................................................................................................................

● 本文作者:小麥苗,只專注於資料庫的技術,更注重技術的運用

● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-1811839/

● 本文部落格園地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、個人簡介及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA寶典今日頭條號地址:

.............................................................................................................................................

● QQ群號:230161599(滿)、618766405

● 微信群:可加我微信,我拉大家進群,非誠勿擾

● 聯絡我請加QQ好友646634621,註明新增緣由

● 於 2015-09-28 09:00~ 2015-09-29 23:00 在魔都完成

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

.............................................................................................................................................

小麥苗的微店

小麥苗出版的資料庫類叢書http://blog.itpub.net/26736162/viewspace-2142121/

.............................................................................................................................................

使用微信客戶端掃描下面的二維碼來關注小麥苗的微信公眾號(xiaomaimiaolhr)及QQ群(DBA寶典),學習最實用的資料庫技術。

   小麥苗的微信公眾號      小麥苗的DBA寶典QQ群1     小麥苗的DBA寶典QQ群2        小麥苗的微店

.............................................................................................................................................

【DATAGUARD】物理dg配置客戶端無縫切換 (八.1)--Data Guard Broker 的配置
DBA筆試面試講解群1
DBA筆試面試講解群2
歡迎與我聯絡



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28628435/viewspace-1984348/,如需轉載,請註明出處,否則將追究法律責任。

相關文章