The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
p570 - Problem bringing it back up KeesH UNIX for Advanced & Expert Users 2 03-19-2007 08:55 AM
problem while getting the response back..plz help splax UNIX for Advanced & Expert Users 1 12-27-2006 12:52 PM
553 config error: mail loops back to me (MX problem) bluehell UNIX for Dummies Questions & Answers 5 05-19-2003 09:24 AM
automated back up problem Prafulla UNIX for Dummies Questions & Answers 7 11-21-2001 06:10 AM
back up problem Prafulla UNIX for Dummies Questions & Answers 1 10-10-2001 07:55 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-15-2005
tushar_johri's Avatar
Registered User
 

Join Date: May 2005
Location: Mumbai,India
Posts: 7
Roll back problem

Hi,
I have 5 sub processes which are updating and commiting different records of a single table.I have a problem here.I want to rollback all the transaction if any one of processes fails.Can any one of you gurus suggest how to go about it ?
Thanks
Tushar Johri
Reply With Quote
Forum Sponsor
  #2  
Old 06-15-2005
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
I dont think you can do this in any straight forward manner since each process is hitting the database in its own session. When the rollback is issued, it will only impact that session. If you need to do this, I would create a TEMP table that is a mirror of the working table. Process the records for each script in that TEMP table, then when the work is done, update the working table.
Reply With Quote
  #3  
Old 06-15-2005
Registered User
 

Join Date: Jan 2005
Posts: 682
...or you could use something like a semaphore. Keep a status flag in an OS table for all of your processes to check. When one updates this to say that a failure occurred, start rolling back.

If you are periodically committing records, then use some kind of common batch update identifier in your table. This will help you delete all records common to the batch. If you can't add columns to the table that you are loading, create a new table that keeps key values of records that you are working with.

Thomas
Reply With Quote
  #4  
Old 06-16-2005
tushar_johri's Avatar
Registered User
 

Join Date: May 2005
Location: Mumbai,India
Posts: 7
Hi,
Let me thank google and tmarikle for replying to my query.I will try to go ahead with semaphore technique and let us see if it works out
Thanks
Tushar
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0