The DBMS_METADATA package is used to generate DDL statements or to execute DDL statements by submitting an XML document.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Privilege requirements for DBMS_METADATA
The DBMS_METADATA package belongs to the SYS user and grants execute access to PUBLIC. DBMS_METADATA runs with the privileges of the caller, which are determined by the caller's security profile.
Overview of DBMS_METADATA subprograms
The following table lists the DBMS_METADATA subprograms supported in the current version of OceanBase Database and their brief descriptions.
| Subprogram | Description |
|---|---|
| GET_DDL | Returns the metadata of a single object as a DDL statement. |
| GET_TABLE_INDEX_DDL | Extracts index DDL statements for a table in batches. |