scottyjohn
Technical User
Hi all,
I have a situation where I have a table TABLE1 and a backup table BACKUPTABLE1 which is an exact copy of the main table, populated by running a query before a bulk merge to the TABLE1 table.
I am looking for the best way to handle some kind of rollback, and I have looked at rollback command, but I think MERGE carries an implicit commit which means there is no rollback available after it? I have thought of using TRUNCATE TABLE1 to delete the main data, and then sqlldr to move the data from BACKUPTABLE1 into TABLE1, thereby getting the table back to the prechange state. Trouble is that TABLE1 is queried constantly by another application for Voice Call Routing instructions, so it cant be empty at any point. Im struggling to come up with a solution, as Im quite new to this element of SQL.
IS there a solution to the above problem?
John
I have a situation where I have a table TABLE1 and a backup table BACKUPTABLE1 which is an exact copy of the main table, populated by running a query before a bulk merge to the TABLE1 table.
I am looking for the best way to handle some kind of rollback, and I have looked at rollback command, but I think MERGE carries an implicit commit which means there is no rollback available after it? I have thought of using TRUNCATE TABLE1 to delete the main data, and then sqlldr to move the data from BACKUPTABLE1 into TABLE1, thereby getting the table back to the prechange state. Trouble is that TABLE1 is queried constantly by another application for Voice Call Routing instructions, so it cant be empty at any point. Im struggling to come up with a solution, as Im quite new to this element of SQL.
IS there a solution to the above problem?
John