title: Oracle PLSQL - Commit only database link
body: <p>Is there a way to commit only the data inserted/updated on a table through a database link and <strong>not</strong> the data of the current session?  Or are they considered one and the same?</p>
  
  <p>For example:</p>
  
  <pre><code>INSERT INTO main_database.main_table(value1, value2)
  VALUES (1 , 2)
  
  INSERT INTO database.table@database_link(value3, value4)
  VALUES (3 , 4)
  </code></pre>
  
  <p>And do a commit for only the database link table?</p>
  
  <p>Background on why I would want to do this:
  The main database is for (multiple) records while the database link is for (monetary) transactions (processed on a separate server).  I want to update the records first to check to see if any of the constraints fail, but not commit the data until the transaction is complete.  If the transaction fails, I want to rollback the records to save me the effort of deleting/undoing inserts/updates which could get messy.</p>
  
  <p>I am assuming there is not but I am hoping that there is a way.  Thanks in advance.</p>