成都网站建设设计

将想法与焦点和您一起共享

Oracle物理DG自动切换中DataguardBroker如何配置

这篇文章主要介绍了Oracle物理DG自动切换中Dataguard Broker如何配置,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

丹棱网站制作公司哪家好,找成都创新互联!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设公司等网站项目制作,到程序开发,运营维护。成都创新互联2013年至今到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联

 1.1 导读

① Data Guard Broker 的配置

③ Oracle DataGuard 之客户端TAF 配置

⑤ 物理dg管理和维护的一些sql

 

  List of Archived Logs in backup set 11

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

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

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


 3.1 实验目标

3.2 前提条件

1. 设置primary和standby启动时参数文件为spfile 

3. 设置listener 
在Data Guard Broker环境中,需要在listener.ora静态添加一个service_name为db_unique_name_DGMGRL.db_domain的注册。这个service_name会在DGMGRL重启数据库的时候用到。通过DGMGRL重启数据库时DMON进程会先将数据库关闭,然后DGMGRL用此service_name通过listener连接到数据库,发出启动命令。

主库操作:

连接到:

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_unique_name                       string      oradg11g

instance_name                        string      oradg11g

log_file_name_convert                string      oradglg, oradg11g

service_names                        string      oradg11g

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

                                                 /dbhome_1/dbs/spfileoradg11g.o

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

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

10:20:43 SQL> set line 9999

10:20:44 SQL> col FS_FAILOVER_OBSERVER_HOST format a20

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

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

10:20:44   3         d.FORCE_LOGGING,

10:20:44   5         d.FS_FAILOVER_STATUS,

10:20:44   7         d.FS_FAILOVER_THRESHOLD,

10:20:44   9         d.FS_FAILOVER_OBSERVER_HOST

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

10:20:45 SQL>

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

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

                                                 /dbhome_1/dbs/dr1oradg11g.dat

                                                 /dbhome_1/dbs/dr2oradg11g.dat

10:21:39 SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE

dg_broker_start                      boolean     FALSE

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

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

10:22:02 SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE

dg_broker_start                      boolean     TRUE

10:23:58 SQL> col name format a10

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   2         d.DB_UNIQUE_NAME,

10:23:58   4         d.FLASHBACK_ON,

10:23:58   6         d.FS_FAILOVER_CURRENT_TARGET,

10:23:58   8         d.FS_FAILOVER_OBSERVER_PRESENT,

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

Mon Sep 28 10:21:56 2015

Mon Sep 28 10:21:56 2015

Starting Data Guard Broker (DMON)

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

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

db_name                              string      oradg11g

global_names                         boolean     FALSE

lock_name_space                      string

processor_group_name                 string

10:25:27 SQL>  show parameter spfile

NAME                                 TYPE        VALUE

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

                                                 ra

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

                                                 /dbhome_1/dbs/dr1oradgphy.dat

                                                 /dbhome_1/dbs/dr2oradgphy.dat

10:25:51 SQL> col name format a10

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

       d.DB_UNIQUE_NAME,

       d.FLASHBACK_ON,

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

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   8         d.FS_FAILOVER_OBSERVER_PRESENT,

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

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

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:46 SQL>  ! ps -ef|grep dmon

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

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

10:26:50 SQL>

3.3 配置db_domain 和  listener 及 tnsnames

14:05:05 SQL>  show parameter db_domain 

NAME                                 TYPE        VALUE

db_domain                            string

主备库listener的配置,注意红色的为新添加的内容:

LISTENER 的 STATUS

别名                      LISTENER

启动日期                  28-9月 -2015 14:32:08

跟踪级别                  off

SNMP                      OFF

监听端点概要...

服务摘要..

  实例 "+ASM", 状态 READY, 包含此服务的 1 个处理程序...

  实例 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "ora11g", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "oradg11g", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "oradg11g", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

服务 "oradg11gXDB.lhr.com" 包含 2 个实例。

  实例 "oradgphy", 状态 READY, 包含此服务的 1 个处理程序...

  实例 "oradg11g", 状态 READY, 包含此服务的 1 个处理程序...

  实例 "oradg11g", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "oradglg", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "oradgphy", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

  实例 "oradgphy", 状态 UNKNOWN, 包含此服务的 1 个处理程序...

服务 "oradgphy_DGB.lhr.com" 包含 1 个实例。

服务 "oradgphy_DGMGRL.lhr.com" 包含 1 个实例。

服务 "oradgss" 包含 1 个实例。

服务 "orclasm.lhr.com" 包含 1 个实例。

命令执行成功

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

  (SID_LIST =

      (GLOBAL_DBNAME = orclasm.lhr.com)

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

    (SID_DESC =

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

    )

    (GLOBAL_DBNAME = oradg11g)

    (SID_NAME= oradg11g)

  (SID_DESC =

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

  )

    (GLOBAL_DBNAME = oradglg)

    (SID_NAME= oradglg)

  (SID_DESC =

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

  )

    (GLOBAL_DBNAME = ora11g)

    (SID_NAME= ora11g)

    (SID_DESC =

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

  )

    (GLOBAL_DBNAME = oradgphy.lhr.com)

    (SID_NAME= oradgphy)

  (SID_DESC =

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

  )

    (GLOBAL_DBNAME = oradgphy_DGMGRL.lhr.com)

    (SID_NAME= oradgphy)

  )

LOGGING_LISTENER = OFF

LISTENER =

    (DESCRIPTION =

    )

[oracle@rhel6_lhr admin]$

主备库tnsnames的配置,注意红色的为新添加的内容:

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

  (DESCRIPTION =

    (CONNECT_DATA =

      (SERVICE_NAME = oradg11g_DGMGRL.lhr.com)

  )

  (DESCRIPTION =

    (CONNECT_DATA =

      (SERVICE_NAME = oradgphy_DGMGRL.lhr.com)

  )

tns_oradg11g =

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

      (SERVER = DEDICATED)

    )

tns_oradgphy =

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

      (SERVER = DEDICATED)

    )

tns_oradglg =

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

      (SERVER = DEDICATED)

    )

DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production

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

欢迎使用 DGMGRL, 要获取有关信息请键入 "help"。

connect        连接到 Oracle 数据库实例

create         创建中介配置

edit           编辑配置, 数据库或实例

exit           退出程序

help           显示命令的说明和语法

reinstate      将标记为恢复的数据库更改为可行的备用数据库

remove         删除配置, 数据库或实例

shutdown       关闭当前正在运行的 Oracle 数据库实例

start          启动快速启动故障转移观察程序

stop           停止快速启动故障转移观察程序

已连接。

DGMGRL> show configuration

DGMGRL> help create 

创建中介配置

语法:

  CREATE CONFIGURATION AS

    CONNECT IDENTIFIER IS ;

DGMGRL> create configuration 'fsf_oradg11g_lhr' as

> connect identifier is tns_oradg11g_dgmgrl;

DGMGRL> show configuration

配置 - fsf_oradg11g_lhr

  保护模式:        MaxPerformance

    oradg11g - 主数据库

快速启动故障转移: DISABLED

配置状态:

> connect identifier is tns_oradgphy_dgmgrl

已添加数据库 "oradgphy"

  数据库:

    oradgphy - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:

已启用。

  数据库:

    oradgphy - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:

DGMGRL> show database verbose oradg11g

数据库 - oradg11g

  角色:            PRIMARY

  实例:

    DGConnectIdentifier             = 'tns_oradg11g_dgmgrl'

    LogXptMode                      = 'ASYNC'

    Binding                         = 'OPTIONAL'

    MaxConnections                  = '1'

    NetTimeout                      = '30'

    LogShipping                     = 'ON'

    ApplyInstanceTimeout            = '0'

    StandbyFileManagement           = 'AUTO'

    LogArchiveMaxProcesses          = '4'

    DbFileNameConvert               = 'oradgphy, oradg11g'

    FastStartFailoverTarget         = ''

    InconsistentLogXptProps         = '(monitor)'

    LogXptStatus                    = '(monitor)'

    SidName                         = 'oradg11g'

    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'

    LogArchiveTrace                 = '0'

    TopWaitEvents                   = '(monitor)'

数据库状态:

  预期状态:        APPLY-ON

  应用滞后:        0 秒

  实例:

    DGConnectIdentifier             = 'tns_oradgphy_dgmgrl'

    LogXptMode                      = 'ASYNC'

    Binding                         = 'optional'

    MaxConnections                  = '1'

    NetTimeout                      = '30'

    LogShipping                     = 'ON'

    ApplyInstanceTimeout            = '0'

    StandbyFileManagement           = 'AUTO'

    LogArchiveMaxProcesses          = '4'

    DbFileNameConvert               = 'oradg11g, oradgphy'

    FastStartFailoverTarget         = ''

    InconsistentLogXptProps         = '(monitor)'

    LogXptStatus                    = '(monitor)'

    SidName                         = 'oradgphy'

    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'

    LogArchiveTrace                 = '0'

    TopWaitEvents                   = '(monitor)'

数据库状态:

DGMGRL>

主库告警日志:

NSV1 started with pid=30, OS id=25660

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

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_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='oradg11g';

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

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

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

Mon Sep 28 15:20:57 2015

备库告警日志:

Mon Sep 28 15:20:57 2015

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

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

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

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

Mon Sep 28 15:21:01 2015

RFS[4]: Assigned to RFS process 25708

在配置broker完成后,我们就可以利用broker完成switchover了。在DGMGRL中只需要简单的一个命令。 
switchover to standby-database 
(standby-database: 此参数是db_unique_name,大小写敏感。如果名称是大写的,需要用引号。表示切换standby-database为主机,原主机转换为备机状态) 

  数据库:

    oradgphy - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:

立即执行切换, 请稍候...

操作要求关闭实例 "oradg11g" (在数据库 "oradg11g" 上)

ORACLE 例程已经关闭。

正在启动实例 "oradg11g"...

数据库装载完毕。

切换成功, 新的主数据库为 "oradgphy"

  数据库:

    oradg11g - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:

再切换一次,回到最初状态:

立即执行切换, 请稍候...

操作要求关闭实例 "oradgphy" (在数据库 "oradgphy" 上)

ORACLE 例程已经关闭。

正在启动实例 "oradgphy"...

数据库装载完毕。

切换成功, 新的主数据库为 "oradg11g"

  数据库:

    oradgphy - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:

主库告警日志:

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN

Mon Sep 28 15:26:24 2015

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

Stopping background process CJQ0

Stopping Job queue slave processes, flags = 27

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

Job queue slave processes stopped

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)'

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

Waiting for all FAL entries to be archived...

Waiting for dest_id 2 to become synchronized...

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

ARCH: Noswitch archival of thread 1, sequence 146

ARCH: LGWR is actively archiving destination LOG_ARCHIVE_DEST_2

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

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

Archive destination LOG_ARCHIVE_DEST_3 invalidated

Archive destination LOG_ARCHIVE_DEST_4 invalidated

LOG_ARCHIVE_DEST_2 is a potential Physical Standby switchover target

Target has also received all redo

Clearing standby activation ID 1419089259 (0x5495956b)

'MAXLOGFILES 16' clause.

Use the following SQL commands on the standby database to create

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

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

Archivelog for thread 1 sequence 146 required for standby recovery

Switchover: Complete - Database shutdown required

Mon Sep 28 15:26:37 2015

Shutting down instance (abort)

USER (ospid: 26018): terminating the instance

Mon Sep 28 15:26:38 2015

ORA-1092 : opitsk aborting process

Starting ORACLE instance (normal)

LICENSE_SESSIONS_WARNING = 0

Archive destination LOG_ARCHIVE_DEST_3 invalidated

Archive destination LOG_ARCHIVE_DEST_4 invalidated

Autotune of undo retention is turned on.

ILAT =27

SYS auditing is disabled

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

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

Node name:      rhel6_lhr

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

VM name:        VMWare Version: 6

System parameters with non-default values:

  memory_target            = 300M

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

  db_file_name_convert     = "oradgphy"

  log_file_name_convert    = "oradgphy"

  db_block_size            = 8192

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

  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_3       = "SERVICE=tns_oradglg LGWR ASYNC db_unique_name=oradglg valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE)"

  log_archive_dest_state_1 = "ENABLE"

  log_archive_dest_state_3 = "defer"

  log_archive_min_succeed_dest= 1

  fal_server               = "tns_oradgphy_dgmgrl"

  log_archive_config       = "dg_config=(oradg11g,oradgphy)"

  log_archive_max_processes= 4

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

  standby_file_management  = "AUTO"

  remote_login_passwordfile= "EXCLUSIVE"

  global_names             = TRUE

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

  db_name                  = "oradg11g"

  open_cursors             = 300

  diagnostic_dest          = "/u01/app/oracle"

PMON started with pid=2, OS id=26102

PSP0 started with pid=3, OS id=26104

Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST

Mon Sep 28 15:26:39 2015

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

GEN0 started with pid=5, OS id=26116

DIAG started with pid=6, OS id=26118

DBRM started with pid=7, OS id=26120

DIA0 started with pid=8, OS id=26122

MMAN started with pid=9, OS id=26124

DBW0 started with pid=10, OS id=26126

LGWR started with pid=11, OS id=26128

CKPT started with pid=12, OS id=26130

SMON started with pid=13, OS id=26132

RECO started with pid=14, OS id=26134

MMON started with pid=15, OS id=26136

MMNL started with pid=16, OS id=26138

starting up 1 shared server(s) ...

Mon Sep 28 15:26:40 2015

Mon Sep 28 15:26:40 2015

ARCH: STARTING ARCH PROCESSES

ARC0 started with pid=22, OS id=26157

ARCH: STARTING ARCH PROCESSES COMPLETE

Successful mount of redo thread 1, with mount id 1419115888

Starting background process RVWR

ARC1 started with pid=23, OS id=26159

RVWR started with pid=24, OS id=26161

ARC2 started with pid=25, OS id=26163

ARC3 started with pid=26, OS id=26165

ARC2: Archival started

ARC1: Becoming the 'no SRL' ARCH

Physical Standby Database mounted.

ARC2: Becoming the active heartbeat ARCH

alter database  open

Data Guard Broker initialization complete

Beginning standby crash recovery.

Managed Standby Recovery starting Real Time Apply

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

Resetting standby activation ID 0 (0x0)

Completed standby crash recovery.

Mon Sep 28 15:26:46 2015

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

Dictionary check beginning

RFS[2]: Assigned to RFS process 26179

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

Database Characterset is ZHS16GBK

replication_dependency_tracking turned off (no async multimaster replication found)

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

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

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

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

Mon Sep 28 15:26:46 2015

RFS[3]: Assigned to RFS process 26185

ARC3: Archival started

Starting Data Guard Broker (DMON)

INSV started with pid=30, OS id=26191

NSV1 started with pid=31, OS id=26199

RSM0 started with pid=32, OS id=26208

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

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

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

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

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

Attempt to start background Managed Standby Recovery process (oradg11g)

MRP0 started with pid=33, OS id=26214

started logmerger process

Managed Standby Recovery starting Real Time Apply

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

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

Clearing online redo logfile 1 complete

Clearing online log 2 of thread 1 sequence number 146

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

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

Clearing online redo logfile 3 complete

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

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_148_c0ktxp70_.arc

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

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

Mon Sep 28 15:26:24 2015

Mon Sep 28 15:26:24 2015

Mon Sep 28 15:26:30 2015

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

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

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

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

Managed Standby Recovery not using Real Time Apply

Mon Sep 28 15:26:31 2015

Managed Standby Recovery Canceled (oradgphy)

Database not available for switchover

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

Media Recovery Start: Managed Standby Recovery (oradgphy)

Mon Sep 28 15:26:32 2015

Parallel Media Recovery started with 2 slaves

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

Media Recovery End-Of-Redo indicator encountered

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

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

ALTER DATABASE SWITCHOVER TO PRIMARY (oradgphy)

krsv_proc_kill: Killing 2 processes (all RFS)

CLOSE: killing server sessions.

Mon Sep 28 15:26:34 2015

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

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

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

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

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

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

Data Guard Broker initializing...

Assigning activation ID 1419120567 (0x54960fb7)

ARC3: Becoming the 'no SRL' ARCH

ARC0: Becoming the 'no SRL' ARCH

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

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

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

Mon Sep 28 15:26:37 2015

Mon Sep 28 15:26:37 2015

(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:

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

  Tracing not turned on.

    ns main err code: 12537

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

Fatal NI connect error 12537, connecting to:

        TNS for Linux: Version 11.2.0.3.0 - Production

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

  Tns error struct:

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

TNS-12537: TNS:connection closed

    ns secondary err code: 12560

        ns secondary err code: 12560

    nt main err code: 507

        nt secondary err code: 0

    nt OS err code: 0

    nt secondary err code: 0

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

Fatal NI connect error 12537, connecting to:

        TNS for Linux: Version 11.2.0.3.0 - Production

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

  Tns error struct:

    ns secondary err code: 12560

    nt secondary err code: 0

Dictionary check complete

Verifying 11g file header compatibility for tablespace encryption completed

Database Characterset is ZHS16GBK

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

Fatal NI connect error 12537, connecting to:

        TNS for Linux: Version 11.2.0.3.0 - Production

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

  Tns error struct:

    ns secondary err code: 12560

    nt secondary err code: 0

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

Fatal NI connect error 12537, connecting to:

        TNS for Linux: Version 11.2.0.3.0 - Production

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

  Tns error struct:

    ns secondary err code: 12560

    nt secondary err code: 0

Error 12537 received logging on to the standby

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

ORACLE Instance oradgphy - Archival Error. Archiver continuing.

SMCO started with pid=26, OS id=26033

(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:

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

  Tracing not turned on.

    ns main err code: 12537

TNS-12537: TNS:connection closed

    nt main err code: 507

TNS-00507: Connection closed

    nt OS err code: 0

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

Starting background process QMNC

QMNC started with pid=27, OS id=26036

LOGSTDBY: Validation complete

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

Starting background process CJQ0

CJQ0 started with pid=32, OS id=26050

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

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

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

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

Mon Sep 28 15:26:38 2015

ARC4: Archival started

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

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

Mon Sep 28 15:26:41 2015

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

(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:

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

  Tracing not turned on.

    ns main err code: 12564

TNS-12564: TNS:connection refused

    nt main err code: 0

    nt OS err code: 0

Mon Sep 28 15:26:44 2015

Shutting down archive processes

ARC4: Archival stopped

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

ARC3: Becoming the 'no SRL' ARCH

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

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

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

ALTER SYSTEM ARCHIVE LOG

Thread 1 cannot allocate new log, sequence 151

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

ARC3: Becoming the 'no SRL' ARCH

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

Mon Sep 28 15:27:07 2015

感谢你能够认真阅读完这篇文章,希望小编分享的“Oracle物理DG自动切换中Dataguard Broker如何配置”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!


当前标题:Oracle物理DG自动切换中DataguardBroker如何配置
本文来源:http://chengdu.cdxwcx.cn/article/piigdh.html