暂无图片
哪个大佬能彻底把DG中的VALID_FOR这个参数讲清楚,谢谢
我来答
分享
暂无图片 匿名用户
哪个大佬能彻底把DG中的VALID_FOR这个参数讲清楚,谢谢
暂无图片 5M
以下是官方文档的解释,但是在实际使用中还是不清楚这个到底要怎么设置,请大佬详细解释一下,非常感谢
  • The VALID_FOR attribute is optional. However, Oracle recommends that the VALID_FOR attribute be specified for each redo transport destination at each database in a Data Guard configuration so that redo transport continues after a role transition to any standby database in the configuration.

  • To configure these factors for each LOG_ARCHIVE_DEST_n destination, you specify this attribute with a pair of keywords: VALID_FOR=(redo_log_type,database_role):

    • The redo_log_type keyword identifies the destination as valid for archiving one of the following:

      • ONLINE_LOGFILE—This destination is valid only when archiving online redo log files.

      • STANDBY_LOGFILE—This destination is valid only when archiving standby redo log files.

      • ALL_LOGFILES— This destination is valid when archiving either online redo log files or standby redo log files.

    • The database_role keyword identifies the role in which this destination is valid for archiving:

      • PRIMARY_ROLE—This destination is valid only when the database is running in the primary role.

      • STANDBY_ROLE—This destination is valid only when the database is running in the standby role.

      • ALL_ROLES—This destination is valid when the database is running in either the primary or the standby role.

  • If you do not specify the VALID_FOR attribute for a destination, by default, archiving online redo log files and standby redo log files is enabled at the destination, regardless of whether the database is running in the primary or the standby role. This default behavior is equivalent to setting the (ALL_LOGFILES,ALL_ROLES) keyword pair on the VALID_FOR attribute.

  • The VALID_FOR attribute enables you to use the same initialization parameter file for both the primary and standby roles.

我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
你好我是李白

要搞明白VALID_FOR参数,首先要明白log_archive_dest_n参数含义。

1.log_archive_dest_n

简而言之就是归档位置存储位置,所以DG的配置也只不过是把归档存储位置更改为DG这个库,即归档日志发送一份到DG库,当然log_archive_dest_n根据n编号不同也有不同配置,这个就可以参考官方文档了。

明白上面这个参数含义,那么接下来就可以看valid_for参数了。

2.valid_for

2.1 online_logfile

意味着该log_archive_dest_n参数只在归档的是v$Logfile中type为ONLINE的联机日志时生效,那也就是在DG环境中,主库归档时生效的log_archive_dest_n。

2.2 standby_logfile

意味着该log_archive_dest_n参数只在归档的是v$logfile中type为standby的联机日志时生效,那么什么时候归档的是type为standby呢?那肯定是在配置了standby redo log日志组,数据库当前角色为physical standby,所以就会理解为什么在一主一备一级联配置中,中间的备库的log_archive_dest_n参数发送到级联库时,为什么要配置的valid_for为standby_logfile。

3. database role

理解了上面就好理解数据库角色配置了,即当配置log_archive_dest_n参数的库在
select DATABASE_ROLE from v$database;
查询中为对应设置角色,归档日志才发送到该log_archive_dest_n设置。

暂无图片 评论
暂无图片 有用 2
打赏 0
JiekeXu
暂无图片

可以看看这篇,前几天总结的官方文档的加强版《爆肝一万字终于把 Oracle Data Guard 核心参数搞明白了》

https://mp.weixin.qq.com/s/m1S-ElWOYf_h2kcrre5HNA

暂无图片 评论
暂无图片 有用 0
打赏 0
回答交流
Markdown


请输入正文
提交
相关推荐
oracle12c安装过程出现ADR setup (diagsetup) tool failed. Check the install log for more details错误
回答 2
从你的报错提示可以看到,少一个路径你在$ORACLEBASE/下面创建一个diag目录就可以了
如果Oracle没有设置客户端字符集变量NLS_LANG,那么客户端默认会用什么字符集?
回答 4
已采纳
如果不设置NLSLANG,NLSLANG值默认为空,数据库查询出来的客户端字符集为对应数据库字符集,并不影响使用,我还原了一下:关于客户端字符集和数据库字符集可以参考:《Oracle查看数据库字符集和
问个问题哈,merge into a using (select * from a left join b)c on …… when update ,执行特别慢,我直接把括号里面的建表,再执行merge 就很快,这是为什么?
回答 2
还是要对比两个SQL的执行计划才好分析
Oracle 10046和10053两个事件有啥区别?都在什么时候用?
回答 1
已采纳
当一个SQL出现性能问题的时候,可以使用SQLTRACE或者10046事件来跟踪SQL.通过生成的trace来了解SQL的执行过程。我们在查看一条SQL的执行计划的时候,只能看到CBO最终告诉我们的执
Oracle数据库为什么要闩定共享池?
回答 1
已采纳
共享池是一个共享数据结构,别人在读取这个共享资源时,其他人不能对其进行修改;如果别人正在修改它,其他人就不能读取。所以只有闩定共享池,才能在任何时候都能读取。
oracle基础信息脚本?
回答 1
已采纳
–获取数据库版本SELECTFROMv$version;–获取实例名SELECTinstancenameFROMv$instance;–获取数据库启动时间SELECTstartuptimeFROMv$
x86方式与定制版差异
回答 1
已采纳
Exadata是oracle的一体机,硬件配置非常高,价格非常昂贵,相当于是甲骨文公司专门为oracle产品线定制的成品。如果公司有钱,当然可以上Exadata,如果没钱,那肯定是用普通的X86服务器
ODA一体机如何实现RAC集群部署的?
回答 2
可以做rac的是odax82ha这个型号,两个服务器一台存储
Oracle用sys账户创建一个Scott用户的表格和直接在Scott用户创建一个同样的表格有什么区别吗?
回答 1
已采纳
没有区别,如果你的scott用户有默认表空间,这个表就会建在默认表空间里,如果没有默认表空间,就会建在users的表空间里。SQL>createusertestidentifiedbytestd
Oracle impdp 如果要导入到一个新的精简表,不要部分列,可以导入的时候选择部分导入吗?
回答 2
已采纳
9i创建新表取部分字段导入10g,11g使用ORACLEDATAPUMP12c及以上数据泵支持VIEWSASTABLES即创建视图,数据表可以处理视图然后导出视图,实际当表导入就可以。参考链接http