日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

odu恢复delete 表

發(fā)布時間:2023/12/13 综合教程 28 生活家
生活随笔 收集整理的這篇文章主要介紹了 odu恢复delete 表 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

生成測試表
conn liang/chengce243
create table tab_01(id int,name VARCHAR2(128));
insert into tab_01
select OBJECT_ID,OBJECT_NAME
from dba_objects where rownum<=10000;
commit;

create table tab_04 as select * from tab_01;
delete tab_04 where id<500;
commit;



恢復(fù)的步驟為:
OFFLINE表所在的表空間
將參數(shù)unload_deleted設(shè)置為YES
生成數(shù)據(jù)字典:unload dict
恢復(fù)表: unload table username.tablename
ONLINE表所在的表空間


set linesize 180
col FILE_NAME for a50
col VALUE for a8
select ts#,file_id fno#,file_id rfno#,file_name,value
from V$tablespace t,dba_data_files d,v$parameter p
where t.name=d.tablespace_name
and p.name='db_block_size';
把查詢結(jié)果貼到control.txt;

修改配置文件config.txt output_format 為 DMP
[oracle@hncdf odu]$ cat config.txt
byte_order little
block_size 8192
db_timezone -7
client_timezone 8
data_path data
charset_name ZHS16GBK
ncharset_name AL16UTF16
output_format DMP
lob_storage infile
clob_byte_order little


OFFLINE表所在的表空間
SQL> alter tablespace users offline;

做一個Checkpoint,讓ODU能夠讀到最新的數(shù)據(jù)字典數(shù)據(jù)。
SQL> alter system checkpoint;


ODU> unload dict


ODU> unload table liang.tab_04

Unloading table: TAB_04,object ID: 87364
Unloading segment,storage(Obj#=87364 DataObj#=87364 TS#=4 File#=4 Block#=274 Cluster=0)
10000 rows unloaded



將測試表所在的users表空間online:
SQL> alter tablespace users online;

使用imp導(dǎo)入數(shù)據(jù)
imp liang/chengce243 file=data/LIANG_TAB_04.dmp


參考文檔:http://www.laoxiong.net/category/odu

總結(jié)

以上是生活随笔為你收集整理的odu恢复delete 表的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。