[20180625]oradebug peek 2.txt
[20180625]oradebug peek 2.txt
--//上个星期演示了oradebug peek查看内存数据块的情况,oradebug peek {address} length 1,最后的参数1可以实现转储到跟踪文件.
--//以前也使用oradebug查看sql语句在共享池的父游标.采用拚接的方式查看.
--//如果使用上面的方式就简单了,测试看看.
--//以前的测试,链接:[20161230]查看父游标中sql语句.txt => http://blog.itpub.net/267265/viewspace-2131655/
1.环境:
SCOTT@book> @ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.查看父游标中sql语句:
SCOTT@book> select * from dept where deptno=10;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
--//多执行几次,保持sql语句光标在共享池中,确定sql_id= 4xamnunv51w9j.
SYS@book> @ &r/sharepool/shp4 4xamnunv51w9j 0
TEXT KGLHDADR KGLHDPAR C40 KGLHDIVC KGLOBHD0 KGLOBHD6 KGLOBHS0 KGLOBHS6 KGLOBT16 N0_6_16 N20 KGLNAHSH KGLOBT03 KGLOBT09
-------------- ---------------- ---------------- ---------------------------------------- ---------- ---------------- ---------------- ---------- ---------- ---------- --------- ---------- ---------- ------------- ----------
子游标句柄地址 000000007B9C0FD8 000000007C6315A8 select * from dept where deptno=10 0 000000007C25EC10 000000007DBA6D20 4528 12144 3067 19739 19739 911274289 4xamnunv51w9j 0
父游标句柄地址 000000007C6315A8 000000007C6315A8 select * from dept where deptno=10 0 000000007D84C448 00 4720 0 0 4720 4720 911274289 4xamnunv51w9j 65535
--//父游标地址=000000007C6315A8
4.看看范围:
--//通过查询x$ksmsp确定范围
SELECT * FROM x$ksmsp WHERE TO_NUMBER ('000000007C6315A8', 'xxxxxxxxxxxxxxxx') between TO_NUMBER(KSMCHPTR, 'xxxxxxxxxxxxxxxx') and TO_NUMBER(KSMCHPTR, 'xxxxxxxxxxxxxxxx')+KSMCHSIZ
ADDR INDX INST_ID KSMCHIDX KSMCHDUR KSMCHCOM KSMCHPTR KSMCHSIZ KSMCHCLS KSMCHTYP KSMCHPAR
---------------- ---------- ---------- ---------- ---------- ---------------- ---------------- ---------- -------- ---------- ----------------
00007FDE14C240E8 13208 1 1 1 KGLHD 000000007C631578 560 recr 80 00
--//可以确定范围: 0x000000007C631578,0x000000007C631578+560.
--//先看看sql语句转储的内容:
SCOTT@book> select dump('select * from dept where deptno=10',16) from dual ;
DUMP('SELECT*FROMDEPTWHEREDEPTNO=10',16)
--------------------------------------------------------------------------------------------------------------------
Typ=96 Len=34: 73,65,6c,65,63,74,20,2a,20,66,72,6f,6d,20,64,65,70,74,20,77,68,65,72,65,20,64,65,70,74,6e,6f,3d,31,30
--//我使用的cpu是intel系列的,存在大小头问题,在内存中看到的应该4个字节4个字节颠倒.前面4个应该是65,6c,65,73(16进制).
--//BTW: 我的测试oradebug peek最多查询60个字节.
SYS@book> oradebug setmypid
Statement processed.
SYS@book> oradebug peek 0x000000007C631578 560 1
[07C631578, 07C6317A8) = 00000231 80B38F00 7C631500 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00080050 803CBD30 00000000 ...
SYS@book> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/book/book/trace/book_ora_7077.trc
5.查看转储:
*** 2018-06-25 09:05:02.603
Processing Oradebug command 'peek 0x000000007C631578 560 1'
[07C631578, 07C6317A8) = 00000231 80B38F00 7C631500 00000000 00000000 ...
Dump of memory from 0x07C63158C to 0x07C6317A8
07C631580 00000000 [....]
07C631590 00000000 00000000 00000000 00000000 [................]
07C6315A0 00000000 00080050 803CBD30 00000000 [....P...0.<.....]
07C6315B0 803CBD30 00000000 7DBA6660 00000000 [0.<.....`f.}....]
07C6315C0 7C631700 00000000 00010000 10012841 [..c|........A(..]
07C6315D0 00000001 00000001 00010001 00000002 [................]
07C6315E0 00000000 00000005 00010000 00000000 [................]
07C6315F0 00000000 00000000 7C631778 00000000 [........x.c|....]
07C631600 00000001 00000000 7C631608 00000000 [..........c|....]
07C631610 7C631608 00000000 7C631618 00000000 [..c|......c|....]
07C631620 7C631618 00000000 7BF9D778 00000000 [..c|....x..{....]
07C631630 7BF9D778 00000000 7C631638 00000000 [x..{....8.c|....]
07C631640 7C631638 00000000 7D654A40 00000000 [8.c|....@Je}....]
07C631650 7D654A40 00000000 00000000 00000000 [@Je}............]
07C631660 00000001 00000000 4EAA74D5 00000000 [.........t.N....]
07C631670 0000F131 00000000 7C6316E8 00000000 [1.........c|....]
07C631680 7C631680 00000000 7C631680 00000000 [..c|......c|....]
07C631690 7C631690 00000000 7C631690 00000000 [..c|......c|....]
07C6316A0 00000000 00000000 7FC47F68 00000000 [........h.......]
07C6316B0 00000000 00000000 00000000 00000000 [................]
07C6316C0 00000003 00000001 00020002 00000000 [................]
07C6316D0 00000001 00000000 00000000 00000000 [................]
07C6316E0 00000000 00000000 00000000 00000000 [................]
07C6316F0 00000021 00000000 3650F131 00000000 [!.......1.P6....]
07C631700 1431C45D BDDBB9E7 4EAA74D5 3650F131 [].1......t.N1.P6]
07C631710 00000000 19067678 0011030A 00000000 [....xv..........]
07C631720 00000000 00000000 00000023 00000000 [........#.......]
07C631730 00000000 00000000 00000000 00000000 [................]
07C631740 7C631750 00000000 3650F131 00000053 [P.c|....1.P6S...]
07C631750 656C6573 2A207463 6F726620 6564206D [select * from de]
07C631760 77207470 65726568 70656420 3D6F6E74 [pt where deptno=]
07C631770 00003031 00000000 00000000 00000000 [10..............]
07C631780 00000000 00000000 00000000 00000000 [................]
Repeat 1 times
07C6317A0 00000000 00000000 [........]
--//可以发现sql语句的内容.
*** 2018-06-25 09:05:02.604
Oradebug command 'peek 0x000000007C631578 560 1' console output:
[07C631578, 07C6317A8) = 00000231 80B38F00 7C631500 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00080050 803CBD30 00000000 ...
*** 2018-06-25 09:05:12.659
Processing Oradebug command 'tracefile_name'
--//通过这样的方式提供快捷的方式查看内存地址的相关内容.
[20180625]oradebug peek 2.txt的更多相关文章
- [20180619]oradebug peek.txt
[20180619]oradebug peek.txt --//我以前一直以为oradebug peek查看某个地址开始的内容,后面的长度有限制的.--//在linux下,我的测试是60.实际上ora ...
- [20190423]oradebug peek测试脚本.txt
[20190423]oradebug peek测试脚本.txt --//工作测试需要写一个oradebug peek测试脚本,不断看某个区域内存地址的值. 1.环境: SCOTT@book> @ ...
- [20190402]关于semtimedop函数调用2.txt
[20190402]关于semtimedop函数调用2.txt --//前几天做了sql语句在mutexes上的探究.今天看看_mutex_wait_time设置很大的情况下是否semtimedop会 ...
- [20190423]简单测试latch nowilling等待模式.txt
[20190423]简单测试latch nowilling等待模式.txt --//我对这个问题的理解就是如果参数willing=0,表示无法获取该latch,直接退出,再寻找类似的latch.--/ ...
- [20190416]查看shared latch gets的变化.txt
[20190416]查看shared latch gets的变化.txt 1.环境:SYS@book> @ ver1PORT_STRING VERSION ...
- [20190416]exclusive latch测试脚本.txt
[20190416]exclusive latch测试脚本.txt --//昨天做了shared latch的测试脚本,今天完善exclusive latch测试脚本,上个星期的测试我是手工执行的.- ...
- [20190416]完善shared latch测试脚本2.txt
[20190416]完善shared latch测试脚本2.txt --//昨天测试shared latch,链接:http://blog.itpub.net/267265/viewspace-264 ...
- [20190415]关于shared latch(共享栓锁).txt
[20190415]关于shared latch(共享栓锁).txt http://andreynikolaev.wordpress.com/2010/11/17/shared-latch-behav ...
- [20190402]Library Cache mutex.txt
[20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING VERSION ...
随机推荐
- LeetCode--No.002 Add Two Numbers
Add Two Numbers Total Accepted: 160702 Total Submissions: 664770 Difficulty: Medium You are given tw ...
- 【sping揭秘】20、spring的orm
面向对象的操作方式,spring统一定义在org.springframework.jdbc.object以RdbmsOperation作为顶层抽象定义 Spring对各种ORM的集成 Spring的集 ...
- Difference Between Session.run and Tensor.eval
[Question]: TensorFlow has two ways to evaluate part of graph: Session.run on a list of variables an ...
- Tensflow的equal函数
一.函数 tf.equal() equal( x, y, name=None ) tf.equal(A, B)是对比这两个矩阵或者向量的相等的元素,如果是相等的那就返回True,反正返回False,返 ...
- Kafka实战-Storm Cluster
1.概述 在<Kafka实战-实时日志统计流程>一文中,谈到了Storm的相关问题,在完成实时日志统计时,我们需要用到Storm去消费Kafka Cluster中的数据,所以,这里我单独给 ...
- C#字符串分割成列表及相反转换
在实际开发中,一些老系统,特别是ERP,在做数据交换的时候,保存的是文本格式,然后以一个特殊符号隔开.如 2018-01-02 12:33:20#24.4#20.0|2018-01-03 11:33: ...
- ES启动报错之引导检测失败
[--16T18::,][ERROR][o.e.b.Bootstrap ] [node-] node validation exception [] bootstrap checks failed [ ...
- Linux 使用 ssh 命令远程连接另一台 Linux
用 Linux 系统的 ssh 命令远程连接另一台 Linux 机器的命令 #ssh 用户名@主机名(IP地址) 例: #ssh root@10.41.24.138 ...
- SpringMVC入门学习(一)
SpringMVC入门学习(一) ssm框架 spring SpringMVC是一个Java WEB框架,现在我们知道Spring了,那么,何为MVC呢? MVC是一种设计模式,其分为3个方面 mo ...
- [JSOI2010] 连通数
Description Input 输入数据第一行是图顶点的数量,一个正整数N. 接下来N行,每行N个字符.第i行第j列的1表示顶点i到j有边,0则表示无边. Output 输出一行一个整数,表示该图 ...