OceanBase Database provides procedural language (PL) system packages to extend database functionality and provide access to SQL features by using PL statements.
You can use the system packages provided when you create your own stored procedures and applications. This manual describes the system packages supported by the current OceanBase Database server version.
A system package is an encapsulated collection of related program objects stored in the database. A program object can be a stored procedure, a function, a variable, a constant, a cursor, or an exception.
If you have the required privileges, you can run the following statement in the oceanbase schema to query the supported system packages and their information:
SELECT * FROM __all_package;
Composition of a PL system package
A PL system package consists of two parts: the package specification (SPECIFICATION) and the package body (BODY). The package specification is the interface to applications. It declares public items visible to applications, including types, variables, constants, exceptions, cursors, and subprograms. The package body contains implementation details and private declarations invisible to applications. It completely defines cursors and subprograms to support the implementation of the package specification.
Note
The current OceanBase Database version does not allow you to modify system packages.
Usage of PL system packages
System packages supplied with OceanBase Database are automatically installed when you create a database.
Overview of PL system packages
The following table describes the PL system packages supported by the current OceanBase Database version.
| System package | Description |
|---|---|
| DBMS_RESOURCE_MANAGER | Maintains resource usage plans, consumer groups, and plan directives. |
| DBMS_STATS | Supports viewing and modifying the statistics collected by the optimizer for database objects. |
| DBMS_UDR | Provides the rewrite binding feature, which rewrites an SQL statement received by the database before execution based on the rewrite binding rule that the statement matches. |
| DBMS_XPLAN | Provides features for the management of logical plans, such as optimizing and tracing logical plans. |