首頁 資料庫 mysql教程 怎么监控oracle数据库表和表空间

怎么监控oracle数据库表和表空间

Jun 07, 2016 pm 04:19 PM
oracle 怎麼 資料庫 監控 空間

怎么监控oracle数据库表和表空间的现状 declare unf number; unfb number; fs1 number; fs1b number; fs2 number; fs2b number; fs3 number; fs3b number; fs4 number; fs4b number; full number; fullb number; begin dbms_space.space_usage('1', '2', 'TA

   怎么监控oracle数据库表和表空间的现状

  declare

  unf number;

  unfb number;

  fs1 number;

  fs1b number;

  fs2 number;

  fs2b number;

  fs3 number;

  fs3b number;

  fs4 number;

  fs4b number;

  full number;

  fullb number;

  begin

  dbms_space.space_usage('&1',

  '&2',

  'TABLE',

  unf,

  unfb,

  fs1,

  fs1b,

  fs2,

  fs2b,

  fs3,

  fs3b,

  fs4,

  fs4b,

  full,

  fullb);

  dbms_output.put_line('unformatted_blocks:' || unf);

  dbms_output.put_line('full_blocks(0% free):' || full);

  dbms_output.put_line('fs1_blocks(0-25% free):' || fs1);

  dbms_output.put_line('fs2_blocks(25-50% free):' || fs2);

  dbms_output.put_line('fs3_blocks(50-75% free):' || fs3);

  dbms_output.put_line('fs4_blocks(75-100% free):' || fs4);

  end;

  /

  2. 表空间的使用历史记录(只输出了每天的第一次统计结果)

  select b.name,

  a.rtime,

  a.tablespace_usedsize,

  a.tablespace_size,

  round(100 * a.tablespace_usedsize / a.tablespace_size) used_percent

  from dba_hist_tbspc_space_usage a,

  (select t2.name,

  min(rtime) rtime,

  min(tablespace_id) tablespace_id

  from dba_hist_tbspc_space_usage t1

  inner join v$tablespace t2 on t1.tablespace_id = t2.TS#

  where t2.NAME = upper('&1')

  group by name, substr(rtime,1,10)

  ) b

  where a.tablespace_id = b.tablespace_id

  and a.rtime = b.rtime

  order by a.rtime;

  3. 表的剩余空间预测

  select * from table(dbms_space.OBJECT_GROWTH_TREND('ECC_CC', 'YTKC_ORDERRELEVANCE', 'TABLE')

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

oracle資料庫日誌會保存多久 oracle資料庫日誌會保存多久 May 10, 2024 am 03:27 AM

oracle資料庫日誌會保存多久

oracle資料庫伺服器硬體配置需求 oracle資料庫伺服器硬體配置需求 May 10, 2024 am 04:00 AM

oracle資料庫伺服器硬體配置需求

oracle需要多少內存 oracle需要多少內存 May 10, 2024 am 04:12 AM

oracle需要多少內存

用oracle資料庫需要多大內存 用oracle資料庫需要多大內存 May 10, 2024 am 03:42 AM

用oracle資料庫需要多大內存

如何辨別耐吉鞋子的真假鞋盒(掌握一招輕鬆辨識) 如何辨別耐吉鞋子的真假鞋盒(掌握一招輕鬆辨識) Sep 02, 2024 pm 04:11 PM

如何辨別耐吉鞋子的真假鞋盒(掌握一招輕鬆辨識)

在PHP中使用MySQLi建立資料庫連線的詳盡教學 在PHP中使用MySQLi建立資料庫連線的詳盡教學 Jun 04, 2024 pm 01:42 PM

在PHP中使用MySQLi建立資料庫連線的詳盡教學

iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片 iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片 Jul 18, 2024 am 05:48 AM

iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片

如何在PHP中處理資料庫連線錯誤 如何在PHP中處理資料庫連線錯誤 Jun 05, 2024 pm 02:16 PM

如何在PHP中處理資料庫連線錯誤

See all articles