当前位置:Gxlcms > 数据库问题 > Oracle扩容表空间

Oracle扩容表空间

时间:2021-07-01 10:21:17 帮助过:30人阅读

技术分享图片

2、通过google查询,问题是表空间文件不够了

SELECT a.tablespace_name "表空间名",a.bytes / 1024 / 1024 "表空间大小(M)",(a.bytes - b.bytes) / 1024 / 1024 "已使用空间(M)",b.bytes / 1024 / 1024 "空闲空间(M)",round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "使用比" FROM (SELECT tablespace_name, sum(bytes) bytes FROM dba_data_files GROUP BY tablespace_name) a,(SELECT tablespace_name, sum(bytes) bytes, max(bytes) largest FROM dba_free_space GROUP BY tablespace_name) b WHERE a.tablespace_name = b.tablespace_name ORDER BY ((a.bytes - b.bytes) / a.bytes) DESC;

技术分享图片

3、查看表空间文件位置

SELECT * FROM dba_data_files WHERE tablespace_name = LMSTEST;

4、增加表空间文件

alter tablespace LMSTEST add datafile /home/oracle/data/lmstest.dbf size 5120M;

技术分享图片

 

Oracle扩容表空间

标签:bubuko   ace   height   where   select   空间名   bsp   inf   add   

人气教程排行