Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: getting the size of an oracle db
On Thu, 31 Jan 2002 17:08:00 +0100, Marc Teufel wrote:
> hi ng,
>
> just a little question. i need a sql-command wich gets the current size
> (in MB or GB) of a database. i need a SQL cause i want to show the size
> in my vb-programm on a form (ODBC-Connection, in VB I use RDO) .
>
> many thanks for all your help (and sorry for my bad english ;-))
>
> With best wishes from Bavaria/Germany, Marc Teufel
Hi,
SELECT ROUND(SUM(bytes) / (1024 * 1024)) FROM dba_segments;
will give you MBytes of your _used_ space. This doesn't mean that your datafiles might be a lot bigger but I assume you wanted to know the actual size of you objects - not the size of all your datafiles.
Note that you need DBA or SELECT ANY TABLE in Oracle 8i or SELECT SYSTEM CATALOG in Oracle9i.
Greetings from Munich/Bavaria :-), Klaus
-- Klaus Naumann Database Administration GMX Aktiengesellschaft Riesstrasse 17, 80992 München Telefon +49.89.143 39-0 Telefax +49.89.143 39-100 mailto:knaumann_at_gmx-ag.de http://www.gmx.net/Received on Thu Jan 31 2002 - 11:06:41 CST