The NAME_RESOLVE stored procedure resolves a specified name, including necessary synonym translation and authorization checking.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
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. The value can be in the [[a.]b.]c[@d] format. a, b, and c are SQL identifiers, and d is a DBLink. No syntax check is performed on a DBLink. If a DBLink is specified or the name is resolved to a value that contains a DBLink, the object will not be resolved, but the schema, part1, part2, and dblink OUT parameters will be added. a, b, and c may be delimiters and contain single-byte or multi-byte National Language Support (NLS) characters. |
| context | The context, which must be an integer ranging from 0 to 9. Valid values:
|
| schema | The schema of the object. If name does not specify the schema, the schema is obtained by resolving the name. |
| part1 | The first part of the name. The type of the name is part1_type (synonym or package). |
| part2 | If this parameter is not NULL, it is a subprogram name. If part1 is not NULL, the subprogram is contained in the package specified by part1. If part1 is NULL, the subprogram is at the top level. |
| dblink | If this parameter is not NULL, the DBLink was specified as part of name, or name was a synonym which was resolved to a value with a DBLink. In this case, if you want to further translate the name, you must call the DBMS_UTILITY.NAME_RESOLVE stored procedure on this remote node. |
| part1_type | The type of part1. Valid values:
|
| object_number | The identifier of the object. |
Exceptions
Exceptions are thrown to handle errors. Various syntax errors may occur when you specify the object name, causing various exceptions.
The current version does not support UTF-16-encoded strings. Therefore, errors will occur when you use such strings.