需求,由于一套生产环境归档日志切换频率过低,建议修改参数,使其间隔一定时间周期自动切换生成归档日志;
SQL>select thread#,sequence#,to_char(completion_time,'yyyy-mm-dd hh24:mi') from v$archived_log where completion_time>sysdate-;
THREAD# SEQUENCE# TO_CHAR(COMPLETION_TIME,'YYYY-MM
---------- ---------- --------------------------------
-- :
-- :
-- :
-- :
测试环境归档日志切换频率非常低,生产环境类似,如果生产环境online redo出现问题,将丢失数十小时的数据。
SQL>select a.ksppinm,b.ksppstvl,a.ksppdesc from x$ksppi a,
x$ksppcv b where (a.indx=b.indx) and a.ksppinm like '%archive_lag_target%';
--------------------------------------------------------------------------------
archive_lag_target Maximum number of seconds of redos the standby could lose 秒为单位,重做日志切换时间

生产环境建议配置1800s,即建议30分钟日志切换一次。

How to force a log switch (文档 ID 2320185.1)
There are cases when your DB activity is not significant so the number of redo log switches is very small or even 0 for certain timeframes. In these conditions, how do we force a periodical log file switch?

Setup of archive_lag_target anywhere between [60, 7200] seconds:

use of setting archive_lag_target in non-standby envrionment

ARCHIVE_LAG_TARGET limits the amount of data that can be lost and effectively increases the availability of the standby database by forcing a log switch after the specified amount of time elapses.

A 0 value disables the time-based thread advance feature; otherwise, the value represents the number of seconds. Values larger than 7200 seconds are not of much use in maintaining a reasonable lag in the standby database. The typical, or recommended value is 1800 (30 minutes). Extremely low values can result in frequent log switches, which could degrade performance; such values can also make the archiver process too busy to archive the continuously generated logs.

SQL> alter system set archive_lag_target=; --15分钟

SQL>  select sysdate from dual;
SYSDATE
-------------------
-- :: 测试环境没有数据,按照参数,应该是再03:52分,alert应该存在日志切换记录信息。
Alert日志信息 Mon Aug ::
Thread advanced to log sequence (LGWR switch)
Current log# seq# mem# : /11.2.0.4/app/oracle/oradata/tt11204/redo03.log
Mon Aug ::
Archived Log entry added for thread sequence ID 0x756770e0 dest :
Mon Aug :: 2019

archive_lag_target参数的更多相关文章

  1. 【转载】ARCHIVE_LAG_TARGET参数的作用(定时切换redo)

    (一)  设置archive_lag_target参数1.      一旦设置了archive_lag_target初始化参数,数据库将会周期性的检查实例的当前重做日志.如果遇到下列情况,实例将会切换 ...

  2. ORACLE归档日志比联机重做日志小很多的情况总结

    ORACLE归档日志比联机重做日志小很多的情况   前几天一网友在群里反馈他遇到归档日志比联机重做日志(redo log)小很多的情况,个人第一次遇到这种情况,非常感兴趣,于是在一番交流沟通后,终于弄 ...

  3. 2007-10的PWX OracleCdc问题解答

    1. 捕获增量的底层机制是什么?(例如日志.触发器.LogMiner) PWX利用Oracle的LogMiner来提取来自于Oracle的增量, LogMiner是由Oracle数据库提供的,如果当前 ...

  4. Oracle 11g新参数USE_LARGE_PAGES与AMM使用 (转载)

    在之前的文章(http://space.itpub.net/17203031/viewspace-774843)中,笔者介绍了如何在Linux 2.6内核中配置HugePage以及AMM与其的不兼容性 ...

  5. RAC 环境下的重要参数

    Oracle 数据库启动时会根据参数文件中提供的相关参数启动Oracle实例.这些参数包括数据库名字.sga,pga的分配,控制文件的位置,undo,process等等.Oracle RAC数据库同样 ...

  6. Oracle 参数文件spfile

    pfile和spfile 概念 ORACLE中的参数文件是一个包含一系列参数以及参数对应值的操作系统文件,可以分为两种类型.它们是在数据库实例启动时候加载的,决定了数据库的物理结构.内存.数据库的限制 ...

  7. RAC 修改 spfile 参数

    我们知道数据库的参数文件有spfile 和pfile. RAC 的参数文件比较特殊. 因为默认情况下,RAC的spfile 是放在共享设备上(RAW设备或者ASM磁盘组).而在各节点的pfile文件里 ...

  8. PGA+SGA的几个参数操作

    1.sga_max_size;是静态的必须重启之后生效需要加scope=spfile;(不要超过物理内存值) SQL> alter system set sga_max_size=500M sc ...

  9. 【.net 深呼吸】细说CodeDom(6):方法参数

    本文老周就给大伙伴们介绍一下方法参数代码的生成. 在开始之前,先补充一下上一篇烂文的内容.在上一篇文章中,老周检讨了 MemberAttributes 枚举的用法,老周此前误以为该枚举不能进行按位操作 ...

随机推荐

  1. 2018-2019-2 《网络对抗技术》 Exp7 网络欺诈防范 20165222

    1.实践目标 本实践的目标理解常用网络欺诈背后的原理,以提高防范意识,并提出具体防范方法. 2.实践内容 (1)简单应用SET工具建立冒名网站 (1分) apachectl start开启服务 ser ...

  2. docker安装单机hadoop

    安装环境 centos7. docker -ce(这个安装参考我的另外一篇博客 首先关闭防火墙 systemctl stop firewalld.service #停止firewall systemc ...

  3. win10 合并磁盘 disk Acronis Disk Director

    硬盘调整C盘大小的工具.zip 无损分区软件(Acronis Disk Director)下载 11.0 破解版  ADD11H_trial_en-US(11.0.0.2343).exe 注册码: E ...

  4. SQL语句里合并两个select查询结果

    SQL UNION 操作符UNION 操作符用于合并两个或多个 SELECT 语句的结果集. 请注意,UNION 内部的 SELECT 语句必须拥有相同数量的列.列也必须拥有相似的数据类型.同时,每条 ...

  5. osg fbx 模型结构操作

    osg::Node* TeslaManage::findOsgNodeByName(QString &nodeNme) { osg::Node* findNode = NULL; std::v ...

  6. 学习TypeScript 笔记

    TypeScript 什么是TypeScript TypeScript 是 JavaScript 的一个超集,支持 ECMAScript 6 标准. TypeScript 由微软开发的自由和开源的编程 ...

  7. ABAP编辑器输入中文变成问号

    在ABAP编辑器里输入汉字,点击空格后显示问号? 中英文环境下编辑都出现乱码 实用程序->设置 ->基于文本的编辑器 如果用老式编辑器,可以输入中文  试试打个补丁 GUI740 补丁17 ...

  8. 【微信小程序】wx.navigateBack() 携带参数返回

    第一个页面: go_pick_time:function(e){ var that = this; var type = e.currentTarget.dataset.type; wx.naviga ...

  9. sonarqube-jenkins-config

    Sonar Config .Jenkinsfile config stage('SonarQube analysis') { steps { script { scannerHome = tool ' ...

  10. Spring Boot使用监听器Listener

    之前介绍了在Spring Boot中使用过滤器:https://www.cnblogs.com/zifeiy/p/9911056.html 接下来介绍使用监听器Listener. 下面是一个例子: p ...