If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Trigger to access multi-database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-05, 23:33
carmenlei carmenlei is offline
Registered User
 
Join Date: Jun 2004
Posts: 24
Trigger to access multi-database

I want to create a trigger that if table in DB1 is modified, the trigger action insert data to table2 in DB2. Is it possible for me to do that? How to access table in another database?

Thanks in advance~
Reply With Quote
  #2 (permalink)  
Old 02-02-05, 01:34
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
trigger

yes this is. If defining the table2 from different db as a nickname to db1
If both are db2, no additional code has to be installed, only federated activated.
create wrapper drda - create server .... - create user mapping .... - create nickname..
This should do
Best Regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 02-02-05, 02:30
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Not sure if you can do this ....
This is a two phase commit scenario ... AFAIK, there is no support for two phase commits in federated systems, unless it has changed in one of the recent fixpaks

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On