[20190415]10g下那些latch是共享的.txt

http://andreynikolaev.wordpress.com/2010/11/23/shared-latches-by-oracle-version/

--//oracle并没有文档准确说明那些latch是支持共享,作者的链接通过使用orderbug手工调用kslgetsl()函数(10g)或者kslgetsl_w()函
--//数(11g),确定那些latch支持共享模式.我仅仅重复测试看看.

1.环境:
SYS@test> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- ----------------------------------------------------------------
x86_64/Linux 2.4.xx            10.2.0.4.0     Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

2.建立测试脚本:
--//drop table shared_latches purge;
create table shared_latches(
  version varchar2(50),   /* Oracle version */
  latch# number,          /* latch# */
  name   varchar2(200),   /* ltach name */
  shared varchar2(1)      /* if 'Y' then latch is shared  */
);
--//建立表shared_latches.

spool list_shared_latches.sh
select 'sqlplus /nolog @is_latch_shared 0x'||addr||' '||latch#||' "'||translate(name,'''',' ')||'"'
   from v$latch_parent;
spool off
--//获得latch list.仅仅测试latch parent就ok了.适当编辑整理脚本.

$ cat is_latch_shared.sql
/*
     This file is part of demos for "Contemporary Latch Internals" seminar v.24.08.2010
     Copyright:   (c) Andrey S. Nikolaev (Andrey.Nikolaev@rdtex.ru) RDTEX
     http://AndreyNikolaev.wordpress.com
     for 32bit Oracle 10g and above
*/
connect / as sysdba
set verify off
WHENEVER SQLERROR EXIT;
set pagesize 0

alter session set max_dump_file_size=0;
/*
   before 11g shared latch get function was named kslgetsl()
   in 11g - kslgetsl_w()
*/
col shared_latch_function new_value shared_latch_function
var db_v varchar2(100);
var db_comp varchar2(100);
begin dbms_utility.db_version(:db_v,:db_comp); end;
/
select decode(sign(replace(:db_v,'.','')-110000),1,'kslgetsl_w', 'kslgetsl') shared_latch_function from dual;
--//11g use kslgetsl_w,other use kslgetsl.

oradebug setmypid
/* try to get latch as shared in S mode */
oradebug call &shared_latch_function &1 1 2 3 8
/* if ORA-00600: [545] was raised in previous statement then latch was exclusive.  The error terminates the script */
/* free the latch */
oradebug call kslfre &1
/* if we are here, the latch was shared */
insert into shared_latches(version,latch#,name,shared) select version,latch#,name,'Y' from v$latch,v$instance where latch#=&2;
commit;
exit

--//说明:作者利用oradebug调用报错,后面的插入语句不会执行,来完整获得那些shared latch的列表.

3.执行:
$ . list_shared_latches.sh > /dev/null
--//略.

4.结果:
SYS@test> select * from shared_latches;
VERSION        LATCH# NAME                                     S
---------- ---------- ---------------------------------------- -
10.2.0.4.0          7 session idle bit                         Y
10.2.0.4.0          8 client/application info                  Y
10.2.0.4.0         35 resmgr group change latch                Y
10.2.0.4.0         36 channel handle pool latch                Y
10.2.0.4.0         37 channel operations parent latch          Y
10.2.0.4.0         38 message pool operations parent latch     Y
10.2.0.4.0         51 SGA mapping latch                        Y
10.2.0.4.0         52 active service list                      Y
10.2.0.4.0         97 name-service namespace bucket            Y
10.2.0.4.0        101 gcs remastering latch                    Y
10.2.0.4.0        102 gcs partitioned table hash               Y
10.2.0.4.0        103 gcs pcm hashed value bucket hash         Y
10.2.0.4.0        106 recovery domain hash list                Y
10.2.0.4.0        109 Memory Management Latch                  Y
10.2.0.4.0        118 buffer pool                              Y
10.2.0.4.0        122 cache buffers chains                     Y
10.2.0.4.0        131 object queue header operation            Y
10.2.0.4.0        150 KCL gc element parent latch              Y
10.2.0.4.0        193 In memory undo latch                     Y
10.2.0.4.0        194 KTF sga latch                            Y
10.2.0.4.0        196 Change Notification Hash table latch     Y
10.2.0.4.0        204 global KZLD latch for mem in SGA         Y
10.2.0.4.0        207 Policy Refresh Latch                     Y
10.2.0.4.0        208 Policy Hash Table Latch                  Y
10.2.0.4.0        209 OLS label cache                          Y
10.2.0.4.0        210 instance information                     Y
10.2.0.4.0        211 policy information                       Y
10.2.0.4.0        212 global ctx hash table latch              Y
10.2.0.4.0        221 library cache hash chains                Y
10.2.0.4.0        229 resmgr:active threads                    Y
10.2.0.4.0        238 resmgr:plan CPU method                   Y
10.2.0.4.0        244 Shared B-Tree                            Y
10.2.0.4.0        245 Memory Queue                             Y
10.2.0.4.0        246 Memory Queue Subscriber                  Y
10.2.0.4.0        271 JOX SGA heap latch                       Y
10.2.0.4.0        284 hash table column usage latch            Y
10.2.0.4.0        291 compile environment latch                Y
10.2.0.4.0        314 KWQP Prop Status                         Y
10.2.0.4.0        315 AQ Propagation Scheduling Proc Table     Y
10.2.0.4.0        316 AQ Propagation Scheduling System Load    Y
10.2.0.4.0        319 rules engine rule set statistics         Y
10.2.0.4.0        320 rules engine rule statistics             Y
10.2.0.4.0        325 kwqbsn:qsga                              Y
10.2.0.4.0        327 bufq statistics                          Y
10.2.0.4.0        329 queue sender's info. latch               Y
10.2.0.4.0        330 bq:time manger info latch                Y
10.2.0.4.0        333 KWQMN job cache list latch               Y
10.2.0.4.0        334 KWQMN to-be-Stopped Buffer list Latch    Y
10.2.0.4.0        392 JS Sh mem access                         Y
10.2.0.4.0        393 PL/SQL warning settings                  Y
50 rows selected.

--//我导入作者的测试结果在链接https://andreynikolaev.wordpress.com/上可以找到.
--//https://andreynikolaev.wordpress.com/summary-tables/shared_latches-ctl/
--//10.2.0.4.0结果如下:
SYS@book> select count(*) from  scott.shared_latches where version='10.2.0.4.0';
  COUNT(*)
----------
        51

--//相差1个.

SYS@192.168.100.33:1521/test> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- ----------------------------------------------------------------
x86_64/Linux 2.4.xx            10.2.0.4.0     Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

SYS@192.168.100.33:1521/test> @ laddr.sql 'parameter table allocation management'
ADDR             NAME
---------------- ----------------------------------------
0000000060009298 parameter table allocation management

SYS@book> select * from scott.shared_latches where version='10.2.0.4.0' minus select * from sys.shared_latches@test033;
VERSION        LATCH# NAME                                     S
---------- ---------- ---------------------------------------- -
10.2.0.4.0         15 parameter table allocation management    Y

--//我手工执行发现报错,
SYS@192.168.100.33:1521/test> oradebug setmypid
Statement processed.

SYS@192.168.100.33:1521/test> oradebug call kslgetsl 0x0000000060009298 1 2 3 8
ORA-00600: internal error code, arguments: [545], [0x060009298], [15], [8], [], [], [], []

[20190415]10g下那些latch是共享的.txt的更多相关文章

  1. [20190415]11g下那些latch是共享的.txt

    [20190415]11g下那些latch是共享的.txt http://andreynikolaev.wordpress.com/2010/11/23/shared-latches-by-oracl ...

  2. [20190416]11g下那些latch是Exclusive的.txt

    [20190416]11g下那些latch是Exclusive的.txt --//昨天测试了11g下那些latch是共享的,链接:--//是否反过来剩下的都是Exclusive的.继续测试: 1.环境 ...

  3. oracle 10g下范围分区扫描的几种方式

    oracle 10g下有几种扫描方式,注意最后一种扫描方式,当对分区的列进行计算时,会不走分区.这跟对索引列进行计算会导致无法用索引一样. --扫描单个分区  PARTITION RANGE SING ...

  4. Mac、Linux下两个Emacs共享一个配置文件

    Mac.Linux下两个Emacs共享一个配置文件 有些嵌入式的实验需要在Linux进行,就安装了RHEL6.4的虚拟机,下载并编译了Emacs. 在Linux的.emacs文件中加入以下语句,即可引 ...

  5. 阿里云服务器win2003下iis整合tomcat共享80端口

    阿里云服务器win2003下iis整合tomcat共享80端口 很多机器都用tomcat跟IIS部署不同网站.最近买了阿里云的服务器.于是也想玩一下.网上百度了很多方法.但是都有缺陷说的不是很清楚.通 ...

  6. [20190319]shared pool latch与library cache latch的简单探究.txt

    [20190319]shared pool latch与library cache latch的简单探究.txt --//昨天看Oracle DBA手记3:数据库性能优化与内部原理解析.pdf 电子书 ...

  7. [20190416]完善shared latch测试脚本2.txt

    [20190416]完善shared latch测试脚本2.txt --//昨天测试shared latch,链接:http://blog.itpub.net/267265/viewspace-264 ...

  8. [20190505]关于latch 一些统计信息.txt

    [20190505]关于latch 一些统计信息.txt --//我在两篇文章,提到一些latch的统计信息.链接如下:http://blog.itpub.net/267265/viewspace-2 ...

  9. [20190423]简单测试latch nowilling等待模式.txt

    [20190423]简单测试latch nowilling等待模式.txt --//我对这个问题的理解就是如果参数willing=0,表示无法获取该latch,直接退出,再寻找类似的latch.--/ ...

随机推荐

  1. MyBatis增、删、改、查

    1.config.xml文件的基本配置信息 2.选择数据源 3.mybatis约定 (1)parameterType和resultType 只能传一个参数,但是我们可以传一个数组或者集合,达到传多个参 ...

  2. 机器学习基石笔记:Homework #1 PLA&PA相关习题

    原文地址:http://www.jianshu.com/p/5b4a64874650 问题描述 程序实现 # coding: utf-8 import numpy as np import matpl ...

  3. Nginx学习系列三Nginx的启动、停止、修改配置文件后重启

    1.启动Nginx 命令规则:Ngxin的安装地址 -c Nginx的安装地址下的配置文件地址 注意:一般都在root权限下进行Nginx的启动 2.停止Nginx (1).从容停止 第一步:查看Ng ...

  4. CentOS 7 安装 Jenkins

    准备工作 首选需要安装JAVA环境 https://www.cnblogs.com/stulzq/p/9286878.html 如果你的系统没有自带git,那么也需要安装一个 yum install ...

  5. 贝叶斯个性化排序(BPR)算法小结

    在矩阵分解在协同过滤推荐算法中的应用中,我们讨论过像funkSVD之类的矩阵分解方法如何用于推荐.今天我们讲另一种在实际产品中用的比较多的推荐算法:贝叶斯个性化排序(Bayesian Personal ...

  6. 解决GOOGLE无法访问

    修改hosts文件 https://github.com/txthinking/google-hosts  

  7. 用gogs轻松搭建个人的git服务器

    因为公司和家里电脑里面有些项目需做版本控制或者说共享吧,就想搭个自己的git服务器:原本想用gitlab,不过我服务器配置比较差,查了一下,看到gogs,眼前一亮: Gogs 的目标是打造一个最简单. ...

  8. 【c#】RabbitMQ学习文档(四)Routing(路由)

    (使用Net客户端) 在上一个教程中,我们构建了一个简单的日志系统,我们能够向许多消息接受者广播发送日志消息. 在本教程中,我们将为其添加一项功能 ,这个功能是我们将只订阅消息的一个子集成为可能. 例 ...

  9. 离线批量数据通道Tunnel的最佳实践及常见问题

    基本介绍及应用场景 Tunnel是MaxCompute提供的离线批量数据通道服务,主要提供大批量离线数据上传和下载,仅提供每次批量大于等于64MB数据的场景,小批量流式数据场景请使用DataHub实时 ...

  10. 痞子衡嵌入式:第一本Git命令教程(1)- 准备(init/config/.gitignore)

    今天是Git系列课程第一课,痞子衡给大家要讲的是创建仓库的准备工作. 1.建仓库git init 第一步是创建一个空仓库,这是一切操作的前提. // 打开git bash命令行,切换到指定目录下 ja ...