【文章內(nèi)容簡(jiǎn)介】
ntified by test default tablespace test。grant connect,resource to test。conn test/testcreate table a(a number)。insert into a values(1)。insert into a select * from a。 反復(fù)插入,達(dá)到10萬(wàn)條mit。insert into a select * from a。 20萬(wàn)條mit。關(guān)閉數(shù)據(jù)庫(kù)shutdown。重新啟動(dòng)數(shù)據(jù)庫(kù)這時(shí),可以mount上,但無(wú)法打開,因?yàn)楝F(xiàn)在使用的數(shù)據(jù)文件是舊的只有10萬(wàn)條記錄,與控制文件中記載的log number不一樣startup mount需要recover database,使數(shù)據(jù)庫(kù)記錄重新恢復(fù)到當(dāng)前的20萬(wàn)條C:\svrmgrlsvrmgrlconnect internalsvrmgrlshutdownsvrmgrlstartup mountsvrmgrlset autorecovery onsvrmgrlrecover database。svrmgrlalter database open。conn test/testselect count(*) from a。 數(shù)據(jù)又恢復(fù)到20萬(wàn)條conn system/manager刪除實(shí)驗(yàn)表空間alter tablespace test offline。drop tablespace test INCLUDING CONTENTS。 沒有備份、只有歸檔日志,如何恢復(fù)數(shù)據(jù)文件? 系統(tǒng)環(huán)境: 操作系統(tǒng):Windows 2000 Server,機(jī)器內(nèi)存128M數(shù)據(jù)庫(kù): Oracle 8i R2 () for NT 企業(yè)版安裝路徑:C:\ORACLE模擬現(xiàn)象: 可通過(guò)重建數(shù)據(jù)文件來(lái)恢復(fù),前提是歸檔日志文件保存完整先將數(shù)據(jù)庫(kù)設(shè)置為歸檔模式SQL*Plusconn system/manager創(chuàng)建實(shí)驗(yàn)表空間create tablespace test datafile39。c:\39。 size 5MAUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITEDdefault storage (initial 128K next 1M pctincrease 0)/創(chuàng)建實(shí)驗(yàn)用戶 drop user test cascade。create user test identified by test default tablespace test。grant connect,resource to test。conn test/testcreate table a(a number)。insert