makiju
27th May 2004, 13:55
Hi!
Anybody facing problems with BaanIVc4 on Oracle9.2?
We are using automatic undo management and still getting errors. We try to solve this by setting undo_retention to higher value. Information in Metalink is quite confusing.
dave_23
27th May 2004, 16:51
Yes, its unfortunatly still possible.. remember your undo retention needs to be set to a time long enough to hold the transaction..
if its a very large time, check with Baan support to see if they
can optimize the session. Sometimes they can break transactions into smaller chunks to help with this.
Dave
Markus Schmitz
30th May 2004, 08:00
Hi there,
in my understanding, if your undo_retention is long enough to hold your transaction and you still get the error, than this must mean, that your undo talblespace is too small.
Can you check this?
Regards
Markus
Dikkie Dik
1st June 2004, 10:40
Since 9i the possibility to get an ORA-1555 is less compared to previous versions. But still this is possible due to:
- an undo tablespace that is too small or
- an application that keeps a cursor open for a too long time.
The last issue can be solved by:
- add an "as prepared set" to the main 4 GL query when this query has no "for update" clause.
- break the main query after processing e.g. 10.000 rows if the main query has a "for update" clause and restart the main query after these 10.000 rows. An example of the latest could be:
completed = false
repeat
db.retry.point()
counter = 0
select *
from <table> for update
|* Read from previous point onwards
where table._index1 > {:hold.field1}
|* Sort by on index to prevent problems
order by table._index1 with retry repeat last row
|* Speed up transfer of data
hint use array fetching
and buffer 100 rows
and array size 100
selectdo
update.other.tables()
|* Commit once a 50 rows
counter = counter + 1
if counter\50 = 0 then
commit.transaction()
|* When query is open longer than 10.000
|* records, than restart query
if counter >= 10000 then
|* Set all index 1 fields
hold.field1 = table.field1
break
endif
endif
selectempty
completed = true
selecteos
commit.transaction()
completed = true
endselect
|* Only complete when complete flag has been set
until completed
Hope this helps,
Dick
makiju
1st June 2004, 11:05
I was surprised that Oracle uses Rollback for reading because of read consistency. We had 1555 when generating export file using export schema.
So this might mean that this query got overwritten by another session before query end. I changed undo_retention to 4800 and now it seems to work. Of course tablespace area is also enlarged.
So, "as prepared set" is not a solution for these kind of things.