0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

表領域の(過去からの)状態遷移を確認する

Last updated at Posted at 2024-04-22

以下のSQLを実施する。
粒度は、snapshotが取られる間隔に依存する。

select v.name
,h.snap_id
, h.tablespace_size * p.value/1024/1024 ts_mb
, h.tablespace_usedsize * p.value/1024/1024 used_mb
, h.rtime
, to_char(s.begin_interval_time, 'YYYY-MM-DD HH24:MI:SS') begin_time
, to_char(s.end_interval_time, 'YYYY-MM-DD HH24:MI:SS') end_time
from dba_hist_tbspc_space_usage h
, dba_hist_snapshot s
, v$tablespace v
, dba_tablespaces t
, v$parameter p
where h.tablespace_id = v.ts#
and v.name = t.tablespace_name
and t.contents not in ('UNDO','TEMPORARY')
and p.name = 'db_block_size'
and h.snap_id = s.snap_id
and s.begin_interval_time
-- Start time
between to_date('2024-04-22 11:00:00','YYYY-MM-DD HH24:MI:SS')
-- End time
and to_date('2024-04-22 18:00:00','YYYY-MM-DD HH24:MI:SS')
-- specify tablespace
and v.name in ('USERS')
order by v.name, h.snap_id asc;

以下のブログを参考にしました。
https://www.pythian.com/blog/technical-track/how-to-retrieve-growth-history-for-oracle-tablespaces

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?