OceanBase AI Database supports the PL system package to extend database functionality and provide PL access to SQL features.
You can use the provided system packages when creating applications or when creating your own stored procedures. This topic describes the system packages supported by the current version of OceanBase AI Database Server.
A system package is a encapsulated collection of related program objects stored in the database. These program objects include stored procedures, functions, variables, constants, cursors, and exceptions.
After obtaining the necessary privileges, run the following statement in the oceanbase schema to query the currently supported system packages and their related information:
SELECT * FROM __all_package;
Components of the PL system package
A PL package consists of two parts: the package header (SPECIFICATION) and the package body (BODY). The package header serves as the application interface, containing public declarations visible to the application that define usable types, variables, constants, exceptions, cursors, and subprograms. The package body contains implementation details and private declarations hidden from the application, fully defining cursors and subprograms to support the implementation of the package header.
Note
The current version of OceanBase AI Database does not support user modification of system packages.
Usage of the PL system package
When you create a database, the system packages provided by OceanBase AI Database are automatically installed.
Overview of PL system packages
The following table lists the PL system packages supported by the current version of OceanBase AI Database and provides brief descriptions.
System Package |
Description |
|---|---|
| Overview of DBMS_APPLICATION_INFO | Used to register and monitor application names, modules, operations, and client information. |
| Overview of DBMS_ASYNC_INDEX | Manually manages major compactions for asynchronous indexes. |
| Overview of DBMS_RESOURCE_MANAGER | Used to manage resource usage plans, resource usage groups, and resource plan directives. |
| Overview of DBMS_DAILY_MAINTENANCE | It is used for the management and maintenance of window merging. |
| Overview of DBMS_STATS | View and modify the statistics collected by the optimizer for database objects. |
| Overview of DBMS_UDR | The database provides a rewrite and binding feature that rewrites SQL statements received by the database based on matching rules before execution. |
| Overview of DBMS_XPLAN | Provides features related to logical plan management, including logical plan optimization and tracing. |
| Overview of DBMS_WORKLOAD_REPOSITORY | It is used to manage the automatic workload repository (WR). |
| Overview of DBMS_MVIEW | Allows callers to understand the functionality of materialized views and potential materialized views, including their query rewrite availability. It can also refresh materialized views that do not belong to the same refresh group and clear logs. |
| Overview of DBMS_MVIEW_STATS | Allows the caller to use the interface to manage the collection and retention of statistics for materialized view refresh operations. |
| Overview of DBMS_TRUSTED_CERTIFICATE_MANAGER | Allows the caller to add, delete, and modify the CA root certificates trusted by the OBServer cluster for RPC security authentication. |
| Overview of DBMS_OB_LIMIT_CALCULATOR | You can call this API to query the current resource usage of a cluster, which helps you plan operations such as scaling, node replacement, and standby tenant creation. |
| Overview of DBMS_EXTERNAL_TABLE | Provides a programmatic interface for managing and operating external tables. |
| Overview of DBMS_PARTITION | Provides an API for managing dynamic partitions. |
| Overview of DBMS_JAVA | It is used to integrate and manage Java programs within the database, supporting the implementation of Java stored procedures, functions, and security policies. |
| Overview of DBMS_PYTHON | It enables integrating and managing Python programs within a database, supporting the implementation of Python stored procedures, functions, and security policies. |
| Overview of DBMS_OB_LIMIT_CALCULATOR | You can call this API to query the current resource usage of a cluster, which helps you plan operations such as scaling, node replacement, and standby tenant creation. |
| DBMS_DATA_DICT | Controls the scheduling of data dictionaries. |