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: find what tables are being used in the database

Re: find what tables are being used in the database

From: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Thu, 14 Jun 2007 08:06:36 -0700 (PDT)
Message-ID: <842518.40972.qm@web58714.mail.re1.yahoo.com>


>What is the easiest way to find out what tables are being used in a 10.2.0.2 database?
>I am using dba_tab_modifications but this only tracks inserts, updates, or deletes.
>I am trying to document a database that has been running for about 10 years and has over 1500 tables.
>It has no little integrity constrains and no documentation.

Casey

One approach is to use V$SQL_PLAN to identify objects that have been referenced. As with all V$ views, you only see what's in the cache right now - but if you monitor over all representative loads, you should get a pretty good idea. Statspack can collect the data for you (use level 7 iirc and you may want to fiddle with the thresholds; watch out for additional snapshot load). This has the added advantage of collecting indexes referenced by plans as well. Note that if a query is satisfied from the index, there needn't be a reference to the table object itself.

Definitely combine this with PL/SQL and view dependency analysis, grep-ing through source code (or string-ing through executables) for all known table names, etc. It all sounds crummy but can be easily semi-automated.

HTH Regards Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 14 2007 - 10:06:36 CDT

Original text of this message

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