Solved

public synonyms and oracle packages

Posted on 2006-11-10
1
2,482 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
1 Comment
 
LVL 7

Accepted Solution

by:
lappins earned 250 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now