一例cache buffers chain等待诊断思路
今日在生产系统上业务高峰期时遇到了latch free等待,top 5等待如下:Top 5 Timed Events~~~~~~~~~~~~~~~~~~ &...
当type为TX时v$lock中ID1,ID2的含义
SQL> select * from v$lock where sid=19; ADDR KADDR SID TY ID1 &n...
使用10046事件跟踪sql定位错误一例
修改一个表时,发生如下错误:SQL> update emp set ename='adsf';update emp set ename='adsf' *ERROR at line 1:ORA-12096: error in materialized view log on "SCOTT"."EMP...
ORA-02085 database link string connects to string解决
当使用全局数据库命名的时候(global_names=TRUE),数据库链接(DATABASE LINK)的名字必须和数据库的名字相同。SQL> create database linke mv_link 2&n...
rman在什么情况下会使用large pool
在9204环境下,经过测试,初步得出结论,当满足如下条件时,rman将使用large pool:1.dbwr_io_slaves被设置为非02.disk_asynch_io被设置为false测试过程如下:SQL> show parameter slave NAME &...
library cache pin的解决思路
1。解决思路 当出现library cache pin时,首先要查找到(1)持有锁的sid。(2)正在等待pin的sid(3)正在被pin的object要查到以上信息,需要查询x$kglpn k,v$session ,v$session_wait,x$kglob 这几个视...
主键被disable后相应索引的处理
分2种情况进行测试:1.创建表时直接创建的主键。建表语句如下:CREATE TABLE EMP (EMPNO NUMBER(4) CONSTRAINT PK_EMP PRIMARY KEY, &nb...
关于sga_max_size
在9208版本下:关于sga_max_size,oracle文档中如下解释:SGA_MAX_SIZEParameter typeBig integerSyntaxSGA_MAX_SIZE = integer [K | M | G]Default valueInitial size of SGA at startup, depen...
Direct-Path INSERT和常规INSERT获取表级锁的不同
测试如下:SQL> select sid from v$mystat where rownum=1; SID---------- 20 SQL> insert /*+ append */ into t1 sel...
Parallel Execution of SQL Statements
Introduction to Parallel ExecutionParallelism is the idea of breaking down a task so that, instead of one process doing all of the work in a query, many processes do part of the work at the same tim...
two-phase commit (2PC)(转)
two-phase commit (2PC) 两阶段提交分布式系统中处理用户提交的担任时,操作管理器(或操作监视器)通常使用两阶段提交协议保证所有操作涉及到的数据库被锁定然后被正确地更新。如果因为某种原因操作不能完...
一次对批处理程序的优化
针对日终时间较长的问题,做了一下分析,以下是从日终时间段的statspack报告中获取的信息: &...
Transaction Naming
使用命令set transaction name 可以给事务命名,有如下优点:It is easier to monitor long-running transactions and to resolve in-doubt distributed transactions. You can view transaction names along wit...
insert /*+ append */ into 与insert into 的区别
分别在这两种情况下执行插入,用tkprof生成统计信息文件,对比如下:insert into test select * from bc_log_1 ...
关于Physical rowid和Logical rowid
关于Physical rowid和Logical rowid,oracle concepts中有如下解释:Oracle uses a ROWID datatype to store the address (rowid) of every row in the database.Physical rowids store the addresses of rows in...
参数NLS_LENGTH_SEMANTICS的设置问题
在Oracle数据库中和Oracle FORM中都 有这样一个参数的设置,有必要澄清一下:参数NLS_LENGTH_SEMANTICS的含义在Oracle文档中这样描述:Oracl文档中的说明: Syntax: NLS_LENGTH_SEMANTICS = string Range of value...
写了一个监控文件系统空间使用的脚本
echo "">>/tmp/mon.stat.tmpecho "">>/tmp/mon.stat.tmpDAY=`date +%Y-%m-%d`echo "Today is $DAY,now checking the filesystem's space_usage.........">>/tmp/mon.stat.tmpdf -h|grep -v Filesystem|grep -v none...
修改dual表引发的故障
今天做测试的时候,对一个表收集统计信息,遇到如下错误:SQL> exec dbms_stats.gather_table_stats(user,'TEST');BEGIN dbms_stats.gather_table_stats(user,'TEST'); END; *ERROR at line 1:OR...
管理脚本系列(1)-查找索引较大的表
1. 今天看到生产库里有个索引是表的2倍大,写了个脚本查一下到底有多少size比较夸张的索引:select t.tab_name,t.tab_size,i.ind_name,i.ind_size,round(i.ind_size/t.tab_size,2)*100||'%' as size_pctfrom(select...
concepts之null在block中的存储
关于null,在concepts中有如下解释:A null is the absence of a value in a column of a row. Nulls indicate missing,unknown, or inapplicable data. A null should not be used to imply any other value,such a...