OceanBase logo

OceanBase

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

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

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

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

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

About OceanBase

Partner

Trust Center

Contact Us

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

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

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

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

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

Practical guides for utilizing OceanBase more effectively and conveniently

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

About OceanBase

Partner

Trust Center

Contact Us

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

OceanBase Database

KV - V4.3.5

  • OBKV overview
  • Architecture
  • OBKV-Table
    • Introduction to OBKV-Table
      • Overview
      • OBKV-Table operation types
      • Core features of OBKV-Table
      • Differences between replace and insert_or_update
      • Supported value types
      • OBKV-Table data models
    • Use the OBKV-Table Java client
      • Java development guide for OBKV-Table
      • Prepare for development with OBKV-Table
      • Use the OBKV-Table Java client to connect to a cluster
      • Set client parameters
      • Supported client interfaces
      • Use the OBKV-Table Java client
    • Use the OBKV-Table GO client
      • Use the OBKV-Table Go client to connect to a cluster
      • Overview of the Go client
      • Individual API operations
      • Batch operations
      • About queries
      • Aggregation API
      • Filters
    • FAQ
  • OBKV-HBase
    • Overview
    • OBKV-HBase core features
    • Compatibility with HBase
    • Deployment
    • Application development with OBKV-HBase
      • Overview of OBKV-HBase application development
      • Data model
      • Data model design
      • Connect to a cluster using the OBKV-HBase client
      • Migrate HBase business code to OBKV-HBase
      • Data operation examples
      • Delete expired data
    • OBKV-HBase migration guide
    • OBKV-HBase management
      • Overview
      • High availability
      • Security and permissions
      • Monitoring metrics
    • Performance test
    • OBKV-HBase integrations
      • Flink
        • Synchronize data to OBKV-HBase by using Flink
    • Views
    • FAQ

Download PDF

OBKV overview Architecture Overview OBKV-Table operation types Core features of OBKV-Table Differences between replace and insert_or_update Supported value types OBKV-Table data models Java development guide for OBKV-Table Prepare for development with OBKV-Table Use the OBKV-Table Java client to connect to a cluster Set client parameters Supported client interfaces Use the OBKV-Table Java client Use the OBKV-Table Go client to connect to a cluster Overview of the Go client Individual API operations Batch operations About queries Aggregation API Filters FAQ Overview OBKV-HBase core features Compatibility with HBase Deployment Overview of OBKV-HBase application development Data model Data model design Connect to a cluster using the OBKV-HBase client Migrate HBase business code to OBKV-HBase Data operation examples Delete expired data OBKV-HBase migration guide Overview High availability Security and permissions Monitoring metrics Performance test Views FAQ
OceanBase logo

The Unified Distributed Database for the AI Era.

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

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. KV
  4. V4.3.5
iconOceanBase Database
KV - V 4.3.5
SQL
KV
  • V 4.3.5

Prepare for development with OBKV-Table

Last Updated:2025-12-17 07:17:30  Updated
share
What is on this page
General preparations
Create a tenant
Create a database
Create a table
Create a user
Additional preparations for direct connection mode
Create a system tenant user and grant access privileges to the routing table

folded

share

This topic explains the essential steps required before you start development with OBKV-Table. Before you use the OBKV-Table client to access a cluster, you need to create a tenant, database, table, and user. OBKV-Table supports two connection modes: direct connection and OceanBase Database Proxy (ODP). Additional setup requirements vary depending on the connection mode you choose.

Notice

OBKV-Table supports only Java clients.

General preparations

Create a tenant

For more information, see Create a tenant.

Create a database

For more information, see Create a database.

Create a table

For more information, see Create a table.

Create a user

For more information, see Create a user.

Additional preparations for direct connection mode

Create a system tenant user and grant access privileges to the routing table

In direct connection mode, the OBKV-Table client retrieves partition routing information for user tables by accessing the routing table. In OceanBase, only users under the SYS tenant have privileges to access the routing table. You need to create a user under the SYS tenant and grant this user the necessary privileges. The root user has routing table access by default.

Create a user

For more information, see Create a user.

Here is an example of how to create a user named test_sys_user with minimal database privileges.

  1. Use the root user to connect to the SYS tenant by using obclient.

    -h specifies the host address.
    -u specifies the username.
    -P specifies the port.
    -p specifies the password.
    -c specifies not to use the auto-completion feature, which can improve the connection speed and reduce unnecessary system resource consumption.
    -A specifies to connect to the cluster.
    -D specifies to connect to the SYS tenant.
    obclient -h10.10.10.1 -uroot@$obkvcluster -P2883 -p****** -c -A -D SYS
    
  2. Create a user.

    CREATE USER 'test_sys_user'@'%' IDENTIFIED BY 'test_sys_password';
    

Grant access privileges to the routing table

The user needs SELECT privilege on the following routing tables:

  • __all_virtual_table
  • __all_virtual_proxy_schema
  • __all_tenant
  • __all_virtual_proxy_partition_info
  • __all_virtual_proxy_partition
  • __all_server
  • __all_virtual_proxy_sub_partition
  • __all_virtual_proxy_server_stat
  • DBA_OB_SERVERS
  • DBA_OB_ZONES
  • CDB_OB_TABLEGROUP_TABLES
  • DBA_OB_TENANTS
  • CDB_OB_TABLET_TO_LS

After you connect to the database as the SYS tenant, grant the SELECT privilege on the specified routing tables to the test_sys_user user.

GRANT SELECT ON oceanbase.__all_virtual_table TO test_sys_user;
GRANT SELECT ON oceanbase.__all_virtual_proxy_schema TO test_sys_user;
GRANT SELECT ON oceanbase.__all_tenant TO test_sys_user;
GRANT SELECT ON oceanbase.__all_virtual_proxy_partition_info TO test_sys_user;
GRANT SELECT ON oceanbase.__all_virtual_proxy_partition TO test_sys_user;
GRANT SELECT ON oceanbase.__all_server TO test_sys_user;
GRANT SELECT ON oceanbase.__all_virtual_proxy_sub_partition TO test_sys_user;
GRANT SELECT ON oceanbase.__all_virtual_proxy_server_stat TO test_sys_user;
GRANT SELECT ON oceanbase.DBA_OB_SERVERS TO test_sys_user;
GRANT SELECT ON oceanbase.DBA_OB_ZONES TO test_sys_user;
GRANT SELECT ON oceanbase.CDB_OB_TABLEGROUP_TABLES TO test_sys_user;
GRANT SELECT ON oceanbase.DBA_OB_TENANTS TO test_sys_user;
GRANT SELECT ON oceanbase.CDB_OB_TABLET_TO_LS TO test_sys_user;

Previous topic

Java development guide for OBKV-Table
Last

Next topic

Use the OBKV-Table Java client to connect to a cluster
Next
What is on this page
General preparations
Create a tenant
Create a database
Create a table
Create a user
Additional preparations for direct connection mode
Create a system tenant user and grant access privileges to the routing table