I wonder if there is something equivalent to oracle's AUTONOMOUS_TRANSACTION Pragma in SQL Anywhere? I found this work around: http://sqlanywhere-forum.sap.com/questions/12/what-is-the-best-way-to-simulate-oracle-autonomous-transactions-in-sql-anywhere but it was posted awhile ago so perhaps there is some new functionality I can use instead?
note: Oracle AUTONOMOUS_TRANSACTION pragma changes the way a subprogram works within a transaction. A subprogram marked with this pragma can do SQL operations and commit or roll back those operations, without committing or rolling back the data in the main transaction.
asked 30 Jan '14, 03:16
I'm not aware of new functionality, so I guess the answers from the other FAQ are still valid.
FWIW: In case you may just need a subprogram to be able to rollback its own work (but nested in an outer program), you can use SAVEPOINTs to do so, i.e. a subprogram may save or rollback its own work but the outer program will still have to commit the whole transaction. Apparently, that's not the same as autonomous transactions.
answered 30 Jan '14, 04:00