Solved

public synonyms and oracle packages

Posted on 2006-11-10
1
2,508 Views
Last Modified: 2012-06-21
Hi,

I have 2 schemas in an oracle database. (SchemaA and SchemaB). I have a procedure (Proc1) in a package (Pkg1) in SchemaB that I wish to execute from a C# application. I only want to log in to SchemaA in the application. I created a public synonym for Pkg1 as follows in SchemaB:
CREATE PUBLIC SYNONYM pkg1 FOR Pkg1;

We use toad as the oracle development environment. When I log in to SchemaA, I can execute Proc1 in SchemaB without problems. However when I execute it from the C# application, I get the following error:
ORA-06550: line 1, column 15: PLS-00201: identifier 'pkg1.proc1' must be declared
ORA-06550: line 1, column 7: PL/SQL: Statement ignored

Does anybody know how to fix this and why it works in Toad?

Thanks
0
Comment
Question by:WallaceAdrian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
Stephen Lappin earned 250 total points
ID: 17913410
Make sure that you specify the schema when creating a public synonym:

CREATE PUBLIC SYNONYM pkg1 FOR SchemaB.Pkg1;

Also, ensure that your user has execute privilege on Pkg1

GRANT EXECUTE on SchemaB.Pkg1 to UserY;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question