Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > dblink ,dblink_...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 15132 of 17637
Post > Topic >>

dblink ,dblink_exec not participating in a Transaction??

by cartymc3@[EMAIL PROTECTED] (carty mc) Apr 1, 2008 at 03:28 PM

--0-1163584699-1207088899=:2902
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

How I can make dblink to participate in transaction so that remote changes
made by dblink can only be committed if only local transaction succeds.
   
  Here is my current scenario:
   
  I am using two databases A & B.  In Database A, I have trigger procedure
written for  a Table . In this trigger procedure, I use dblink_exec  to
update a table in the other database B.
  The problem I am having right now is my trigger procedure currently
participates in a transaction.  If Transaction rollsback: whatever trigger
procedure modified in database A is getting rolled back whereas Chages made
to a table in Database B using dblink_exec are not.
  Note: Transaction can be rolled back due to excpetions any where from
main db client which updates a table in database A .
   
  So my question is there a way to  tell dblink_exec to participate in a
Transaction. This way commits wont go to table in database B until
transaction completed succesfully.
   
   
  I appreciate any help,
   
  thanks,

       
---------------------------------
You rock. That's why Blockbuster's offering you one month of Blockbuster
Total Access, No Cost.
--0-1163584699-1207088899=:2902
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div>How I can make dblink to participate in transaction so that remote
changes made by dblink can only be committed if only local transaction
succeds.</div>  <div>&nbsp;</div>  <div>Here is my current scenario:</div>
 <div>&nbsp;</div>  <div>I am using two databases A &amp; B.&nbsp; In
Database A, I have trigger&nbsp;procedure written for&nbsp; a Table . In
this trigger procedure,&nbsp;I use dblink_exec&nbsp; to update a table in
the other database B.</div>  <div>The problem I am having right now is my
trigger procedure currently participates in a transaction.&nbsp;&nbsp;If
Transaction&nbsp;rollsback:&nbsp;whatever trigger procedure modified in
database A&nbsp;is getting rolled back whereas Chages made to a table
in&nbsp;Database&nbsp;B using dblink_exec&nbsp;are not.</div>  <div>Note:
Transaction can be rolled back due to excpetions any where from&nbsp;main
db&nbsp;client which updates&nbsp;a table in database A&nbsp;.</div> 
<div>&nbsp;</div>  <div>So my question is
 there&nbsp;a way to &nbsp;tell dblink_exec to participate in a
Transaction. This way commits wont go to table in&nbsp;database B until
transaction completed succesfully.</div>  <div>&nbsp;</div> 
<div>&nbsp;</div>  <div>I appreciate any help,</div>  <div>&nbsp;</div> 
<div>thanks,</div><p>&#32;



      <hr size=1>You rock. That's why Blockbuster's offering you <a
href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one
month of Blockbuster Total Access</a>, No Cost.
--0-1163584699-1207088899=:2902--
 




 6 Posts in Topic:
dblink ,dblink_exec not participating in a Transaction??
cartymc3@[EMAIL PROTECTED  2008-04-01 15:28:19 
Re: dblink ,dblink_exec not participating in a Transaction??
cartymc3@[EMAIL PROTECTED  2008-04-01 16:56:27 
Re: dblink ,dblink_exec not participating in a Transaction??
Jon.Roberts@[EMAIL PROTEC  2008-04-02 09:33:56 
Re: dblink ,dblink_exec not participating in a Transaction??
cartymc3@[EMAIL PROTECTED  2008-04-02 07:57:30 
Re: dblink ,dblink_exec not participating in a Transaction??
cartymc3@[EMAIL PROTECTED  2008-04-02 08:54:25 
Re: dblink ,dblink_exec not participating in a Transaction??
doug@[EMAIL PROTECTED] (  2008-04-01 22:10:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 6:32:47 CST 2008.