从3.0.7版本开始,恢复Truncate表更方便,只需要执行下面的步骤:
· (1)OFFLINE表所在的表空间
· (2)生成数据字典:unload dict
· (3)扫描数据:scan extent
· (4)恢复表: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;
一:OFFLINE表所在的表空间
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;
二:ODU 版本3.0.9
![](/image///img.blog.itpub.net/blog/attachment/201712/29/29785807_1514511309pKn3.png?x-oss-process=style/bb)
三:生成数据字典
四:扫描数据
五:恢复表
自动生成以下三个文件
六:通过sqlldr加载数据到数据库
七:验证数据
select count(*) from tt1; ---86155
select * from tt1;
..........
原文链接如下:
http://www.laoxiong.net/category/odu
http://www.laoxiong.net/odu_recover_drop_table.html#more-95
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29785807/viewspace-2149477/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29785807/viewspace-2149477/