Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Privilege Issue
Raja,
You can create a synonym like this:
CREATE PUBLIC SYNONYM S1 FOR S1_at_dblinkname
<mailto:%22DOLRIC%22_at_DMVLINK.LABOR.STATE.NY.US>
S1 is the object in the remote database. This solves your coding problem - the programmers only have to know about the synonym name. I do this all the time.
Tom
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Subbiah, Nagarajan
Sent: Thursday, November 03, 2005 12:41 PM
To: ORACLE-L
Subject: RE: Privilege Issue
If I spefify the P1.F1@<dblink> it works but I would like to avoid the DB LINK name in the code making transparent to the users/developers.
-Raja.
-----Original Message----- From: Subbiah, Nagarajan [mailto:Nagarajan.Subbiah_at_aetn.com] Sent: Thursday, November 03, 2005 12:32 PM To: 'rjamya' Cc: ORACLE-L Subject: RE: Privilege Issue Yes, It has the privilege. X1 is the schema which contains thepackage. My suspect is when I give the S1.F1, oracle tries to look for the schema name S1 in the local database (D2) instead of referring the synonym S1.
-Raja.
-----Original Message----- From: rjamya [mailto:rjamya_at_gmail.com] Sent: Thursday, November 03, 2005 12:27 PM To: Nagarajan.Subbiah_at_aetn.com Cc: ORACLE-L Subject: Re: Privilege Issue make sure that the x1_at_d1 has execute privs on thatpackage. Where x1 is the user you are trying to connect thru db-link from d2.
Raj
On 11/3/05, Subbiah, Nagarajan
<Nagarajan.Subbiah_at_aetn.com> wrote:
Hi,
I am getting an ORA-904 invalid identifier error when calling a package over the db link.
Database D1 has a package P1 and Database D2 has the synonym S1 for the package P1 over the db link. When I call a function F1 in the package P1 using the synonym S1 from D2,
"Select S1.F1('123) from dual; " I am getting the above error ORa-904. What privilege I am missing and Can we not access the package over the db link?
Don't have any issue with accesing the tables.
Thanks,
Raja.
-- ------------------------------ Useful Links: FAQ1, FAQ2, RTFM, STFW, ORA-600, ORA-7445
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Nov 03 2005 - 12:08:48 CST
![]() |
![]() |