Table of Contents
1.DUMP buffer cache中全部数据块
2.DUMP buffer cache中指定RDBA的数据块方法
3.查看TRACE文件--就先不解读了
Home Database Mysql Tutorial 使用eventsDUMPbuffercache中指定的数据块

使用eventsDUMPbuffercache中指定的数据块

Jun 07, 2016 pm 03:22 PM
use

介绍了DUMP buffer cache中全部数据块及指定RDBA的数据块方法。 1.DUMP buffer cache中全部数据块 ALTER SESSION SET EVENTS ‘immediate trace name buffers level n’; 1 buffer header 2 level 1 block header 3 level 2 block contents 4 level 1 hash c

介绍了DUMP buffer cache中全部数据块及指定RDBA的数据块方法。

1.DUMP buffer cache中全部数据块

ALTER SESSION SET EVENTS ‘immediate trace name buffers level n’;
1 buffer header
2 level 1 + block header
3 level 2 + block contents
4 level 1 + hash chain
5 level 2 + hash chain
6 level 3 + hash chain
8 level 4 + users/waiters
9 level 5 + users/waiters
10 level 6 + users/waiters
###############################

2.DUMP buffer cache中指定RDBA的数据块方法

BYS@ bys3>select dbms_rowid.rowid_relative_fno(rowid) fileid,dbms_rowid.rowid_object(rowid) obj#,dbms_rowid.rowid_block_number(rowid) block#,deptno from dept;
FILEID OBJ# BLOCK# DEPTNO
---------- ---------- ---------- ----------
4 22327 251 10
4 22327 251 20
4 22327 251 40
4 22327 251 99
BYS@ bys3>select dbms_utility.make_data_block_address(4,251) from dual; --使用此函数算出rdba--就是rowid中的rfile#+block#
DBMS_UTILITY.MAKE_DATA_BLOCK_ADDRESS(4,251)
-------------------------------------------
16777467

BYS@ bys3>alter session set events 'immediate trace name set_tsn_p1 level 5'; --这里的5是表空间号加1得到的。也就是TS#+1。select ts#,name from v$tablespace;
Session altered.
BYS@ bys3>alter session set events 'immediate trace name buffer level16777467';
Session altered.
BYS@ bys3>select value from v$diag_info where name like 'De%';
VALUE
---------------------------------------------------
/u01/diag/rdbms/bys3/bys3/trace/bys3_ora_21011.trc
###########################

3.查看TRACE文件--就先不解读了

[oracle@bys3 ~]$ cat /u01/diag/rdbms/bys3/bys3/trace/bys3_ora_21011.trc
Trace file /u01/diag/rdbms/bys3/bys3/trace/bys3_ora_21011.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: bys3.bys.com
Release: 2.6.32-200.13.1.el5uek
Version: #1 SMP Wed Jul 27 20:21:26 EDT 2011
Machine: i686
Instance name: bys3
Redo thread mounted by this instance: 1
Oracle process number: 17
Unix process pid: 21011, image: oracle@bys3.bys.com (TNS V1-V3)


*** 2013-12-20 13:22:53.896
*** SESSION ID:(35.1461) 2013-12-20 13:22:53.896
*** CLIENT ID:() 2013-12-20 13:22:53.896
*** SERVICE NAME:(SYS$USERS) 2013-12-20 13:22:53.896
*** MODULE NAME:(SQL*Plus) 2013-12-20 13:22:53.896
*** ACTION NAME:() 2013-12-20 13:22:53.896

Dump of buffer cache at level 10 for tsn=4 rdba=16777467
BH (0x20ff065c) file#: 4 rdba: 0x010000fb (4/251) class: 1 ba: 0x20e1a000
set: 3 pool: 3 bsz: 8192 bsi: 0 sflg: 1 pwc: 0,0
dbwrid: 0 obj: 22327 objn: 22327 tsn: 4 afn: 4 hint: f
hash: [0x21be851c,0x2bbfddf4] lru: [0x21fe8100,0x21ff6c78]
lru-flags: hot_buffer
ckptq: [NULL] fileq: [NULL] objq: [0x21fe8118,0x246ea304] objaq: [0x21fe8120,0x246ea2fc]
st: XCURRENT md: NULL fpin: 'kdswh01: kdstgr' tch: 0
flags: only_sequential_access
LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [65535]
buffer tsn: 4 rdba: 0x010000fb (4/251)
scn: 0x0000.00359e7e seq: 0x01 flg: 0x04 tail: 0x9e7e0601
frmt: 0x02 chkval: 0x8cd6 type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x20E1A000 to 0x20E1C000
20E1A000 0000A206 010000FB 00359E7E 04010000 [........~.5.....]
20E1A010 00008CD6 00000001 00005737 00359E7E [........7W..~.5.]
20E1A020 00000000 00320003 010000F8 00050008 [......2.........]
20E1A030 0000097B 00000000 00000000 0000A000 [{...............]
20E1A040 00359171 00000000 00000000 00000000 [q.5.............]
20E1A050 00000000 00000000 00000000 00000000 [................]
Repeat 1 times
20E1A070 00000000 00000000 00000000 00040100 [................]
20E1A080 001AFFFF 1F0E1F28 00001F0E 1F280004 [....(.........(.]
20E1A090 1F581F42 00001F70 00000000 00000000 [B.X.p...........]
20E1A0A0 00000000 00000000 00000000 00000000 [................]
Repeat 495 times
20E1BFA0 00000000 0203002C 410A0BC1 554F4343 [....,......ACCOU]
20E1BFB0 4E49544E 454E0847 4F592057 002C4B52 [NTING.NEW YORK,.]
20E1BFC0 15C10203 53455208 43524145 41440648 [.....RESEARCH.DA]
20E1BFD0 53414C4C 0203002C 4F0A29C1 41524550 [LLAS,....).OPERA]
20E1BFE0 4E4F4954 4F420653 4E4F5453 0203002C [TIONS.BOSTON,...]
20E1BFF0 630664C1 61646568 6A62026E 9E7E0601 [.d.chedan.bj..~.]
Block header dump: 0x010000fb
Object id on Block? Y
seg/obj: 0x5737 csc: 0x00.359e7e itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x10000f8 ver: 0x01 opc: 0
inc: 0 exflg: 0

Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0008.005.0000097b 0x00000000.0000.00 C-U- 0 scn 0x0000.00359171
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
bdba: 0x010000fb
data_block_dump,data header at 0x20e1a07c
===============
tsiz: 0x1f80
hsiz: 0x1a
pbl: 0x20e1a07c
76543210
flag=--------
ntab=1
nrow=4
frre=-1
fsbo=0x1a
fseo=0x1f28
avsp=0x1f0e
tosp=0x1f0e
0xe:pti[0] nrow=4 offs=0
0x12:pri[0] offs=0x1f28
0x14:pri[1] offs=0x1f42
0x16:pri[2] offs=0x1f58
0x18:pri[3] offs=0x1f70
block_row_dump:
tab 0, row 0, @0x1f28
tl: 26 fb: --H-FL-- lb: 0x0 cc: 3
col 0: [ 2] c1 0b
col 1: [10] 41 43 43 4f 55 4e 54 49 4e 47
col 2: [ 8] 4e 45 57 20 59 4f 52 4b
tab 0, row 1, @0x1f42
tl: 22 fb: --H-FL-- lb: 0x0 cc: 3
col 0: [ 2] c1 15
col 1: [ 8] 52 45 53 45 41 52 43 48
col 2: [ 6] 44 41 4c 4c 41 53
tab 0, row 2, @0x1f58
tl: 24 fb: --H-FL-- lb: 0x0 cc: 3
col 0: [ 2] c1 29
col 1: [10] 4f 50 45 52 41 54 49 4f 4e 53
col 2: [ 6] 42 4f 53 54 4f 4e
tab 0, row 3, @0x1f70
tl: 16 fb: --H-FL-- lb: 0x0 cc: 3
col 0: [ 2] c1 64
col 1: [ 6] 63 68 65 64 61 6e
col 2: [ 2] 62 6a
end_of_block_dump

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use magnet links How to use magnet links Feb 18, 2024 am 10:02 AM

Magnet link is a link method for downloading resources, which is more convenient and efficient than traditional download methods. Magnet links allow you to download resources in a peer-to-peer manner without relying on an intermediary server. This article will introduce how to use magnet links and what to pay attention to. 1. What is a magnet link? A magnet link is a download method based on the P2P (Peer-to-Peer) protocol. Through magnet links, users can directly connect to the publisher of the resource to complete resource sharing and downloading. Compared with traditional downloading methods, magnetic

How to use mdf and mds files How to use mdf and mds files Feb 19, 2024 pm 05:36 PM

How to use mdf files and mds files With the continuous advancement of computer technology, we can store and share data in a variety of ways. In the field of digital media, we often encounter some special file formats. In this article, we will discuss a common file format - mdf and mds files, and introduce how to use them. First, we need to understand the meaning of mdf files and mds files. mdf is the extension of the CD/DVD image file, and the mds file is the metadata file of the mdf file.

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

How to download foobar2000? -How to use foobar2000 How to download foobar2000? -How to use foobar2000 Mar 18, 2024 am 10:58 AM

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

How to use NetEase Mailbox Master How to use NetEase Mailbox Master Mar 27, 2024 pm 05:32 PM

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below

How to use Baidu Netdisk app How to use Baidu Netdisk app Mar 27, 2024 pm 06:46 PM

Cloud storage has become an indispensable part of our daily life and work nowadays. As one of the leading cloud storage services in China, Baidu Netdisk has won the favor of a large number of users with its powerful storage functions, efficient transmission speed and convenient operation experience. And whether you want to back up important files, share information, watch videos online, or listen to music, Baidu Cloud Disk can meet your needs. However, many users may not understand the specific use method of Baidu Netdisk app, so this tutorial will introduce in detail how to use Baidu Netdisk app. Users who are still confused can follow this article to learn more. ! How to use Baidu Cloud Network Disk: 1. Installation First, when downloading and installing Baidu Cloud software, please select the custom installation option.

Simple guide to pip mirror source: easily master how to use it Simple guide to pip mirror source: easily master how to use it Jan 16, 2024 am 10:18 AM

Get started easily: How to use pip mirror source With the popularity of Python around the world, pip has become a standard tool for Python package management. However, a common problem that many developers face when using pip to install packages is slowness. This is because by default, pip downloads packages from Python official sources or other external sources, and these sources may be located on overseas servers, resulting in slow download speeds. In order to improve download speed, we can use pip mirror source. What is a pip mirror source? To put it simply, just

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? Apr 26, 2024 am 09:40 AM

MetaMask (also called Little Fox Wallet in Chinese) is a free and well-received encryption wallet software. Currently, BTCC supports binding to the MetaMask wallet. After binding, you can use the MetaMask wallet to quickly log in, store value, buy coins, etc., and you can also get 20 USDT trial bonus for the first time binding. In the BTCCMetaMask wallet tutorial, we will introduce in detail how to register and use MetaMask, and how to bind and use the Little Fox wallet in BTCC. What is MetaMask wallet? With over 30 million users, MetaMask Little Fox Wallet is one of the most popular cryptocurrency wallets today. It is free to use and can be installed on the network as an extension

See all articles