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 > DB2 - Create Alias locally for a remote table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-10, 13:51
Neharao Neharao is offline
Registered User
 
Join Date: Dec 2007
Posts: 49
DB2 - Create Alias locally for a remote table

Hello All

I Work in DB2 on AIX Platform. I would like to create an alias on my local system for a remote table on AIX.

Can some one tell me how ?

If the remote table is dropped what will happen to the local alias ? Can I Access the data in the local alias ?

Can some one let me know please

Thank You
Neharao
Reply With Quote
  #2 (permalink)  
Old 04-29-10, 13:56
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Look up "Federation" in the manuals.

If the remote table is dropped, you alias will fail when it is accessed.

Andy
Reply With Quote
  #3 (permalink)  
Old 04-29-10, 14:07
Neharao Neharao is offline
Registered User
 
Join Date: Dec 2007
Posts: 49
Then what is the advantage of creating alias as such ..!

Request you to correct me if I am wrong in the below two
  • When a table is dropped alias which resides locally and it is not dropped
  • When a table is dropped synonym is also dropped
Reply With Quote
  #4 (permalink)  
Old 04-29-10, 14:53
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
Read Andy's reply again to make out the difference between Alias and Synonym.
Reply With Quote
  #5 (permalink)  
Old 04-29-10, 14:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You really need to read the manuals on Federation to understand it properly.

It work like this:

You have 2 servers S1 and S2, and a table T1 on S1.

S2 has a nickname F1 that is a federation link to T1, so queries against F1 on S2 are automatically routed to S1 to read T1, and the result is sent to S2 to return to the client. As far as S1 is concerned, S2 is just another client. So if T1 is dropped, S1 does nothing more. Then when F1 is accessed again on S2, it will fail because T1 no longer exists.

Andy
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