-
does anyone have a sql script to show the usage of table and tablespace (total, used, free)
thanks in advance
-
select
2 b.file_id "file#",
3 b.tablespace_name "Tablespace name",
4 b.bytes "#Bytes",
5 (b.bytes-sum(nvl(a.bytes,0)))"#used",
6 sum(nvl(a.bytes,0))"#free",
7 (sum(nvl(a.bytes,0))/(b.bytes))*100"%Free"
8 from sys.dba_free_space a,sys.dba_data_files b
9 where a.file_id(+)=b.file_id
10 group by b.tablespace_name ,b.file_id,b.bytes
11 order by b.tablespace_name;
Anurag
Appreciation is a wonderful thing;
It makes what is excellent in others belong to us as well.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|