Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Commands about dumping Oracle index information

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

#Version Oracle 11g

1. Dumping index information

After obtaining the index Object_id, execute the following command

ALTER SESSION SET EVENTS 'immediate trace name TREEDUMP level 76400';

where 76400 is the index Object_id

2. View the location where the storage file was generated

Generally store session tracking information, use show parametr user_dump_dest to view

You can also query the generated file name through SQL

SELECT C.VALUE || '/' || '_ora_' || A.SPID || '.trc' TRACE_NAME_FILE

FROM V$PROCESS A, V$SESSION B, V$PARAMETER C

WHERE A.ADDR = B.PADDR

AND B.AUDSID = USERENV('sessionid')

AND C.NAME = 'user_dump_dest'

3. Find the data block corresponding to the leaf branch/leaf node

select dbms_utility.data_block_address_file(20977549),dbms_utility.data_block_address_block(20977549) from dual;

where the red digits are decimal values for branch/leaf nodes

hexadecimal to decimal

SELECT to_number('1401979','xxxxxxx') FROM dual;

4. Dumping index data block contents

alter system dump datafile 5 block 7075;

Where the number 5 is the data file ID, 7075 is the database block number, which are found in step 3.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 219

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report