Using Oracle SQL Developer I'm trying to access a given package that has been created by SYS
and in which the, say, FOO schema has EXECUTE
and DEBUG
permissions, in fact executing a desc
will produce the following output:
desc SYS.PKG_MY_PACKAGE
PR开发者_C百科OCEDURE Argument Name Type IN/OUT Default
-------------- ------------- -------- ------ -------
PRC_MY_PROCESS P_MY_ARGUMENT VARCHAR2 IN unknown
The problem is such package is not visible under Connections > My Connection > Packages.
Any feedback will be sincerely appreciated. Thanks much in advance.
The only way I've found to do this is to select "Other Users" under My Connection, expand the SYS user, and go to Packages in there.
IOW,
Connections > MyConnection > Other Users > SYS > Packages
Well you could start by creating an alias to the package your are trying to access under the schema you are using, but you will need to have all permissions on all objects this package is accessing/modifying and on the execute permission on package itself for everything to work correctly
Is this is a genuine example? That is, have you created a package called PKG_MY_PACKAGE
in the SYS schema?
This is very bad practice. The SYS schema is key to the successful running of the database. Building objects in that schema can make exports, etc difficult. Even worse is when we use CREATE OR REPLACE to apply our code and overwrite an existing PL/SQL package.
So, please, create new schemas for all your code. If the schema needs additional powerful privileges like SYS then grant them. But don't contaminate SYS. This also applies to SYSTEM and indeed any of the other schemas which Oracle installs.
Changing the SYS schema from the Oracle-supplied state is bad practice.
精彩评论