ASM Rebalance and ASM_POWER_LIMIT

ASM is the ability to add and remove disks/luns from a diskgroup with no down time and an automatic rebalancing of the data on the luns. This creates all kinds of possibilities.

Invisible Indexes in oracle11g

11gr1起提供了Invisible Indexes,作用就是通过alter index xx invisible,对CBO隐身,我突然想到之前的一个情况,就是开发的在应用中滥用hint index,当时为了让hint index 无效,当时是选择index rename,现在看来如果是11g可以用invisible

External Table On GoldenGate Discard Files

goldengate 做为数据同步的利器,越来越普遍,往往会因为某些原因replicat进程在应用trail文件时会失败,进程要么Abending也可以也忽略记录到 Discard Files中,默认在OGG_HOME/dirrpt/ *.dsc,可以用文本工具查看内容,当然也可以更方便的用pl/sql function 读取文件,做为一张外部表(external table)查询

Script: 通过AWR信息查询db 中segments 的增长信息

awr 中有很多wr开头的表收集的数据非常有用,通过dba_hist开头的视图可以很直观的查看,也可以手动查询一些详细或定制自己所要的信息

Estimate of the duration of a rollback operation(估算rollback事务回滚剩余时间)

when a long, running transaction has been rolled back, How Much Longer completion time of the rollback process? The questions are justified, because the transaction holds the locks and normal processing often suffers as the rollback progresses.

Why Disk space has been made available archive process do not Restart.ORA-19815 ORA-16014

We use to import a dump file into a database today. imp […]

Script: oracle 删除用户(schema)下的所有对象

有时需要清除schema里的所有对象,但又没有dba权限,不可以drop user xxx cascade; re-create user;可以写个plsql,循环删除所有对象,注意有些对象存在依赖关系,如外键、index 和table..,这里建个procedure,方便在开发库一堆有schema中运行。

How to open read/write mode no longer be physical standby db(active standby)?

如果primary db 丢失或不再需要的physical standby ,想把这些库(standby)利用起来,logical standby 本来就可以write open,11g ADG也可以APPLY LOG时open,但是read only,下面演示如果把off-line standby 转为primary,open read/write mode.

,

Script: AWR snap sessions,load profile, SCN or Transactions per second

自定义生成一些报表,曲线数据从AWR 数据表。

About like 5% selectivity引起的不完美执行计划

CBO优化器的内部有两个重要的标准:selectivity and cardinality,cardinality 就CBO在处理完后返回的行数,selectivity是返回数据范围百分比,cardinality = (number of input rows)* selectivity,所以selectivity 的直接影响了CBO表访问路径

rlwrap 独立的历史操作记录

我是习惯在sqlplus中做一些操作,在linux中安装rlwrap 支持方向键,但如果多个用户在同一台机器上登录,每个人常用的命令不同,方向键查找起来很麻烦,so.那就把我们经常用的操作分类或以用户分类,设立独立的历史操作记录log

程序sql不应该滥用Hint

Hint提示是优化SQL的一种手段,但不应该放在首位,记的国外有位大师说过顺序应该是学写SQL,写更好SQL,学写ORACLE SQL,写更好的ORACLE SQL,在了解原理且CBO没有走理想路线的情况下再去指引CBO。

Use “show paramter” in sqlplus display Hidden Init Parameter

有时需要参考一些隐藏参数值了解ORACLE内部的限制,在sqlplus 中使用show parameter 显示隐藏参数..

more about session_cached_cursors

Session cursor caching does not mean that server process caches the whole SQL area in the PGA.It just means that Oracle does not release the cursor object when the same statement was executed more than 2 times in the same process…

bind variable在11g 中出现Cursor: mutex S

今天看到一个案例,从10G升级到11GR2后cpu负载迅速上升,很快达到100%,通过OWI显示出现大量“Cursor: mutex S”事件,mutex S是发生在cursor cache上的序列化mutex

Installing Enterprise Manager Cloud Control 12c r2 Agent on Linux(安装em12c agent)

Oracle Management Agent 12c communicates only with Oracle Management Service 12c and not with any earlier release of Enterprise Manager

Installing Enterprise Manager Cloud Control 12c release2 on Linux(安装em12c)

EM 12c在安装时和11EM相似,只是增加了Plug-ins 的选择,Plug-ins 和 Connectors做为GRID CONTROLE的扩展并增加了一些非oracle的产品整合为”Cloud”云管理包含DATABASE,Middleware,VM server

skip a transaction in goldengate(跳过一个事务OGG)

GGSCI (ggsdb) 1> alter replicat ricme, extrba 84510103
REPLICAT altered.
GGSCI (ggsdb) 3> start ricme

SQL ordered by Version Count and Troubleshooting

the cause:
bug,related to name resolution issues, bind buffer length, fine grained access control, cursor invalidation, or any of the other common structural or coding reasons for multiple child cursors

, ,

DB_FILE_MULTIBLOCK_READ_COUNT parameter

DB_FILE_MULTIBLOCK_READ_COUNT is one of the parameters you can use to minimize I/O during table scans. It specifies the maximum number of blocks read in one I/O operation during