oracle增加表空间

select tablespace_name, sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;

select tablespace_name, sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;

select * from dba_data_files t where t.tablespace_name = 'USERS'

/home/oracle/app/oradata/orcl/users01.dbf

  1. select dbf.tablespace_name,  
  2. dbf.totalspace "总量(M)",  
  3. dbf.totalblocks as 总块数,  
  4. dfs.freespace "剩余总量(M)",  
  5. dfs.freeblocks "剩余块数",  
  6. (dfs.freespace / dbf.totalspace) * 100 "空闲比例"
  7. from (select t.tablespace_name,  
  8. sum(t.bytes) / 1024 / 1024 totalspace,  
  9. sum(t.blocks) totalblocks  
  10. from dba_data_files t  
  11. group by t.tablespace_name) dbf,  
  12. (select tt.tablespace_name,  
  13. sum(tt.bytes) / 1024 / 1024 freespace,  
  14. sum(tt.blocks) freeblocks  
  15. from dba_free_space tt  
  16. group by tt.tablespace_name) dfs  
  17. where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)

create tablespace shybt datafile '\home\oracle\app\oradata\orcl\shybt1.dbf' size 6000m;

create tablespace shybt01 datafile '\home\oracle\app\oradata\orcl\shybt01.dbf' size 5000m autoextend on next 5m

上一篇:css3 之border-radius 属性解析


下一篇:MySQL服务优化参数设置参考