943,609 Members | Top Members by Rank

Ad:
  • Oracle Discussion Thread
  • Marked Solved
  • Views: 958
  • Oracle RSS
Mar 6th, 2009
0

Limit days stored in DB

Expand Post »
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...

Thanks in advance.
Similar Threads
Reputation Points: 11
Solved Threads: 1
Newbie Poster
vimotaru is offline Offline
17 posts
since Oct 2008
Mar 9th, 2009
0

Re: Limit days stored in DB

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.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Mar 9th, 2009
0

Re: Limit days stored in DB

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!!
Reputation Points: 11
Solved Threads: 1
Newbie Poster
vimotaru is offline Offline
17 posts
since Oct 2008
Mar 9th, 2009
0

Re: Limit days stored in DB

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.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Mar 9th, 2009
0

Re: Limit days stored in DB

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!!
Reputation Points: 11
Solved Threads: 1
Newbie Poster
vimotaru is offline Offline
17 posts
since Oct 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Oracle Forum Timeline: Urgent Help!! Database Tables
Next Thread in Oracle Forum Timeline: problem with update





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC