Database Reference
In-Depth Information
CHAPTER 21
■ ■ ■
DBMS_UTILITY
M ost of the functions and procedures of the PL/SQL package DBMS_UTILITY are sufficiently
documented. The procedure NAME_RESOLVE accepts the name of a database object and decom-
poses the name into its constituent parts, such as a schema, an object name, and potentially
a database link. According to Oracle Database PL/SQL Packages and Types Reference 10g Release 2 ,
the procedure supports the four object types: synonym, procedure, function, and package.
Actual testing reveals that it supports a total of eight object types, thus extending its usefulness.
DBMS_UTILITY.NAME_RESOLVE is useful for applications that deal with database object
names. It removes the burden of translating a name into a fully qualified database object desig-
nation from applications. SQL identifiers are not case sensitive unless surrounded by double
quotes. Considering that identifiers may be case sensitive or contain spaces and punctuation
characters, it is clear that it makes sense to reuse existing functionality.
NAME_RESOLVE Procedure
This chapter discusses undocumented aspects of the packaged procedure DBMS_UTILITY.
NAME_RESOLVE . This procedure resolves a name that may include quotes, spaces, and mixed
case to an unambiguous designation of a database object. The return parameter values have
the same spelling as the schema and object names in the data dictionary. The object identifier,
which corresponds to DBA_OBJECTS.OBJECT_ID , is returned along with the type of object resolved.
Syntax
DBMS_UTILITY.NAME_RESOLVE (
name IN VARCHAR2,
context IN NUMBER,
schema OUT VARCHAR2,
part1 OUT VARCHAR2,
part2 OUT VARCHAR2,
dblink OUT VARCHAR2,
part1_type OUT NUMBER,
object_number OUT NUMBER);
213
 
Search WWH ::




Custom Search