Solved

How to find unused objects?

Posted on 2013-05-30
8
1,168 Views
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.



Thanks,
sve
0
Comment
Question by:sventhan
[X]
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
8 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 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.
0
 
LVL 18

Author Comment

by:sventhan
ID: 39207620
Agree. I would say table is not being used for more than 60 days. Is there any way to find that out?
0
 
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.
0
Technology Partners: 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

by:MikeOM_DBA
MikeOM_DBA earned 250 total points
ID: 39210674
You could set the tables to "MONITORING" and then query {ALL|DBA}_TAB_MODIFICATIONS view:
ALTER TABLE MyTable MONITORING;"

Open in new window

:p
0
 
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?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39210734
You could copy the data to another table before computing statistics?
But you are right, we gather statistics daily -- bummer.
:)
0
 
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...
0
 
LVL 18

Author Closing Comment

by:sventhan
ID: 39224279
Thanks.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

695 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