Summary of DBMS_CATALOG
This section covers the DBMS_CATALOG subprograms
provided with Oracle Autonomous AI Database.
The subprograms are classified into the following functional areas.
Catalog Mounting and Unmounting
| Subprogram | Description |
|---|---|
|
This procedure mounts a data catalog such as AWS GLUE or OCI Data Catalog. |
|
|
This procedure mounts a catalog based on a database link. |
|
|
This procedure mounts an Apache Iceberg catalog with specific configurations. |
|
|
This procedure mounts a single catalog based on a share. |
|
|
This procedure mounts multiple catalogs from a share provider, with overloads to support different input types. |
|
|
This procedure creates and mounts a new virtual catalog. |
|
|
This procedure unmounts an existing external catalog. |
Catalog Property Management
| Subprogram | Description |
|---|---|
|
These procedures retrieve property values for a catalog. |
|
|
These procedures update property values for a catalog. |
|
|
These functions retrieve property values for a specific column in VARCHAR2 or CLOB format. |
|
|
These procedures update property values for a specific column with options to push updates to source. |
|
|
These procedures retrieve schema property values. |
|
|
These procedures update schema property values. |
|
|
These procedures retrieve table property values. |
|
|
These procedures update table property values. |
|
|
These functions retrieve property values for a cloud storage link in VARCHAR2 or CLOB format. |
|
|
These procedures update the property values for a cloud storage link. |
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 retrieves a property of a required credential. |
|
|
This procedure updates a property of a required credential. |
|
| This procedure retrieves mappings between required credentials and local credentials, with overloads for various output formats. | |
|
This procedure specifies a local credential for a required credential. |
Catalog Entity Management
| Subprogram | Description |
|---|---|
|
These procedures manage cloud storage links in a catalog. |
|
|
This function retrieves metadata for cloud storage links in a catalog with optional filters. |
|
|
This procedure creates an external table in a catalog. |
|
|
This procedure creates a new schema in a catalog and also creates Apache Iceberg schema in remote catalogs. |
|
|
This procedure retrieves metadata for tables, schemas, and objects within a catalog using pipelined functions. |
|
|
This procedure drops schemas and tables from a catalog. |
|
|
This function retrieves metadata for columns in tables or views in a catalog. |
|
|
This procedure and function retrieves detailed information about a specific table in record or JSON format. |
Data Access and Caching
| Subprogram | Description |
|---|---|
|
This procedure creates a |
|
|
This procedure opens a cursor to return data from a logical table. |
|
|
These procedures manage catalog metadata caching. |
Synchronization and Sharing
| Subprogram | Description |
|---|---|
|
These procedures manage synchronized schemas with remote catalog definitions. |
|
|
This procedure updates properties of synchronized schemas. |
|
|
This procedure manages the catalogs corresponding to unavailable shares with options to unmount or disable. |
|
|
This procedure creates views on catalog tables to apply restrictions. |
|
|
This procedure copies properties from one table to another, including optional column properties. |
|
|
These procedures manage access permissions for catalog recipients. |
Event Logging
| Subprogram | Description |
|---|---|
|
This procedure clears the events from the catalog event log within a time range. |
Iceberg-Specific Management
| Subprogram | Description |
|---|---|
|
This procedure creates a new Iceberg table within a specified schema in a catalog. |
|
|
This procedure adds a snapshot to an Iceberg table to represent data changes with detailed metadata. |
- MOUNT_DB_LINK Procedure
This procedure mounts an external catalog based on a database link. - MOUNT_SHARES Procedure
This procedure mounts multiple catalogs based on shares from a share provider. - MOUNT_SHARE Procedure
This procedure mounts a catalog based on a single share. - MOUNT_VIRTUAL_CATALOG Procedure
This procedure creates and mounts a new virtual catalog. - MOUNT_DATA_CATALOG Procedure
This procedure mounts a data catalog (e.g., AWS GLUE or OCI Data Catalog). - MOUNT_ICEBERG Procedure
This procedure mounts an Iceberg catalog. - UNMOUNT Procedure
This procedure unmounts an external catalog. - GET_CATALOG_PROPERTY Procedure
This procedure returns the value of a property for a catalog. - GET_CATALOG_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a catalog in CLOB format. - UPDATE_CATALOG_PROPERTY Procedure
This procedure updates the value of a property for a catalog. - UPDATE_CATALOG_PROPERTY_CLOB Procedure
This procedure updates the value of a property for a catalog in CLOB. - UPDATE_TABLE_PROPERTY_CLOB Procedure
Updates the value of a table property using a Character Large Object (CLOB) data type. - GET_SCHEMA_PROPERTY Procedure
This procedure returns the value of a property for a schema. - GET_SCHEMA_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a schema in CLOB format. - UPDATE_SCHEMA_PROPERTY Procedure
This procedure returns the value of a property for a schema. - GET_TABLE_PROPERTY Procedure
Returns the value of a property for a table. - GET_TABLE_PROPERTY_CLOB Procedure
This procedure returns the value of a property for a table in CLOB format. - UPDATE_TABLE_PROPERTY Procedure
This procedure updates the value of a property for a table. - UPDATE_TABLE_PROPERTY_CLOB Procedure
Updates the value of a table property using a Character Large Object (CLOB) data type. - ADD_REQUIRED_CREDENTIAL Procedure
Defines a credential required for using the catalog. - REMOVE_REQUIRED_CREDENTIAL Procedure
This procedure removes a required credential from a catalog. - RENAME_REQUIRED_CREDENTIAL Procedure
This procedure renames a required credential from a catalog. - UPDATE_REQUIRED_CREDENTIAL_PROPERTY Procedure
This procedure updates a property of a named required credential. - GET_REQUIRED_CREDENTIAL_PROPERTY Procedure
This procedure retrieves a property of a named required credential. - SET_LOCAL_CREDENTIAL Procedure
This procedure specifies a local credential to use when consuming a catalog. - GET_LOCAL_CREDENTIAL_MAP (Overloaded) Procedure
This procedure retrieves a map of required credentials to local credentials. - CREATE_CLOUD_STORAGE_LINK Procedure
This procedure creates a cloud storage link in a catalog. - DROP_CLOUD_STORAGE_LINK Procedure
This procedure drops a cloud storage link from a catalog. - CREATE_EXTERNAL_TABLE Procedure
Creates an external table in a catalog. - DROP_SCHEMA Procedure
This procedure drops a schema from a catalog along with all its contents. - DROP_TABLE Procedure
This procedure drops a table from a catalog. - CREATE_SCHEMA Procedure
Creates a new schema in a catalog. You can also create Apache Iceberg schema in remote catalogs. - GET_TABLES Procedure
This procedure fetches all tables for a catalog. - GET_SCHEMAS Procedure
This procedure fetches all schemas for a catalog. - GET_OBJECTS Procedure
This procedure fetches all objects for a catalog. - GENERATE_TABLE_SELECT (Overloaded) Procedure
This procedure generates a SELECT statement for a logical table. - OPEN_TABLE_CURSOR Procedure
This procedure opens a cursor that returns data from a logical table. - FLUSH_CATALOG_CACHE Procedure
This procedure flushes the catalog metadata cache, - PREFILL_CATALOG_CACHE Procedure
This procedure fills the cache for the specified catalog with current data. - CREATE_SYNCHRONIZED_SCHEMAS Procedure
This procedure creates local database schemas synchronized with remote catalog definitions. - DROP_SYNCHRONIZED_SCHEMAS Procedure
This procedure drops one or more synchronized schemas. - UPDATE_SYNCHRONIZED_SCHEMA_PROPERTY Procedure
This procedure updates a property of synchronized schemas. - GRANT_TO_RECIPIENT Procedure
This procedure grants access on a catalog to a specific share recipient. - REVOKE_FROM_RECIPIENT Procedure
This procedure revokes access on a catalog from a specific recipient.
Parent topic: Manage Catalogs with DBMS_CATALOG
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 |
Parent topic: Summary of DBMS_CATALOG
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;
/Parent topic: Summary of DBMS_CATALOG
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;
/Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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;
/Parent topic: Summary of DBMS_CATALOG
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;
/Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
UPDATE_TABLE_PROPERTY_CLOB Procedure
Updates the value of a table property using a Character Large Object (CLOB) data type.
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,
push_to_source IN BOOLEAN := FALSE
);Parameters
| Parameter | Description |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
schema_name |
Name of the source catalog schema. |
table_name |
Name of the source catalog table. |
table_property |
The table property to update. |
new_value |
Assigns a new value in CLOB format. |
push_to_source |
Indicates whether to push the property update to source object annotations. The default is FALSE. |
See also:
Parent topic: Summary of DBMS_CATALOG
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, |
Parent topic: Summary of DBMS_CATALOG
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, |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
GET_TABLE_PROPERTY 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 |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
schema_name |
Name of the source catalog schema. |
table_name |
Name of the source catalog table. |
table_property |
The property to retrieve. |
Parent topic: Summary of DBMS_CATALOG
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., |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
UPDATE_TABLE_PROPERTY_CLOB Procedure
Updates the value of a table property using a Character Large Object (CLOB) data type.
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,
push_to_source IN BOOLEAN := FALSE
);Parameters
| Parameter | Description |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
schema_name |
Name of the source catalog schema. |
table_name |
Name of the source catalog table. |
table_property |
The table property to update. |
new_value |
Assigns a new value in CLOB format. |
push_to_source |
Indicates whether to push the property update to source object annotations. The default is FALSE. |
See also:
Parent topic: Summary of DBMS_CATALOG
ADD_REQUIRED_CREDENTIAL 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 |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
required_credential |
The name of the required credential. |
local_credential |
It is an optional local credential to use. The default is NULL. |
credential_type |
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.
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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., |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
CREATE_EXTERNAL_TABLE 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 := NULL,
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 |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
schema_name |
Name of the source catalog schema. |
table_name |
Name of the source catalog table. |
storage_link_name |
(Optional) Name of the cloud storage link. The default is NULL. |
file_uri_list |
The relative file list as a CLOB. |
column_list |
(Optional) Column list. The default is NULL. |
field_list |
(Optional) Field list. The default is NULL. |
table_format |
(Optional) The format or options for reading external files, for example, CSV, Parquet or Avro, delimiters, headers, schema derivation settings, and so on). It is expressed as JSON key-value pairs. The default is NULL. |
credential_name |
Name of the credential. The default is NULL. |
replace_if_exists |
Indicates whether to replace an object if it already exists. The default is FALSE. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
CREATE_SCHEMA Procedure
Creates a new schema in a catalog. You can also create Apache Iceberg schema in remote catalogs.
Syntax
PROCEDURE CREATE_SCHEMA
(
catalog_name IN VARCHAR2,
schema_name IN VARCHAR2,
schema_definition IN CLOB := NULL
);Parameters
| Parameter | Description |
|---|---|
|
|
Name of the source catalog. The value is in uppercase. |
schema_name |
Name of the source catalog schema. |
schema_definition |
(Optional) Schema definition payload. The default is NULL. |
See also:
Parent topic: Summary of DBMS_CATALOG
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.
Parent topic: Summary of DBMS_CATALOG
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., |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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. |
Parent topic: Summary of DBMS_CATALOG
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 |
Parent topic: Summary of DBMS_CATALOG
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 |
Parent topic: Summary of DBMS_CATALOG