Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:08:24+00:00 2026-05-25T03:08:24+00:00

Normally, I call my function like so: SELECT * FROM TABLE( package_name.function(parameters) ) I’m

  • 0

Normally, I call my function like so:

SELECT * 
FROM TABLE(
  package_name.function(parameters)
)

I’m trying to call this function across a database link. My intuition is that the following is the correct syntax, but I haven’t gotten it to work:

SELECT * 
FROM TABLE(
  package_name.function@DBLINK(parameters)
)

> ORA-00904: "PACKAGE_NAME"."FUNCTION": invalid identifier

I’ve tried moving around the database link to no effect. I’ve tried putting it after the parameter list, after the last parenthesis, after the package name…I’ve also tried all of the above permutations including the schema name before the package name. I’m running out of ideas.

This is oracle 10g. I’m suspicious that the issue may be that the return type of the function is not defined in the schema in which I’m calling it, but I feel like I should be getting a different error if that were the case.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:08:24+00:00Added an answer on May 25, 2026 at 3:08 am

    What you’re trying is the correct syntax as far as I know, but in any case it would not work due to the return type being user-defined, as you suspect.

    Here’s an example with a built-in pipelined function. Calling it locally works, of course:

    SELECT * FROM TABLE(dbms_xplan.display_cursor('a',1,'ALL'));
    

    Returns:

    SQL_ID: a, child number: 1 cannot be found 
    

    Calling it over a database link:

    SELECT * FROM TABLE(dbms_xplan.display_cursor@core('a',1,'ALL'));
    

    fails with this error:

    ORA-30626: function/procedure parameters of remote object types are not supported
    

    Possibly you are getting the ORA-904 because the link goes to a specific schema that does not have access to the package. But in any case, this won’t work, even if you define an identical type with the same name in your local schema, because they’re still not the same type from Oracle’s point of view.

    You can of course query a view remotely, so if there is a well-defined set of possible parameters, you could create one view for each parameter combination and then query that, e.g.:

    CREATE VIEW display_cursor_a_1_all AS
      SELECT * FROM TABLE(dbms_xplan.display_cursor('a',1,'ALL'))
      ;
    

    If the range of possible parameter values is too large, you could create a procedure that creates the needed view dynamically given any set of parameters. Then you have a two-step process every time you want to execute the query:

    EXECUTE  package.create_view@remote(parameters)
    
    SELECT * FROM created_view@remote;
    

    You have to then think about whether multiple sessions might call this in parallel and if so how to prevent them from stepping on each other.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rakefile with a Rake task that I would normally call from
I'm wondering if PHP has this optimization built in. Normally when you call foreach
Normally, the method of passing workflow parameters to the workflow happens in the call
Normally you create a function using cfscript like: <cfscript> function foo() { return bar;
Normally you can do this: <select size=3> <option>blah</option> <option>blah</option> <option>blah</option> </select> And it would
I got this function from someone on here: create FUNCTION [dbo].[fnSplitString] (@s varchar(512),@sep char(1))
I would like to call a jQuery pager function (p) defined as: function p(page)
In case a system call function fails, we normally use perror to output the
First, this could look like duplicate for How to prevent your JavaScript code from
I am wondering where to call the ShowDialog() in MVP pattern, Presenter is normally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.