Now
SCOTT> exec RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY
does not work because of a lack of a synonym and lack of specifying the owner of the package.
How do I create a public synonym for a package.package_body ? The following public synonym was created as SYSTEM but SCOTT still cannot see the RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY unless I specify the owner.
This worked syntactically but not during execution logged on as SCOTT:
create public synonym "RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY" for
"stage_owner.RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY"
Originally posted by gopi owner = stage_owner
Package = RPT_CA_INVENTORY_AGING
Package body = GET_INVENTORY_AGING_SUMMARY
You have mixed up few things. Package and package body allways have the same name.
In your case:
Package = RPT_CA_INVENTORY_AGING packaged procedure (not package body) = GET_INVENTORY_AGING_SUMMARY
your problem is that your public synonym was created totaly wrong:
create public synonym "RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY" for
"stage_owner.RPT_CA_INVENTORY_AGING.GET_INVENTORY_AGING_SUMMARY"
You can't include packaged function/procedure in your synonym. Also, because you used double quotes the schema name STAGE_OWNER has being interpreted wrong, because you used lowercase inside the double quotes. Your create sysnonym statement should be:
Code:
create public synonym RPT_CA_INVENTORY_AGING for
stage_owner.RPT_CA_INVENTORY_AGING;
Now your users will be able to reference those packaged procedures and functions without specifying schema name, eg
Bookmarks