Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to find unused objects?

Posted on 2013-05-30
Medium Priority
Last Modified: 2013-06-05
Experts -

Would it be possible to get a report of what tables are used (have read/writes operations over them) in the selected oracle schema.

We would like to remove the unused objects to make up some space.

Question by:sventhan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
LVL 77

Accepted Solution

slightwv (䄆 Netminder) earned 1000 total points
ID: 39207458
I don't know of a way to track DML on tables that will be 100% accurate.

Even if you turn on auditing or run log miner through all available logs, it won't catch everything.  For example, you might have a table that is only used for year-end closing and only accessed once a year.
LVL 18

Author Comment

ID: 39207620
Agree. I would say table is not being used for more than 60 days. Is there any way to find that out?
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39207635
>> Is there any way to find that out?

Already mentioned the ways I know of:  turn on auditing and/or use log miner to go back through your old logs.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 29

Assisted Solution

MikeOM_DBA earned 1000 total points
ID: 39210674
You could set the tables to "MONITORING" and then query {ALL|DBA}_TAB_MODIFICATIONS view:

Open in new window

LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39210703
Setting monitoring might be a decent approximation but from what I read in the docs, I don't think it would be accurate here.  From the docs: "since the last time statistics were gathered".

If you have tables that are used infrequently wouldn't the *_tab_modifications view likely show no activity on a regular basis?
LVL 29

Expert Comment

ID: 39210734
You could copy the data to another table before computing statistics?
But you are right, we gather statistics daily -- bummer.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39210751
>>You could copy the data to another table before computing statistics?

That might be a decent work-around over time.  It would almost definitely generate less data than auditing.  Likely be less of a headache than constantly worrying about purging audit logs.

Just need to make sure the capture runs before automatic statistics collection.

I've not messed with adding my own tasks to the maintenance window...
LVL 18

Author Closing Comment

ID: 39224279

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question