Home » SQL & PL/SQL » SQL & PL/SQL » Commit data in several databases (10g)
Commit data in several databases [message #332023] Mon, 07 July 2008 05:03 Go to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Hi!
I am making a script that updates data in many databases; this script uses a cursor that loops over all the databases (it's one table in many databases), using DBLinks.
Another cursor loops over all records in the table in one database, and the updates are made in the others upon this cursor.
All the changes must be committed.

My question is: Does one commit at the end of the script (outside the loops) commit all changes in all databases, or I have to put the commit inside the loops to commit the changes in the table for every database??

Thank you!!
Re: Commit data in several databases [message #332028 is a reply to message #332023] Mon, 07 July 2008 05:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Does one commit at the end of the script (outside the loops) commit all changes in all databases

Yes.

Regards
Michel
Re: Commit data in several databases [message #332052 is a reply to message #332028] Mon, 07 July 2008 06:41 Go to previous message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Quote:
Yes.

Thank you!!
Previous Topic: sql query
Next Topic: Display Record in Specific Order
Goto Forum:
  


Current Time: Fri Dec 02 16:20:48 CST 2016

Total time taken to generate the page: 0.35046 seconds