Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    15

    Unanswered: 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

  2. #2
    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

  3. #3
    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

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

  5. #5
    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

  6. #6
    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.

  7. #7
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •