Solved

How to find unused objects?

Posted on 2013-05-30
8
1,118 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

730 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