Results 1 to 6 of 6
  1. #1
    Join Date
    May 2012
    Posts
    3

    Unanswered: Function call accross chained dblinks using synonyms fails

    Hello All

    I am attempting to call a function accross a chain of dblinks.

    For example, I am in database A and am attempting to call myFunc@dblink_B which is actually a synonym of the actual package on database C defined in database B.

    I get ORA-04054: database link dblink_C does not exist

    Now dblink_C is not defined in database A, but is defined in database B. It seems to me that Oracle is looking at myFunc on database B (as instructed by my call to myFunc@dblink_B) and is finding that this is infact a pointer to myFunc@dblink_C - therefore attempting to execute myFunc@dblink_C from database A.

    When myFunc is a table it seems to work, but a package method and it fails

    Can anyone help?

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >When myFunc is a table it seems to work, but a package method and it fails
    I could be wrong, but keep in mind the following truism.

    Privileges acquired via ROLE do NOT apply within named PL/SQL procedure.
    issue may be permission related; then again it might be something else.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2012
    Posts
    3
    Thanks, but it certainly is not due to permissions...

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by AgeingHippy View Post
    Hello All

    I am attempting to call a function accross a chain of dblinks.

    For example, I am in database A and am attempting to call myFunc@dblink_B which is actually a synonym of the actual package on database C defined in database B.

    I get ORA-04054: database link dblink_C does not exist

    Now dblink_C is not defined in database A, but is defined in database B. It seems to me that Oracle is looking at myFunc on database B (as instructed by my call to myFunc@dblink_B) and is finding that this is infact a pointer to myFunc@dblink_C - therefore attempting to execute myFunc@dblink_C from database A.

    When myFunc is a table it seems to work, but a package method and it fails

    Can anyone help?

    Thanks
    You need a synonym on server b pointing to server C and a synonym on server A pointing to the synonym on Server B.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    May 2012
    Posts
    3
    Quote Originally Posted by beilstwh View Post
    You need a synonym on server b pointing to server C and a synonym on server A pointing to the synonym on Server B.
    I have these synonyms already, but still get the error! This error does not occur when the synonym chain points to a table, only a function.

  6. #6
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    How are you invoking it?
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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