Databases Synchronization with Web Services

A

Amar

Can someone give me an answer to this please.

I want to run some SQL commands within my page to a local database,
after that call a webservice that runs other SQL commands to another
database and i want to be able to control all these commands in case
something goes wrong to rollback everything. For example

Scenario within my aspx page
---------------------------------
Insert Into LocalDatabase
Update LocalDatabase
Insert Into LocalDatabase
Insert within WebService
Insert within WebService

If Locals OK and WebService OK Commit Both else RollBack Both
---------------------------------

I believe you understand what i want to achieve, i have read about
WS-Coordination, WS-AtomicTransaction etc but if i have understand
right these are not availble yet, if yes when they will be out?
Is there any other way to succeed this now?
Thanks in advance,
 
G

Guest

You can do this currently without the WS enhancements, but you have to think
it through. The basic system is this:

1. Client side starts a transaction and changes the datababase
2. Client contacts server via a web service
3. Server initiates a transaction and makes changes to its database

To work, the condition then goes
a) Server succeeds and sends back a success and the client commits
b) Server sends back a failure and the client rolls back

The only thing missing here is the dual commit (ie, the server succeeds, but
the client cannot commit). As the client has already put the information,
wrapped in a transaction, in the database (provisionally), that should not
happen. The commit failing would only likely happen in a catestrophic failure.

Now, there are better modes for the long run, but you can institute this
today.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top