Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Federation for Db2 functions

    Hi,

    I have some multiple databases & i created some wrappers & servers to access the remote databases. For some operations I created few procedures & I can access my remote database(Only SELECT) using federation & its working fine.

    Now I am trying to access the same remote database using a function. I am getting an error called trying to access a federated object. My question, Is the wrappers which I created for procedures are also applicable to the functions created on the same database?
    Or Is there any way to use federation on a db2 functions ?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need to create nicknames for the functions.

    Andy

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Thanks Andy I l try that

  4. #4
    Join Date
    Jul 2014
    Posts
    294
    Read something & tried to create a function mapping to access a federated object using functions .
    Function TEMPLATE & mapping is successful. But If I ran the UDF, it is still throwing the same error.

    Routine "yellow.pages" (specific name "SQL141202174243900") attempted to access a federated object.. SQLCODE=-20136, SQLSTATE=55047, DRIVER=4.17.30
    Run of routine failed.


    this is my syntax for functionTEMPLATE & mapping:
    CREATE FUNCTION FUNC_TEMP1 () RETURNS VARCHAR(1000) AS TEMPLATE DETERMINISTIC NO EXTERNAL ACTION

    CREATE FUNCTION MAPPING FUNC_MAP1 FOR yellow.pages (VARCHAR(1000),VARCHAR(1000)) SERVER TYPE DB2/UDB 10.5 OPTIONS (REMOTE_NAME 'SAMPLE')


    can some please let me know, what to do?

    thanks
    Last edited by HABBIE; 12-02-14 at 08:25.

  5. #5
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    although you state being new to db2 - you try many things - never read the books - always throw all errors directly to the forum, hoping these helpful people will resolve all your problems without you having todo anything.. nice solution ..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  6. #6
    Join Date
    Jul 2014
    Posts
    294
    I keep on reading, as this is my task. I have multiple things to work on daily, this is just a small component which I am developing on db2luw 10.5 .
    Kindly excuse me If I am wrong with my question. & i request you to stop judging a person, with out knowing any thing about him.this is the mere basic thing rather than a technology.there are lots of experts who are helping me with out any attitude.

  7. #7
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    Guy is one of those experts that has been helping you, quite a bit too if I remember correctly. He is pointing out what a lot of us notice is that you are asking almost every question to the forum. I do see you are doing some investigation yourself as the other day I pointed you towards some functions and you developed the solution yourself, but this was only after being given what functions you should look at, which were fairly basic functions. I think, Guy was suggesting that maybe you do some initial research before coming to the forum. There are quite a few people on this server that help quite a bit, sometimes some may feel that they are being taken advantage of or something else as well. I must admit I have been quite amazed at the shear number of threads you have started in the short time you have been on this forum.
    Dave

  8. #8
    Join Date
    Jul 2014
    Posts
    294
    dave,

    I ll try my best to resolve on my own.May be some of my questions, which are typical for me, are quiet basic for these experts.Even I am thankful for all the experts who are helping me all the time. I started learning & working in a short span. may be what u said is correct . Have to filter my questions, before I post.even Guy helped me a lot, but i am not taking this as an advantage, behind my question there is lot of hard work, which I only can recognize.
    Thanks for your suggestion. I will not trouble these experts

  9. #9
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    we continue to support you also..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  10. #10
    Join Date
    Jul 2014
    Posts
    294
    Thanks przytula_guy

Tags for this Thread

Posting Permissions

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