Re: Space usage from dba_segments

From: Andy Sayer <andysayer_at_gmail.com>
Date: Wed, 8 Dec 2021 18:20:50 +0000
Message-ID: <CACj1VR5JvUZJzbigYKy71aOmPF=4gMFEF6mkihCxoievOjDmhw_at_mail.gmail.com>



Dbms_xplan.format_size(bytes) will do the trick too

On Wed, 8 Dec 2021 at 18:08, 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 Wed Dec 08 2021 - 19:20:50 CET

Original text of this message