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

Recovery of Truncate Table under Oracle

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "recovery of Truncate table under Oracle". In daily operation, I believe many people have doubts about the recovery of Truncate table under Oracle. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "recovery of Truncate table under Oracle". Next, please follow the editor to study!

Oracle Truncate recovery (ODU)

Starting with version 3.0.7, it is more convenient to restore the Truncate table by performing the following steps:

(1) the tablespace where the OFFLINE table resides

(2) generate data dictionary: unload dict

(3) scan data: scan extent

(4) recovery table: unload table username.tablename object auto

Create table tt1 as select * from dba_objects

Create table tt2 as select * from tt1

Select * from dba_objects where object_name='TT1';-OBJECT_ID 87295-DATA_OBJECT_ID 87295

-object_id: Dictionary object number of the object.

-Data_object_id: Dictionary object number of the segment that contains the object.

Truncate table tt1

Select * from tt1

One: the tablespace where the OFFLINE table is located

Select * from dba_objects where object_name='TT1';-OBJECT_ID 87290-DATA_OBJECT_ID 87297

Select tablespace_name from user_tables where table_name='T1';-USERS

Alter tablespace USERS offline

Alter system checkpoint

Two: ODU version 3.0.9

Three: generate a data dictionary

Four: scan data

Five: restore the table

The following three files are automatically generated

Six: load data to database through sqlldr

Seven: validate data

Select count (*) from tt1;-86155

Select * from tt1

At this point, the study on "the recovery of Truncate tables under Oracle" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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: 0

*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