• 查看表空间文件以及利用率、修改、删除表空间文件大小


    查看临时表空间文件路径

    select tablespace_name,file_name,bytes/1024/1024 file_size,autoextensible from dba_temp_files;

    修改临时表空间文件大小
    alter database tempfile 'C:ORGDATATEMP04.DBF' resize 10M;

    删除临时表空间文件

    alter database tempfile 'C:ORGDATATEMP04.DBF' drop;

    表空间使用率(含TEMP)

    select * from (  
    Select a.tablespace_name,  
    to_char(a.bytes/1024/1024,'99,999.999') total_bytes,  
    to_char(b.bytes/1024/1024,'99,999.999') free_bytes,  
    to_char(a.bytes/1024/1024 - b.bytes/1024/1024,'99,999.999') use_bytes,  
    to_char((1 - b.bytes/a.bytes)*100,'99.99') || '%' use  
    from (select tablespace_name,  
    sum(bytes) bytes  
    from dba_data_files  
    group by tablespace_name) a,  
    (select tablespace_name,  
    sum(bytes) bytes  
    from dba_free_space  
    group by tablespace_name) b  
    where a.tablespace_name = b.tablespace_name  
    union all  
    select c.tablespace_name,  
    to_char(c.bytes/1024/1024,'99,999.999') total_bytes,  
    to_char( (c.bytes-d.bytes_used)/1024/1024,'99,999.999') free_bytes,  
    to_char(d.bytes_used/1024/1024,'99,999.999') use_bytes,  
    to_char(d.bytes_used*100/c.bytes,'99.99') || '%' use  
    from  
    (select tablespace_name,sum(bytes) bytes  
    from dba_temp_files group by tablespace_name) c,  
    (select tablespace_name,sum(bytes_cached) bytes_used  
    from v$temp_extent_pool group by tablespace_name) d  
    where c.tablespace_name = d.tablespace_name  
    )  
    

      

  • 相关阅读:
    Hibernate学习(2)- hibernate.cfg.xml详解
    Hibernate学习(1)- 初识
    linux(centos6) 常用操作
    linux(centos6) 下安装 postgresql-9.3.1.tar.gz
    struts2 值栈分析
    struts2 paramsPrepareParamsStack拦截器简化代码(源码分析)
    idea 配置maven
    idea 使用github
    idea 配置svn
    idea 配置tomcat
  • 原文地址:https://www.cnblogs.com/wdw31210/p/7687732.html
Copyright © 2020-2023  润新知