Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010

    Unanswered: problem calling remote UDF in federated database

    I am trying to set up federation between 2 data bases A and B (both are on v9.7 FP6-AIX)
    Database A - database containing the source tables and UDFs
    Database B- Enabled the federation here, created nickname,function template and function mapping.

    create function test.func1_template(varchar(), varchar()) returns integer as template deterministic no external action
    create function mapping test_func1 for test.func1_template(varchar(), varchar()) server type db2/udb options(remote_name 'FUNC1')

    I have created nick name on source table . Able to view the contents using nick name from the source table i.e. in A
    But I am unable to call this function test_func1
    It always throw error:
    SQL0440N No authorized routine named "FUNC1" of type "FUNCTION" having
    compatible arguments was found. SQLSTATE=42884

    I am able to call my remote UDF using the template defined in database:B ,but not able to call using the mapped function.

    Kindly help to resolve the issue.


  2. #2
    Join Date
    Jul 2013

    How I did this

    1. Create Function on Datasource DB
    2. Create Function Template on Federated DB
    3. Create Function Mapping on federated db

    There are a couple good references for federated DB's that I've found in my research.

    One is the Info Center. There's an entire section on Federation that's OK.
    The other is the Federated Systems Guide. Google it. It's a PDF.

    What I didn't find was anything that tied it together into those 3 steps as I did, here.

Posting Permissions

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