工作总结30 ORACLE表空间无法扩展后处理
发布时间:2020-12-12 14:53:40 所属栏目:百科 来源:网络整理
导读:--查看表空间使用情况 select t1 "表空间", z/(1024*1024*1024) "总表空间", z-s/(1024*1024*1024) "已用表空间", s/(1024*1024*1024) "剩余表空间", ROUND((z-s)/z*100,2) "使用率%" from (select tablespace_name t1,sum(bytes) s from dba_free_space gro
--查看表空间使用情况 select t1 "表空间",z/(1024*1024*1024) "总表空间", z-s/(1024*1024*1024) "已用表空间", s/(1024*1024*1024) "剩余表空间", ROUND((z-s)/z*100,2) "使用率%" from (select tablespace_name t1,sum(bytes) s from dba_free_space group by tablespace_name), (select tablespace_name t2,sum(bytes) z from dba_data_files group by tablespace_name) where t1 = t2 --查询表空间的数据文件 select file_name,tablespace_name,bytes,autoextensible,maxbytes from dba_data_files where tablespace_name='USERS' --初始化表空间大小 alter tablespace USERS add datafile 'D:ORACLEPRODUCT10.2.0DB_1ORADATAORCLUSERS02.DBF' size 1024m autoextend on next 200m maxsize unlimited; --可以调整表空间扩展大小 alter database datafile 'D:ORACLEPRODUCT10.2.0DB_1ORADATAORCLUSERS02.DBF' autoextend on next 200m maxsize unlimited; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |