UNDO表空間清理(切換)

2021-10-17 19:34:25 字數 586 閱讀 6667

--檢視表空間使用情況

select a.tablespace_name "表空間名",total "表空間大小",free "表空間剩餘大小", 

(total - free) "表空間使用大小",total / (1024 * 1024 * 1024) "表空間大小(g)",free / (1024 * 1024 * 1024) "表空間剩餘大小(g)",(total - free) / (1024 * 1024 * 1024) "表空間使用大小(g)",round((total - free) / total, 4) * 100 "使用率 %" from (select tablespace_name, sum(bytes) free from dba_free_space group by tablespace_name) a, (select tablespace_name, sum(bytes) total from dba_data_files group by tablespace_name) b where a.tablespace_name = b.tablespace_name;

---檢視表空間檔案目錄

select * from dba_data_files;

UNDO 表空間重建(清理)

oracle的aum auto undo management 從出生以來就經常出現只擴充套件,不收縮 shrink 的情況 通常我們可以設定足夠的undo表空間大小,然後取消其自動擴充套件屬性 檢視表空間使用情況 select a.tablespace name,round a.total siz...

重建Undo表空間

檢視各表空間名稱 select name from v tablespace 檢視某個表空間資訊 select file name,bytes 1024 1024 from dba data files where tablespace name like undotbs1 檢視回滾段的使用情況,哪...

undo表空間損壞

操作如下 sqlplus as sysdba 繼續執行命令 alter database open 例項終止。強制斷開連線 recover database recover datafile 1 recover datafile 2 系統提示 介質恢復成功 以為恢復成功就,直接,startup fo...