OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Cloud

  • Product Updates & Announcements
    • What's new
      • Release notes for 2026
      • Release notes for 2025
      • Release notes for 2024
      • Release history
    • Product announcements
      • Notice of underlying component upgrades for OceanBase Cloud database proxy clusters on Alibaba Cloud
      • AI Service Model Launch and Delisting Notice
      • Data development module deprecation notice
      • Optimization of Backup and Restore commercialization strategy
      • Database proxy billing update
      • AWS instance pricing adjustment
      • Billing notice for limited-time free OMS instances
      • Notice of cross-AZ data transfer billing adjustments (OceanBase Cloud on AWS)
  • Product Introduction
    • Overview
    • Management mode and scenarios
    • Core features
      • High availability with cross-cloud active-active architecture
      • High availability with cross-cloud primary-standby databases
      • Data backup and restore
      • Multi-layer online scaling and on-demand adjustment
    • Deployment modes
    • Product specifications
    • Product billing
      • Overview
      • Instance billing
        • Alibaba Cloud instance billing
        • Huawei Cloud instance billing
        • AWS instance billing
        • Google Cloud instance billing
        • Azure instance billing
      • Backup and restore billing
      • SQL audit billing
      • Migrations billing
      • Database proxy billing
      • Binlog service billing
      • Read-only replica billing
      • AI model billing
    • Supported database versions
  • Get Started
    • Quick start with Flagship Edition
    • Create a Flagship Edition cluster instance
    • Create a tenant
    • Use the database
  • Work with DBaaS Instances
    • Work with flagship edition instances
      • Overview
      • Create an instance
        • Overview
        • Create via OceanBase Cloud official website
        • Create via AWS Marketplace
        • Create via GCP Marketplace
        • Create via Huawei Cloud Marketplace
        • Create via Alibaba Cloud Marketplace
        • Create via Azure Marketplace
      • Connect to an instance
        • Configure network connection
          • Overview
          • Connect using a public IP address
          • Connect using Azure Private Link
          • Connect using Google Cloud Private Service Connect
          • Connect using Huawei Cloud VPC Endpoint
          • Connect using a Huawei Cloud peering connection
          • Connect using AWS PrivateLink
          • Connect using AWS VPC peering
          • Connect using Alibaba Cloud VPC
        • MySQL compatible mode
          • Connect with clients
            • Connect to OceanBase Cloud by using Client ODC
            • Connect to OceanBase Cloud by using a MySQL client
            • Connect to OceanBase Cloud by using OBClient
          • Connect with drivers
            • Java
              • Connect to OceanBase Cloud using SpringBoot
              • SpringBatch sample application for connecting to OceanBase Cloud
              • spring-jdbc
              • SpringDataJPA sample application for connecting to OceanBase Cloud
              • Hibernate application development with OceanBase Cloud
              • Sample program for connecting to OceanBase Cloud
              • connector-j
              • Use TestContainers to connect to and use OceanBase Cloud
            • Python
              • Connect to OceanBase Cloud using mysqlclient
              • Connect to OceanBase Cloud using PyMySQL
              • Use the MySQL-connector-python driver to connect to and use OceanBase Cloud
              • Use SQLAlchemy to connect to an OceanBase Cloud database
              • Connect to an OceanBase Cloud database using Django
              • Connect to an OceanBase Cloud database by using peewee
            • C
              • Use MySQL Connector/C to connect to OceanBase Cloud
            • Go
              • Connect to OceanBase Cloud using the Go-SQL-Driver/MySQL driver
              • Connect to OceanBase Cloud using GORM
            • PHP
              • Use the EXT driver to connect to OceanBase Cloud
              • Connect to OceanBase Cloud by using the MySQLi driver
              • Use the PDO driver to connect to OceanBase Cloud
            • Rust
              • Rust application example for connecting to OceanBase Cloud
              • SeaORM example for connecting to OceanBase Cloud
            • Ruby
              • ActiveRecord sample application for OceanBase Cloud
              • Connect to OceanBase Cloud by using mysql2
              • Connect to OceanBase Cloud by using Sequel
          • Use database connection pool
            • Database connection pool configuration
            • Connect to OceanBase Cloud by using a Tomcat connection pool
            • Connect to OceanBase Cloud by using a C3P0 connection pool
            • Connect to OceanBase Cloud by using a Proxool connection pool
            • Connect to OceanBase Cloud by using a HikariCP connection pool
            • Connect to OceanBase Cloud by using a DBCP connection pool
            • Connect to OceanBase Cloud by using Commons Pool
            • Connect to OceanBase Cloud by using a Druid connection pool
        • Oracle compatible mode
          • Connect with clients
            • Connect to OceanBase Cloud by using OBClient
            • Connect to OceanBase Cloud by using Client ODC
          • Connect with drivers
            • Java
              • Connect to OceanBase Cloud using OceanBase Connector/J
              • Connect to OceanBase Cloud by using Spring Boot
              • SpringBatch application example for connecting to OceanBase Cloud
              • Connect to OceanBase Cloud using Spring JDBC
              • Connect to OceanBase Cloud by using Spring Data JPA
              • Connect to OceanBase Cloud by using Hibernate
              • Use MyBatis to connect to OceanBase Cloud
              • Use JFinal to connect to OceanBase Cloud
            • Python
              • Python Driver for Oracle Mode
            • C/C++
              • Connect to OceanBase Cloud using OceanBase Connector/C
              • Connect to OceanBase Cloud using OceanBase Connector/ODBC
              • Use SqlSugar to connect to OceanBase Cloud
          • Use database connection pool
            • Database connection pool configuration
            • Sample program that uses a Tomcat connection pool to connect to OceanBase Cloud
            • C3P0 connection pool connects to OceanBase Cloud
            • Connect to OceanBase Cloud using Proxool connection pool
            • Sample program that uses HikariCP to connect to OceanBase Cloud
            • Use DBCP connection pool to connect to OceanBase Cloud
            • Connect to OceanBase Cloud by using Commons Pool
            • Connect to OceanBase Cloud by using a Druid connection pool
        • KV compatible mode
          • Connect to a cluster by using the OBKV-HBase client
      • Developer guide
        • MySQL compatible mode
          • Plan database objects
            • Create a database
            • Create a table group
            • Create a table
            • Create an index
            • Create an external table
          • Write data
            • Insert data
            • Update data
            • Delete data
            • Replace data
            • Generate test data in batches
          • Read data
            • Single-table queries
            • Join tables
              • INNER JOIN queries
              • FULL JOIN queries
              • LEFT JOIN queries
              • RIGHT JOIN queries
              • Subqueries
              • Lateral derived tables
            • Use operators and functions in queries
              • Use arithmetic operators in queries
              • Use numerical functions in queries
              • Use string concatenation operators in queries
              • Use string functions in queries
              • Use datetime functions in queries
              • Use aggregate functions in queries
              • Use NULL-related functions in queries
              • Use the CASE conditional operator in queries
              • Use the SELECT ... FOR UPDATE statement to lock query results
              • Use the SELECT ... LOCK IN SHARE MODE statement to lock query results
            • Use a DBLink in queries
            • Set operations
          • Manage transactions
            • Overview
            • Start a transaction
            • Savepoints
              • Mark a savepoint
              • Roll back a transaction to a savepoint
              • Release a savepoint
            • Commit a transaction
            • Roll back a transaction
        • Oracle compatible mode
          • Plan database objects
            • Create a table group
            • Create a table
            • Create an index
            • Create an external table
          • Write data
            • Insert data
            • Update data
            • Delete data
            • Replace data
            • Generate test data in batches
          • Read data
            • Single-table queries
            • Join tables
              • INNER JOIN queries
              • FULL JOIN queries
              • LEFT JOIN queries
              • RIGHT JOIN queries
              • Subqueries
              • Lateral derived tables
            • Use operators and functions in queries
              • Use arithmetic operators in queries
              • Use numerical functions in queries
              • Use string concatenation operators in queries
              • Use string functions in queries
              • Use datetime functions in queries
              • Use aggregate functions in queries
              • Use CASE functions in queries
            • Use a DBLink in queries
            • Set operations
          • Manage transactions
            • Overview
            • Start a transaction
            • Savepoints
              • Mark a savepoint
              • Roll back a transaction to a savepoint
            • Commit a transaction
            • Roll back a transaction
        • KV compatible mode
          • OBKV-Table Java development guide
          • Table data operation examples
            • Insert data with OBKV-Table
            • Query data with OBKV-Table
            • Update data with OBKV-Table
            • Delete data with OBKV-Table
          • Table Java development
            • Connect to an instance by using the OBKV-Table Java client
          • HBase data operation examples
            • OBKV-HBase application development overview
            • OBKV-HBase data operation examples
      • Manage instances
        • Manage instances
          • View the instance list
          • Instance workbench overview
          • Stop and start instances
          • Unit migration
        • Manage tenants
          • Tenant overview
          • Create a tenant
          • Modify tenant specifications
          • Modify tenant names
          • Add an endpoint
          • Resource isolation
            • Overview
            • Manage resource groups
              • Create a resource group
              • View a resource group
              • Edit a resource group
              • Delete a resource group
            • Manage isolation rules
              • Create an isolation rule
              • View isolation rules
              • Edit an isolation rule
              • Delete a quarantine rule
          • Modify primary zone
          • Modify the maximum number of connections for a tenant proxy
          • Enable the AI function built-in AI models
          • Monitor tenant performance
            • Overview
            • View performance and SQL monitoring details
            • View transaction monitoring details
            • View storage and cache monitoring details
            • View Binlog service monitoring
            • Customize a monitoring dashboard for a tenant
          • Diagnostics
            • View performance monitoring data
            • Real-time diagnostics
              • SQL diagnostics
                • Top SQL
                • Slow SQL
                • Suspicious SQL
                • High-risk SQL
                • SQL details
              • Session management
                • Session management
              • Optimization management
                • Manage active outlines
                • View optimization history
              • SQL audit
          • Manage tenant parameters
            • Manage tenant parameters
            • Parameters for tenants
            • Parameter template overview
          • Delete a tenant
          • Manage databases and accounts
            • Create accounts
            • Manage accounts
            • Create a database (MySQL compatible mode)
            • Manage databases (MySQL compatible mode)
        • Monitor instance performance
          • Overview
          • Monitor the performance of databases in an instance
          • Monitor multidimensional metrics of an instance
          • Monitor the performance of hosts in an instance
          • Monitor database proxy
          • Monitor database proxy hosts
          • Monitor cross-cloud network performance
          • Customize a monitoring dashboard for an instance
        • Manage major compactions
          • Initiate a major compaction
          • View compaction records
          • Update time for compactions
        • Manage instance parameters
          • Manage parameters
          • Parameters for cluster instances
        • Change instance configurations
          • Set compute auto-scaling
          • Set storage auto-scaling
          • View history of configuration changes
          • Change configuration
          • Switch the deployment mode
        • Manage standby instances
          • Overview
          • Create a standby instance
          • Create a cross-cloud standby instance
          • Primary-standby instance workspace
          • Configure a primary-standby synchronization strategy
          • Configure global endpoint
          • Enable automatic forwarding of standby write requests
          • Primary-standby instance switchover
          • Initiate failover
          • Detach a standby instance
          • Release a standby instance
        • Release an instance
        • Database proxy
          • Overview
          • Manage database proxy
          • Direct load
        • Manage alerts
          • Overview
          • Manage alert rules
            • Create an alert rule
            • View an alert rule
            • Edit an alert rule
            • Delete an alert rule
          • View alert history
          • Manage alert templates
            • Create an alert template
            • View an alert template
            • Edit an alert template
            • Copy an alert rule template
            • Delete an alert template
          • Manage muting rules
            • Create an alert muting rule
            • View an alert muting rule
            • Edit an alert muting rule
            • Delete an alert muting rule
          • Manage alert notification templates
            • Create an alert notification template
            • View an alert notification template
            • Edit an alert notification template
            • Copy an alert notification template
            • Delete an alert notification template
          • Manage alert contacts
            • Add an alert contact
            • Add an alert contact group
            • View an alert contact
            • Edit an alert contact
            • Delete an alert contact
            • Obtain a webhook URL
          • Monitoring metrics for alerts
        • Backup and restore
          • Overview
          • Backup strategy
          • Initiate a backup immediately
          • Data backup
          • Initiate a restore
          • Data restore
          • Restore data from the instance recycle bin
        • Diagnostics
          • View performance monitoring data
          • Capacity diagnostics
          • One-click diagnostics
            • Initiate one-click diagnostics
            • View one-click diagnostic report
              • Exceptions
              • Real-time diagnostics
              • Optimization suggestions
              • Capacity management
              • Security management
          • Real-time diagnostics
            • SQL diagnostics
              • Top SQL
              • Slow SQL
              • Suspicious SQL
              • High-risk SQL
              • SQL details
              • SQL monitoring metrics list
            • Session management
              • Session management
            • Request analysis
              • Request analysis
          • Root cause diagnostics
            • Exception handling
            • Enable system autonomy
          • SQL audit
          • Materialized view analysis
          • Optimization center
            • Optimization suggestions
            • Manage active outlines
            • SQL review
            • View the optimization history
        • Manage read-only replicas
          • Overview
          • Instance read-only replicas
            • Add a read-only replica to an instance
            • View read-only replicas of an instance
            • Manage read-only replicas of an instance
            • Delete a read-only replica of an instance
          • Tenant read-only replicas
            • Add a read-only replica to a tenant
            • View read-only replicas of a tenant
            • Manage read-only replicas of a tenant
            • Delete a read-only replica of a tenant
        • Manage tags
        • Manage JVM-dependent services
      • Data source management
        • Overview of data source management
        • Manage data sources
        • User privileges
          • User privileges for compatibility assessment
          • User privileges for data migration
          • User privileges for performance assessment
          • User privileges for data archiving
          • User privileges for data cleanup
        • Connect via private network
          • AWS
          • Huawei Cloud
          • Alibaba Cloud
          • Azure
          • Private IP address segments
        • Connect via public network
          • AWS
          • Huawei Cloud
          • Alibaba Cloud
          • Azure
      • Data lifecycle management
        • Archive data
        • Clean up data
      • Manage recycle bin
        • Instance recycle bin
        • Manage databases and tables in recycle bin
          • Overview
          • Instance-level recycle bin
          • Tenant-level recycle bin
    • Work with transactional instances
      • Overview
      • Create an instance
        • Overview
        • Create via OceanBase Cloud official website
        • Create via AWS Marketplace
        • Create via GCP Marketplace
        • Create via Huawei Cloud Marketplace
        • Create via Alibaba Cloud Marketplace
        • Create via Azure Marketplace
      • Connect to an instance
        • MySQL compatible mode
          • Overview
          • Get connection string
            • Overview
            • Connect to a database by using AWS PrivateLink
            • Access the database by using an Azure private network connection
            • Connect using AWS VPC peering
            • Connect using Google Cloud Private Service Connect
            • Connect using Huawei Cloud VPC Endpoint
            • Connect using Alibaba Cloud VPC
            • Connect using a public IP address
            • Connect using a Huawei Cloud peering connection
          • Connect with clients
            • Connect to OceanBase Cloud by using Client ODC
            • Connect to OceanBase Cloud by using a MySQL client
            • Connect to OceanBase Cloud by using OBClient
          • Connect with drivers
            • Java
              • Connect to OceanBase Cloud using SpringBoot
              • SpringBatch sample application for connecting to OceanBase Cloud
              • spring-jdbc
              • SpringDataJPA sample application for connecting to OceanBase Cloud
              • Hibernate application development with OceanBase Cloud
              • Sample program for connecting to OceanBase Cloud
              • connector-j
              • Use TestContainers to connect to and use OceanBase Cloud
            • Python
              • Connect to OceanBase Cloud using mysqlclient
              • Connect to OceanBase Cloud using PyMySQL
              • Use the MySQL-connector-python driver to connect to and use OceanBase Cloud
              • Use SQLAlchemy to connect to an OceanBase Cloud database
              • Connect to an OceanBase Cloud database using Django
              • Connect to an OceanBase Cloud database by using peewee
            • C
              • Use MySQL Connector/C to connect to OceanBase Cloud
            • Go
              • Connect to OceanBase Cloud using the Go-SQL-Driver/MySQL driver
              • Connect to OceanBase Cloud using GORM
            • PHP
              • Use the EXT driver to connect to OceanBase Cloud
              • Connect to OceanBase Cloud by using the MySQLi driver
              • Use the PDO driver to connect to OceanBase Cloud
            • Rust
              • Rust application example for connecting to OceanBase Cloud
              • SeaORM example for connecting to OceanBase Cloud
            • ruby
              • ActiveRecord sample application for OceanBase Cloud
              • Connect to OceanBase Cloud by using mysql2
              • Connect to OceanBase Cloud by using Sequel
          • Use database connection pool
            • Database connection pool configuration
            • Connect to OceanBase Cloud by using a Tomcat connection pool
            • Connect to OceanBase Cloud by using a C3P0 connection pool
            • Connect to OceanBase Cloud by using a Proxool connection pool
            • Connect to OceanBase Cloud by using a HikariCP connection pool
            • Connect to OceanBase Cloud by using a DBCP connection pool
            • Connect to OceanBase Cloud by using Commons Pool
            • Connect to OceanBase Cloud by using a Druid connection pool
        • Oracle compatible mode
          • Overview
          • Get connection string
            • Overview
            • Connect to a database by using AWS PrivateLink
            • Access a database by using an Azure private network connection
            • Connect using AWS VPC peering
            • Connect using Google Cloud Private Service Connect
            • Connect using Huawei Cloud VPC Endpoint
            • Connect using a public IP address
          • Connect with clients
            • Connect to OceanBase Cloud by using OBClient
            • Connect to OceanBase Cloud by using Client ODC
          • Connect with drivers
            • Java
              • Connect to OceanBase Cloud using OceanBase Connector/J
              • Connect to OceanBase Cloud by using Spring Boot
              • SpringBatch application example for connecting to OceanBase Cloud
              • Connect to OceanBase Cloud using Spring JDBC
              • Connect to OceanBase Cloud by using Spring Data JPA
              • Connect to OceanBase Cloud by using Hibernate
              • Use MyBatis to connect to OceanBase Cloud
              • Use JFinal to connect to OceanBase Cloud
            • Python
              • Python Driver for Oracle Mode
            • C
              • Connect to OceanBase Cloud using OceanBase Connector/C
              • Connect to OceanBase Cloud using OceanBase Connector/ODBC
              • Use SqlSugar to connect to OceanBase Cloud
          • Use database connection pool
            • Database connection pool configuration
            • Sample program that uses a Tomcat connection pool to connect to OceanBase Cloud
            • C3P0 connection pool connects to OceanBase Cloud
            • Connect to OceanBase Cloud using Proxool connection pool
            • Sample program that uses HikariCP to connect to OceanBase Cloud
            • Use DBCP connection pool to connect to OceanBase Cloud
            • Connect to OceanBase Cloud by using Commons Pool
            • Connect to OceanBase Cloud by using a Druid connection pool
      • Developer guide
        • MySQL compatible mode
          • Plan database objects
            • Create a database
            • Create a table group
            • Create a table
            • Create an index
            • Create an external table
          • Write data
            • Insert data
            • Update data
            • Delete data
            • Replace data
            • Generate test data in batches
          • Read data
            • Single-table queries
            • Join tables
              • INNER JOIN queries
              • FULL JOIN queries
              • LEFT JOIN queries
              • RIGHT JOIN queries
              • Subqueries
              • Lateral derived tables
            • Use operators and functions in queries
              • Use arithmetic operators in queries
              • Use numerical functions in queries
              • Use string concatenation operators in queries
              • Use string functions in queries
              • Use datetime functions in queries
              • Use type conversion functions in queries
              • Use aggregate functions in queries
              • Use NULL-related functions in queries
              • Use the CASE conditional operator in queries
              • Use the SELECT ... FOR UPDATE statement to lock query results
              • Use the SELECT ... LOCK IN SHARE MODE statement to lock query results
            • Use a DBLink in queries
            • Set operations
          • Manage transactions
            • Overview
            • Start a transaction
            • Savepoints
              • Mark a savepoint
              • Roll back a transaction to a savepoint
              • Release a savepoint
            • Commit a transaction
            • Roll back a transaction
        • Oracle compatible mode
          • Plan database objects
            • Create a table group
            • Create a table
            • Create an index
            • Create an external table
          • Write data
            • Insert data
            • Update data
            • Delete data
            • Replace data
            • Generate test data in batches
          • Read data
            • Single-table queries
            • Join tables
              • INNER JOIN queries
              • FULL JOIN queries
              • LEFT JOIN queries
              • RIGHT JOIN queries
              • Subqueries
              • Lateral derived tables
            • Use operators and functions in queries
              • Use arithmetic operators in queries
              • Use numerical functions in queries
              • Use string concatenation operators in queries
              • Use string functions in queries
              • Use datetime functions in queries
              • Use type conversion functions in queries
              • Use aggregate functions in queries
              • Use NULL-related functions in queries
              • Use CASE functions in queries
              • Use the SELECT ... FOR UPDATE statement to lock query results
            • Use a DBLink in queries
            • Set operations
          • Manage transactions
            • Overview
            • Start a transaction
            • Savepoints
              • Mark a savepoint
              • Roll back a transaction to a savepoint
            • Commit a transaction
            • Roll back a transaction
      • Manage instances
        • Manage instances
          • View the instance list
          • Instance overview
          • Stop and restart instances
          • Unit migration
        • Manage tenants
          • Tenant overview
          • Create a tenant
          • Modify tenant specifications
          • Modify tenant names
          • Add an endpoint
          • Resource isolation
            • Overview
            • Manage resource groups
              • Create a resource group
              • View a resource group
              • Edit a resource group
              • Delete a resource group
            • Manage isolation rules
              • Create an isolation rule
              • View isolation rules
              • Edit an isolation rule
              • Delete a quarantine rule
          • Modify primary zone
          • Modify the maximum number of connections for a tenant proxy
          • Enable the AI function built-in AI models
          • Monitor tenant performance
            • Overview
            • View performance and SQL monitoring details
            • View transaction monitoring details
            • View storage and cache monitoring details
            • View Binlog service monitoring
            • Customize a monitoring dashboard for a tenant
          • Diagnostics
            • Real-time diagnostics
              • SQL diagnostics
                • Top SQL
                • Slow SQL
                • Suspicious SQL
                • High-risk SQL
              • SQL audit
          • Manage tenant parameters
            • Manage tenant parameters
            • Parameters for tenants
            • Parameter template overview
          • Delete a tenant
          • Manage databases and accounts
            • Create accounts
            • Manage accounts
            • Create a database (MySQL compatible mode)
            • Manage databases (MySQL compatible mode)
        • Monitor instance performance
          • Overview
          • Monitor the performance of databases in an instance
          • Monitor multidimensional metrics of an instance
          • Monitor the performance of hosts in an instance
          • Monitor database proxy
          • Monitor database proxy hosts
          • Monitor cross-cloud network performance
          • Customize a monitoring dashboard for an instance
        • Manage major compactions
          • Initiate a major compaction
          • View compaction records
          • Update time for compactions
        • Manage instance parameters
          • Manage parameters
          • Parameters for cluster instances
        • Change instance configurations
          • Set storage auto-scaling
          • View history of configuration changes
          • Change configuration
          • Switch the deployment mode
        • Manage standby instances
          • Overview
          • Create a standby instance
          • Create a cross-cloud standby instance
          • View details of primary and standby instances
          • Configure global endpoint
          • Enable automatic forwarding for write requests of standby databases
          • Primary-standby instance switchover
          • Initiate failover
          • Detach a standby instance
          • Release a standby instance
        • Release an instance
        • Database proxy
          • Overview
          • Manage database proxy
          • Direct load
        • Manage alerts
          • Overview
          • Manage alert rules
            • Create an alert rule
            • View an alert rule
            • Edit an alert rule
            • Delete an alert rule
          • View alert history
          • Manage alert templates
            • Create a trigger condition template
            • View an alert template
            • Edit an alert template
            • Copy an alert rule template
            • Delete an alert template
          • Manage muting rules
            • Create an alert muting rule
            • View an alert muting rule
            • Edit an alert muting rule
            • Delete an alert muting rule
          • Manage alert notification templates
            • Create an alert notification template
            • View an alert notification template
            • Edit an alert notification template
            • Copy an alert notification template
            • Delete an alert notification template
          • Manage alert contacts
            • Add an alert contact
            • Add an alert contact group
            • View an alert contact
            • Edit an alert contact
            • Delete an alert contact
            • Obtain a webhook URL
          • Monitoring metrics for alerts
        • Backup and restore
          • Overview
          • Backup strategy
          • Initiate a backup immediately
          • Data backup
          • Initiate a restore
          • Data restore
          • Restore data from the instance recycle bin
        • Diagnostics
          • View performance monitoring data
          • Capacity diagnostics
          • One-click diagnostics
            • Initiate one-click diagnostics
            • View one-click diagnostic report
              • Exceptions
              • Real-time diagnostics
              • Optimization suggestions
              • Capacity management
              • Security management
          • Real-time diagnostics
            • SQL diagnostics
              • Top SQL
              • Slow SQL
              • Suspicious SQL
              • High-risk SQL
              • SQL details
              • SQL monitoring metrics list
            • Session management
              • Session management
            • Request analysis
              • Request analysis
          • Root cause diagnostics
            • Exception handling
            • Enable system autonomy
          • SQL audit
          • Materialized view analysis
          • Optimization center
            • Optimization suggestions
            • Manage active outlines
            • SQL review
            • View the optimization history
        • Manage read-only replicas
          • Overview
          • Instance read-only replicas
            • Add a read-only replica to an instance
            • View read-only replicas of an instance
            • Manage read-only replicas of an instance
            • Delete a read-only replica of an instance
          • Tenant read-only replicas
            • Add a read-only replica to a tenant
            • View read-only replicas of a tenant
            • Manage read-only replicas of a tenant
            • Delete a read-only replica of a tenant
        • Manage tags
        • Manage JVM-dependent services
      • Data source management
        • Connect via private network
          • Google Cloud
        • Connect via public network
          • Google Cloud
      • Overview of data source management
      • Data lifecycle management
        • Overview
        • Archive data
        • Clean up data
        • Data archiving configurations
      • Manage recycle Bin
        • Instance recycle bin
        • Manage databases and tables in recycle bin
          • Overview
          • Instance-level recycle bin
          • Tenant-level recycle bin
    • Work with analytical instances
      • Overview
      • Core features
      • Connect to an instance
        • Overview
        • Get connection string
          • Overview
          • Connect using AWS PrivateLink
          • Connect using Huawei Cloud VPC Endpoint
          • Connect using a public IP address
        • Connect with clients
          • Connect to OceanBase Cloud by using Client ODC
          • Connect to OceanBase Cloud by using a MySQL client
          • Connect to OceanBase Cloud by using OBClient
        • Connect with drivers
          • Java
            • Connect to OceanBase Cloud by using Spring Boot
            • Connect to OceanBase Cloud by using Spring Batch
            • Connect to OceanBase Cloud by using Spring Data JDBC
            • Connect to OceanBase Cloud by using Spring Data JPA
            • Connect to OceanBase Cloud by using Hibernate
            • Connect to OceanBase Cloud by using MyBatis
            • Connect to OceanBase Cloud using MySQL Connector/J
          • Python
            • Connect to OceanBase Cloud by using mysqlclient
            • Connect to OceanBase Cloud by using PyMySQL
            • Connect to OceanBase Cloud using MySQL Connector/Python
          • C
            • Connect to OceanBase Cloud using MySQL Connector/C
          • Go
            • Connect to OceanBase Cloud using Go-SQL-Driver/MySQL
          • PHP
            • Connect to OceanBase Cloud using PHP
        • Use database connection pool
          • Database connection pool configuration
          • Connect to OceanBase Cloud by using a Tomcat connection pool
          • Connect to OceanBase Cloud by using a C3P0 connection pool
          • Connect to OceanBase Cloud by using a Proxool connection pool
          • Connect to OceanBase Cloud by using a HikariCP connection pool
          • Connect to OceanBase Cloud by using a DBCP connection pool
          • Connect to OceanBase Cloud by using Commons Pool
          • Connect to OceanBase Cloud by using a Druid connection pool
      • Create an instance
      • Data table design
        • Table overview
        • Best practices
          • Unit 1: Best practices for optimizing storage structures and query performance
          • Unit 2: Best practices for creating special indexes
      • Export data
      • OceanBase data processing
      • Query acceleration
        • Statistics
        • Materialized views for query acceleration
        • Select a query parallelism level
      • Manage instances
        • Instance overview
        • Change configuration
        • Set storage auto-scaling
        • Modify primary zone
        • Manage parameters
        • Backup and restore
          • Backup overview
          • Backup strategies
          • Immediate backup
          • Data Backup
          • Initiate restore
          • Data restore
        • Monitor instance performance
          • Overview
          • Monitor the performance of databases in an instance
          • Monitor the performance of hosts in an instance
        • Manage major compactions
          • Initiate a major compaction
          • View compaction records
          • Update time for compactions
        • Database proxy
          • Overview
          • Manage database proxy
          • Direct load
        • Manage alerts
          • Overview
          • Manage alert rules
            • Create an alert rule
            • View an alert rule
            • Edit an alert rule
            • Delete an alert rule
          • View alert history
          • Manage alert templates
            • Create a trigger condition template
            • View an alert template
            • Edit an alert template
            • Copy an alert template
            • Delete an alert template
          • Manage muting rules
            • Create an alert muting rule
            • View an alert muting rule
            • Edit an alert muting rule
            • Delete an alert muting rule
          • Manage alert notification templates
            • Create an alert notification template
            • View an alert notification template
            • Edit an alert notification template
            • Copy an alert notification template
            • Delete an alert notification template
          • Manage alert contacts
            • Add an alert contact
            • Add an alert contact group
            • View an alert contact
            • Edit an alert contact
            • Delete an alert contact
            • Obtain a webhook URL
          • Monitoring metrics for alerts
        • Diagnostics
          • View performance monitoring data
          • Capacity diagnostics
          • Real-time diagnostics
            • SQL diagnostics
              • Top SQL
              • Slow SQL
              • Suspicious SQL
              • High-risk SQL
              • SQL details
              • SQL monitoring metrics list
            • Session management
              • Session management
            • Optimization management
              • Manage active outlines
              • View the optimization history
            • Request analysis
              • Request analysis
        • Stop and restart instances
        • Release instances
        • Manage databases and accounts
          • Create and manage accounts
          • Create a database
          • Manage databases
        • Manage tags
      • Overview of data source management
      • Data lifecycle management
        • Archive data
        • Clean up data
      • Performance diagnosis and tuning
        • Use the DBMS_XPLAN package for performance diagnostics
        • Use the GV$SQL_PLAN_MONITOR view for performance analysis
        • Views related to AP performance analysis
      • Performance testing
      • Product integration
      • Manage recycle Bin
        • View instance recycle bin
        • Manage databases and tables in recycle bin
          • Overview
          • Instance recycle bin
    • Work with Key-Value instances
      • Try out Key-Value instances
        • Create an instance
        • Create a tenant
        • Create an account for a database user
        • OBKV HBase data operation examples
      • Use Table model
        • Create an instance
        • Manage instances
          • Manage instances
            • View the instance list
            • Instance overview
            • Stop and restart instances
            • Release an instance
          • Manage tenants
            • Create a tenant
            • Modify tenant specifications
            • Modify tenant names
            • Delete a tenant
            • Tenant overview
            • Resource isolation
              • Overview
              • Manage resource groups
                • Create a resource group
                • View a resource group
                • Edit a resource group
                • Delete a resource group
              • Manage isolation rules
                • Create an isolation rule
                • View isolation rules
                • Edit an isolation rule
                • Delete a quarantine rule
            • Monitor tenant performance
              • Overview
              • View performance and SQL monitoring details
              • View transaction monitoring details
              • View storage and cache monitoring details
              • OBKV-Table
              • Customize a monitoring dashboard for a tenant
            • Diagnostics
              • Top SQL
            • Manage tenant parameters
              • Manage tenant parameters
              • Parameters for tenants
            • Manage databases and accounts
              • Create and manage accounts
              • Create a database
              • Manage databases
            • Modify primary zone
          • Monitor instance performance
            • Overview
            • Monitor the performance of databases in an instance
            • Monitor multi-dimensional metrics of an instance
            • Monitor the performance of hosts in a cluster
            • Customize monitoring dashboards for an instance
          • Manage major compactions
            • Initiate major compactions
            • View compaction records
            • Update time for compactions
          • Manage instance parameters
            • Parameter management overview
            • Parameters for cluster instances
          • Change instance configurations
            • Set storage auto-scaling
            • View history of configuration changes
            • Change configuration
            • Switch the deployment mode
          • Database proxy
            • Overview
            • Manage database proxy
          • Manage alerts
            • Overview
            • Manage alert rules
              • Create an alert rule
              • View an alert rule
              • Edit an alert rule
              • Delete an alert rule
            • View alert history
            • Manage alert templates
              • Trigger condition template management
              • Create an alert template
              • View an alert template
              • Edit an alert template
              • Copy an alert template
              • Delete an alert template
            • Manage muting rules
              • Create an alert muting rule
              • View an alert muting rule
              • Edit an alert muting rule
              • Delete an alert muting rule
            • Manage alert contacts
              • Add an alert contact
              • Add an alert contact group
              • View an alert contact
              • Edit an alert contact
              • Delete an alert contact
              • Obtain a webhook URL
            • Monitoring metrics for alerts
          • Backup and restore
            • Backup overview
            • Backup strategies
            • Immediate backup
            • Data backup
            • Initiate restore
            • Data restore
          • Diagnostics
            • View performance monitoring data
            • Top SQL
            • Capacity diagnostics
            • Request analysis
          • Manage recycle Bin
            • View instance recycle bin
            • Manage databases and tables in recycle bin
              • Overview
              • Instance-level recycle bin
              • Tenant-level recycle bin
          • Manage tags
      • Use HBase model
        • OBKV-HBase Overview
        • Create an instance
        • Develop in HBase model
          • Connect to an instance by using the OBKV-HBase client
        • Manage instances
          • Manage instances
            • View the instance list
            • Instance overview
            • Stop and restart instances
            • Release an instance
          • Manage tenants
            • Create a tenant
            • Modify tenant specifications
            • Modify tenant names
            • Delete a tenant
            • Tenant overview
            • Resource isolation
              • Overview
              • Manage resource groups
                • Create a resource group
                • View a resource group
                • Edit a resource group
                • Delete a resource group
              • Manage isolation rules
                • Create an isolation rule
                • View isolation rules
                • Edit an isolation rule
                • Delete a quarantine rule
            • Monitor tenant performance
              • Overview
              • View performance and SQL monitoring details
              • View transaction monitoring details
              • View storage and cache monitoring details
              • OBKV-HBase
              • Customize a monitoring dashboard for a tenant
            • Diagnostics
              • Top SQL
            • Manage tenant parameters
              • Manage tenant parameters
              • Parameters for tenants
            • Manage databases and accounts
              • Create and manage accounts
              • Create a database
              • Manage databases
            • Modify primary zone
          • Monitor instance performance
            • Overview
            • Monitor the performance of databases in an instance
            • Monitor multi-dimensional metrics of an instance
            • Monitor the performance of hosts in a cluster
            • Customize monitoring dashboards for an instance
          • Manage major compactions
            • Initiate major compactions
            • View compaction records
            • Update time for compactions
          • Manage instance parameters
            • Parameter management overview
            • Parameters for cluster instances
          • Change instance configurations
            • Set storage auto-scaling
            • View history of configuration changes
            • Change configuration
            • Switch the deployment mode
          • Database proxy
            • Overview
            • Manage database proxy
          • Manage alerts
            • Overview
            • Manage alert rules
              • Create an alert rule
              • View an alert rule
              • Edit an alert rule
              • Delete an alert rule
            • View alert history
            • Manage alert templates
              • Trigger condition template management
              • Create an alert template
              • View an alert template
              • Edit an alert template
              • Copy an alert template
              • Delete an alert template
            • Manage muting rules
              • Create an alert muting rule
              • View an alert muting rule
              • Edit an alert muting rule
              • Delete an alert muting rule
            • Manage alert contacts
              • Add an alert contact
              • Add an alert contact group
              • View an alert contact
              • Edit an alert contact
              • Delete an alert contact
              • Obtain a webhook URL
            • Monitoring metrics for alerts
          • Backup and restore
            • Backup overview
            • Backup strategies
            • Immediate backup
            • Data backup
            • Initiate restore
            • Data restore
          • Diagnostics
            • View performance monitoring data
            • Top SQL
            • Capacity diagnostics
            • Request analysis
          • Manage recycle Bin
            • View instance recycle bin
            • Manage databases and tables in recycle bin
              • Overview
              • Instance-level recycle bin
              • Tenant-level recycle bin
          • Manage tags
        • Overview of data source management
        • Performance test
      • Connect Key-Value instances
        • Overview
        • Connect using Huawei Cloud VPC Endpoint
        • Connect using a public IP address
  • Use BYOC instances
    • Prepare BYOC instance quotas
    • Create a BYOC instance
    • Connect to an instance
      • Connect in MySQL mode
        • Connect with a client
          • Connect to OceanBase Cloud using the desktop ODC
          • Connect to OceanBase Cloud using the MySQL client
          • Connect to OceanBase Cloud by using OBClient
        • Connect with a driver or ORM framework
          • Java
            • Sample application for connecting to OceanBase Cloud using Spring Boot
            • Sample application for connecting to OceanBase Cloud using Spring Batch
            • spring-jdbc
            • Sample application for connecting to OceanBase Cloud using Spring Data JPA
            • Connect to OceanBase Cloud using Hibernate
            • Sample application for connecting to OceanBase Cloud using MyBatis
            • connector-j
            • Connect to OceanBase Cloud using Testcontainers Java
          • Python
            • Connect to OceanBase Cloud using mysqlclient
            • Connect to OceanBase Cloud using PyMySQL
            • Connect to OceanBase Cloud using MySQL Connector/Python
            • Example program for connecting to OceanBase Cloud using SQLAlchemy
            • Connect to OceanBase Cloud using Django
            • Sample program for connecting to OceanBase Cloud using Peewee
          • C
            • Connect to OceanBase Cloud by using MySQL Connector/C
          • Go
            • Example program for connecting to OceanBase Cloud using Go-SQL-Driver/MySQL
            • Example program for connecting to OceanBase Cloud using GORM
          • PHP
            • Example program for connecting to OceanBase Cloud using the EXT driver
            • Connect to OceanBase Cloud by using the MySQLi driver
            • Connect to OceanBase Cloud using the PDO driver
          • Rust
            • Connect to OceanBase Cloud using Rust
            • Sample application for connecting to OceanBase Cloud using SeaORM
          • Ruby
            • Example program for connecting to OceanBase Cloud database using ActiveRecord
            • Connect to OceanBase Cloud using mysql2
            • Example program for connecting to OceanBase Cloud using Sequel
        • Use connection pools
          • Database connection pool configuration
          • Connect to OceanBase Database with Druid in a Tomcat application
          • Connect to OceanBase Database by using a C3P0 connection pool
          • Sample program for connecting to OceanBase Database using a Proxool connection pool
          • Connect to OceanBase Database by using the HikariCP connection pool
          • Connect to OceanBase Database by using a DBCP connection pool
          • Connect to OceanBase Database by using Commons Pool
          • Sample program for connecting to OceanBase Database using a Druid connection pool
      • Connect in Oracle mode
        • Connect with a client
          • Connect to OceanBase Cloud using OBClient
          • Connect to OceanBase Cloud using the desktop ODC
        • Connect with a driver or ORM framework
          • Java
            • Sample application for connecting to OceanBase Cloud using OceanBase Connector/J
            • Connect to OceanBase Cloud using Spring Boot
            • Sample application for connecting to OceanBase Cloud using Spring Batch
            • Connect to OceanBase Cloud by using Spring JDBC
            • Connect to OceanBase Cloud using Spring Data JPA
            • Connect to OceanBase Cloud using Hibernate
            • Sample application for connecting to OceanBase Cloud using MyBatis
            • Connect to OceanBase Cloud using JFinal
          • Python
            • Python Driver Oracle Mode
          • C/C++
            • Connect to OceanBase Cloud using OceanBase Connector/C
            • Sample program for connecting to OceanBase Cloud using OceanBase Connector/ODBC
            • Sample application for connecting to OceanBase Cloud using SqlSugar
        • Use connection pools
          • Database connection pool configuration
          • Connect to OceanBase Database with Druid in a Tomcat application
          • Connect to OceanBase Cloud by using a C3P0 connection pool
          • Sample application for connecting to OceanBase Cloud using a Proxool connection pool
          • Connect to OceanBase Cloud by using HikariCP connection pool
          • Connect to OceanBase Cloud by using a DBCP connection pool
          • Connect to OceanBase Cloud by using Commons Pool
          • Sample program for connecting to OceanBase Cloud using a Druid connection pool
      • Connect in KV mode
        • Connect to a cluster by using the OBKV-HBase client
    • Manage instances
      • Manage instances
        • View the instance list
        • Instance workspace overview
        • Stop and start an instance
        • Migrate resource units
      • Manage tenants
        • Tenant workspace
        • Create a tenant
        • Modify tenant specifications
        • Change the tenant name
        • Add an endpoint
        • Modify the primary zone
        • Monitor tenant performance
          • Tenant monitoring overview
          • Monitor performance and SQL
          • Monitor transactions
          • Monitor storage and cache
          • Monitor the Binlog service
          • Customize monitoring dashboards for tenants
        • Manage parameters
          • Manage tenant parameters
          • Parameter list description
          • Parameter template description
        • Delete a tenant
        • Manage databases and accounts
          • Create an account
          • Manage accounts
          • Create a database (MySQL only)
          • Manage databases (MySQL only)
      • Monitor instance performance
        • Instance monitoring overview
        • Monitor the performance of databases in a cluster
        • Monitor multi-dimensional metrics of a cluster
        • Monitor the performance of hosts in a cluster
        • Database proxy monitoring details
        • Database proxy host monitoring details
        • Customize monitoring dashboards for instances
      • Major compaction
        • Initiate a major compaction
        • View major compaction records
        • Modify the major compaction time
      • Manage instance parameters
        • Parameter management
        • Parameter list description
      • Change instance configurations
        • View the configuration change history of a cluster instance
        • Change instance configurations (pay-as-you-go)
      • Manage standby instances
        • Create a standby instance
        • Primary and standby instance workspaces
        • Set a primary/standby synchronization strategy
      • Release an instance
      • Database proxy
        • Database proxy overview
        • Manage database proxies
      • Manage alerts
        • Manage alerts
        • Manage alert rules
          • Create an alert rule
          • View an alert rule
          • Edit an alert rule
          • Delete an alert rule
        • View alert history
        • Manage trigger condition templates
          • Create a trigger condition template
          • View a trigger condition template
          • Edit a trigger condition template
          • Copy a trigger condition template
          • Delete a trigger condition template
        • Manage muting rules
          • Create an alert muting rule
          • View an alert muting rule
          • Edit an alert muting rule
          • Delete an alert muting rule
        • Manage notification templates
          • Create an alert notification template
          • View an alert notification template
          • Edit an alert notification template
          • Copy an alert notification template
          • Delete an alert notification template
        • Manage alert contacts
          • Add an alert contact
          • Add an alert contact group
          • View an alert contact
          • Edit an alert contact
          • Delete an alert contact
          • Get a webhook URL
        • Monitoring metrics for custom alerts
      • Backup and restore
        • Backup and restore overview
        • Modify a backup strategy
        • Perform an immediate backup
        • Initiate restore
      • Manage read-only replicas
        • Read-only replica overview
        • Instance read-only replicas
          • Add a read-only replica to an instance
          • View information about read-only replicas of an instance
          • Manage the specifications of read-only replicas
          • Delete a read-only replica of an instance
        • Tenant read-only replicas
          • Add a read-only replica for a tenant
          • View information about tenant read-only replicas
          • Modify tenant read-only replicas
          • Delete tenant read-only replicas
      • Manage tags
      • Manage JVM environment dependency services
    • Manage the recycle bin
      • Instance recycle bin
  • AI Features
    • AI services
      • Overview of AI service
      • Quick start
      • Manage AI API keys
      • Use AI models
      • Use Claude Code with OceanBase MaaS
      • Use Codex CLI and Codex App with OceanBase MaaS
      • Use the memory feature
      • AI APIs
        • Access guide
        • AI service APIs
          • AI API list
          • Anthropic compatible APIs
            • List Anthropic models
            • Create a message
            • Create a message (default base URL)
          • OpenAI compatible APIs
            • List models
            • Create chat completion
            • Create embedding
            • Rerank
            • Reranks
            • Create response
          • Vertex AI compatible APIs
            • Generate content
            • Stream generate content
          • Image and video generation APIs
            • Create an image generation task
            • Create a video generation task
            • Retrieve task status
          • Image model APIs
            • gpt-image-2 text-to-image
            • gpt-image-2 image editing
            • gemini-3-pro-image text-to-image
            • gemini-3-pro-image image-to-image / image editing
          • OpenAI compatible batches and files APIs
            • Upload file
            • List files
            • Retrieve file
            • Delete file
            • Get file content
            • Get file content (POST)
            • Create batch
            • List batches
            • openai-compatible-apis
            • Retrieve batch (POST)
            • Cancel batch
          • Memory APIs
            • listSpaces - Paginated list of memory spaces
            • createSpace - Create a memory space
            • getSpace - Get details of a specified memory space
            • updateSpace - Update the name and description of a space
            • deleteSpace - Delete a space
            • extractMemories - Extract memories from dialogue messages
            • listMemories - List memories in a space
            • addMemory - Add a memory directly
            • getMemory - Retrieve a single memory
            • updateMemory - Update a single memory
            • deleteMemory - Delete a single memory
            • distillMemory - Distill experiences from conversations
            • searchExperiences - Search for experiences
            • getExperience - Retrieve a single experience
            • deleteExperience - Delete a single experience
            • feedbackExperiences - Submit feedback on experiences
            • setExperienceObsolescence - Set the obsolete status of an experience
            • combinedSearch - Combined search for memories and experiences
    • OceanBase OAgent
      • What is OceanBase OAgent?
      • Quick start with OceanBase OAgent
      • Configure a channel
      • Set skills
      • View OceanBase OAgent token usage
  • Migrations
    • Data migration and import solutions
    • Data assessment and migration quick start
    • Assess compatibility
      • Overview
      • Perform online assessment
      • Perform offline assessment
      • Manage compatibility assessment tasks
        • View a compatibility assessment task
        • View and download a compatibility assessment report
        • Stop a compatibility assessment task
        • Delete a compatibility assessment task
      • Obtain files for upload
      • Configure PrivateLink
      • Add an IP address to an allowlist
    • Data source management
      • Create a data source
      • Manage data sources
      • User privileges
        • User privileges for compatibility assessment
        • User privileges for data migration
        • User privileges for performance assessment
        • User privileges for data archiving
        • User privileges for data cleanup
      • Connect via private network
        • AWS
        • Huawei Cloud
        • Alibaba Cloud
        • Azure
        • Private IP address range
      • Connect via public network
        • AWS
        • Huawei Cloud
        • Alibaba Cloud
        • Azure
      • Connect via VPC peering
        • Configure an AWS data service peering connection
        • Configure a Huawei Cloud data service peering connection
        • Configure an Alibaba Cloud data service peering connection
        • Configure a Google Cloud data service peering connection
    • Migrate data
      • Overview
      • Migrations specification
      • Purchase a data migration instance
      • Migrate data from a MySQL database to the MySQL-compatible mode of OceanBase Database
      • Migrate data from OceanBase Database in MySQL-compatible mode to a MySQL database
      • Data migration between tenants of OceanBase Database in the same compatibility mode
      • Migrate data between OceanBase database tenants of different compatibility modes
      • Migrate data from an Oracle database to an Oracle-compatible tenant of OceanBase Database
      • Migrate data from an Oracle-compatible tenant of OceanBase Database to an Oracle database
      • Configure a two-way synchronization task
      • Migrate data from OceanBase Database to Kafka
      • Migrate data from a TiDB database to the MySQL-compatible mode of OceanBase Database
      • Migrate incremental data from OceanBase Database in MySQL-compatible mode to TiDB Database
      • Migrate data from a PostgreSQL database to OceanBase Database
      • Migrate incremental data from OceanBase Database to PostgreSQL Database
      • Migrate data from a Lindorm/HBase database to the HBase API compatible mode of OceanBase Database
      • Migrate incremental data from OceanBase Database in HBase API compatibility mode to a Lindorm/HBase database
      • Migrate data from OceanBase Database to RocketMQ
      • Migrate data from OceanBase Database to DataHub
      • Migrate data from OceanBase Database in MySQL mode to ADB
      • Migrate data from PolarDB-X 2.0 to OceanBase Database in MySQL mode
      • Manage data migration tasks
        • View details of a data migration task
        • Rename a data migration task
        • View and modify migration objects
        • View and modify migration parameters
        • Configure alert monitoring
        • Manage data migration tasks by using tags
        • Intelligent diagnosis
        • Start, stop, and resume a data migration task
        • Clone a data migration task
        • Terminate and release a data migration task
      • Features
        • Custom DML/DDL configurations
        • DDL synchronization scope
        • Use SQL conditions to filter data
        • Rename a migration object
        • Set an incremental synchronization timestamp
        • Instructions on schema migration
        • Configure and modify matching rules
        • Wildcard rules
        • Import migration objects
        • Download conflict data
        • Change a topic
        • Column filtering
        • Data formats
        • Partition settings
      • Authorize an Alibaba Cloud account
      • SQL statements for querying table objects
      • Online DDL tools
      • Create a trigger
      • Modify the log level of a self-managed PostgreSQL instance
      • Supported DDL statements for synchronization and their limitations
        • DDL synchronization from Aurora MySQL DB clusters to MySQL-compatible tenants of OceanBase Database
        • DDL synchronization from MySQL-compatible tenants of OceanBase Database to Aurora MySQL DB clusters
        • DDL synchronization between MySQL-compatible tenants of OceanBase Database
        • DDL synchronization from Oracle databases to Oracle-compatible tenants of OceanBase Database
        • DDL synchronization from Oracle-compatible tenants of OceanBase Database to Oracle databases
        • DDL synchronization between Oracle-compatible tenants of OceanBase Database
        • DDL synchronization from OceanBase databases to Kafka instances
    • Data subscription
      • Create a data subscription task
      • Manage data subscription tasks
        • View details of a data subscription task
        • Configure subscription information
        • Modify the name of a data subscription task
        • View and modify subscription objects
        • View data subscription parameters
        • Set up data subscription alerts
        • Start, stop, and resume data subscription tasks
        • Clone a data subscription task
        • Release a data subscription task
      • Manage private connections for data subscriptions
      • Configure consumer subscription
      • Message formats
    • Data validation
      • Overview
      • Create a data validation task
      • Manage data validation tasks
        • View details of a data validation task
        • View and modify validation objects
        • View and modify validation parameters
        • Manage data validation tasks with tags
        • Start, pause, and resume data validation tasks
        • Clone a data validation task
        • Release a data validation task
      • Features
        • Import validation objects
        • Rename the validation object
        • Filter objects by using SQL conditions
        • Configure the matching rules for the validation object
    • Assess performance
      • Overview
      • Obtain traffic files from a database instance
      • Create a full performance assessment task
      • Create an SQL file parsing task
      • Create an SQL file replay task
      • Manage performance assessment tasks
        • View the details of a performance assessment task
        • View a performance assessment report
        • Retry and stop a performance assessment task
        • Delete a performance assessment task
      • Obtain a database instance
      • Create an access key
    • Import data
      • Import data
      • Direct load
      • Supported file formats and encoding formats for Data Import
      • Sample data introduction
    • Binlog service
      • Overview
      • Purchase the Binlog service
      • Manage Binlog service
        • View details of the Binlog service
        • Change configuration
        • Modify the auto-scaling strategy for storage space
        • Modify the elasticity strategy for compute units
        • Disable the Binlog service
    • Upgrade assistant
  • Security
    • OceanBase Cloud account settings
      • Manage personal account information
      • Multi-factor authentication
      • Organization authentication
        • Enable organization authentication
        • Configure IdP
      • Manage AccessKeys
      • Time zone settings
      • Account message subscriptions
      • Manage cloud marketplace accounts
      • Account audit
    • Organizations and projects
      • Overview
      • Manage organization information
      • Project management
        • Manage projects
        • Cross-project bidirectional authorization
        • Authorize a cloud account for BYOC
        • Manage object storage configurations
        • Manage log service configurations
        • Subscribe to project messages
      • Manage members
      • Permissions for roles
      • Cost management
        • Overview
        • Cost details
        • Manage cost units
      • Operation audit
    • Database accounts and privileges
      • Account privileges
      • Authorize cloud vendor accounts
      • AWS KMS key management
      • Support access control
    • Security and encryption
      • Set allowlist groups
      • SSL encryption
      • Transparent Data Encryption (TDE)
    • Monitoring dashboard
    • Events
    • Support plans
      • Overview of OceanBase Cloud support plans
      • Subscribe to and manage support plans
  • SQL Console
    • Overview
    • Access SQL Console
    • SQL editing and execution
    • PL compilation
    • Result set editing
    • Execution analysis
    • Database object management
      • Create a table
      • Create a view
      • Create a function
      • Create a stored procedure
      • Create a program package
      • Create a trigger
      • Create a type
      • Create a sequence
      • Create a synonym
    • Session variable management
    • Functional keys in SQL Console
  • Integrations
    • Overview
    • Schema evolution
      • Liquibase
      • Flyway
    • Data ingestion
      • Canal
      • dbt
      • Debezium
      • Flink
      • Glue
      • Informatica Cloud
      • Kafka
      • Maxwell
      • SeaTunnel
      • DataWorks
      • NiFi
    • SQL development
      • DataGrip
      • DBeaver
      • Navicat
      • TablePlus
    • Orchestration
      • DolphinScheduler
      • Linkis
      • Airflow
    • Visualization
      • Grafana
      • Power BI
      • Quick BI
      • Superset
      • Tableau
    • Observability
      • Datadog
      • Prometheus
    • Database management
      • Bytebase
    • AI
      • LlamaIndex
      • Dify
      • LangChain
      • Tongyi Qianwen
      • OpenAI
      • n8n
      • Trae
      • SpringAI
      • Cline
      • Cursor
      • Continue
      • Toolbox
      • CamelAI
      • Firecrawl
      • Hugging Face
      • Ollama
      • Google Gemini
      • Cloudflare Workers AI
      • Qoder
      • OpenCode
      • Claude Code
      • GitHub Copilot
      • Codex
      • Jina AI
      • Augment Code
      • Claude Code
      • Kiro
    • Development tools
      • Cloudflare Workers
      • Vercel
  • Best practices
    • Best practices for achieving high availability through cross-cloud active-active deployment
    • High availability through cross-cloud primary-standby databases (1:1)
    • High availability through cross-cloud primary-standby databases (1:n)
    • High host CPU usage
    • Best practices for read/write splitting in OceanBase Cloud
    • Best practices for migrating data from AWS RDS to OceanBase Cloud
  • References
    • System architecture
    • System management
    • Database object management
    • Database design and specification constraints
    • SQL reference
    • System views
    • Parameters and system variables
    • Error codes
    • Performance tuning
    • Open API References
      • Overview of Open APIs
      • Service endpoints
      • Using API
      • Open APIs
        • Cluster management
          • DescribeInstances
          • DescribeInstance
          • CreateInstance
          • DeleteInstance
          • ModifyInstanceName
          • describe-node-options
          • StopCluster
          • StartCluster
          • ModifyInstanceSpec
          • DescribeInstanceTopology
          • DescribeReadonlyInstances
          • CreateReadonlyInstance
          • ModifyReadonlyInstanceSpec
          • ModifyReadonlyInstanceDiskSize
          • ModifyReadonlyInstanceNodeNum
          • DeleteReadonlyInstance
          • DescribeInstanceAvailableRoZones
          • DescribeInstanceParameters
          • UpdateInstanceParameters
          • DescribeInstanceParametersHistory
          • ModifyInstanceTagList
          • ModifyInstanceNodeNum
          • DescribeInstanceAnomalyEvents
          • DescribeOasClusterAnomalySqlList
          • DescribeOasClusterSlowSQLList
          • DescribeInstanceSqlAuditServiceInfo - Query SQL Audit Service Information
          • DescribeProxyClusterForInstance - Query ODP clusters associated with an instance
          • SwitchoverInstance - Perform a primary/standby switchover
          • DisconnectStandbyInstance - Detach a standby instance
        • Tenant management
          • DescribeTenants
          • DescribeTenant
          • CreateTenants
          • DeleteTenants
          • ModifyTenantName
          • ModifyTenant
          • ModifyTenantUserDescription
          • ModifyTenantUserStatus
          • GetTenantCreateConstraints
          • ModifyTenantPrimaryZone
          • GetTenantCreateCpuConstraints
          • GetTenantCreateMemConstraints
          • GetTenantModifyCpuConstraints
          • GetTenantModifyMemConstraints
          • CreateTenantSecurityIpGroup
          • DescribeTenantSecurityIpGroups
          • ModifyTenantSecurityIpGroup
          • DeleteTenantSecurityIpGroup
          • BatchKillProcessList
          • DescribeProcessStatsComposition
          • DescribeTenantAvailableRoZones
          • ModifyTenantReadonlyReplica
          • DescribeTenantParameters
          • UpdateTenantParameters
          • DescribeTenantParametersHistory
          • ModifyTenantTagList
          • DescribeTenantSqlAuditServiceInfo - Query SQL Audit Service Information for a Tenant
          • DescribeCharset
        • Tenant user management
          • CreateTenantUser
          • DescribeTenantUsers
          • DeleteTenantUsers
          • ModifyTenantUserPassword
          • ModifyTenantUserRoles
        • Database management
          • CreateDatabase
          • DescribeDatabases
          • DeleteDatabases
          • ModifyDatabaseUserRoles
          • DescribeTableSchema
          • DescribeTimeZone
          • ModifyDatabaseDescription
        • Backup and restore
          • DescribeDataBackupSet
          • DescribeRestorableTenants
          • ModifyBackupStrategy
          • CreateTenantRestoreTask
          • CreateDataBackupTask
          • DescribeOneDataBackupSet
          • CreateBackupSetDownloadLink - Create a backup set download link
          • DeleteBackupSetDownloadTask - Delete a backup set download task
          • DescribeBackupSetDownloadLink - Query a backup set download link
          • DescribeBackupStrategy - Query backup strategy
        • Database proxy management
          • ModifyOdpClusterSpec
        • Connection management
          • CreateTenantAddress
          • CreateTenantSingleTunnelSLBAddress
          • DeleteTenantAddress
          • DescribeTenantAddress
          • ModifyTenantAddressPort
          • ModifyTenantAddressDomainPrefix
          • ConfirmPrivatelinkConnection
          • DescribeTenantPrivateLink
          • DeletePrivatelinkConnection
          • CreatePrivatelinkService
          • ConnectPrivatelinkService
          • AddPrivatelinkServiceUser
          • DescribeTenantAddressInfo - Query Tenant Address Information
          • CreateReadonlyPrivatelink
          • CreateReadwritePrivatelink
          • DescribeTenantPublicAddress
        • Data source management
          • ListDataSources - List data sources
          • CreateDataSource - Create a data source
          • DeleteDataSource - Delete a data source
        • OMS project management
          • DescribeProject - Query project details
          • CreateProject - Create a project
          • DeleteProject - Delete a project
          • DescribeProjectSteps - Query project steps
          • StartProject - Start a project
          • StopProject - Stop a project
          • ResumeProject - Resume a project
          • ReleaseProject - Release project resources
          • UpdateProjectConfig - Update project configuration
          • ListProjectModifyRecords - List project modification records
          • CreateProjectModifyRecords - Create modification records (add or remove tables)
          • CancelProjectModifyRecord - Cancel a modification record
          • RetryProjectModifyRecords - Retry a modification
          • StopProjectModifyRecords - Terminate a modification
          • GetModifyRecord - Query modification record details
          • DescribeTransferMapping - Query transfer object mappings
        • Monitoring management
          • DescribeTenantMetrics
          • DescribeMetricsData
          • CreatePrometheusIntegration - Create a Prometheus Monitoring Integration
          • DeletePrometheusIntegration - Delete Prometheus Monitoring Integration
          • ListPrometheusIntegration - Query Prometheus Monitoring Integration List
          • DescribeNodeMetrics
        • Diagnostic management
          • DescribeOasTopSQLList
          • DescribeOasAnomalySQLList
          • DescribeOasSlowSQLList
          • DescribeOasSQLText
          • DescribeSqlAudits
          • DescribeOutlineBinding
          • DescribeSampleSqlRawTexts
          • DescribeSQLTuningAdvices
          • DescribeOasSlowSQLSamples
          • DescribeOasSQLTrends
          • DescribeOasSQLPlanGroup
          • DescribeRcaRecord
          • DescribeTopSQLComparision
          • DescribeSessionStatsGroupBySqlId
          • DescribeIndexes
          • DescribeOasHighRiskSQL
        • Security management
          • CreateSecurityIpGroup
          • DescribeSecurityIpGroups - Query cluster allowlist groups
          • DescribeInstanceSSL
          • ModifyInstanceSSL
          • DescribeTenantEncryption
          • ModifyTenantEncryption
          • ModifySecurityIps
          • DeleteSecurityIpGroup
          • DescribeTenantSecurityConfigs
          • DescribeInstanceSecurityConfigs
        • Tag management
          • DescribeTags
          • CreateTags
          • UpdateTag
          • DeleteTag
        • Historical event management
          • DescribeOperationEvents
        • AI service management
          • CreateAIServiceAPIKey
          • DeleteAIServiceAPIKey
          • ListAIServiceAPIKeys
        • OpenAPI catalog
          • ListOpenApis - List OpenAPIs
          • DescribeOpenApi - Query OpenAPI details
      • Open API FAQ
      • Differences between ApsaraDB for OceanBase APIs and OceanBase Cloud APIs
    • Download OBClient
      • Download OBClient
      • Download OceanBase Connector/J
      • Download client ODC
      • Download OceanBase Connector/ODBC
      • Download OBClient Libs
    • Performance Tests
      • OLTP performance test: Sysbench benchmark
      • OLAP performance test: TPC-H benchmark
      • OLTP performance test: TPC-C benchmark
    • Metrics References
      • CMS metric compatibility
      • Prometheus monitoring metrics
      • Cluster database
      • Cluster hosts
      • Binlog service
      • Cross-cloud network channel connection
      • Performance and SQL
      • Transactions
      • Storage and caching
      • Proxy database
      • Proxy host
    • ODC User Guide
      • What is ODC?
        • What is ODC?
        • Limitations
      • Quick start
        • Client ODC
          • Overview
          • Install Client ODC
          • Use Client ODC
        • Web ODC
          • Overview
          • Use Web ODC
      • Data source management
        • Create a data source
        • Data sources and project collaboration
        • Database O&M
          • Session management
          • Global variable management
          • Recycle bin management
      • SQL development
        • Edit and execute SQL statements
        • Perform PL compilation and debugging
        • Edit and export the result set of an SQL statement
        • Execution analysis
        • Generate test data
        • System settings
        • Database objects
          • Table objects
            • Overview
            • Create a table
          • View objects
            • Overview
            • Create a view
            • Manage views
          • Materialized view objects
            • Overview
            • Create a materialized view
            • Manage materialized views
          • Function objects
            • Overview
            • Create a function
            • Manage functions
          • Stored procedure objects
            • Overview
            • Create a stored procedure
            • Manage stored procedures
          • Sequence objects
            • Overview
            • Create a sequence
            • Manage sequences
          • Package objects
            • Overview
            • Create a program package
            • Manage program packages
          • Trigger objects
            • Overview
            • Create a trigger
            • Manage triggers
          • Type objects
            • Overview
            • Create a type
            • Manage types
          • Synonym objects
            • Overview
            • Create a synonym
            • Manage synonyms
      • Import and export
        • Import schemas and data
        • Export schemas and data
      • Database change management
        • User permission management
          • Users and roles
          • Automatic authorization
          • User permission management
        • Project collaboration management
        • Risk levels, risk identification rules, and approval processes
        • SQL check specifications
        • SQL window specification
        • Database change management
        • Batch database change management
        • Online schema changes
        • Synchronize shadow tables
        • Schema comparison
      • Data lifecycle management
        • Partitioning plan management
          • Manage partitioning plans
          • Set partitioning strategies
          • Examples
        • SQL plan task
      • Data desensitization and auditing
        • Desensitize data
        • Operation records
      • Notification management
        • Overview
        • View notification records
        • Manage notification channel
          • Create a notification channel
          • View, edit, and delete a notification channel
          • Configure a custom channel
        • Manage notification rules
      • Best practices
        • Tips for SQL development
        • Explore ODC team workspaces
        • Understanding real-time SQL diagnostics for OceanBase AP
        • OceanBase historical database solutions
        • ODC SQL check for automatic identification of high-risk operations
        • Manage and modify sharded databases and tables via ODC
        • Data masking and control practices
        • Enterprise-level control and collaboration: Safeguard every database change
    • Data development
      • Overview
      • Workspace management
      • Worksheet management
      • Compute node pool management
      • Workflow management
      • Dashboard management
      • Manage Git repositories
      • SQL development
        • SQL editing and execution
        • Result set editing
        • Execution analysis
        • Database object management
          • Create a table
          • Create a view
          • Create a function
          • Create a stored procedure
        • Session variable management
        • Git integration
      • Sample datasets
      • Data development terms
  • Manage Billing
    • Access billing
    • View bills
      • View orders
      • View transaction details
    • View monthly bills
    • View payment details
    • Manage AI service billing
      • Usage monitoring
      • View API key records
      • Rate limits & quotas
    • Payment method
      • Bank remittances and claims
      • Use vouchers for payment
    • View invoices
  • Legal Agreements
    • OceanBase Cloud Services Agreement
    • AI Service Addendum
    • Service Level Agreement
    • OceanBase Data Processing Addendum
    • Service Level Agreement for OceanBase Cloud Migration Service
    • Historical agreements
      • Service Level Agreement for OceanBase Cloud Migration Service (Released March 20, 2026)

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Cloud

Sample program for connecting to OceanBase Cloud using a Druid connection pool

Last Updated:2026-11-11 03:38:34

Prerequisites
Procedure
Step 1: Import the druid-oceanbase-client project into Eclipse
Step 2: Modify the database connection information in the druid-oceanbase-client project
Step 3: Run the druid-oceanbase-client project
Sample project overview
Introduction to pom.xml code
Introduction to db.properties
Introduction to Main.java code
Complete sample code
References

This topic describes how to build an application using a Druid connection pool, OceanBase Connector/J, and OceanBase Cloud to perform basic database operations, including creating tables, inserting data, updating data, deleting data, querying data, and dropping tables.

Download the sample project

Prerequisites

  • You have registered an OceanBase Cloud account and created a cluster instance and an OceanBase Cloud tenant in Oracle-compatible mode. For more information, see Create a cluster instance and Create a tenant.

  • You have obtained the connection string of the target tenant in Oracle mode. For instructions, see Get a connection string.

  • You have installed JDK 1.8 and Maven.

  • You have installed Eclipse.

    Note

    The tool used to run the sample code in this topic is Eclipse IDE for Java Developers 2022-03. You can also choose a tool that suits your personal preference to run the sample code.

Procedure

Note

The procedure described in this topic is based on using Eclipse IDE for Java Developers 2022-03 in a Windows environment to compile and run the project. If you are using a different operating system or compiler, the steps may vary slightly.

Step 1: Import the druid-oceanbase-client project into Eclipse

  1. Open Eclipse, and select File > Open Projects from File System from the menu bar.

  2. In the dialog box that appears, click Directory, select the directory where the project is located, and then click Finish to complete the import.

    Note

    When importing a Maven project in Eclipse, it automatically detects the pom.xml file in the project, downloads the required dependency libraries based on the dependencies described in the file, and adds them to the project.

  3. View the project.

Step 2: Modify the database connection information in the druid-oceanbase-client project

Modify the database connection information in the druid-oceanbase-client/src/main/resources/db.properties file based on the connection string obtained in the prerequisites.

Sample code:

...
url=jdbc:oceanbase://t5******.********.oceanbase.cloud:1521/test_schema001
username=test_user
password=******
...
  • The connection address is t5******.********.oceanbase.cloud.
  • The access port is 1521.
  • The name of the database to access is test_schema001.
  • The tenant connection account is test_user.
  • The password is ******.

Step 3: Run the druid-oceanbase-client project

  1. In the project navigation view, locate and expand the druid-oceanbase-client/src/main/java directory.

  2. Right-click the Main.java file and select Run As > Java Application.

  3. View the output results in the console window of Eclipse.

Sample project overview

Click druid-oceanbase-client to download the project code, which is a compressed file named druid-oceanbase-client.zip.

After decompressing it, you will get a folder named druid-oceanbase-client. The directory structure is as follows:

druid-oceanbase-client
├── src
│   └── main
│       ├── java
│       │   └── com
│       │       └── example
│       │           └── Main.java
│       └── resources
│           └── db.properties
└── pom.xml

File description:

  • src: The root directory for source code.
  • main: The main code directory, containing the application's core logic.
  • java: The Java source code directory.
  • com: The Java package directory.
  • example: The package directory for the sample project.
  • Main.java: The main class sample file, containing logic for creating tables, and inserting, deleting, updating, and querying data.
  • resources: The resource file directory, containing configuration files.
  • db.properties: The connection pool configuration file, containing relevant database connection parameters.
  • pom.xml: The Maven project configuration file, used to manage project dependencies and build settings.

Introduction to pom.xml code

The pom.xml file is the configuration file for a Maven project, defining information such as the project's dependencies, plugins, and build rules. Maven is a Java project management tool that can automatically download dependencies, compile, and package projects.

The code in this pom.xml file mainly includes the following parts:

  1. File declaration statement.

    Declares that this file is an XML file, using XML version 1.0 and character encoding UTF-8.

    Code:

    <?xml version="1.0" encoding="UTF-8"?>
    
  2. Configure the POM namespace and POM model version.

    1. Use xmlns to specify the POM namespace as http://maven.apache.org/POM/4.0.0.
    2. Use xmlns:xsi to specify the XML namespace as http://www.w3.org/2001/XMLSchema-instance.
    3. Use xsi:schemaLocation to specify the POM namespace, http://maven.apache.org/POM/4.0.0, and the location of its XSD file, http://maven.apache.org/xsd/maven-4.0.0.xsd.
    4. Use the <modelVersion> element to specify the POM model version used by this POM file as 4.0.0.

    Code:

    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
    
     <!-- Other configurations -->
    
    </project>
    
  3. Configure basic information.

    1. Use <groupId> to specify the project's organization as com.example.
    2. Use <artifactId> to specify the project name as druid-oceanbase-client.
    3. Use <version> to specify the project version as 1.0-SNAPSHOT.

    Code:

        <groupId>com.example</groupId>
        <artifactId>druid-oceanbase-client</artifactId>
        <version>1.0-SNAPSHOT</version>
    
  4. Configure the properties of the project's source files.

    Specifies the Maven compiler plugin as maven-compiler-plugin and sets both the source and target Java versions to 8. This means the project's source code is written using Java 8 features, and the compiled bytecode will also be compatible with the Java 8 runtime environment. This configuration ensures the project can correctly handle Java 8 syntax and features during compilation and runtime.

    Note

    Java 1.8 and Java 8 are different names for the same version.

    Sample code:

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>8</source>
                        <target>8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
  5. Configure the components on which the project depends.

    1. Add the oceanbase-client dependency library to interact with the database:

      1. Use <groupId> to specify the dependency's organization as com.oceanbase.
      2. Use <artifactId> to specify the dependency name as oceanbase-client.
      3. Use <version> to specify the dependency version as 2.4.2.

      Note

      The following code defines that the project depends on OceanBase Connector/J V2.4.2. For information about other versions, see OceanBase JDBC driver

      Sample code:

              <dependency>
                  <groupId>com.oceanbase</groupId>
                  <artifactId>oceanbase-client</artifactId>
                  <version>2.4.2</version>
              </dependency>
      
    2. Add the druid dependency library:

      1. Use <groupId> to specify the dependency's organization as com.alibaba.
      2. Use <artifactId> to specify the dependency name as druid.
      3. Use <version> to specify the dependency version as 1.2.8.

      Sample code:

              <dependency>
                  <groupId>com.alibaba</groupId>
                  <artifactId>druid</artifactId>
                  <version>1.2.8</version>
              </dependency>
      

Introduction to db.properties

db.properties is the connection pool configuration file in this example, containing the configuration properties of the connection pool. These properties include the database URL, username, password, and other optional settings for the connection pool.

The code in the db.properties file mainly consists of the following parts:

  1. Configure database connection parameters.

    1. Specify the database driver class name as com.oceanbase.jdbc.Driver.
    2. Specify the database connection URL, including the host IP, port number, and schema to access.
    3. Specify the database username.
    4. Specify the database password.

    Sample code:

    driverClassName=com.oceanbase.jdbc.Driver
    url=jdbc:oceanbase://$host:$port/$schema_name
    username=$user_name
    password=$password
    

    Parameter description:

    • $host: The connection address of OceanBase Cloud, which is obtained from the -h parameter in the connection string.
    • $port: The connection port of OceanBase Cloud, which is obtained from the -P parameter in the connection string.
    • $schema_name: The name of the database to be accessed, which is obtained from the -D parameter in the connection string.
    • $user_name: The account name, which is obtained from the -u parameter in the connection string.
    • $password: The password of the account, which is obtained from the -p parameter in the connection string.
  2. Configure parameters for other connection pools.

    1. Specify the SQL statement select 1 from dual to validate connections.
    2. Set the initial number of connections in the connection pool to 3. This means that when the connection pool starts, it creates three initial connections.
    3. Set the maximum number of active connections in the connection pool to 30. This means that at most 30 connections can exist in the connection pool simultaneously.
    4. Set true to specify whether to log abandoned connections. When set to true, information is output to the error log when abandoned connections are reclaimed. You can set this to true in a test environment and false in a production environment to avoid performance impact.
    5. Set the minimum number of idle connections in the connection pool to 5. This means that if the number of idle connections in the connection pool drops below 5, the connection pool automatically creates new connections.
    6. Set the maximum wait time for obtaining a connection to 1000 milliseconds. If all connections in the connection pool are occupied and the wait time exceeds 1000 milliseconds, the operation to obtain a connection throws a timeout exception.
    7. Set the minimum idle time before a connection is reclaimed to 300000 milliseconds (5 minutes). If a connection remains idle for more than 300000 milliseconds, it is reclaimed.
    8. Set true to specify whether to reclaim abandoned connections. Abandoned connections are reclaimed after they exceed the time defined by removeAbandonedTimeout.
    9. Set the timeout period for abandoned connections to 300 seconds. Connections that remain unused for more than 300 seconds (5 minutes) are reclaimed.
    10. Set the interval at which the idle connection recycling thread runs to 10000 milliseconds. The idle connection recycling thread runs every 10000 milliseconds (10 seconds) to reclaim idle connections.
    11. Set false to specify whether to validate the availability of a connection when obtaining it. Setting this to false improves performance but may result in the obtained connection being unavailable.
    12. Set false to specify whether to validate the availability of a connection when returning it. Setting this to false improves performance but may result in the returned connection being unavailable.
    13. Set true to specify whether to validate idle connections. When set to true, the connection pool periodically executes the validationQuery to validate the availability of connections.
    14. Set false to specify whether to enable the keep-alive feature for persistent connections. Setting this to false disables the keep-alive feature.
    15. Set the idle time threshold for a connection to 60000 milliseconds. If a connection remains idle for more than the specified threshold of 60000 milliseconds (1 minute), the connection keep-alive mechanism detects the connection to ensure its availability. If any operation is performed on the connection within the threshold period, the connection's idle time is recalculated.

    Sample code:

    validationQuery=select 1 from dual
    initialSize=3
    maxActive=30
    logAbandoned=true
    minIdle=5
    maxWait=1000
    minEvictableIdleTimeMillis=300000
    removeAbandoned=true
    removeAbandonedTimeout=300
    timeBetweenEvictionRunsMillis=10000
    testOnBorrow=false
    testOnReturn=false
    testWhileIdle=true
    keepAlive=false
    keepAliveBetweenTimeMillis=60000
    

Notice

The specific attribute (parameter) configuration depends on project requirements and database characteristics. We recommend that you adjust and configure them based on your actual situation.

Common configuration parameters for the Druid connection pool:

Parameter
Description
url Specify the URL for connecting to the database, including information such as the database type, hostname, port number, and database name.
username Specifies the username required to connect to the database.
password Specify the password required to connect to the database.
driverClassName The database driver class. If omitted, Druid determines the database type (dbType) from url and selects the driver class automatically. Set driverClassName explicitly if the URL cannot be parsed or you need a nonstandard driver.
initialSize Specifies the number of connections created when initializing the connection pool. When the application starts, the connection pool creates and adds the specified number of connections to itself.
maxActive Specifies the maximum number of active connections in the connection pool. When the number of active connections in the connection pool reaches this maximum, subsequent connection requests will wait until a connection is released.
maxIdle Specifies the maximum number of idle connections in the connection pool (this attribute is deprecated). When the number of idle connections in the connection pool reaches the maximum value, excess connections will be closed.
minIdle Specifies the minimum number of idle connections in the connection pool. When the number of idle connections in the pool drops below this value, the pool creates new connections.
maxWait Specifies the maximum wait time for obtaining a connection. If this period is exceeded, an exception is thrown. If set to a positive value, it indicates the number of milliseconds to wait; if exceeded, an exception is thrown.
poolPreparedStatements Enables prepared statement caching (PSCache) when set to true. Monitor and configure memory usage carefully because OBProxy memory consumption may continue to grow.
validationQuery Specifies the SQL query statement for connection validation. When a connection is retrieved from the connection pool, this query statement is executed to validate whether the connection is valid.
timeBetweenEvictionRunsMillis Specifies the interval for detecting idle connections in the connection pool, in milliseconds. If a connection remains idle for more thantimeBetweenEvictionRunsMillis, the connection will be closed.
minEvictableIdleTimeMillis Specifies the minimum idle time for a connection in the connection pool before it is recycled. The unit is milliseconds. If set to a negative value, the connection will not be recycled.
testWhileIdle If true, runs validationQuery to validate connections when they are idle.
testOnBorrow If true, runs validationQuery to validate connections when they are borrowed from the pool.
testOnReturn If true, runs validationQuery to validate connections when they are returned to the pool.
filters Configures a comma-separated list of filters, for example, filters=stat,wall,log4j. Filters are applied in the specified order:
  • stat: Collects performance statistics.
  • wall: Provides SQL firewall filtering.
  • log4j: Sends logs to log4j.
  • slf4j: Sends logs to SLF4J.
  • config: Loads configuration from an external file.
  • encoding: Sets the character encoding for database communication.

Introduction to Main.java code

The Main.java file is the main program of the sample application in this topic. Through this example, you can learn how to use data sources, connection objects, and various database operation methods to interact with a database.

The code in the Main.java file mainly includes the following parts:

  1. Import necessary classes and interfaces.

    1. Declare the package name of the current code as com.example.
    2. Import the Java IOException class to handle input/output exceptions.
    3. Import the Java InputStream class to obtain an input stream from a file or other source.
    4. Import the Java Connection interface to represent a connection to a database.
    5. Import the Java ResultSet interface to represent a dataset of database query results.
    6. Import the Java SQLException class to handle SQL exceptions.
    7. Import the Java Statement interface to execute SQL statements.
    8. Import the Java PreparedStatement interface for precompiled SQL statements.
    9. Import the Java Properties class to process property files.
    10. Import the Java DataSource interface to manage database connections.
    11. Import the Alibaba Druid connection pool's DruidDataSourceFactory class to create a Druid data source.

    Code:

    package com.example;
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.util.Properties;
    import javax.sql.DataSource;
    import com.alibaba.druid.pool.DruidDataSourceFactory;
    
  2. Create a Main class and define the main method.

    Define a Main class and a main method. The main method demonstrates how to use a connection pool to perform a series of operations on a database. The specific steps are as follows:

    1. Define a public class named Main as the program's entry point. The class name must match the file name.

    2. Define a public static method main as the program's entry point, which accepts command-line arguments.

    3. Use exception handling mechanisms to catch and handle potential exceptions.

    4. Call the loadPropertiesFile method to load the property file and return a Properties object.

    5. Call the createDataSource() method to create a data source object based on the configuration in the property file.

    6. Use a try-with-resources statement to obtain a database connection and automatically close it after the connection is no longer needed.

      1. Call the createTable() method to create a table.
      2. Call the insertData() method to insert data.
      3. Call the selectData() method to query data.
      4. Call the updateData() method to update data.
      5. Call the selectData() method again to query the updated data.
      6. Call the deleteData() method to delete data.
      7. Call the selectData() method again to query the data after deletion.
      8. Call the dropTable() method to drop the table.

    Code:

    public class Main {
    
        public static void main(String[] args) {
            try {
                Properties properties = loadPropertiesFile();
                DataSource dataSource = createDataSource(properties);
                try (Connection conn = dataSource.getConnection()) {
                    // Create table
                    createTable(conn);
                    // Insert data
                    insertData(conn);
                    // Query data
                    selectData(conn);
    
                    // Update data
                    updateData(conn);
                    // Query the updated data
                    selectData(conn);
    
                    // Delete data
                    deleteData(conn);
                    // Query the data after deletion
                    selectData(conn);
    
                    // Drop table
                    dropTable(conn);
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    
        // Define methods for retrieving and using configuration information from the property file.
        // Define a method for retrieving data source objects.
        // Define the method for creating a table.
        // Define the method for inserting data.
        // Define the method for updating data.
        // Define the method for deleting data.
        // Define the method for querying data.
        // Define a method for dropping a table.
    }
    
  3. Define methods for retrieving and using configuration information from the property file.

    Define a private static method loadPropertiesFile() to load the properties file and return a Properties object. The specific steps are as follows:

    1. Define a private static method loadPropertiesFile() that returns a Properties object and declares that it may throw an IOException.
    2. Create a Properties object to store the key-value pairs from the properties file.
    3. Use a try-with-resources statement to obtain an input stream is for the properties file db.properties through the class loader.
    4. Use the load method to load the properties from the input stream into the properties object.
    5. Return the loaded properties object.

    Code:

        private static Properties loadPropertiesFile() throws IOException {
            Properties properties = new Properties();
            try (InputStream is = Main.class.getClassLoader().getResourceAsStream("db.properties")) {
                properties.load(is);
            }
            return properties;
        }
    
  4. Define a method to obtain the data source object.

    Define a private static method createDataSource() to create a DataSource object based on the configuration in the properties file, which is used to manage and obtain database connections. The specific steps are as follows:

    1. Define a private static method createDataSource() that takes a Properties object as a parameter and declares that it may throw an Exception.
    2. Call the createDataSource() method of the DruidDataSourceFactory class, pass in the properties properties, and return a DataSource object.

    Code:

        private static DataSource createDataSource(Properties properties) throws Exception {
            return DruidDataSourceFactory.createDataSource(properties);
        }
    
  5. Define a method to create a table.

    Define a private static method createTable() to create a table in the database. The specific steps are as follows:

    1. Define a private static method createTable() that takes a Connection object as a parameter and declares that it may throw an SQLException.
    2. Use a try-with-resources statement to create a Statement object stmt by calling the createStatement() method on the connection object conn.
    3. Define a string variable sql to store the SQL statement for creating the table.
    4. Use the executeUpdate() method to execute the SQL statement and create the table.
    5. Print a success message indicating the table was created.

    Code:

        private static void createTable(Connection conn) throws SQLException {
            try (Statement stmt = conn.createStatement()) {
                String sql = "CREATE TABLE test_druid (id NUMBER, name VARCHAR2(20))";
                stmt.executeUpdate(sql);
                System.out.println("Table created successfully.");
            }
        }
    
  6. Define a method to insert data.

    Define a private static method insertData() to insert data into the database. The specific steps are as follows:

    1. Define a private static method insertData() that takes a Connection object as a parameter and declares that it may throw an SQLException.

    2. Define a string variable insertDataSql to store the SQL statement for inserting data.

    3. Define an integer variable insertedRows with an initial value of 0 to record the number of rows inserted.

    4. Use a try-with-resources statement to create a PreparedStatement object insertDataStmt by calling the prepareStatement() method on the connection object conn and passing the SQL statement for inserting data.

    5. Use a for loop to iterate five times, representing the insertion of five pieces of data.

      1. Use the setInt() method to set the value of the first parameter to the loop variable i.
      2. Use the setString() method to set the value of the second parameter to the string test_insert plus the value of the loop variable i.
      3. Use the executeUpdate() method to execute the SQL statement for inserting data, and accumulate the returned number of rows affected into the insertedRows variable.
    6. Print a success message indicating that the data was inserted, along with the total number of rows inserted.

    7. Return the total number of rows inserted.

    Sample code:

        private static int insertData(Connection conn) throws SQLException {
            String insertDataSql = "INSERT INTO test_druid (id, name) VALUES (?, ?)";
            int insertedRows = 0;
            try (PreparedStatement insertDataStmt = conn.prepareStatement(insertDataSql)) {
                for (int i = 1; i < 6; i++) {
                    insertDataStmt.setInt(1, i);
                    insertDataStmt.setString(2, "test_insert" + i);
                    insertedRows += insertDataStmt.executeUpdate();
                }
                System.out.println("Data inserted successfully. Inserted rows: " + insertedRows);
            }
            return insertedRows;
        }
    
  7. Define a method for updating data.

    Define a private static method named updateData() to update data in the database. The specific steps are as follows:

    1. Define a private static method named updateData() that takes a Connection object as a parameter and declares that it may throw an SQLException.
    2. Use a try-with-resources statement to create a PreparedStatement object pstmt by calling the prepareStatement() method on the connection object conn and passing the SQL statement for updating data.
    3. Use the setString() method to set the value of the first parameter to the string test_update.
    4. Use the setInt() method to set the value of the second parameter to the integer value 3.
    5. Use the executeUpdate() method to execute the SQL statement for updating data, and assign the returned number of rows affected to the updatedRows variable.
    6. Print a success message indicating that the data was updated, along with the total number of rows updated.

    Sample code:

        private static void updateData(Connection conn) throws SQLException {
            try (PreparedStatement pstmt = conn.prepareStatement("UPDATE test_druid SET name = ? WHERE id = ?")) {
                pstmt.setString(1, "test_update");
                pstmt.setInt(2, 3);
                int updatedRows = pstmt.executeUpdate();
                System.out.println("Data updated successfully. Updated rows: " + updatedRows);
            }
        }
    
  8. Define a method for deleting data.

    Define a private static method named deleteData() to delete data from the database. The specific steps are as follows:

    1. Define a private static method named deleteData() that takes a Connection object as a parameter and declares that it may throw an SQLException.
    2. Use a try-with-resources statement to create a PreparedStatement object pstmt by calling the prepareStatement() method on the connection object conn and passing the SQL statement for deleting data.
    3. Use the setInt() method to set the value of the first parameter to the integer value 3.
    4. Use the executeUpdate() method to execute the SQL statement for deleting data, and assign the returned number of rows affected to the deletedRows variable.
    5. Print a success message indicating that the data was deleted, along with the total number of rows deleted.

    Sample code:

        private static void deleteData(Connection conn) throws SQLException {
            try (PreparedStatement pstmt = conn.prepareStatement("DELETE FROM test_druid WHERE id < ?")) {
                pstmt.setInt(1, 3);
                int deletedRows = pstmt.executeUpdate();
                System.out.println("Data deleted successfully. Deleted rows: " + deletedRows);
            }
        }
    
  9. Define a method for querying data.

    Define a private static method named selectData() to query data from the database. The specific steps are as follows:

    1. Define a private static method named selectData() that takes a Connection object as a parameter and declares that it may throw an SQLException.

    2. Use a try-with-resources statement to create a Statement object stmt by calling the createStatement() method on the connection object conn.

    3. Define a string variable sql to store the SQL statement for querying data.

    4. Use the executeQuery() method to execute the SQL statement for querying data, and assign the returned result set to the resultSet variable.

    5. Use a while loop to iterate through each row of data in the result set.

      1. Use the getInt() method to get the integer value of the id field in the current row and assign it to the id variable.
      2. Use the getString() method to get the string value of the name field in the current row and assign it to the name variable.
      3. Print the values of the id and name fields in the current row.

    Sample code:

        private static void selectData(Connection conn) throws SQLException {
            try (Statement stmt = conn.createStatement()) {
                String sql = "SELECT * FROM test_druid";
                ResultSet resultSet = stmt.executeQuery(sql);
                while (resultSet.next()) {
                    int id = resultSet.getInt("id");
                    String name = resultSet.getString("name");
                    System.out.println("id: " + id + ", name: " + name);
                }
            }
        }
    
  10. Define a method for dropping a table.

    Define a private static method dropTable() to drop a table from the database. The specific steps are as follows:

    1. Define a private static method dropTable() that takes a Connection object as a parameter and declares that it may throw an SQLException.
    2. Use a try-with-resources statement to create a Statement object stmt by calling the createStatement() method on the connection object conn.
    3. Define a string variable sql to store the SQL statement for dropping the table.
    4. Use the executeUpdate() method to execute the SQL statement for dropping the table.
    5. Print a message indicating that the table was dropped successfully.

    Sample code:

        private static void dropTable(Connection conn) throws SQLException {
            try (Statement stmt = conn.createStatement()) {
                String sql = "DROP TABLE test_druid";
                stmt.executeUpdate(sql);
                System.out.println("Table dropped successfully.");
            }
        }
    

Complete sample code

pom.xml
db.properties
Main.java
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>druid-oceanbase-client</artifactId>
    <version>1.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.oceanbase</groupId>
            <artifactId>oceanbase-client</artifactId>
            <version>2.4.2</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.2.8</version>
        </dependency>
    </dependencies>
</project>
# Database Configuration
driverClassName=com.oceanbase.jdbc.Driver
url=jdbc:oceanbase://$host:$port/$schema_name
username=$user_name
password=$password

# Connection Pool Configuration
#To check whether the database link is valid, MySQL must be configured to select 1; Oracle is select 1 from dual
validationQuery=select 1 from dual
#Initial number of connections
initialSize=3
#Maximum number of activations, that is, the maximum number of Connection pool
maxActive=30
#When closing the Abandoned connection, the error log is output. When the link is recycled, the console prints information. The test environment can add true, while the online environment is false. Will affect performance.
logAbandoned=true
#Minimum number of activations during idle time
minIdle=5
#The maximum waiting time for a connection, in milliseconds
maxWait=1000
#The maximum time to start the eviction thread is the survival time of a link (previous value: 25200000, the converted result of this time is: 2520000/1000/60/60=7 hours)
minEvictableIdleTimeMillis=300000
#Whether to recycle after exceeding the time limit
removeAbandoned=true
#Exceeding the time limit (in seconds), currently 5 minutes. If any business processing time exceeds 5 minutes, it can be adjusted appropriately.
removeAbandonedTimeout=300
# Run the idle connection collector Destroy thread every 10 seconds to detect the interval time between connections, based on the judgment of testWhileIdle
timeBetweenEvictionRunsMillis=10000
#When obtaining a link, not verifying its availability can affect performance.
testOnBorrow=false
#Check whether the link is available when returning the link to the Connection pool.
testOnReturn=false
#This configuration can be set to true, without affecting performance and ensuring security. The meaning is: Detect when applying for a connection. If the idle time is greater than timeBetweenEviceRunsMillis, execute validationQuery to check if the connection is valid.
testWhileIdle=true
#Default false, if configured as true, connection detection will be performed in the DestroyConnectionThread thread (timeBetweenEvaluation once)
keepAlive=false
#If keepAlive rule takes effect and the idle time of the connection exceeds it, the connection will only be detected
keepAliveBetweenTimeMillis=60000
package com.example;

import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.util.Properties;
import javax.sql.DataSource;
import com.alibaba.druid.pool.DruidDataSourceFactory;

public class Main {

    public static void main(String[] args) {
        try {
            Properties properties = loadPropertiesFile();
            DataSource dataSource = createDataSource(properties);
            try (Connection conn = dataSource.getConnection()) {
                // Create table
                createTable(conn);
                // Insert data
                insertData(conn);
                // Query data
                selectData(conn);

                // Update data
                updateData(conn);
                // Query the updated data
                selectData(conn);

                // Delete data
                deleteData(conn);
                // Query the data after deletion
                selectData(conn);

                // Drop table
                dropTable(conn);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static Properties loadPropertiesFile() throws IOException {
        Properties properties = new Properties();
        try (InputStream is = Main.class.getClassLoader().getResourceAsStream("db.properties")) {
            properties.load(is);
        }
        return properties;
    }

    private static DataSource createDataSource(Properties properties) throws Exception {
        return DruidDataSourceFactory.createDataSource(properties);
    }

    private static void createTable(Connection conn) throws SQLException {
        try (Statement stmt = conn.createStatement()) {
            String sql = "CREATE TABLE test_druid (id NUMBER, name VARCHAR2(20))";
            stmt.executeUpdate(sql);
            System.out.println("Table created successfully.");
        }
    }

    private static int insertData(Connection conn) throws SQLException {
        String insertDataSql = "INSERT INTO test_druid (id, name) VALUES (?, ?)";
        int insertedRows = 0;
        try (PreparedStatement insertDataStmt = conn.prepareStatement(insertDataSql)) {
            for (int i = 1; i < 6; i++) {
                insertDataStmt.setInt(1, i);
                insertDataStmt.setString(2, "test_insert" + i);
                insertedRows += insertDataStmt.executeUpdate();
            }
            System.out.println("Data inserted successfully. Inserted rows: " + insertedRows);
        }
        return insertedRows;
    }

    private static void updateData(Connection conn) throws SQLException {
        try (PreparedStatement pstmt = conn.prepareStatement("UPDATE test_druid SET name = ? WHERE id = ?")) {
            pstmt.setString(1, "test_update");
            pstmt.setInt(2, 3);
            int updatedRows = pstmt.executeUpdate();
            System.out.println("Data updated successfully. Updated rows: " + updatedRows);
        }
    }

    private static void deleteData(Connection conn) throws SQLException {
        try (PreparedStatement pstmt = conn.prepareStatement("DELETE FROM test_druid WHERE id < ?")) {
            pstmt.setInt(1, 3);
            int deletedRows = pstmt.executeUpdate();
            System.out.println("Data deleted successfully. Deleted rows: " + deletedRows);
        }
    }

    private static void selectData(Connection conn) throws SQLException {
        try (Statement stmt = conn.createStatement()) {
            String sql = "SELECT * FROM test_druid";
            ResultSet resultSet = stmt.executeQuery(sql);
            while (resultSet.next()) {
                int id = resultSet.getInt("id");
                String name = resultSet.getString("name");
                System.out.println("id: " + id + ", name: " + name);
            }
        }
    }

    private static void dropTable(Connection conn) throws SQLException {
        try (Statement stmt = conn.createStatement()) {
            String sql = "DROP TABLE test_druid";
            stmt.executeUpdate(sql);
            System.out.println("Table dropped successfully.");
        }
    }
}

References

For more information about OceanBase Connector/J, see OceanBase JDBC Driver.

Previous topic

Connect to OceanBase Cloud by using Commons Pool
Last

Next topic

Connect to a cluster by using the OBKV-HBase client
Next
on this page
Prerequisites
Procedure
Step 1: Import the druid-oceanbase-client project into Eclipse
Step 2: Modify the database connection information in the druid-oceanbase-client project
Step 3: Run the druid-oceanbase-client project
Sample project overview
Introduction to pom.xml code
Introduction to db.properties
Introduction to Main.java code
Complete sample code
References