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

    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.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    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:2026-04-09 02:53:55  Updated
    share
    What is on this page
    Considerations
    Data structure
    CHARARR table type
    DBMSOUTPUT_LINESARRAY object type
    Subprograms

    folded

    share

    The DBMS_OUTPUT package allows you to send messages from stored procedures, packages, and triggers.

    This package is mostly used for debugging and can display PL debugging information.

    You can call the PUT or PUT_LINE stored procedure in the DBMS_OUTPUT package to put information in the buffer for other triggers, stored procedures, or packages to read. In a standalone PL subprogram or anonymous block, you can call the GET_LINE or GET_LINES stored procedure to display the buffered information.

    Applicability

    This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.

    Considerations

    • Messages in the buffer will be ignored if you do not call GET_LINE.

    • Generally, you should avoid having applications call the DISABLE or ENABLE stored procedure, because this might affect the display control of external tools.

      Notice

      DBMS_OUTPUT only starts sending messages as requested by a subprogram or trigger after the subprogram or trigger completes its execution. Real-time messaging between DBMS_OUTPUT and the client is not supported.

    Data structure

    The DBMS_OUTPUT package defines the CHARARR table type and the DBMSOUTPUT_LINESARRAY object type, which are used with the GET_LINES stored procedure.

    CHARARR table type

    You can use the CHARARR table type with the GET_LINES stored procedure to obtain the text submitted by the PUT and PUT_LINE stored procedures.

    The syntax is as follows:

    TYPE CHARARR IS TABLE OF VARCHAR2(32767) INDEX BY BINARY_INTEGER;
    

    DBMSOUTPUT_LINESARRAY object type

    The DBMSOUTPUT_LINESARRAY object type is defined outside the package. You can use it with the GET_LINES stored procedure to obtain the text submitted by the PUT and PUT_LINE stored procedures.

    The syntax is as follows:

    TYPE DBMSOUTPUT_LINESARRAY IS
    VARRAY(2147483647) OF VARCHAR2(32767);
    

    Subprograms

    The following table describes the DBMS_OUTPUT subprograms supported by the current OceanBase Database version.

    Subprogram Description
    DISABLE Disables the output of messages.
    ENABLE Enables the output of messages.
    GET_LINE Retrieves a line from the buffer.
    GET_LINES Retrieves a set of lines from the buffer.
    NEW_LINE Terminates the line that was created with PUT.
    PUT Puts some lines in the buffer.
    PUT_LINE Puts a single line in the buffer.

    Previous topic

    SET_SYSTEM_DEFAULT
    Last

    Next topic

    DISABLE
    Next
    What is on this page
    Considerations
    Data structure
    CHARARR table type
    DBMSOUTPUT_LINESARRAY object type
    Subprograms