The NAME_RESOLVE procedure resolves the specified name, including necessary synonym translation and authorization checks.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
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);
Parameters
| Parameter | Description |
|---|---|
| name | The name of the object. It can be specified in the [[a.]b.]c[@d] format, where a, b, and c are SQL identifiers, and d is a dblink. The syntax of dblink is not checked. If a dblink is specified, or if the name resolves to a dblink, the object is not resolved, but the schema, part1, part2, and dblink OUT parameters are populated. a, b, and c can be delimited identifiers and can contain NLS characters (single-byte and multibyte). |
| context | An integer from 0 to 9. The value indicates the type of object.
|
| schema | The schema of the object. If the schema is not specified in name, it is resolved by parsing the name. |
| part1 | The first part of the name. The type of this name is specified as part1_type (synonym or package). |
| part2 | The name of the subprogram, if it is not NULL. If part1 is not NULL, the subprogram is contained in the package indicated by part1. If part1 is NULL, the subprogram is a top-level subprogram. |
| dblink | If not NULL, specifies the database link as part of name, or name as a synonym for the database link content. In this case, if further name resolution is required, you must call the DBMS_UTILITY.NAME_RESOLVE stored procedure on the remote node. |
| part1_type | The type of part1 is as follows:
|
| object_number | The object identifier. |
Exceptions
All errors are handled by raising exceptions. Various syntax errors may occur when specifying the object name, leading to multiple exceptions.
The current version does not support UTF16 encoded strings, so an error will also be raised.
