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 > Accessing DB2 and UDB Tables in sinale SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-08, 19:09
ramesh jampala ramesh jampala is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
Accessing DB2 and UDB Tables in sinale SQL

Hi,
I did setup communication between DB2(v7.1) on Z/OS and UDB(9.5) on AIX.
I am able to access AIX UDB tables from Mainframe using DRDA. But I am receiving errors when trying to access Mainframe Table and AIX Table from a single query.

I tried from SPUFI,QMF and Application Program also. All are giving same error.


DSNT408I SQLCODE = -512, ERROR: STATEMENT REFERENCE TO REMOTE OBJECT IS INVALID .

Can someone help me?

Thanks
Ramesh
Reply With Quote
  #2 (permalink)  
Old 04-05-08, 22:26
SuperKuper SuperKuper is offline
Registered User
 
Join Date: Apr 2008
Posts: 51
Please post your SELECT statement here and indicate which tables are from z/OS and which are from AIX. I believe what you are trying to do cannot be done, unless you came up with some innovative idea or using federation. Hopefully you are not trying to get this done with three-part names.
__________________
db2topgun.com
Reply With Quote
  #3 (permalink)  
Old 04-06-08, 00:58
ramesh jampala ramesh jampala is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
The Query is

Select * from mfschema.tb1, aixschema.tb2;

mfschema.tb1 is the table on Mainframe
aixschema.tb2 is the alias defined on Mainframe for the table aixschema.tb1 on AIX

As you know alias is equivalent of 3 part name. Is it possible to execute the above query without federation?

Thanks
Reply With Quote
  #4 (permalink)  
Old 04-06-08, 14:27
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Yes, that's definitively possible if your federated server is the AIX box. But I guess your DB2 z/OS is supposed to act as federated server? (That's not really clear to me.) If so, please post exactly what you did to set things up.

Also, I guess you are mixing up aliases and nicknames. Aliases have no 3 part names - nicknames do.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 04-07-08, 11:33
ramesh jampala ramesh jampala is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
Hi,
I am not using any federation(Nicknames) for my query. I just setup DRDA communication between Mainframe and AIX. I will be running the queries from Mainframe itself. Instead of using 3 part qualifier for the remote Table, i am using alias for that.

In this case, which one need to federated server ? Is it Mainframe or AIX?
Whether Mainframe db2 v7 supports Federation?

Thanks
Reply With Quote
  #6 (permalink)  
Old 04-07-08, 13:48
nidm nidm is offline
Registered User
 
Join Date: May 2003
Posts: 113
Quote:
Originally Posted by ramesh jampala
Hi,
I am not using any federation(Nicknames) for my query. I just setup DRDA communication between Mainframe and AIX. I will be running the queries from Mainframe itself. Instead of using 3 part qualifier for the remote Table, i am using alias for that.

In this case, which one need to federated server ? Is it Mainframe or AIX?
Whether Mainframe db2 v7 supports Federation?

Thanks
You can refer two tables from two locations(even both from z/OS) in one single SQL statement. There is a DB2 product called 'federation' to help user to achieve the task. But Not by single query.
Reply With Quote
  #7 (permalink)  
Old 04-07-08, 14:00
SuperKuper SuperKuper is offline
Registered User
 
Join Date: Apr 2008
Posts: 51
So we all agree that this can be done using federation. But there seems to be some confusion about three-part names vs. federated nicknames. Last time I checked, these were not at all the same thing. Three-names have always been used between DB2 z/OS subsystems and employed "private protocol" for all communications, whereas federation is DRDA-based.
__________________
db2topgun.com
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