Avatar of bkreynolds48
bkreynolds48
 asked on

ora 904 invalid identifier 10g

I have two database links going from one database to two others.
I do a

select owner.function_name@database_link ('50458093010') from dual;

one works the other doesn't
other than the owner and the database link everything is the same including the function

have no clue as to why

the database links test successfully
Oracle Database

Avatar of undefined
Last Comment
bkreynolds48

8/22/2022 - Mon
slightwv (䄆 Netminder)

It looks like the function on the one server isn't correct/working.
bkreynolds48

ASKER
I tried taking the function that works and putting it in the other database but still have the same error
slightwv (䄆 Netminder)

Log into the other database and make sure the function works.
Double check the database link is using the correct user and thus executing the correct function.

Are the database versions between the working server and non-working server the same?
Your help has saved me hundreds of hours of internet surfing.
fblack61
bkreynolds48

ASKER
it runs fine in the destination server but when it is run in database one with the database link it doesn't work - link is fine - very weird  - database version / os are the same - will go and check the user in the link
slightwv (䄆 Netminder)

As a sanity check, on the failed server add a dbms_output.put_line('Hello World'); to the function.  Then "set serveroutput on" on the calling session and call the function.

You should see the output to make sure you are calling the correct function.
bkreynolds48

ASKER
will give that a try tomorrow - thanks
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
bkreynolds48

ASKER
the permissions were granted through a role and work fine elsewhere - this is a new build so something was missed

Thanks