473,791 Members | 3,122 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 2023
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
4146
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
2604
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
1934
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
1979
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
3793
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
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
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
10147
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,...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
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...
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
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.