Update registration information on two databases at different physical locations

Update registration information on two databases at different physical locations

I would like to update two databases located at two different physical locations to be able to update the Registration information.


    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This question depends too much on the actual database software in use. At a minimum, you should consider the case where one of the updates fails -- this usually requires wrapping the update statements in a transaction block that the database can roll back. This scenario can be implemented in many ways, depending on the software available. Here's some pseudocode --

BEGIN DISTRIBUTED TRANSACTION doubleup
UPDATE Table1SQLServer
   SET Registration = "foobar"
IF ERROR THEN
   ROLLBACK DISTRIBUTED TRANSACTION doubleup
UPDATE Table2Oracle
   SET Registration = "foobar"
IF ERROR THEN
   ROLLBACK DISTRIBUTED TRANSACTION doubleup
COMMIT DISTRIBUTED TRANSACTION doubleup

Check with your Database Administrator for specifics concerning your installation.

For More Information


This was first published in April 2001

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.