Re: Space usage from dba_segments

  • From: William Robertson <william@xxxxxxxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 9 Dec 2021 08:14:27 +0000

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@xxxxxxxxx> wrote:


Okay, that was embarrassing, but thanks for the help everyone 

On Wed, Dec 8, 2021 at 12:00 PM Rich J <rich242j@xxxxxxxxx> wrote:

Hey CP,

I think you have one too many "/1024" in your calculation.  Looks like that 
should be 3.3TB.

/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@xxxxxxxxx> 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.

Other related posts: