這篇文章將為大家詳細講解有關怎樣進行Oracle Delete表的恢復,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。
目前創(chuàng)新互聯(lián)已為近千家的企業(yè)提供了網(wǎng)站建設、域名、網(wǎng)站空間、綿陽服務器托管、企業(yè)網(wǎng)站設計、屯溪網(wǎng)站維護等服務,公司將堅持客戶導向、應用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
Oracle Delete表恢復(ODU)
表中數(shù)據(jù)被DELETE
· (1)將參數(shù)unload_deleted設置為YES
· (2)生成數(shù)據(jù)字典:unload dict
· (3)恢復表: unload table username.tablename
---模擬誤刪除
create table t0 as select * from dba_objects;
create table t0_bak as select * from t0;
select count(*) from t0;---86159
delete t0 where object_id>85000; commit;
select count(*) from t0;---84141
一:將參數(shù)unload_deleted設置為YES
二:生成數(shù)據(jù)字典
三:恢復表
rename t0 to tt0;
CREATE TABLE "CHEN"."T0"
(
"OWNER" VARCHAR2(30) ,
"OBJECT_NAME" VARCHAR2(128) ,
"SUBOBJECT_NAME" VARCHAR2(30) ,
"OBJECT_ID" NUMBER ,
"DATA_OBJECT_ID" NUMBER ,
"OBJECT_TYPE" VARCHAR2(19) ,
"CREATED" DATE ,
"LAST_DDL_TIME" DATE ,
"TIMESTAMP" VARCHAR2(19) ,
"STATUS" VARCHAR2(7) ,
"TEMPORARY" VARCHAR2(1) ,
"GENERATED" VARCHAR2(1) ,
"SECONDARY" VARCHAR2(1) ,
"NAMESPACE" NUMBER ,
"EDITION_NAME" VARCHAR2(30)
);
四:通過sqlldr將數(shù)據(jù)加載到數(shù)據(jù)庫
5:驗證數(shù)據(jù)
select count(*) from t0; ---86159
select * from t0 where object_id>85000;
關于怎樣進行Oracle Delete表的恢復就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。