Package owner. [message #38125] |
Fri, 22 March 2002 05:45 |
Alex Mazur
Messages: 17 Registered: March 2002
|
Junior Member |
|
|
I have 3 schemas in my database, lets say A,B and C.
In schemas A and B i have package SomePackage and in schema C i have synonym SomePackageSyn that could possibly be created for A.SomePackage or B.SomePackage in different moments of time. Do i have a chance to
figure out the current OWNER of the package when i call its method via synonym ? I would greatly appriciate your help.
|
|
|
Re: Package owner. [message #38127 is a reply to message #38125] |
Fri, 22 March 2002 06:23 |
hepl?
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
hope i understood yer problem ,
try this
------
select owner from dba_synonyms where
synonym_name=SomePackageSyn
|
|
|
Re: Package owner [message #38146 is a reply to message #38125] |
Mon, 25 March 2002 08:57 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
-- if it is a public synonym
select table_owner
from all_synonyms
where owner = 'PUBLIC'
and synonym_name = 'SOMEPACKAGESYN';
-- if you are in C and it is a private synonym
select table_owner
from user_synonyms
where synonym_name = 'SOMEPACKAGESYN';
|
|
|