473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to Rollback between two different DB in ORACLE?

Hi all!

Am using two different DB in ORACLE! Letz take it as CONN1 and CONN2 means
DATASOURCE: CONN1
USERID : CONN1
PASSWORD : CONN1
same as CONN2 also!..

In my functions am writing like first opening the connection for CONN1 and doing selection from a table called TABLE1 and closing it and again opening the connection for second connection CONN2 and doing insertion for the same table but in different DB!

Like this am proceeding with so many functions!

I just want to rollback Which is not happening ?? Since it is using two connections!

Can anyone help me regarding this?

Rdgs.
Priya.S.
Nov 30 '06 #1
1 1488
pragatiswain
96 Expert
Hi all!

Am using two different DB in ORACLE! Letz take it as CONN1 and CONN2 means
DATASOURCE: CONN1
USERID : CONN1
PASSWORD : CONN1
same as CONN2 also!..

In my functions am writing like first opening the connection for CONN1 and doing selection from a table called TABLE1 and closing it and again opening the connection for second connection CONN2 and doing insertion for the same table but in different DB!

Like this am proceeding with so many functions!

I just want to rollback Which is not happening ?? Since it is using two connections!

Can anyone help me regarding this?

Rdgs.
Priya.S.
Hi Priya,

Once you close connection to DB, data is commited if autocommit = true.
It will rollback, if autocommit = false.

Why don't you create 2 separate connection object for 2 DBs?
After creating connection object, do begin transaction.
Do all the work. Commit transaction.
Don't close the connections untill all the work is done and you commit.

You have to do this change to all the function.

I hope this helps. Incase of problem mail me : pragatiswain@airtelbroadband.in
Dec 2 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: tkestell | last post by:
Is their anyway to perform mass deletes (several million records) without "maxing out" rollback segments? I'm working on archiving data from an Oracle 8.1.7 database The system is about 4 years...
0
by: Prashant Kumar | last post by:
Hi: I get the following exception from oracle. It seems to be happening during a rollback of a transaction, while doing an executeBatch() Has anyone seen this before ? Thanks much!...
6
by: Tuhin Kumar | last post by:
Hi, Is It possible to disable rollback in Oracle 9i. I am running it in a loop deleting 2000 records at a time. The maximum performance I am able to get is 3 lakhs records in 20 minutes. I am...
2
by: Alice | last post by:
Hi all, I have a problem with rollback segment. I am a beginner and do not have much knowledge of DBA. Anyways, the problem is there is a transaction of around 105 MB. This would not fit...
1
by: anders_tung | last post by:
Hi, I have a procedure which will call 3 functions. First function will update a record. Second function will delete a record. Third function will insert a record. Each function will return...
1
by: Susan Lam | last post by:
Hi, I am an Oracle developer and new to SqlServer. Is there rollback segment in SqlServer? If there is, does it use only for the purpose of rollback or to maintain read consistency as well? ...
6
by: Tor Heigre | last post by:
Hello While testing our code on DB2 we have encountered a difference in the behaviour of DB2Driver (com.ibm.db2.jcc.DB2Driver with driverType= 4) compared to the drivers offered by Oracle 9i and...
5
by: dmalhotr2001 | last post by:
Hi, I have a piece of code that uploads a file and writes to a database. Is there a way that if the upload of the file fails or the database write fails, that the entire process can be rolled...
1
by: spriyasenthil | last post by:
How to Rollback between two different DB in ORACLE? -------------------------------------------------------------------------------- Hi all! Am using two different DB in ORACLE! Letz take it...
0
by: =?Utf-8?B?YmJn?= | last post by:
Hi all, here might not be best place to ask this but, Does anyone know how to rollback to particular check point not back to start of transaction? We are handling a socket connection as a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.