Home » SQL & PL/SQL » SQL & PL/SQL » synonym for a synonym
synonym for a synonym [message #19468] Wed, 20 March 2002 22:25 Go to next message
Synonymous
Messages: 2
Registered: March 2002
Junior Member
I have a synonym SYMA pointing to a table TABA.
I am trying to create another synonym SYMB pointing to SYMA, so as to query TABA in my program.

But I am getting the following error:
ORA-00942: table or view does not exist.

When I try to create a synonym for TABA directly, it works fine.

What am I doing wrong?

Thanks.
Re: synonym for a synonym [message #19470 is a reply to message #19468] Wed, 20 March 2002 23:42 Go to previous messageGo to next message
seng
Messages: 191
Registered: February 2002
Senior Member
From error message, i think that the user is not granted to access TABA table. Hope this is helping
Re: synonym for a synonym [message #19481 is a reply to message #19468] Thu, 21 March 2002 05:43 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
I believe you cannot create a synonym pointing to another synonym.
Re: synonym for a synonym [message #19511 is a reply to message #19468] Fri, 22 March 2002 07:37 Go to previous messageGo to next message
oraboy
Messages: 97
Registered: October 2001
Member
This is very much possible.

There is no restriction as to you have to create a synonym only for a table or view..

Check out whether you are creating the second syn'm SYMB from the same schema where u have SYMA..
Else check out whether you have SYMA as a public synonym!

Regards
Oraboy
Re: synonym for a synonym [message #19516 is a reply to message #19468] Fri, 22 March 2002 15:37 Go to previous message
Sudhakar Atmakuru
Messages: 58
Registered: May 2001
Member
Either you are trying to create the second synonym from another user or you dont have the privilege granted by the creator of TABA. Have the creator of TABA granted you the SELECT and UPDATE privileges on TABA WITH GRANT OPTION. The WITH GRANT OPTION enables the creator of first synonym to pass on his/her privileges to other users to create one or more synonyms on the one already created. Otherwise, the ORACLE does not let you access a table which you are not privileged to access. Get the following done by the creator of TABA.

GRANT SELECT, UPATE ON TABA TO yourname WITH GRANT OPTION;

This should work. Try it out.

Good luck :)
Previous Topic: if then else
Next Topic: Database Triggers
Goto Forum:
  


Current Time: Thu Mar 28 05:05:35 CDT 2024