sqloracle-databasesap-iq

Flashback table rows in SAP IQ 16.0


My question is about "flashback" table in SAP IQ 16.0 . Lets assume I have a table called tab_1 and I updated my table rows and committed accidentally. Is there a way to "flashback" table as we do in Oracle, I mean what is the alternative for flashback in SAP IQ?

Thanks beforehand.


Solution

  • IQ doesn't have flashback table -- But IQ has mvcc -- so I think -- maybe there's a workaround --

    1. before you update the tab_1 -- open another connection (Connection B) on it -- and select some data on tab_1 -- and don't run commit or rollback on it until the step 3 completed...

    2. update tab_1 on your working connection(Connection A) and accidently commited.

    3. The tab_1 on conneciton B is still using the old version of tab_1 before Connection A's update-- so you can select * into tab_1_old_ver from tab_1 -- make a copy from this version on Connection B and commit.

    4. Back to connection A-- drop the table tab_1 and commit and sp_iqrename tab_1_old_ver to tab_1

      And if your update is correct, then you can disconnect B after A's update completed.