Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Efficient way to monitor table growth...

Re: Efficient way to monitor table growth...

From: Jonas A Wetterberg <jonas.a.wetterberg_at_manpower.se>
Date: Mon, 27 Aug 2001 23:41:14 -0700
Message-ID: <F001.00379287.20010827232632@fatcity.com>

I hade to make a little script a while ago to figure out the numbers of rows/table.

Declare
  cursor tables is
   select object_name, owner
   from all_objects
   where object_type = 'TABLE'
   order by owner;

  stmt_ VARCHAR2(2000);
  rows_ NUMBER;
 begin

  For rec_ IN tables LOOP
    stmt_ := 'SELECT count(*) from ' || rec_.owner || '.' || rec_.object_name;

    EXECUTE IMMEDIATE stmt_ INTO rows_;            

    Dbms_Output.Put_Line('Table: ' || rec_.owner || '.' || rec_.object_name || ' has ' || rows_ || ' rader');

  END LOOP; end;

-----Ursprungligt meddelande-----
Från: Denmark Weatherburne [mailto:denmark_weatherburne_at_hotmail.com] Skickat: den 28 augusti 2001 0:59
Till: Multiple recipients of list ORACLE-L Ämne: Efficient way to monitor table growth...

Hi DBA's

Does an Oracle Stored Procedure or function exist that returns the row count

by table in each tablespace?
I've observed that one of our production tablespaces is has only 8% free space. Perhaps it could be fragmented. I'll have to find a script that can provide these statistics. I know I'll need to add another datafile to the tablespace soon.
However, I'd like to find out which are the active tables in each tablespace

and track the row insert growth on a daily basis.

Any ideas?

Thanks for your help.

Denmark Weatherburne
Belize
"Knowledge is power, but it is only useful if it is shared!"



Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Denmark Weatherburne
  INET: denmark_weatherburne_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jonas A Wetterberg INET: jonas.a.wetterberg_at_manpower.se Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Aug 28 2001 - 01:41:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US