Re: Space usage from dba_segments

From: Cee Pee <carlospena999_at_gmail.com>
Date: Thu, 9 Dec 2021 13:25:59 -0600
Message-ID: <CAPTPB11nH1Vi11aoDhaWWGJHa2+mOLT5Ogm59h9dZBXoM-iGhQ_at_mail.gmail.com>



Good tip. Thanks. I have been working this long, did not know 'POWER' function existed in oracle.

On Thu, Dec 9, 2021 at 2:14 AM William Robertson < william_at_williamrobertson.net> wrote:

> I prefer to use power(1024,2) for MB, power(1024,3) for GB etc, as it’s
> more readable and easier to adjust. (I suppose that should really be MiB
> and GiB.)
>
> William
>
> On 8 Dec 2021, at 18:07, Cee Pee <carlospena999_at_gmail.com> wrote:
>
> 
> Okay, that was embarrassing, but thanks for the help everyone
>
> On Wed, Dec 8, 2021 at 12:00 PM Rich J <rich242j_at_gmail.com> wrote:
>
>> Hey CP,
>>
>> I think you have one too many "/1024" in your calculation. Looks like
>> that should be 3.3*T*B.
>>
>> /1024 = KB
>> /1024/1024 = MB
>> /1024/1024/1024 = GB
>> /1024/1024/1024/1024 = TB
>>
>> Rich
>>
>> On Wed, Dec 8, 2021 at 11:31 AM Cee Pee <carlospena999_at_gmail.com> wrote:
>>
>>> Hi,
>>>
>>> We have a 19c database. We are trying to export a user's objects using
>>> datapump. When we checked the space usage by the user from dba_segments we
>>> got space used by the user as 3.3Gb:
>>>
>>> 1 select owner, TABLESPACE_NAME, sum(bytes)/1024/1024/1024/1024 Gb
>>> from dba_segments
>>> 2* where owner IN ('&owner') group by owner, TABLESPACE_NAME
>>> SQL> /
>>> Enter value for owner: DW_USER
>>> old 2: where owner IN ('&owner') group by owner, TABLESPACE_NAME
>>> new 2: where owner IN ('DW_USER') group by owner, TABLESPACE_NAME
>>>
>>> OWNER TABLESPACE_NAME GB
>>> -------------- -------------------- ----------
>>> DW_USER DW_TEAM 3.3
>>>
>>> 1 row selected.
>>> ###################################################
>>>
>>> We are currently running the data pump for the user and the dump file is
>>> about 600Gb already and the job is still running. Does dba_segments not
>>> show all space used by a user ? Is there another view where I can see all
>>> the space used by a certain user.
>>>
>>> Thanks,
>>> CP.
>>>
>>>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 09 2021 - 20:25:59 CET

Original text of this message