Home » SQL & PL/SQL » SQL & PL/SQL » generic data retention (oracle 10g)
generic data retention [message #400166] Sun, 26 April 2009 20:43 Go to next message
swas_fly
Messages: 220
Registered: March 2008
Location: Bhubaneswar
Senior Member
Hi I have a table with the below structure


a_output_history

a_id varchar2(30)
a_name varchar2(30)
a_address varchar2(30)
a_tel varchar2(30)
a_post_code varchar2(30)
a_auth_code varchar2(30)
a_consent varchar2(30)
event_date date

The above table is not a partition table.

Data is moved into this table on a weekly basis from the main table a_output.(one partition data is moved to this history table every week.

I need to keep only 2 years of data in this table.the moment it exceeds the data more than 2 yrs will be deleted or removed from the a_output_history table.This process will be automated.

How to proceed for this.
Re: generic data retention [message #400167 is a reply to message #400166] Sun, 26 April 2009 20:47 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Since you choose to once again, again, again not follow Posting Guidelines, we choose to not answer your questions.


Re: generic data retention [message #400168 is a reply to message #400167] Sun, 26 April 2009 20:53 Go to previous messageGo to next message
swas_fly
Messages: 220
Registered: March 2008
Location: Bhubaneswar
Senior Member
Apologise Sir

Please find the repost below

Hi I have a table with the below structure

SQL> desc a_output_history
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 A_ID                                              VARCHAR2(30)
 A_KEY                                             VARCHAR2(30)
 A_TITLE                                           VARCHAR2(15)
 A_FORENAME                                        VARCHAR2(15)
 A_SURNAME                                         VARCHAR2(30)
 A_FULL_NAME                                       VARCHAR2(62)
 A_FLG                                             VARCHAR2(1)
 AC_LOAD_DATE                                       DATE

The above table is not a partition table.

Data is moved into this table on a weekly basis from the main table a_output.(one partition data is moved to this history table every week.

I need to keep only 2 years of data in this table.the moment it exceeds the data more than 2 yrs will be deleted or removed from the a_output_history table.This process will be automated.

How to proceed for this.
Re: generic data retention [message #400169 is a reply to message #400166] Sun, 26 April 2009 21:00 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.

What have you tried & what is wrong with the results?

Re: generic data retention [message #400177 is a reply to message #400168] Sun, 26 April 2009 23:17 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Partition your tables by week and exchange/drop the partition each week.

Regards
Michel
Previous Topic: Avg of the count ??
Next Topic: Encryption
Goto Forum:
  


Current Time: Sat Dec 10 16:26:42 CST 2016

Total time taken to generate the page: 0.26172 seconds