Solved

Oracle ADF PS_TXN Table is safe to truncate or delete?

Posted on 2014-11-07
5
2,244 Views
Last Modified: 2014-11-12
Good day, i've been finding some strange stuff  while diving into Oracle ADF framework.
I would like to know what could happen if i delete every old record in the table PS_TXN when using Oracle ADF.
Also, what is the main purpose of this table?
This is configured in the AppModule of the application.
Thanks in advance.
0
Comment
Question by:JavierVera
  • 2
  • 2
5 Comments
 
LVL 1

Author Comment

by:JavierVera
ID: 40431952
hi, please now that you are part of the experts could you please help me clarify in order to ask the right question?
0
 
LVL 16

Assisted Solution

by:Wasim Akram Shaik
Wasim Akram Shaik earned 500 total points
ID: 40432035
The   PS_TXN table stores snapshots of pending changes made to BC4J application module instances.

,simply doing a blind delete or truncate without knowing the impact will simply make your changes lost. Also you may get some unexpected errors(error while inserting a record in PS_TXN table) as there is a sequence which is being used by the table and it is assigned to specific session while the application is running.

However if you refer docs, there are ways to delete the rows, there is an api which will do this task, so its safe to use an api which will decide the best way to delete the rows(inactive and older than specific date)

See the link below for illustration of the cleanup script

http://www.oracle.com/technetwork/developer-tools/jdev/overview/bc4j-temp-tables-087270.html#ID516
0
 
LVL 1

Author Comment

by:JavierVera
ID: 40436709
hello Wasim Akram Shaik, i've read the link and there it says Oracle itself provides a script to achieve the maintenance of these table and sequence, would you recommend to clear for example every registry wich is over 2 days old ?? (most of these apps are for reporting read only use, so i belive there is no sense on having such a FAT table PS_TXN)
On the other hand, wich one could you consider as your best practice?
Thank you!
0
 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 500 total points
ID: 40436798
>>2 days old

I really cannot predict the amount of the data with which the temp table is loaded in your environment, for huge transactions(which we have in our environment like around 1  million/day) we use to purge them daily(during the lean period). Some would do it weekly(for pre-prod), bi-monthly(sit/uat) etc., it all depends on the incoming you have..
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now