Oracle資料表空間查看sql使用方式_oracle

來源:互聯網
上載者:User

DBA在日常工作中,最重要的一點就是查看錶空間的使用方式,去瞭解是否有資料表空間滿了的情況出現。

具體方法和步驟如下所示:

第一步:開啟PLSQL

第二步:建立一個SQL視窗

第三步:輸入代碼:

select a.tablespace_name tablespace_name,nvl(ceil((1 - b.free / a.total) * 100), 100) "usage_of_tablespace%",nvl(b.free, 0) "left_space(M)",c.extent_management "Extent_management"from (select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 totalfrom dba_data_filesgroup by tablespace_name) a,(select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 freefrom dba_free_spacegroup by tablespace_name) b,dba_tablespaces cwhere a.tablespace_name = c.tablespace_nameand c.tablespace_name = b.tablespace_name(+);

第四步:查看結果,如果資料表空間快滿了,要立刻處理

雲棲社區友情提醒大家需要注意事項:

假如資料表空間滿了,要及時處理,以免系統崩潰

以上所述是小編給大家介紹的Oracle資料表空間查看sql使用方式的相關知識,希望對大家有所協助,如果大家想瞭解更多資訊敬請關注云棲社區網站!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.