Solved

public synonyms and oracle packages

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

726 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