Summary of DBMS_CATALOG
This section covers the DBMS_CATALOG subprograms provided with Autonomous AI Database.
Catalog Mounting and Unmounting
| Subprogram | Description |
|---|---|
|
This procedure mounts a catalog based on a database link. |
|
|
This procedure mounts multiple catalogs from a share provider, with overloads to support different input types. |
|
|
This procedure mounts a single catalog based on a share. |
|
|
This procedure creates and mounts a new virtual catalog. |
|
|
This procedure mounts a data catalog such as AWS GLUE or OCI Data Catalog. |
|
|
This procedure mounts an Iceberg catalog with specific configurations. |
|
|
This procedure unmounts an existing external catalog. |
Catalog Property Management
| Subprogram | Description |
|---|---|
|
These procedures retrieves property values for a catalog. |
|
|
These procedures updates property values for a catalog. |
|
|
These procedures retrieves schema property values. |
|
|
These procedures updates schema property values. |
|
|
These procedures retrieves table property values. |
|
|
These procedures updates table property values. |
Credential Management
| Subprogram | Description |
|---|---|
|
This procedure defines a required credential for a catalog. |
|
|
This procedure removes a required credential from a catalog. |
|
|
This procedure renames a required credential. |
|
|
This procedure updates a property of a required credential. |
|
|
This procedure retrieves a property of a required credential. |
|
|
This procedure specifies a local credential for a required credential. |
|
| get_local_credential_map | This procedure retrieves mappings between required credentials and local credentials, with overloads for various output formats. |
Catalog Entity Management
| Subprogram | Description |
|---|---|
|
These procedure manages cloud storage links within a catalog. |
|
|
This procedure creates an external table in a catalog. |
|
|
This procedure drops schemas and tables from a catalog. |
|
|
This procedure retrieves metadata for tables, schemas, and objects within a catalog using pipelined functions. |
Data Access and Caching
| Subprogram | Description |
|---|---|
|
This procedure creates a |
|
|
This procedure opens a cursor to return data from a logical table. |
|
|
This procedure manages catalog metadata caching. |
Synchronization and Sharing
| Subprogram | Description |
|---|---|
|
These procedure manages synchronized schemas with remote catalog definitions. |
|
|
This procedure updates properties of synchronized schemas. |
|
|
These procedure manages access permissions for catalog recipients. |
MOUNT_DB_LINK Procedure
This procedure mounts an external catalog based on a database link.
Syntax
PROCEDURE mount_db_link
(
catalog_name IN VARCHAR2,
db_link IN VARCHAR2,
enabled IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the new catalog. This will be converted to uppercase. |
|
|
The database link to use for mounting the catalog. |
|
|
Indicates if the catalog is enabled for search. Defaults to |
MOUNT_SHARES Procedure
This procedure mounts multiple catalogs based on shares from a share provider.
Syntax
PROCEDURE mount_shares
(
share_provider IN VARCHAR2,
shares IN SYS.JSON_ARRAY_T,
created_catalogs IN OUT NOCOPY SYS.JSON_ARRAY_T,
share_provider_owner IN VARCHAR2 := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the share provider. |
|
|
A JSON array defining the list of shares to mount. Each element specifies properties like |
|
|
A JSON array of newly created catalogs, returned as output with properties like |
|
|
The owner of the share provider. Defaults to the current catalog if NULL. |
Syntax of Second Procedure
PROCEDURE mount_shares
(
share_provider IN VARCHAR2,
shares IN SYS.JSON_ARRAY_T,
share_provider_owner IN VARCHAR2 := NULL
);Syntax of Third Procedure
PROCEDURE mount_shares
(
share_provider IN VARCHAR2,
shares IN CLOB := '[{shareName:"%"}]',
share_provider_owner IN VARCHAR2 := NULL
);Parameters of the Second Procedure
Parameters are Identical to Procedure 1, except without created_catalogs.
Parameters of the Third Procedure
Parameters are Identical to Signature 1, except shares is a CLOB with a default value that includes all shares.
Example
/****************** Share Catalog ******************/
BEGIN
-- Create a share provider
dbms_share.create_or_replace_share_provider(
provider_name => 'MY_SHARE_PROVIDER',
endpoint => 'https://...');
dbms_cloud.create_credential(
credential_name => 'SHARE_PROVIDER_CREDENTIAL', ...);
dbms_share.set_share_provider_credential(
provider_name => 'MY_SHARE_PROVIDER',
share_credential => 'SHARE_PROVIDER_CREDENTIAL');
-- Mount shares as catalogs
dbms_catalog.mount_shares(
share_provider => 'MY_SHARE_PROVIDER');
END;
/MOUNT_SHARE Procedure
This procedure mounts a catalog based on a single share.
Syntax
PROCEDURE mount_share
(
catalog_name IN VARCHAR2,
share_provider IN VARCHAR2,
share_name IN VARCHAR2,
share_provider_owner IN VARCHAR2 := NULL,
enabled IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the new catalog. This will be converted to uppercase. |
|
|
The name of the share provider. |
|
|
The name of the share to mount. |
|
|
The owner of the share provider. Defaults to the current catalog if NULL. |
enabled |
Indicates if the catalog is enabled for search. Defaults to TRUE. |
Example
/****************** Share Catalog ******************/
BEGIN
-- Create a share provider
dbms_share.create_or_replace_share_provider(
provider_name => 'MY_SHARE_PROVIDER',
endpoint => 'https://...');
dbms_cloud.create_credential(
credential_name => 'SHARE_PROVIDER_CREDENTIAL', ...);
dbms_share.set_share_provider_credential(
provider_name => 'MY_SHARE_PROVIDER',
share_credential => 'SHARE_PROVIDER_CREDENTIAL');
-- Mount a share catalog
dbms_catalog.mount_share(
catalog_name => 'SHARE_CAT',
share_provider => 'MY_SHARE_PROVIDER',
share_name => 'MY_SHARE_1');
END;
/MOUNT_VIRTUAL_CATALOG Procedure
This procedure creates and mounts a new virtual catalog.
Syntax
PROCEDURE mount_virtual_catalog
(
catalog_name IN VARCHAR2,
enabled IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the new catalog. This will be converted to uppercase. |
|
|
Indicates if the catalog is enabled for search. Defaults to TRUE. |
MOUNT_DATA_CATALOG Procedure
This procedure mounts a data catalog (e.g., AWS GLUE or OCI Data Catalog).
Syntax
PROCEDURE mount_data_catalog
(
catalog_name IN VARCHAR2,
data_catalog_type IN VARCHAR2,
data_catalog_region IN VARCHAR2,
data_catalog_credential IN VARCHAR2,
data_catalog_id IN VARCHAR2 := NULL,
data_storage_credential IN VARCHAR2 := NULL,
enabled IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the new catalog. This will be converted to uppercase. |
|
|
Type of data catalog (e.g., OCI_DCAT or AWS_GLUE). |
|
|
The cloud resource region of the data catalog. |
|
|
The local credential used to access the data catalog. |
|
|
The data catalog name or identifier. Defaults to NULL. |
|
|
It specifies the local credential for data access. Defaults to NULL. This field is optional. |
|
|
Indicates if the catalog is enabled for search. Defaults to |
Example
/****************** Glue Catalog ******************/
BEGIN
-- Create a credential capable of accessing a glue catalog
dbms_cloud.create_credential('GLUE_CATALOG_CREDENTIAL', ...);
-- Mount a glue catalog
dbms_catalog.mount_data_catalog(
catalog_name => 'GLUE_CAT',
data_catalog_type => 'AWS_GLUE',
data_catalog_region => 'us-east-1',
data_catalog_credential => 'GLUE_CATALOG_CREDENTIAL');
END;
/MOUNT_ICEBERG Procedure
This procedure mounts an Iceberg catalog.
Syntax
See Iceberg REST Catalog Spec for more information on Iceberg Catalog.
PROCEDURE mount_iceberg
(
catalog_name IN VARCHAR2,
endpoint IN VARCHAR2,
catalog_credential IN VARCHAR2,
data_storage_credential IN VARCHAR2,
configuration IN SYS.JSON_OBJECT_T := NULL,
enabled IN BOOLEAN := TRUE,
catalog_type IN VARCHAR2 := 'ICEBERG_GENERIC'
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the new catalog. This will be converted to uppercase. |
|
|
The Iceberg base server URL. |
|
|
The credential used to access the Iceberg catalog. |
data_storage_credential |
The credential used to access the data. |
configuration |
This describes the catalog configuration as a JSON object. The following are supported configurations:
|
enabled |
This indicates if the catalog is enabled for search. Defaults to |
catalog_type |
Type of Iceberg catalog (e.g., |
Example
/****************** Iceberg Catalog - Unity ******************/
DECLARE
config JSON_OBJECT_T := JSON_OBJECT_T();
BEGIN
-- Create a credential capable of accessing an external iceberg REST catalog
dbms_share.create_bearer_token_credential(
credential_name => 'ICEBERG_CATALOG_CREDENTIAL',
token_endpoint => 'https://.../v1/tokens',
client_id => ...,
client_secret => ...,
token_scope => 'all-apis');
-- Create a credential capable of accessing the bucket where the
-- iceberg data files are stored.
dbms_cloud.create_credential('ICEBERG_STORAGE_CRED', ...);
-- Mount a iceberg catalog
config.put('namespacePath', 'sales_catalog');
dbms_catalog.mount_iceberg(
catalog_name => 'ICEBERG_CAT',
endpoint => 'https://...//api/2.1/unity-catalog/iceberg/v1',
catalog_credential => 'ICEBERG_CATALOG_CREDENTIAL',
data_storage_credential => 'ICEBERG_STORAGE_CRED',
configuration => config,
catalog_type => 'ICEBERG_UNITY');
END;
/
/****************** Iceberg Catalog - Polaris ******************/
DECLARE
config JSON_OBJECT_T := JSON_OBJECT_T();
BEGIN
-- Create a credential capable of accessing an external iceberg REST catalog
dbms_share.create_bearer_token_credential(
credential_name => 'ICEBERG_CATALOG_CREDENTIAL',
token_endpoint => 'https://.../v1/oauth/tokens',
client_id => ...,
client_secret => ...,
token_scope => 'PRINCIPAL_ROLE:ALL');
-- Create a credential capable of accessing the bucket where the
-- iceberg data files are stored.
dbms_cloud.create_credential('ICEBERG_STORAGE_CRED', ...);
-- Mount a iceberg catalog
config.put('namespacePath', 'sales_catalog');
dbms_catalog.mount_iceberg(
catalog_name => 'ICEBERG_CAT',
endpoint => 'https://.../polaris/api/catalog/v1',
catalog_credential => 'ICEBERG_CATALOG_CREDENTIAL',
data_storage_credential => 'ICEBERG_STORAGE_CRED',
configuration => config,
catalog_type => 'ICEBERG_POLARIS');
END;
/UNMOUNT Procedure
This procedure unmounts an external catalog.
Syntax
PROCEDURE unmount
(
catalog_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of an existing catalog to unmount. This will be converted to uppercase. |
GET_CATALOG_PROPERTY Procedure
This procedure returns the value of a property for a catalog.
Syntax
FUNCTION get_catalog_property
(
catalog_name IN VARCHAR2,
catalog_property IN VARCHAR2
)
RETURN VARCHAR2;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
catalog_property |
This describes the the property to be retrieved.(for example, The value can be any of the following constants:
See Catalog Types and Constants for more information. |
GET_CATALOG_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a catalog in CLOB format.
Syntax
FUNCTION get_catalog_property_clob
(
catalog_name IN VARCHAR2,
catalog_property IN VARCHAR2
)
RETURN CLOB;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
catalog_property |
This describes the the property to be retrieved (for example, The value can be any of the following constants:
See Catalog Types and Constants for more information. |
UPDATE_CATALOG_PROPERTY Procedure
This procedure updates the value of a property for a catalog.
Syntax
PROCEDURE update_catalog_property
(
catalog_name IN VARCHAR2,
catalog_property IN VARCHAR2,
new_value IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
catalog_property |
This describes the property to be updated (for example, The value can be any of the following constants:
See Catalog Types and Constants for more information. |
new_value |
The new property value. |
UPDATE_CATALOG_PROPERTY_CLOB Procedure
This procedure updates the value of a property for a catalog in CLOB.
Syntax
PROCEDURE update_catalog_property_clob
(
catalog_name IN VARCHAR2,
catalog_property IN VARCHAR2,
new_value IN CLOB
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
catalog_property |
This describes the the property to be retrieved (for example, |
new_value |
The new property value in CLOB. |
UPDATE_TABLE_PROPERTY_CLOB Procedure
This procedure updates the value of a property for a table in CLOB format.
Syntax
PROCEDURE update_table_property_clob
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_property IN VARCHAR2,
new_value IN CLOB
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
table_name |
The name of the table. |
table_property |
The property to update. |
new_value |
The new property value in CLOB. |
GET_SCHEMA_PROPERTY Procedure
This procedure returns the value of a property for a schema.
Syntax
FUNCTION get_schema_property
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
schema_property IN VARCHAR2
)Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
schema_property |
This describes the property to be retrieved (for example, |
GET_SCHEMA_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a schema in CLOB format.
Syntax
FUNCTION get_schema_property_clob
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
schema_property IN VARCHAR2
)
RETURN CLOB;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
schema_property |
This describes the property to be retrieved (for example, |
UPDATE_SCHEMA_PROPERTY Procedure
This procedure returns the value of a property for a schema.
Syntax
PROCEDURE update_schema_property
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
schema_property IN VARCHAR2,
new_value IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
schema_property |
This describes the property to be retrieved (for example, |
new_value |
The new property value. |
GET_TABLE_PROPERTY Procedure
This procedure returns the value of a property for a table.
Syntax
FUNCTION get_table_property
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_property IN VARCHAR2
)
RETURN VARCHAR2;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
table_property |
The property to retrieve. |
table_name |
The name of the table. |
GET_TABLE_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a table in CLOB format.
Syntax
FUNCTION get_table_property_clob
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_property IN VARCHAR2
)
RETURN CLOB;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
table_name |
The name of the table. |
table_property |
The property to update (e.g., |
UPDATE_TABLE_PROPERTY Procedure
This procedure updates the value of a property for a table.
Syntax
PROCEDURE update_table_property
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_property IN VARCHAR2,
new_value IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
table_name |
The name of the table. |
table_property |
The property to update. |
new_value |
The new property value. |
UPDATE_TABLE_PROPERTY_CLOB Procedure
This procedure updates the value of a property for a table in CLOB format.
Syntax
PROCEDURE update_table_property_clob
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_property IN VARCHAR2,
new_value IN CLOB
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
table_name |
The name of the table. |
table_property |
The property to update. |
new_value |
The new property value in CLOB. |
ADD_REQUIRED_CREDENTIAL Procedure
This procedure defines a credential required for using the catalog.
Syntax
PROCEDURE add_required_credential
(
catalog_name IN VARCHAR2,
required_credential IN VARCHAR2,
local_credential IN VARCHAR2 := NULL
credential_type IN VARCHAR2 := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
required_credential |
The name of the required credential. |
local_credential |
It is an optional local credential to use. Defaults to |
credential_type |
This field is optional. This parameter specifies the type of authentication mechanism being used to access external services, such as object storage or other databases. For example, oci, aws, azure or a slack_credential. |
See Catalog Types and Constants for more information.
REMOVE_REQUIRED_CREDENTIAL Procedure
This procedure removes a required credential from a catalog.
Syntax
PROCEDURE remove_required_credential
(
catalog_name IN VARCHAR2,
required_credential IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
required_credential |
The name of the required credential to remove. |
RENAME_REQUIRED_CREDENTIAL Procedure
This procedure renames a required credential from a catalog.
Syntax
PROCEDURE rename_required_credential
(
catalog_name IN VARCHAR2,
old_credential_name IN VARCHAR2,
new_credential_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
old_credential_name |
The old name of the required credential. |
new_credential_name |
The new name of the required credential. |
UPDATE_REQUIRED_CREDENTIAL_PROPERTY Procedure
This procedure updates a property of a named required credential.
Syntax
PROCEDURE update_required_credential_property
(
catalog_name IN VARCHAR2,
required_credential IN VARCHAR2,
credential_property IN VARCHAR2,
new_value IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
required_credential |
The name of the required credential. |
credential_property |
The property name (e.g., |
new_value |
The new value for the property. |
GET_REQUIRED_CREDENTIAL_PROPERTY Procedure
This procedure retrieves a property of a named required credential.
Syntax
FUNCTION get_required_credential_property
(
catalog_name IN VARCHAR2,
required_credential IN VARCHAR2,
credential_property IN VARCHAR2
)
RETURN VARCHAR2;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
required_credential |
The name of the required credential. |
credential_property |
The property name (e.g., |
SET_LOCAL_CREDENTIAL Procedure
This procedure specifies a local credential to use when consuming a catalog.
Syntax
PROCEDURE set_local_credential
(
catalog_name IN VARCHAR2,
required_credential IN VARCHAR2,
local_credential IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
required_credential |
The name of the required credential. |
local_credential |
The credential to use. |
GET_LOCAL_CREDENTIAL_MAP (Overloaded) Procedure
This procedure retrieves a map of required credentials to local credentials.
Syntax 1
PROCEDURE get_local_credential_map
(
catalog_name IN VARCHAR2,
credential_map OUT NOCOPY credential_info_map
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
credential_map |
The populated map of credentials. |
Syntax 2
FUNCTION get_local_credential_map
(
catalog_name IN VARCHAR2,
show_errors IN NUMBER := 0,
pretty_json IN NUMBER := 0
)
RETURN CLOB;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. |
show_errors |
This displays error messages for invalid local credentials. Defaults to 0. |
|
|
Format the JSON with the PRETTY option. Defaults to |
Syntax 3
PROCEDURE get_local_credential_map
(
catalog_id IN NUMBER,
credential_map OUT NOCOPY SYS.JSON_OBJECT_T
);Parameters
| Parameter | Description |
|---|---|
|
|
The ID of an existing catalog from the |
credential_map
|
The populated map as a JSON object. |
CREATE_CLOUD_STORAGE_LINK Procedure
This procedure creates a cloud storage link in a catalog.
Syntax
PROCEDURE create_cloud_storage_link
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
storage_link_name IN VARCHAR2,
uri IN VARCHAR2,
required_credential IN VARCHAR2 := NULL,
enabled IN BOOLEAN := TRUE,
replace_if_exists IN BOOLEAN := FALSE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name: |
The schema name. |
storage_link_name |
The storage link name. |
uri |
The bucket URI. |
required_credential |
The required credential (or NULL for public buckets). Defaults to NULL. |
enabled |
Indicates if the storage link is enabled for search. Defaults to TRUE. |
replace_if_exists |
Replace the link if it already exists. Defaults to FALSE. |
DROP_CLOUD_STORAGE_LINK Procedure
This procedure drops a cloud storage link from a catalog.
Syntax
PROCEDURE drop_cloud_storage_link
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
storage_link_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name: |
The schema name. |
storage_link_name |
The storage link name. |
CREATE_EXTERNAL_TABLE Procedure
This procedure creates an external table in a catalog.
Syntax
PROCEDURE create_external_table
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
storage_link_name IN VARCHAR2,
file_uri_list IN CLOB,
column_list IN CLOB := NULL,
field_list IN CLOB := NULL,
table_format IN CLOB := NULL,
credential_name IN VARCHAR2 := NULL,
replace_if_exists IN BOOLEAN := FALSE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The schema name. |
table_name |
The table name. |
storage_link_name |
The storage link name. |
file_uri_list |
The relative file list as a CLOB. |
column_list |
Optional column list. Defaults to NULL. |
field_list |
Optional field list. Defaults to NULL. |
table_format |
Optional format information. Defaults to NULL. |
credential_name |
The required credential. Defaults to NULL. |
replace_if_exists |
Replace the table if it already exists. Defaults to FALSE. |
DROP_SCHEMA Procedure
This procedure drops a schema from a catalog along with all its contents.
Syntax
PROCEDURE drop_schema
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name: |
The schema name to drop. |
DROP_TABLE Procedure
This procedure drops a table from a catalog.
Syntax
PROCEDURE drop_table
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The schema name. |
table_name |
The table name. |
CREATE_SCHEMA Procedure
This procedure creates a new schema in a catalog.
Syntax
PROCEDURE create_schema
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The schema name. |
GET_TABLES Procedure
This procedure fetches all tables for a catalog.
Syntax
FUNCTION get_tables
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2 := NULL,
table_name IN VARCHAR2 := NULL,
conditions IN VARCHAR2 := NULL,
flags IN NUMBER := 0,
result_limit IN NUMBER := NULL,
column_flags IN NUMBER := 0
)
RETURN catalog_tables PIPELINED;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
Optional schema name. Defaults to |
table_name |
Optional table name. Defaults to |
conditions |
Optional additional conditions using lineage syntax. Defaults to |
result_limit |
Optional result limit. Defaults to NULL. |
column_flags |
Optional column flags (e.g., |
Note:
-
RECORDtypes describe structured data with named fields in databases. -
You have to query the database's information schema, system catalogs, or use database introspection tools to see the structure of
RECORDtypes.
GET_SCHEMAS Procedure
This procedure fetches all schemas for a catalog.
Syntax
FUNCTION get_schemas
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2 := NULL,
conditions IN VARCHAR2 := NULL,
flags IN NUMBER := 0,
result_limit IN NUMBER := NULL,
column_flags IN NUMBER := 0
)
RETURN catalog_schemas PIPELINED;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
Optional schema name. Defaults to |
conditions |
Optional additional conditions using lineage syntax. Defaults to |
result_limit |
Optional result limit. Defaults to NULL. |
column_flags |
Optional column flags (e.g., |
GET_OBJECTS Procedure
This procedure fetches all objects for a catalog.
Syntax
FUNCTION get_objects
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2 := NULL,
object_name IN VARCHAR2 := NULL,
conditions IN VARCHAR2 := NULL,
flags IN NUMBER := 0,
result_limit IN NUMBER := NULL
)
RETURN catalog_objects PIPELINED;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
Optional schema name. Defaults to |
object_name |
Optional object name. Defaults to |
conditions |
Optional additional conditions using lineage syntax. Defaults to |
result_limit |
Optional result limit. Defaults to NULL. |
GENERATE_TABLE_SELECT (Overloaded) Procedure
This procedure generates a SELECT statement for a logical table.
Syntax
PROCEDURE generate_table_select
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
stmt IN OUT NOCOPY CLOB,
options IN CLOB := NULL,
prev_gen_sql IN CLOB := NULL,
prev_ts IN TIMESTAMP WITH TIME ZONE := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The schema name. |
table_name |
The table name. |
stmt |
The generated SELECT statement as output. |
options |
Generation options as a JSON object (e.g., distinct, rowLimit, select, orderBy). Defaults to NULL. |
prev_gen_sql |
The previously generated SELECT statement, if known. Defaults to NULL. |
prev_ts |
The previous generation timestamp, if known. Defaults to NULL. |
Syntax
FUNCTION generate_table_select
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
options IN CLOB := NULL,
prev_gen_sql IN CLOB := NULL,
prev_ts IN TIMESTAMP WITH TIME ZONE := NULL
)
RETURN CLOB;Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The schema name. |
table_name |
The table name. |
stmt |
The generated SELECT statement as output. |
options |
Generation options as a JSON object (e.g., distinct, rowLimit, select, orderBy). Defaults to NULL. |
prev_gen_sql |
The previously generated SELECT statement, if known. Defaults to NULL. |
prev_ts |
The previous generation timestamp, if known. Defaults to NULL. |
OPEN_TABLE_CURSOR Procedure
This procedure opens a cursor that returns data from a logical table.
Syntax
PROCEDURE open_table_cursor
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
table_name IN VARCHAR2,
table_cursor IN OUT NOCOPY SYS_REFCURSOR,
options IN CLOB := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
Optional schema name. Defaults to |
table_name |
Optional table name. Defaults to |
table_cursor |
The cursor to return data. |
options |
Generates options as a JSON object (e.g., rowLimit, select, orderBy). Defaults to NULL. |
FLUSH_CATALOG_CACHE Procedure
This procedure flushes the catalog metadata cache,
Syntax
PROCEDURE flush_catalog_cache
(
catalog_name IN VARCHAR2,
auto_commit IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
auto_commit |
Indicates if changes should be committed automatically. Defaults to TRUE. |
PREFILL_CATALOG_CACHE Procedure
This procedure fills the cache for the specified catalog with current data.
Syntax
PROCEDURE prefill_catalog_cache
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2 := NULL,
auto_commit IN BOOLEAN := TRUE
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
The name of the schema. |
auto_commit |
Indicates if changes should be committed automatically. Defaults to TRUE. |
CREATE_SYNCHRONIZED_SCHEMAS Procedure
This procedure creates local database schemas synchronized with remote catalog definitions.
Syntax
PROCEDURE create_synchronized_schemas
(
catalog_name IN VARCHAR2,
schema_names IN VARCHAR2 := NULL,
restrictions IN CLOB := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
A comma-delimited list of schema names (quoted or unquoted). Defaults to NULL to synchronize all schemas. |
restrictions |
JSON document specifying the scope of catalog entities. Defaults to NULL. |
DROP_SYNCHRONIZED_SCHEMAS Procedure
This procedure drops one or more synchronized schemas.
Syntax
PROCEDURE drop_synchronized_schemas
(
catalog_name IN VARCHAR2,
schema_names IN VARCHAR2 := NULL,
restrictions IN CLOB := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
schema_name |
A comma-delimited list of schema names (quoted or unquoted). Defaults to NULL to synchronize all schemas. |
restrictions |
JSON document specifying the scope of catalog entities. Defaults to NULL. |
UPDATE_SYNCHRONIZED_SCHEMA_PROPERTY Procedure
This procedure updates a property of synchronized schemas.
Syntax
PROCEDURE update_synchronized_schema_property
(
catalog_name IN VARCHAR2,
property_name IN VARCHAR2,
new_value IN CLOB
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
property_name |
The property name to update. |
new_value |
The new value as a CLOB. |
GRANT_TO_RECIPIENT Procedure
This procedure grants access on a catalog to a specific share recipient.
Syntax
PROCEDURE grant_to_recipient
(
catalog_name IN VARCHAR2,
recipient_name IN VARCHAR2
);Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
recipient_name |
The name of the share recipient (created by |
REVOKE_FROM_RECIPIENT Procedure
This procedure revokes access on a catalog from a specific recipient.
Syntax
PROCEDURE revoke_from_recipient
(
catalog_name IN VARCHAR2,
recipient_name IN VARCHAR2,
owner IN VARCHAR2 := NULL
); Parameters
| Parameter | Description |
|---|---|
|
|
The name of the existing catalog. This will be converted to uppercase. |
recipient_name |
The name of the share recipient (created by |
owner |
The owner of both catalog and recipient. Defaults to |