- 01-10-2010 02:52 AM #1
partition table on daily basis and delete old partitions on weekly basis Please let me know how we can partition on day basis. And delete partition on daily basis.
1) We have one current old data base which has 59 un-partitioned Tables with 300 days of data.
Now we need write a script to make a new Database oracle 10g with same table definition but Portioned on txn_date(one partition a day) and load the data from current DB.
We have txn_date field as date field in all tables.
We are starting from txn_date from 01 Aug 2009 to create partitions on each day and name the partition as partition_MMDDYY to till today.
So that we will have almost 180 partitions by the end of January 2010.
2) After that we need to create 4 weeks of empty partitions i.e. 28 partitions from February 1st 2010 onwards.
Same name standard: partition_MMDDYY.
3) After one week we need to delete and drop all the partitions that are older than 180 days. (partion_MMDDYY) and REUSE the table space
And we need to create one week of daily partitions.
Thanks
- Club-Oracle Complementary E-Books and Magazines
Get your free Complementary Copy of Oracle Magazine
You can also browse the Free Magazines and E-Books section to see the complete list of free magazines, e-books and Whitepapers.
- 01-11-2010 11:53 AM #2
Re: partition table on daily basis and delete old partitions on weekly basis Google is your friend:
http://www.google.com/search?hl=en&s...tition+&aqi=g7
In particular start with this example:
http://www.oracle-base.com/articles/...AndIndexes.php
Similar Threads
-
How to Delete Work Orders ?
By Aymn in forum Oracle SCMReplies: 2Last Post: 11-30-2009, 07:50 AM -
how to delete record
By laxman in forum SQL PL/SQLReplies: 8Last Post: 11-11-2009, 04:19 PM -
ORA-14074: partition bound must collate higher than that of the last partition
By goodarzi121 in forum Oracle Developer Suite and ToolsReplies: 2Last Post: 05-12-2009, 03:51 AM -
Simple query to delete rows from table
By simona007 in forum SQL PL/SQLReplies: 3Last Post: 01-28-2009, 09:09 AM


LinkBack URL
About LinkBacks
Reply With Quote





