oracle dbf文件過大 Oracle數(shù)據(jù)庫表空間dbf文件被刪除了怎么辦?
Oracle數(shù)據(jù)庫表空間dbf文件被刪除了怎么辦?你好! 主要看看你有沒有備份了以及dbf 的文件內(nèi)容是不是很重要! 還有你的數(shù)據(jù)庫是不是有完整的備份以及歸檔模式! 如果沒有備份以及歸檔,就看看能不能
Oracle數(shù)據(jù)庫表空間dbf文件被刪除了怎么辦?
你好! 主要看看你有沒有備份了以及dbf 的文件內(nèi)容是不是很重要! 還有你的數(shù)據(jù)庫是不是有完整的備份以及歸檔模式! 如果沒有備份以及歸檔,就看看能不能從操作系統(tǒng)層面恢復(fù)文件! 如果不能的話,肯定要丟失了這個(gè)DBF文件的數(shù)據(jù)了! 可以強(qiáng)拉數(shù)據(jù)庫啟動(dòng)使用~
oracle數(shù)據(jù)庫表空間. DBF文件被我手動(dòng)刪除了,然后就登錄不了數(shù)據(jù)庫怎么解決啊?
啟動(dòng)dos命令窗口 然后按下面的操作sqlplus /nologconn sys/orcl as sysdbaalter database open當(dāng)操作完成上面的操作就會(huì)報(bào)ORA-01157: cannot identify/lock data file 9 XXX.DBF就是你誤刪除的那個(gè)文件。然后你執(zhí)行下面的操作。alter database datafile "d:XXX.DBF" offline dropalter database open
為什么在Oracle中,刪除了表空間但是對(duì)應(yīng)的數(shù)據(jù)文件還存在?
Oracle 11g刪除表空間語法描述: DROP TABLESPACE tablespace_name [ including contents [ and datafiles ] [ CASCADE CONSTRAINT ] ] 無選項(xiàng) -- 當(dāng)表空間為空才能刪除; including contents — 刪除表空間及對(duì)象; including contents and datafiles — 刪除表空間、對(duì)象及數(shù)據(jù)文件; includingcontents CASCADE CONSTRAINT — 刪除關(guān)聯(lián); including contents and datafiles cascade constraint -- 含前兩項(xiàng)。 你是采用了哪個(gè)選項(xiàng)?表空間刪除后的數(shù)據(jù)文件A.dbf就不能使用了。
如何刪除Oracle下無用的Dbf文件?
system/sysaux/undo這些系統(tǒng)表空間是不能刪的;
你要確定哪些table是有用的,比如table_name like "W%"等;
篩選出有數(shù)據(jù)的表空間,比如select tablespace_name from dba_tables where table_name like "W%" group by tablespace_name order by 1
把那些不在第1、3步中的表空間名字記下來;
確定無用的數(shù)據(jù)文件,比如select file_name, tablespace_name from dba_data_files where tablespace_name in ()
先把數(shù)據(jù)文件offline,然后再刪除,大功告成。