Oracle 查看表空间及扩容

首先查看所有表空间的大小:

SELECT T.TABLESPACE_NAME, ROUND(SUM(BYTES/(1024 * 1024)), 0) TS_SIZE FROM DBA_TABLESPACES T, DBA_DATA_FILES D WHERE T.TABLESPACE_NAME = D.TABLESPACE_NAME GROUP BY T.TABLESPACE_NAME;

查看空间路径、空间名,最大空间、易用空间

select FILE_NAME, TABLESPACE_NAME, MAXBYTES/1024/1024 maxsizes, USER_BYTES/1024/1024 userbytes from dba_data_files

查看OMSFM库下的所有表

select owner,table_name from all_tables WHERE OWNER = 'OMSFM'

增加表空间:

ALTER DATABASE DATAFILE '/opt/oracle/oradata/TEST/test.dbf' RESIZE 2000M;

posted on 2013-09-12 15:10  海飞丝  阅读(233)  评论(0编辑  收藏  举报