OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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.1

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    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.1
    iconOceanBase Database
    SQL - V 4.3.1
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • 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-15 08:25:15  Updated
    Share
    What is on this page
    Considerations
    Subprograms

    folded

    Share

    The DBMS_DEBUG package implements server-side debuggers. It provides a way to debug server-side PL programs.

    Applicability

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

    To debug PL programs by using the DBMS_DEBUG package, you must have at least two database sessions: a target session for executing the program and a debug session for debugging the program.

    The target session becomes available for debugging after initializing itself. This marks the target session so that the PL interpreter runs in debug mode and generates debug events. After a debug event is generated, it is posted from the session. In most cases, a debug event requires a return notification. As a result, the interpreter pauses to wait for a response.

    At the same time, the debug session must use DBMS_DEBUG to initialize itself to know which target session to monitor. The debug session can then call entry points in DBMS_DEBUG to read events that were posted from the target session and communicate with the target session.

    DBMS_DEBUG does not provide an interface to the PL compiler, but it relies on debug information that the compiler may generate. It is impossible to examine or modify the value of parameters or variables without the debug information.

    Considerations

    You can use one of the following statements to generate debug information for existing PL code. The second statement recompiles a package or type body.

    ALTER [PROCEDURE | FUNCTION | PACKAGE | TRIGGER | TYPE] <name> COMPILE DEBUG;
    ALTER [PACKAGE | TYPE] <name> COMPILE DEBUG BODY;
    

    Breakflags

    The breakflags parameter for CONTINUE can have the following values. These flags can be combined.

    Value
    Description
    break_next_line Breaks at the next source line (steps over calls).
    break_any_call Breaks at the next source line (steps into calls).
    break_any_return Breaks after returning from the current entry point (skips over any entry points called from the current routine).
    break_return Breaks the next time an entry point is ready to return, including entry points called from the current one. If the interpreter is running Proc1, which calls Proc2, break_return stops at the end of Proc2.
    abort_execution Stops execution and forces an exit event immediately after DBMS_DEBUG.CONTINUE is called.

    Information flags

    You can pass the following flags as the info_requested parameter to SYNCHRONIZE, CONTINUE, and GET_RUNTIME_INFO.

    Flag
    Description
    info_getStackDepth Obtains the current depth of the stack.
    info_getBreakpoint Obtains the breakpoint number.
    info_getLineinfo Obtains information about the program unit.

    Subprograms

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

    Subprogram
    Description
    ATTACH_SESSION Sends the target debug ID to the debug session.
    CONTINUE Continues executing the target program.
    DEBUG_ON Turns on the debug mode.
    DEBUG_OFF Turns off the debug mode.
    DETACH_SESSION Stops debugging the target program.
    DELETE_BREAKPOINT Deletes a breakpoint.
    DISABLE_BREAKPOINT Disables a breakpoint.
    ENABLE_BREAKPOINT Enables a breakpoint.
    GET_VALUE Gets a value from the running program.
    GET_VALUES Returns information about all the variables in the current stack frame.
    GET_RUNTIME_INFO Returns information about the current program.
    GET_TIMEOUT_BEHAVIOUR Returns the current timeout behavior.
    INITIALIZE Sets a debug ID in the target session.
    PROBE_VERSION Returns the version number of DBMS_DEBUG on the server.
    PRINT_BACKTRACE Prints a backtrace list of the current execution stack.
    SET_TIMEOUT Sets the timeout value.
    SET_TIMEOUT_BEHAVIOUR Tells Probe how to handle the target session when a timeout occurs.
    SET_BREAKPOINT Sets a breakpoint in a program unit.
    SHOW_BREAKPOINTS Returns a list of current breakpoints.

    Previous topic

    HASH
    Last

    Next topic

    ATTACH_SESSION
    Next
    What is on this page
    Considerations
    Subprograms