0

Hello everybody

My problem is that I'm quite new in oracle admin/dev so I need some help pointing me how to limit the number of days of data stored in a table.
I have some datasources that come in files periodically. I'd like to limit the days stored for each table.

My system is Oracle 10g over Solaris 10.

I though in partitions, but I don't know how to refresh date in them to limit data to 'last 5 days' for example.

Please, if you have some link, example or doc it would be great. I don't know what to search in google to solve this... :S

Thanks in advance.

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by vimotaru
0

The simplest method will be create a view based on the table with last five days record. That will be always refreshed every time you run any query on the view.

0

But that doesn't limit the amount of space occupied by the main table. I'd like the disk space remain limited by the number of days and avoiding reject records by not enough space error.

Thanks!!

0

then you need to populate records from the source to a staging (intermediate) table before actually inserting them to your main table.

so with each load you need to truncate your table and load only the required records.

0

Thanks for the quick response. I'm developing a PL/SQL for doing that over a staging table.

I think is the best way to control the data loaded and del the old data.

Thanks!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.