Re: Tracking table access

From: Guy Dallaire <dallaire_at_megatoon.com>
Date: 1996/02/24
Message-ID: <4gm27c$sis_at_news.accent.net>#1/1


marksc_at_wpmail.code3.com (Mark A. Scarton) wrote:

>As a utility appendage to the transformer, I need to be able to clean up the
>tablespaces as tables become dormant. I need to be able to keep track of when a
>table was last accessed (much like the Unix file system tracks access time). If
>a table of type <foo> hasn't been accessed in the last <bar> days, I can then
>drop the table.

If the data dictionnary doesn't already have an 'last accessed date' column somewhere, I would suggest you use a database trigger on each table that gets 'touched' (read or write) that writes a timestamp in another table (call it the ACCESS table) in the form:

TABLE_NAME		LAST_ACCESS
----------------------		-------------------------	
TEST_TABLE		02-FEB-96
...			...	
OTHER_TABLE		23-FEB-96

All you have to do after that is write a PRO*C program that scan the ACCESS table and drops the least used tables....

                Hope this helps Received on Sat Feb 24 1996 - 00:00:00 CET

Original text of this message