473,804 Members | 2,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Performing a Transaction in 2 systems

I have the need to perform an atomic operation in two systems, a database and
an ftp site. The process is two step; 1. insert a row into oracle, 2. delete
a file from a remote ftp site. I need to make these steps atomic...either
they both succeed or both fail. Any suggestions on how I create a
transaction that bridges these two steps (systems) using C#?

Thanks in advance!

Nov 17 '05 #1
2 2025
Chris,

The problem here is the FTP site. You will have to write some sort of
transaction management for this. Unfortunately, doing something of this
nature is rather tricky. For example, say you write the file to FTP, but
the database insert fails. Then you have to delete the file on the FTP
site. What if you do the reverse?

All-in-all, unless you have an existing resource manager for the FTP
site (which I doubt), then I would consider another option. There are too
many things to take into account (what if the network fails in the middle?
How can you roll back then? Things of that nature).

If you are really serious about doing this the proper way, I would look
into creating a resource manager for FTPing, and then use COM+ to handle the
transaction.

What would be more helpful was if there was a transaction manager on the
FTP machine you want to delete the file from. That way, you could get a
true distributed transaction.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Chris Fink" <Ch*******@disc ussions.microso ft.com> wrote in message
news:D5******** *************** ***********@mic rosoft.com...
I have the need to perform an atomic operation in two systems, a database
and
an ftp site. The process is two step; 1. insert a row into oracle, 2.
delete
a file from a remote ftp site. I need to make these steps atomic...either
they both succeed or both fail. Any suggestions on how I create a
transaction that bridges these two steps (systems) using C#?

Thanks in advance!

Nov 17 '05 #2
Chris,

I don't think you can get this opperation atomic, you have to make some kind
of compensation code for it [just like biztalk long running transaction
compensation]. When one of the jobs fail there must be some custom rollback
code who rollsback the other actoins. And to be more sure that the actoins
will succeed you can write code wich checks if the operation will succeed,
if the file excists if the db is available and that kind of things... when
all checks give an ok, the code can preform the actions when one fails the
compensation code will be executed. At a gotodtnet workspace I've put some
code wich preforms that same steps to deploy and configurate a biztalk
solution... have a look.
http://www.gotdotnet.com/Workspaces/...a-9d13acfccc0a

greets Clemens
"Chris Fink" <Ch*******@disc ussions.microso ft.com> wrote in message
news:D5******** *************** ***********@mic rosoft.com...
I have the need to perform an atomic operation in two systems, a database
and
an ftp site. The process is two step; 1. insert a row into oracle, 2.
delete
a file from a remote ftp site. I need to make these steps atomic...either
they both succeed or both fail. Any suggestions on how I create a
transaction that bridges these two steps (systems) using C#?

Thanks in advance!

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4147
by: Evelyn Pabón | last post by:
Hi I created a database application for the company I'm working and as part of the CFR Part 11 it is a requirement for al the application that are for manufacturing us to have some security option like employee account to log on in the database and a transaction log to register al the activities that has occurred and saved with the employees name who made the transaction or the changes. But I don't have an idea on how to create this...
1
439
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? I have read the doc regarding this: http://www.developer.com/net/asp/article.php/3385631 but it will not work when methods are in different services on
0
2606
by: Raja | last post by:
I have a Linked Server i.e. my SQL Server 2000 is Linked to the Oracle Database. The Link is perfect and dont have any problems in accessing the data from SQL Server 2000. The only problem i am facing is when i am trying to initiate a Distributed transaction. A simple Insert Query is working fine but when i try to perform the same through a Stored Procedure having the Begin Transaction i am getting the error mentioned below. Server:...
5
3345
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by definition? Thanks Klemens
6
348
by: Chris Fink | last post by:
I have the need to perform an atomic operation in two systems, a database and an ftp site. The process is two step; 1. insert a row into oracle, 2. delete a file from a remote ftp site. I need to make these steps atomic...either they both succeed or both fail. Any suggestions on how I create a transaction that bridges these two steps (systems) using C#? Thanks in advance!
2
1935
by: msnews.microsoft.com | last post by:
Hello, I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model. Let us take example of Northwind Database in SQL SERVER. i build an asp.net page. On that page i place the grid with one template column. In that column i put HTML Table with two rows. In First row there are one combobox and two textboxes. In the second row there is another DataGrid means...
3
1980
by: Eitan | last post by:
Hello, I have run a long transaction on the DB (sql server) For some long transaction I have got the following message : What can I do in order to run it properly ? Error Type:
2
3794
by: Christian Stooker | last post by:
Part one: ====== Hi ! I want to use SQLite database like the FireBird database: with big isolation level. What's that meaning ? I have an application that periodically check some input directory,
2
5773
by: Habib | last post by:
CREATE PROCEDURE SimpleInsert ( @custname custname_type, @carname carname_type) AS BEGIN TRANSACTION INSERT Customers (CustName) VALUES (@custname)
2
9255
by: rbg | last post by:
Hi, On My local SQL server I have added a linked server to another SQL server (remoteserver) in another Windows NT Domain. When I run this code select count(*) from remoteserver.mosaics.dbo.Location This works fine. However when I use
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.