Home » RDBMS Server » Server Administration » dba_segment
dba_segment [message #525454] Mon, 03 October 2011 05:39 Go to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
select sum(bytes/1024/1024) from dba_segments where owner='IPPS';

Does the above finding means that IPPS has use up 'this amount' of space in the database from all his objects?
Re: dba_segment [message #525455 is a reply to message #525454] Mon, 03 October 2011 05:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Has this amount currently allocated for its objects.

Regards
Michel
Re: dba_segment [message #525457 is a reply to message #525455] Mon, 03 October 2011 06:00 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
In line with this, i was thinking why before export a schema object, i observe people would use the above script to check how big it is before actually doing a exporting. Thus i brought my doubt over here. Hmmm..not too sure what you mean micheal... . I was thinking in the line how much space this person has taken up for all his whatever objects
Re: dba_segment [message #525460 is a reply to message #525457] Mon, 03 October 2011 06:06 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
In line with SPACE....does

select segment_name as tablename, sum(bytes/ (1024 * 1024 * 1024)) as tablesize_in_GB From dba_segments
where segment_name = 'TABLE_WHOSE_SIZE_I_WANT_TO_KNOW' and OWNER = 'WHO OWNS THAT TABLE'

returns me the size of the table own by that particular owner?
Re: dba_segment [message #525462 is a reply to message #525457] Mon, 03 October 2011 06:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
I was thinking in the line how much space this person has taken up for all his whatever objects

"has taken" or "has used" is ambiguous, the meaning depends on the one that reads it.
"is currently allocated to" can't be read another way that what it means.

Regards
Michel
Re: dba_segment [message #525463 is a reply to message #525460] Mon, 03 October 2011 06:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
hanner wrote on Mon, 03 October 2011 13:06
In line with SPACE....does

select segment_name as tablename, sum(bytes/ (1024 * 1024 * 1024)) as tablesize_in_GB From dba_segments
where segment_name = 'TABLE_WHOSE_SIZE_I_WANT_TO_KNOW' and OWNER = 'WHO OWNS THAT TABLE'

returns me the size of the table own by that particular owner?


1/
It depends on what you mean by size of the table, does it contain the indexes?

2/
A segment is not necessary a table, it can be an index, a partition, a subpartition...

3/
A table in a cluster has no segment (it resides in the cluster segment) and so your query will return no rows.

Regards
Michel

Re: dba_segment [message #525468 is a reply to message #525463] Mon, 03 October 2011 06:57 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
yes, everything...as i understand that table can contain indexes ... partition tables.. .
Re: dba_segment [message #525490 is a reply to message #525468] Mon, 03 October 2011 08:20 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
So your statement does not include all spaces allocated to the table.

Regards
Michel
Previous Topic: ORACLE_HOME
Next Topic: dba_free_space
Goto Forum:
  


Current Time: Fri Nov 29 04:31:05 CST 2024