0
点赞
收藏
分享

微信扫一扫

删除默认表空间

是她丫 2022-08-22 阅读 89


因为本地一直默认表空间导致系统磁盘满了,但是默认表空间还删除不掉,所以总结以下方法删除表空间
--查看所有用户对象
select uo.object_name,uo.object_type from user_objects uo where uo.object_type<>'LOB' order by uo.object_type desc

--自己新建表空间,以后记得多建几个

 create tablespace USER_ME
logging 
datafile 'C:\APP\ADMIN\ORADATA\ORCL\USER_ME.dbf' 
size 50m 
autoextend on 
next 50m maxsize 20480m 
extent management local;

--删除语法
drop user 表空间名称 cascade;

--查询默认表空间
select * from database_properties where property_name='DEFAULT_PERMANENT_TABLESPACE'
--删除
drop tablespace USERS including contents and datafiles;
--调整默认表空间
alter database default tablespace USER_ME;

 select * from database_properties where property_name='DEFAULT_PERMANENT_TABLESPACE';

 

--继续删除就可以了
drop tablespace USERS including contents and datafiles;

举报

相关推荐

0 条评论