Theoretical question, I think I know the answer I'm just looking for confirmation and possible solutions.
I have a READ-ONLY worker thread, which processes a large number of CLOB data. LOBs are loaded upon access, not when opening the dataset. After ~2 days of continuous running I was greeted with the following error:
Other OCILobRead2 ORA-01555: snapshot too old: rollback segment number with name "" too small ORA-22924: snapshot too old (#1555)
All of my worker threads derive from the same base thread, which (as most of my workers do updates in the database as well) sets the ZConnection.AutoCommit to false before connecting and therefore enables transactions. What I understand from this error is that it appears when a transaction is too long, we should commit / roll back more often. This is easily the source at me since I had a transaction which is ~2 days old.
Now, if I override this functionality and set AutoCommit to True in this worker, will it solve my issue? Or should I do a Connection.Rollback every 30 minutes...? This feels kinda hacky...
Any opinion is welcome :)
ORA-22924
Moderators: gto, EgonHugeist, mdaems
ORA-22924
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ORA-22924
An equally theoretical answer :
I seem to remember that Egonhugeist told me that Oracle doesn't have a true AutoCommit mode and so Zeos somehow simulates it. In that case I wouldn't trust the emulation too much and do a commit or rollback from time to time myself.
I seem to remember that Egonhugeist told me that Oracle doesn't have a true AutoCommit mode and so Zeos somehow simulates it. In that case I wouldn't trust the emulation too much and do a commit or rollback from time to time myself.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: ORA-22924
Jan, there is no emulation about "autocommit" for Oracle. It's simply not supported see: https://docs.oracle.com/cd/E11882_01/ap ... LNOCI17163 patameter "mode". we just send OCI_COMMIT_ON_SUCCESS if the connection is in AutoCommit mode.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ORA-22924
I assume, this is what I meant when I said:EgonHugeist wrote: ↑18.03.2021, 18:23 we just send OCI_COMMIT_ON_SUCCESS if the connection is in AutoCommit mode.
But then - to me it seems that using OCI_COMMIT_ON_SUCCESS with OCIStmtExecute comes pretty close to a true autocommit mode - so using it should be quite safe when compared with the things we once did with dblib and Firebird...marsupilami wrote: ↑19.02.2021, 21:26 Oracle doesn't have a true AutoCommit mode and so Zeos somehow simulates it.