重命名表空间
1修改表空间不会影响表空间的数据
2不能重命名系统表空间system和sysaux
语法
alter tablespace tablespaceName rename to
newName;
注意:如果表空间时离线状态,是无法重命名该表空间
alter tablespace myspace rename to
myspace2;
删除表空间
语法
drop tablespace tablespaceName
【including contents 【and datafiles】 】
including contents :删除表空间的同时,删除表空间的所有数据库对象。如果表空间有数据,则必须使用该项。
数据库对象:视图 ,用户,表等内容.
and datafiles :删除表空间的同时,删除表空间对应的数据文件
如果不使用该项,则表示删除表空间实际上只是从数据字典和控制文件中将该表空间的有关信息删除,没有将删除操作系统中与该表空间对应的数据文件.
drop tablespace myspace2
including contents
and datafiles;
查询表空间信息
select tablespace_name ,status from dba_tablespaces;
发现对应的表空间已经被删除了