desc dba_data_files;
desc dba_tablespaces;
create tablespace test1122 datafile ‘/u01/app/oracle/oradata/orcl/tbs2.dbf’ size 10m;
purge tablespace users;(清空表空间)
drop tablespace undotabs2;
或者
drop tablespace undotabs2 including contents and datafiles;
SQL> select tablespace_name,contents from dba_tablespaces;
TABLESPACE_NAME CONTENTS
SYSTEM PERMANENT
SYSAUX PERMANENT
UNDOTBS1 UNDO
TEMP TEMPORARY
USERS PERMANENT
EXAMPLE PERMANENT
TEST123 PERMANENT
UNDOTABS2 PERMANENT
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
/u01/app/oracle/oradata/orcl/users01.dbf USERS
/u01/app/oracle/oradata/orcl/undotbs01.dbf UNDOTBS1
/u01/app/oracle/oradata/orcl/sysaux01.dbf SYSAUX
/u01/app/oracle/oradata/orcl/system01.dbf SYSTEM
/u01/app/oracle/oradata/orcl/example01.dbf EXAMPLE
/u01/app/oracle/oradata/orcl/tbs2.dbf UNDOTABS2
/u01/app/oracle/oradata/orcl/test123.dbf TEST123
SQL> drop tablespace undotabs2;
Tablespace dropped.