Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

public synonyms and oracle packages

Posted on 2006-11-10
1
Medium Priority
?
2,530 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

604 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