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.
本文详细介绍了Oracle数据库中表空间的创建、删除及管理过程,包括如何清空表空间、如何查看表空间及其数据文件详情,并提供了实际的SQL操作命令示例。
1413

被折叠的 条评论
为什么被折叠?



