Skip to content

SQL Developer extension: add a report for viewing synonyms compiled with/without PL/Scope #61

@rvo-cs

Description

@rvo-cs

Synonyms compiled with PL/Scope can be found in sys.plscope_identifier$, with the following identifying properties:

  • type# = 37
  • symrep = name of the synonym
  • obj# = object_id of the synonym in dba_objects

While such internal implementation details are not publicly disclosed by Oracle, hence there's obviously no commitment that they may not change in the future, in the meantime they make it possible to create a report for showing synonyms compiled with/without PL/Scope, along with relevant information (e.g. status of the synonym object, existence and type of the target object, creation date and last_ddl_time of the synonym object).

Because that report would query sys.plscope_identifier$, only users having the DBA role, or the SELECT ANY DICTIONARY system privilege, or an ad-hoc grant of SELECT / READ on sys.plscope_identifier$, would be able to use the new report. This privilege requirement should be made as obvious as possible, otherwise insufficiently-privileged users could be frustrated by trying the report, and receiving the ORA-00942 ("table or view does not exist") exception in response.

As of v1.0.0, existing reports only use ALL_xxx views, hence in principle they can be run by unprivileged users without raising exceptions—though the actual results will vary greatly depending on user privileges. The new report would be different in terms of privilege requirements and exception behaviour, therefore, in order to make this clearer for users I'd suggest to put it clearly aside, perhaps by using sub-folders under the main "plscope-utils Reports" folder:

  • Main reports: for reports using ALL_xxx views; all existing reports (as of v1.0.0) would be put in that sub-folder
  • Other reports: for reports of niche interest, or having high privilege requirements; the new report would be put in this sub-folder.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions