12
返回列表 发新帖
楼主: alexanderr

[讨论] 关于standby SRL的一点疑问?

[复制链接]
论坛徽章:
59
狮子座
日期:2016-03-26 13:35:402013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-02-25 11:06:15ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20灰彻蛋
日期:2012-04-25 13:19:33紫蛋头
日期:2012-03-14 11:16:09最佳人气徽章
日期:2012-03-13 17:39:18玉石琵琶
日期:2012-02-21 15:04:38鲜花蛋
日期:2011-11-30 14:13:01ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
11#
发表于 2010-12-31 09:57 | 只看该作者

回复 #10 alexanderr 的帖子

standby DB would never generate its own redo log in ORL.

Did you ever activate/failover to the standby DB before?
and then flashback it to the point when being primary?

使用道具 举报

回复
论坛徽章:
2
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
12#
 楼主| 发表于 2010-12-31 11:47 | 只看该作者

回复 #11 bluemoon0083 的帖子

no , i didn't do any swithover or failover work

and pay attention that my two kinds of archived log are generated almost
simultaneously which means if there is a new archived log  archivelogstand1_990_737829999.dbf in path log_archive_dest_3, there would be a new archived log 1_990_737829999.dbf in path log_archive_dest_2.

i just consider the 1_990_737829999.dbf was archived from the ORLs which not for sure, since the archivelogstand1_990_737829999.dbf was archived from  the SRLs obviously.

can you explain where does this new 1_990_737829999.dbf come from?

使用道具 举报

回复
论坛徽章:
59
狮子座
日期:2016-03-26 13:35:402013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-02-25 11:06:15ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20灰彻蛋
日期:2012-04-25 13:19:33紫蛋头
日期:2012-03-14 11:16:09最佳人气徽章
日期:2012-03-13 17:39:18玉石琵琶
日期:2012-02-21 15:04:38鲜花蛋
日期:2011-11-30 14:13:01ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
13#
发表于 2010-12-31 13:49 | 只看该作者

回复 #12 alexanderr 的帖子

I find that the redo is actually writen into the SRLs and ORLs both.
  In my standby,
  log_archive_dest_2='service=primary valid_for=(online_logfiles,primary_role) db_unique_name=primary LGWR SYNC AFFIRM reopen=10 net_timeout=15'
  log_archive_dest_3='location=/u/oracle/oradata/sfcodb/archivelogstand valid_for=(standby_logfile,standby_roles) db_unique_name=standby'

   I have two kind of archive logs under two paths
   /u03/archive/sfcodb/1_981_737829999.dbf    ORLs
   /u/oracle/oradata/sfcodb/archivelogstand1_981_737829999.dbf  SRLs
=============

1. log_archive_dest_2 specified service=primary, which means a remote instance, won't archive locally
2. log_archive_dest_2 specified valid_for=(online_logfiles,primary_role), which means this destination is valid only the DB is primary, not standby, check V$DATABASE.DATABASE_ROLE to decide

Maybe you change the dest_2 parameter after 1_990_737829999.dbf is generated.

Try switch logfile on primary to see if new archived log can be generated in this destination.

使用道具 举报

回复
论坛徽章:
2
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
14#
 楼主| 发表于 2010-12-31 16:06 | 只看该作者

回复 #13 bluemoon0083 的帖子

i am afraid that the both kinds of archived logs were generated when i built
the standby, which are still generating now.
at each log switch,  the two kinds of archived logs will generate.

all the parameters were set at the beginning of creating the standby database, and i didn't change any parameters after the standby was being
created.

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
15#
发表于 2011-1-1 00:20 | 只看该作者
alexanderr,

Can you show us on the standby:

show parameter log_archive
col member for a50
select * from v$logfile;

Yong Huang

使用道具 举报

回复
论坛徽章:
2
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
16#
 楼主| 发表于 2011-1-4 10:44 | 只看该作者

回复 #15 Yong Huang 的帖子

login as: oracle
oracle@10.167.4.100's password:
Last login: Fri Dec 31 15:48:19 2010 from 10.167.196.178
[oracle@NSDTESTS ~]$ export ORACLE_SID=sfcodb
[oracle@NSDTESTS ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 4 10:35:16 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter log_archive;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(PRIMARY,STANDBY)
log_archive_dest                     string
log_archive_dest_1                   string      location=/u03/archive/sfcodb V
                                                 ALID_FOR=(ALL_LOGFILES,ALL_ROL
                                                 ES) DB_UNIQUE_NAME=STANDBY
log_archive_dest_10                  string
log_archive_dest_11                  string
log_archive_dest_12                  string
log_archive_dest_13                  string
log_archive_dest_14                  string
log_archive_dest_15                  string

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_16                  string
log_archive_dest_17                  string
log_archive_dest_18                  string
log_archive_dest_19                  string
log_archive_dest_2                   string      SERVICE=PRIMARY VALID_FOR=(ONL
                                                 INE_LOGFILES,PRIMARY_ROLE) DB_
                                                 UNIQUE_NAME=PRIMARY LGWR SYNC
                                                 AFFIRM REOPEN=10 NET_TIMEOUT=1
                                                 5
log_archive_dest_20                  string
log_archive_dest_21                  string

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string
log_archive_dest_28                  string
log_archive_dest_29                  string
log_archive_dest_3                   string      LOCATION=/u/oracle/oradata/sfc
                                                 odb/archivelogstand VALID_FOR=
                                                 (STANDBY_LOGFILE,STANDBY_ROLES

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
                                                 ) DB_UNIQUE_NAME=STANDBY
log_archive_dest_30                  string
log_archive_dest_31                  string
log_archive_dest_4                   string
log_archive_dest_5                   string
log_archive_dest_6                   string
log_archive_dest_7                   string
log_archive_dest_8                   string
log_archive_dest_9                   string
log_archive_dest_state_1             string      enable
log_archive_dest_state_10            string      enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_11            string      enable
log_archive_dest_state_12            string      enable
log_archive_dest_state_13            string      enable
log_archive_dest_state_14            string      enable
log_archive_dest_state_15            string      enable
log_archive_dest_state_16            string      enable
log_archive_dest_state_17            string      enable
log_archive_dest_state_18            string      enable
log_archive_dest_state_19            string      enable
log_archive_dest_state_2             string      enable
log_archive_dest_state_20            string      enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_21            string      enable
log_archive_dest_state_22            string      enable
log_archive_dest_state_23            string      enable
log_archive_dest_state_24            string      enable
log_archive_dest_state_25            string      enable
log_archive_dest_state_26            string      enable
log_archive_dest_state_27            string      enable
log_archive_dest_state_28            string      enable
log_archive_dest_state_29            string      enable
log_archive_dest_state_3             string      enable
log_archive_dest_state_30            string      enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_31            string      enable
log_archive_dest_state_4             string      enable
log_archive_dest_state_5             string      enable
log_archive_dest_state_6             string      enable
log_archive_dest_state_7             string      enable
log_archive_dest_state_8             string      enable
log_archive_dest_state_9             string      enable
log_archive_duplex_dest              string
log_archive_format                   string      %t_%s_%r.dbf
log_archive_local_first              boolean     TRUE
log_archive_max_processes            integer     4

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_min_succeed_dest         integer     1
log_archive_start                    boolean     FALSE
log_archive_trace                    integer     0
SQL> col member for a50;
SQL> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
         3         ONLINE  /u/oracle/oradata/sfcodb/redo03.log
NO

         2         ONLINE  /u/oracle/oradata/sfcodb/redo02.log
NO

         1         ONLINE  /u/oracle/oradata/sfcodb/redo01.log
NO


    GROUP# STATUS  TYPE    MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
         4         STANDBY /u/oracle/oradata/sfcodb/serdo1.log
NO

         5         STANDBY /u/oracle/oradata/sfcodb/sredo2.log
NO

         6         STANDBY /u/oracle/oradata/sfcodb/sredo3.log
NO


    GROUP# STATUS  TYPE    MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
         7         STANDBY /u/oracle/oradata/sfcodb/sredo4.log
NO


7 rows selected.

SQL>

使用道具 举报

回复
论坛徽章:
59
狮子座
日期:2016-03-26 13:35:402013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-02-25 11:06:15ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20灰彻蛋
日期:2012-04-25 13:19:33紫蛋头
日期:2012-03-14 11:16:09最佳人气徽章
日期:2012-03-13 17:39:18玉石琵琶
日期:2012-02-21 15:04:38鲜花蛋
日期:2011-11-30 14:13:01ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
17#
发表于 2011-1-4 11:28 | 只看该作者

回复 #16 alexanderr 的帖子

log_archive_dest_1                   string      location=/u03/archive/sfcodb V
                                                 ALID_FOR=(ALL_LOGFILES,ALL_ROL
                                                 ES) DB_UNIQUE_NAME=STANDBY


Hi alexanderr,
Take a look at log_archive_dest_1,
this is the answer to your /u03/archive/sfcodb/1_981_737829999.dbf archived log

Try "diff arch1 archi2" command to check if the 2 kinds of logs are identical

使用道具 举报

回复
论坛徽章:
2
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
18#
 楼主| 发表于 2011-1-4 16:35 | 只看该作者

回复 #17 bluemoon0083 的帖子

after the comparation, there are no differences being found.
I thought they are identical.

'Hi alexanderr,
Take a look at log_archive_dest_1'
---------------------------------------------
you mean the parameter  'VALID_FOR=(ALL_LOGFILES,ALL_ROLES)' makes the primary transmit the redo info to all the standby
log files which include ORLs and SRLs, right?

使用道具 举报

回复
论坛徽章:
59
狮子座
日期:2016-03-26 13:35:402013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-02-25 11:06:15ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20灰彻蛋
日期:2012-04-25 13:19:33紫蛋头
日期:2012-03-14 11:16:09最佳人气徽章
日期:2012-03-13 17:39:18玉石琵琶
日期:2012-02-21 15:04:38鲜花蛋
日期:2011-11-30 14:13:01ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15
19#
发表于 2011-1-4 22:01 | 只看该作者

回复 #18 alexanderr 的帖子

> you mean the parameter  'VALID_FOR=(ALL_LOGFILES,ALL_ROLES)' makes the primary transmit the redo info to all the standby
> log files which include ORLs and SRLs, right?

You maybe confused about something.
Why you keep associating the archive logs on standby with ORLs?
As a matter of fact standby DB doesn't require ORLs, that was also mentioned by Yong Huang before.
Strictly the ORLs(refer to standby) have nothing to do with standby DB.
The log_archive_dest_n parameters you showed us are set on standby database, right?

So the parameters only affect standby, not primary.
None of the log_archive_dest_n parameters make the primary transmit the redo info to standby DB.
Only those log_archive_dest_n parameters which are set  on primary DB with remote instance(service=XXXX option) do.

Here is your scenario:
dest_1 and dest_3 are your local archive destinations
dest_2 is your remote archive destination, which is valid only when the standby database becomes primary(activate,switchover or failover)

When you switch logfile on primary, standby DB will perform archiving log from SRL, to dest_1 and dest_3.

使用道具 举报

回复
论坛徽章:
2
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
20#
 楼主| 发表于 2011-1-5 16:54 | 只看该作者

回复 #19 bluemoon0083 的帖子

I see.

i am sorry i misunderstood sth before.

thank u very much.

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表