射精一区欧美专区|国产精品66xx|亚洲视频一区导航|日韩欧美人妻精品中文|超碰婷婷xxnx|日韩无码综合激情|特级黄片一区二区|四虎日韩成人A√|久久精品内谢片|亚洲成a人无码电影

您現在的位置:首頁 > IT認證 > oracle認證 >

Oracle性能調優(yōu):Oracle數據庫表空間容量調整


--1、獲取需要釋放空間的表空間信息(包含oracle database自有表空間)

    --drop table system.tbs_detail;

    create table system.tbs_detail as select

    a.tablespace_name,

    a.bytes/1024/1024 "Sum_MB",

    (a.bytes-b.bytes)/1024/1024 "used_MB",

    b.bytes/1024/1024 "free_MB",

    round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"   

    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;

     

     

    --select * from system.tbs_detail order by "Sum_MB" desc,"free_MB" desc;

     

    --2、獲取需要釋放空間的應用表空間數據文件使用情況

    --drop table system.datafile_space;

    create table system.datafile_space as 

    select a.TABLESPACE_NAME,

           a.FILE_NAME,

           a.BYTES / 1024 / 1024 total,

           b.sum_free / 1024 / 1024 free

      from dba_data_files a,

相關文章

無相關信息
更新時間2022-03-13 11:18:59【至頂部↑】
聯系我們 | 郵件: | 客服熱線電話:4008816886(QQ同號) | 

付款方式留言簿投訴中心網站糾錯二維碼手機版

客服電話: