Database size

All posts relating to Oracle database administration.

Moderator: Tim...

Database size

Postby me_lucky » Fri May 03, 2013 5:28 am

Hi Tim,

I have query.

When we check the database size using below query , i got the DB size as 9GB where as on the server the physical files size is 19GB.
Why the difference, pl explain me.

select (select sum(bytes) / 1024 / 1024 / 1024 data_size from dba_data_files) +
(select nvl(sum(bytes), 0) / 1024 / 1024 / 1024 temp_size
from dba_temp_files) +
(select sum(bytes) / 1024 / 1024 / 1024 redo_size from sys.v_$log) +
(select sum(BLOCK_SIZE * FILE_SIZE_BLKS) / 1024 / 1024 / 1024 controlfile_size
from v$controlfile) "Size in GB"
from dual

Thanks & Regards,
Lucky
me_lucky
Senior Member
 
Posts: 166
Joined: Tue Jun 02, 2009 11:40 am

Re: Database size

Postby Tim... » Fri May 03, 2013 6:40 am

Hi.

Have you compared the files you are checking with the query to the contents of the directories? It's possible you have other files in the directory, such as archived redo logs etc.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17932
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 9 guests

cron