使用了索引就一定能避免cache buffers chains争用吗
访问buffer cache里的数据块时需要先以独占模式申请管理hash bucket的latch,这个latch的名称就是所谓的cache buffers chains,系统中出现latch:cache buffers chains争用往往意味着以下两种可能:1、多个会话并发访问相同的数据块(这是最常见的一种情况)2、不同的数据块挂载在同一个hash bucket下,或者虽然挂载在不同的...
透过Buffer cache了解data block在DML操作下的状态演变
一句DML操作对数据表的修改看似很简单:把老的记录值替换成新的记录值,插入或者删除一条记录,这个看似简单的操作但在buffer cache里却有着不一般的经历,为实现读一致性,一个block在buffer cache里可能有多个版本,在DML的过程中,buffer cache里的block经历了一系列的变化。本文以update、insert、delete操作为例揭示了...
sys.dual表被清空后引发的问题
前几天收到过应用人员的一个报障称,应用程序无法连接数据库,报了ORA的错误,这是一个oracle 9.2.0.8的RAC数据库(历史够悠久了吧),人工使用sqlplus连接报错如下:tstdb1@jq570322b:/home/tstdb1>sqlplus wangguan/773946@tstdb1 SQL*Plus: Release 9.2.0.8.0 - Production on Fri Nov 15 21:27:27 2015Copy...
kill session的学问
终止会话有两种方法:1、alter system kill session 'sid,serial#' [ immediate ] 在某个内存区域设置一个标记,表示这个session即将被kill,当session运行下一条命令时会检查此标记,若存在则session立即终止,同时收到"ORA-00028: your session has been killed",session对应的server process也会立...
DG主库发生表误删除后利用备库进行恢复的方法实践
Dataguard中主库发生误操作后,当然可以利用flashback transaction、flashback query、flashback table等技术进行恢复。但是当上述方法都有其局限性,比如受制于undo表空间是否还存在Before-image,回收站里的表否被清理等。本文介绍的是如何把备库上完好的数据恢复到主库上,前提是备库必须:开启延迟应用归档或者打开f...
从dba_hist_active_sess_history里寻找session间的等待关系
dba_hist_active_sess_history每隔10秒钟转储来自v$active_session_history的活动session信息(v$active_session_history.IS_AWR_SAMPLE=Y对应的行会被采集到到dba_hist_active_sess_history),作为AWR、ASH的重要补充,dba_hist_active_sess_history是我们drill down的有效数据来源,特别是session之间存在相互牵制...
Dataguard主库上与redo transport service相关的等待事件
<br /><span style="color:#006600;font-size:14px;"><strong>DG环境中的Redo传输主要是在LGWR、LNS、RFS这三类进程之间进行通信</strong></span><span style="color:#006600;font-size:14px;"><strong>其中主库上有LGWR进程、LNS在主库上的服务进程是nsa或者nss开头的后台进程 </strong></span><span style="color:#...
在Dataguard环境中配置cascade redo transport
<span style="color:#006600;font-size:14px;"><strong>cascade redo transport用在多个standby的环境下,当standby与primary的距离较远需要通过WAN来传输Redo时,为减少传输过程中对primary的压力及网络带宽的占用,仅让其中的一个standby从primary直接接收redo,这个standby就称作cascading standby,而其余的standby从ca...
解析一下DataGuard环境里出现archivelog gap的两个场景
<span style="color:#000000;font-size:14px;"><br /><span style="font-size:16px;background-color:#FF9900;"><strong></strong></span><span style="font-size:16px;background-color:#FF9900;"><strong><<< Redo Transport阶段出现archivelog gap >>></strong></span></span><br /><span style="co...
log_archive_dest_n里的alternate属性使用须知
log_archive_dest_n里的alternate属性主要用于指定当前主归档目录的备用目录下面的设置表示如果/oradata06目录无法写入,那么尝试将归档写入到/oradata01目录
log_archive_dest_n参数中reopen、max_failure、net_timeout三个属性的组合效果测试
<span style="color:#006600;font-size:16px;"><strong>log_archive_dest_n参数中有三个属性都是用来指导在目标归档路径故障的情况下,归档过程应如何继续下去,这三个属性是:</strong></span><br /><br /><br /><span style="color:#006600;font-size:16px;"><strong>reopen:能用于DG或者非DG的环境下,在非DG环境下...
创建Materialized view log时是否使用sequence clause的差别
<span style="font-size:14px;color:#000000;"><br /><strong><span style="color:#000000;"></span></strong><strong><span style="color:#000000;">创建物化视图日志的时候有一个选项是sequence,对于sequence的作用,Data Warehousing guide里有一段描述:</span></strong></span><br /><span style="font-size:14px;c...
创建physical standby的三种方法
<span style="font-size:14px;color:#000000;"><strong>搭建DG过程中三种常用的physical standby创建方法:</strong></span><br /><span style="font-size:14px;color:#000000;"><strong>1、使用传统的RMAN 备份和恢复</strong></span><br /><span style="font-size:14px;color:#000000;"><strong>2、使用基于backup的dup...
使用opatchauto将12.1.0.2.0升级至12.1.0.2.3的过程记录
<p><span style="font-size:14px;">//////////////////</span><br /><span style="font-size:14px;">// Patch 20485724 - Oracle Grid Infrastructure Patch Set Update 12.1.0.2.3 (Apr2015) 安装过程</span><br /><span style="font-size:14px;">//////////////////</span></p><p><span style="font-size:14px;"...
创建快速刷新物化视图使用with rowid还是with primary key?
<p><span style="font-size:14px;"><strong>快速刷新物化视图有with rowid和with primary key两种,创建时该如何选择?</strong></span><br /><span style="font-size:14px;"><br /><strong>本文主要谈及以下两种物化视图的应用:</strong></span><br /><span style="font-size:14px;"><strong>1、用于分布式环境里的...
11.2.0.3 database异机升级至11.2.0.4
<span style="color:#000000;font-size:14px;"><strong>A、B两台主机,A上安装的是11.2.0.3单机版,B上安装的是11.2.0.4单机版,为有效利用主机资源,欲将A上的数据库迁移到B机上运行,假设A上的数据文件所在存储已经能在B机上认到。要完成迁移其实就是将A上的数据库从11.2.0.3升级至11.2.0.4,实施步骤如下:</strong></sp...
浅析query_rewrite_integrity参数
<p><span style="color:#e53333;font-size:16px;"><strong>//////////////////////</strong></span><br /><span style="color:#e53333;font-size:16px;"><strong>// 构造测试数据</strong></span><br /><span style="color:#e53333;font-size:16px;"><strong>/////////////////////<br /></strong></span><br /><span...
select any table权限可能引发大量latch row cache objects等待事件
<p><span style="font-family:'微软雅黑','sans-serif';font-size:12pt;">某个后台批量作业发起数据抽取操作后,在数据库里引起了上百个</span><span style="font-size:12pt;">session</span><span style="font-family:'微软雅黑','sans-serif';font-size:12pt;">都在等待名为</span><span style="font-size:12pt;...
体验跨越incarnation进行flashback database相比传统RMAN RECOVER的便捷性
<p style="text-align:left;" align="left"><b><span style="font-family:'Tahoma', 'sans-serif';font-size:12pt;"><br /></span></b><b><span style="font-family:宋体;font-size:12pt;">本文要模拟的是使用</span></b><b><span style="font-family:'Tahoma', 'sans-serif';font-size:12pt;">flashback database</span...
DB_BLOCK_CHECKSUM VS DB_BLOCK_CHECKING
db_block_checksum:数据块被写入磁盘时是否计算校验值放到块头部,这个校验值放在名为