1.檢查數據庫表空間占用空間情況:
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_data_files group by tablespace_name
union all
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_temp_files group by tablespace_name order by GB;
2.確認文件
select file_name,bytes/1024/1024 from dba_data_files
where tablespace_name like 'USERS';
3.檢查UNDO Segment狀態
select usn,xacts,rssize/1024/1024/1024,hwmsize/1024/1024/1024,shrinks
from v$rollstat order by rssize;
3.創建新用戶表空間
CREATE TABLESPACE USERS DATAFILE '/opt/oracle/oradata/insight/users_01.dbf' SIZE 128M REUSE
AUTOEXTEND ON NEXT 1280K
MINIMUM EXTENT 128K
DEFAULT STORAGE ( INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0);
4.改變默認用戶表空間
alter database default tablespace NEWUSERS;
5.刪除Users表空間
drop tablespace USERS including contents and datafiles