Finding How Much Data Has Been Filled

I would like to know how can one identify the current location that oracle is writing for transaction ie. extent location has reached the maximum allocated for it within the tablespace.

In plain words finding if the extents have reached the maxextent?

----->
You can use the view dba_extents and dba_tables for that

CODE

select b.table_name,a.used,b.max_extents-a.used remaining from
(select segment_name,count(extent_id) used from dba_extents group by segment_name) a,
(select table_name,max_extents from dba_tables) b
where a.segment_name=b.table_name

----->
Are you sure extent_id identifies the used extents?

I thought its just an identification

----->
extent_id identifies extents that are allocated to the table. so max_extents-count(extend_id) would give the number of extents yet to be allocated.

That is what you wanted to know? isn't it?

No comments:

topics