0

As a part of a DB procedure we have the following piece of code:

INSERT INTO remote_table@link_to_remote VALUES ('x','y','z');

UPDATE local_table SET process_status = '1' WHERE id = x;

COMMIT;

Now based on the value in process_status we have further processing, which should be carried out only in a sequence.

Is it a possibility that after the commit, the local_table is instantly updated, but the remote_table (the one over the db link) is only updated after some time (like there is some lag in updating the remote table)?

Rob Baillie
  • 3,436
  • 2
  • 20
  • 34
Jyotirmoy
  • 710
  • 6
  • 12
  • 2
    When you issue a commit, the database will do a 2-phase commit so that the remote data is committed as well. See http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_txns003.htm#ADMIN12232 – Jeffrey Kemp Mar 05 '14 at 13:35

1 Answers1

0

Fortunately I found the source of the problem. We are using a 2 node oracle RAC here. The sequence we defined were not ordered and that was causing entries into the table with unordered sequence. This made me think (initially) that it might be something to do with the insert itself. Thanks to all those who tried to answer it.

Jyotirmoy
  • 710
  • 6
  • 12