解決Oracle下的undo空間過大的問題

2021-04-12 23:06:43 字數 700 閱讀 6284

-- 如果undo表空間undotbs不能釋放空間,重建之

-- 建立備用undo表空間

create undo tablespace newundotbs datafile '$ora_data/newundotbs01.dbf' size 1000m

/-- 切換undo表空間

alter system set undo_tablespace=newundotbs scope=spfile

/shutdown immediate

/startup

/-- drop原表空間

drop tablespace undotbs including contents and datafiles

/-- 建立原undo表空間

create undo tablespace undotbs datafile '$ora_data/undotbs01.dbf' size 1000m

/-- 切換undo表空間

alter system set undo_tablespace=undotbs scope=spfile

/-- 關閉重起並把備用undo表空間drop

shutdown immediate

/startup

/drop tablespace newundotbs including contents and datafiles

/

oracle的undo的作用

undo表空間與redo日誌檔案在oracle中的作用非常重要,重做日誌用於從乙個例項故障或介質故障中恢復資料庫.在應用程式試圖回退 撤消 乙個事務處理時,不使用重做日誌.在這種情況下,oracle將從回退段恢復舊資訊,它還有oracle的另乙個強大的特性 多版本讀取一致性 multi versio...

ORACLE的undo表空間操作

1.檢視undo表空間 select file id,file name,tablespace name,sum bytes 1024 1024 total mb,autoextensible from dba data files group by file name,file id,tables...

Oracle的redo 和undo的區別

redo undo datafile insert一條記錄時,表跟undo的資訊都會放進 redo 中,在commit 或之前,redo 的資訊會放進硬碟上.故障時,redo 便可恢復那些已經commit 了的資料.redo 每次操作都先記錄到redo日誌中,當出現例項故障 像斷電 導致資料未能更新...