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