Home » SQL & PL/SQL » SQL & PL/SQL » ORA-38818: illegal reference to editioned object (11g(11.2.0.1.0))
ORA-38818: illegal reference to editioned object [message #559306] Mon, 02 July 2012 02:48 Go to next message
b_chugh
Messages: 68
Registered: August 2005
Location: delhi
Member
Hi All

When I am trying to create a public synonym for a package then I am getting this error. This error tells us that non editioned object(Public Synonym) can not refenrence the editioned object(Package in this case).
Please let me know how to avoid this error.

One of the solution provided on one of t he site is to create local synonym instaed of public synonym but I need to create public synonym only.

Regards
B_chugh
Re: ORA-38818: illegal reference to editioned object [message #559307 is a reply to message #559306] Mon, 02 July 2012 02:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Please let me know how to avoid this error.


Replace public synonym by private ones.

Quote:
but I need to create public synonym only.


No, you don't need that.
It has always been a bad practice and it was always recommended to use private synonyms.
You can't workaround this error unless you don't use editions (and have to recreate your database to change all your accounts to not edition-enabled ones).

Regards
Michel

[Updated on: Mon, 02 July 2012 02:54]

Report message to a moderator

Re: ORA-38818: illegal reference to editioned object [message #560306 is a reply to message #559306] Thu, 12 July 2012 00:41 Go to previous messageGo to next message
b_chugh
Messages: 68
Registered: August 2005
Location: delhi
Member
Hi All

Now When I am creating private synonym then also I am getting the same error.

I am using the following command to create synonym for a package which has edition information:

create synonym user2.pack_test for user1.pack_test;

and I get the same error as:
ORA-38818: illegal reference to editioned object user1.pack_test

Please let me know if I am doing anything wrong OR what is the wayout to create SYNONYM on editioned object.

Thanks

Re: ORA-38818: illegal reference to editioned object [message #560311 is a reply to message #560306] Thu, 12 July 2012 00:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Most likely user2 is not editioned enable. See DBA_USERS.EDITIONS_ENABLED.

Regards
Michel
Re: ORA-38818: illegal reference to editioned object [message #560313 is a reply to message #560311] Thu, 12 July 2012 01:15 Go to previous messageGo to next message
b_chugh
Messages: 68
Registered: August 2005
Location: delhi
Member
Yes, it was not.

I have altered the user and enabled the editions and then SYNONYM got cerated.

So it means where ever we need to create the synonym those users should also be editioned enabled.

Thanks you so much.
Re: ORA-38818: illegal reference to editioned object [message #560317 is a reply to message #560313] Thu, 12 July 2012 01:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes.
To refer to an editioned object (in any way) you must be edition enabled otherwise how Oracle could know to which edition your object refers?

Regards
Michel
Re: ORA-38818: illegal reference to editioned object [message #560320 is a reply to message #560311] Thu, 12 July 2012 01:46 Go to previous message
b_chugh
Messages: 68
Registered: August 2005
Location: delhi
Member
Got It.

Thank you so much for the help.
Previous Topic: table variable or collection
Next Topic: Index Related to primary key
Goto Forum:
  


Current Time: Tue Jun 16 02:46:37 CDT 2026