OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.1.0Enterprise Edition

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.1.0
    iconOceanBase Database
    SQL - V 4.1.0Enterprise Edition
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Overview

    Last Updated:2023-08-01 06:02:22  Updated
    share
    What is on this page
    Composition of a PL system package
    Usage notes
    PL package overview

    folded

    share

    OceanBase Database provides procedural language (PL) packages to extend database functionality and provide access to SQL features by using PL statements.

    You can use the packages provided when you create your own stored procedures and applications. This manual describes the packages supported by the current OceanBase Database version.

    A 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.

    You can execute the following statement as a user with sufficient privileges to view the supported system packages and their information:

    SELECT * FROM DBA_SOURCE;
    

    You can execute the following statement to query information about a specific system package:

    SELECT * FROM DBA_SOURCE WHERE NAME ='pl_package_name';
    

    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 notes

    Packages supplied with OceanBase Database are automatically installed when you create a database.

    PL package overview

    The following table describes the PL packages supported by the current OceanBase Database version.

    Package Description
    DBMS_APPLICATION_INFO Registers application names with the database for auditing or performance tracking.
    DBMS_AUDIT_MGMT Manages audit logs.
    DBMS_CRYPTO Encrypts and decrypts stored data. It can be used with a running PL program. It supports encryption and hash algorithms.
    DBMS_DEBUG Debugs PL programs.
    DBMS_DESCRIBE Queries information related to PL objects.
    DBMS_JOB Schedules and manages jobs in the job queue.
    DBMS_LOB Provides general-purpose programs for reading/writing large object (LOB) data types such as BLOB and CLOB.
    DBMS_LOCK Requests, converts, and releases locks by using the Lock Management service.
    DBMS_METADATA Retrieves complete database object definitions, namely the metadata, from the dictionary.
    DBMS_OUTPUT Sends messages and displays information.
    DBMS_PLAN_CACHE Removes a specified SQL statement from the plan cache.
    DBMS_RANDOM Provides a built-in random number generator.
    DBMS_RESOURCE_MANAGER Maintains resource usage plans, consumer groups, and plan directives.
    DBMS_SCHEDULER Manages scheduled tasks.
    DBMS_SESSION Provides access to SQL ALTER SESSION statements and other session information.
    DBMS_SQL Provides an interface to use dynamic SQL statements to access the database.
    DBMS_STATS Supports viewing and modifying the statistics collected by the optimizer for database objects.
    DBMS_UDR Rewrites the SQL statement received by the database based on matching rules before the SQL statement is executed.
    DBMS_UTILITY Provides various utility subprograms.
    DBMS_WORKLOAD_REPOSITORY Manages the Automatic Workload Repository (AWR).
    DBMS_XA Provides the XA/Open interface and allows applications to call the XA interface in PL.
    DBMS_XMLGEN Provides the XA/Open interface and allows applications to call the XA interface in PL.
    DBMS_XPLAN Provides logical plan management features, such as logical plan optimization and tracing.
    ODCIConst Defines constants applicable to PL.
    UTL_ENCODE Encodes RAW data into standard formats so that the data can be transmitted between hosts.
    UTL_FILE Allows PL programs to read and write OS text files and provides a restricted version of standard OS streaming file I/O.
    UTL_I18N Provides a group of services that support globalization for applications compiled by using PL.
    UTL_RAW Provides SQL functions for processing data of the RAW data type.
    ANYDATA TYPE Contains instances of the specified type, and a description of the type.
    XMLType Processes XML data.

    Previous topic

    SA_SESSION.SET_ROW_LABEL
    Last

    Next topic

    Overview
    Next
    What is on this page
    Composition of a PL system package
    Usage notes
    PL package overview