Take the 2-minute tour ×

I have couple of statements, the pseudo code would look something like this

insert into local_table
crease savepoint sp1

insert into remote_db //using db_link
update local_table2
delete from local_table

Now I am kind a confuse at insert into remote_db statement. Would there be any chance that the commit which is being applied has different affect on local db and on remote db?

The problem statement is kind a complex. the script which copies data from local db to remote db is producing duplicates. After going through investigation, thats the only place which looks suspicious but i am not sure. Would really appreciate if someone can shed light on COMMIT of oracle.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you are asking whether the commit could potentially cause duplicate rows, no, that's not possible.

Given the way that distributed transactions take place, it is possible that that transaction would not be committed at all on the remote database (in which case it would be an in-doubt distributed transaction that the remote DBA would likely need to resolve). But if the transaction is committed successfully, it's going to be committed correctly. It's not possible that some rows would get committed and others wouldn't or that duplicate rows that didn't exist prior to the commit would be created by the act of committing.

share|improve this answer

Your Answer


