This topic describes how to create and manage tenants in the OceanBase console.
Concepts
Tenant: A tenant is a subset of OceanBase cluster resources. It is a logical concept, similar to an instance in MySQL or Oracle. A tenant is the foundation for managing database objects and resources. It serves as a container for various database objects and resources, such as CPU, memory, and I/O. OceanBase Database uses tenants to achieve resource isolation. It adopts a single-cluster, multi-tenant management model where resources and data are isolated between tenants. Each tenant has a set of computing and storage resources and provides a complete and independent database service. For more information, see Multi-tenant architecture.
Resource unit (Unit): A resource unit specifies the available resources, such as memory, CPU, and I/O, for a tenant on a node. A resource unit is also a basic unit for cluster load balancing. When nodes are brought online or offline, or when the cluster is scaled out or in, the distribution of resource units on the nodes is dynamically adjusted to balance resource usage. For more information, see Manage resources.
Prerequisites
You have created a cluster instance. For more information, see Purchase an instance.
Limits
The maximum number of tenants that can be created in a single cluster instance is calculated based on the following rule:
Maximum number of tenants = min(Number of CPU cores on a single cluster node × Number of cluster nodes, Maximum number of tenants allowed in the cluster). The maximum number of tenants allowed in a cluster is 50.
In a 2F scenario, a cluster instance supports a maximum of 32 tenants. In a 3F scenario, a cluster instance supports a maximum of 50 tenants.
Procedure
Log on to the OceanBase console .
In the navigation pane on the left, click Instance List.
In the instance list, find the target cluster instance and click its name to go to the Cluster Instance Workspace.
In the upper-right corner of the page, click Create Tenant.

Set the parameters for the tenant.
Configuration parameters
Description
Tenant Name
Specify a name for the tenant.
The name must be 2 to 64 characters in length. It can contain Chinese characters, digits, letters, underscores (_), and hyphens (-). The name is case-sensitive and must start with a letter or an underscore. It cannot be set to sys.
Tenant Mode
Set the mode to Oracle or MySQL.
NoteFor Standard Edition (Key-Value) cluster instances, you can only create tenants in MySQL mode.
Parameter Template
Four parameter templates are available. For more information about the specific parameters and variables, see Parameter template descriptions.
NoteParameter template configuration is supported only for newly created OceanBase V4.3.3 and later versions.
OLTP Simple Transaction: Suitable for core systems such as online order trading and payment systems, and Internet services that involve high-concurrency point queries. The SQL statements executed are simple and require fast responses. OLTP is short for online transactional processing.
OLTP Complex Transaction: Suitable for online trading systems with complex transactions. Scenarios include complex join calculations, subqueries, and batch jobs written in PL. Long-running transactions and large transactions may exist. If this cluster instance is dedicated to OLTP workloads, optimize the large query policy parameter
large_query_thresholdfor the cluster. Change its value from the default 600s to 5s.HTAP Mixed Workload: Suitable for mixed workloads that run both transactions and online analytics. This template provides OLTP capabilities and uses vectorization to improve computing performance in online analysis scenarios. HTAP is short for hybrid transactional and analytical processing.
OLAP Online Analytics: Suitable for real-time data warehouse scenarios that involve online analytical processing (OLAP). By default, tables are created in a columnar storage format. A more optimized vectorized engine is used to improve computing performance in complex analysis scenarios. If this cluster instance is dedicated to OLAP scenarios, optimize the system variables and cluster parameters. For example, enable adaptive parallel computing, optimize memory space for SQL sorting, and configure settings for SQL and transaction timeouts and the large query policy. Also, set the tenant character set to
utf8mb4_bin.
Character Set
Select a character set for the database.
Tenants in MySQL mode support the following character sets:
utf8mb4_general_ci
utf8mb4_bin
utf8mb4_unicode_ci
utf16_general_ci
utf16_bin
utf16_unicode_ci
gbk_chinese_ci
gbk_bin
gb18030_chinese_ci
gb18030_bin
binary
Tenants in Oracle mode support the following character sets:
utf8
gbk
NoteFor Standard Edition (Key-Value) cluster instances, only the utf8mb4 character set is supported for new tenants. This setting cannot be changed.
Table Name Case Sensitivity
Specify whether table names are case-sensitive.
NoteThis parameter is required when Tenant Mode is set to MySQL. By default, table names are not case-sensitive.
This setting cannot be changed after the tenant is created.
Time Zone
Specify the time zone information.
Number of Resource Units
Specify the number of resource units for the tenant.
To increase the number of units, you must first scale out the cluster nodes. For more information, see Add or remove nodes.
Allocated Resources
Specify the amount of CPU and memory for the tenant on a single node. Click More Advanced Configurations to set the available input/output operations per second (IOPS) and log disk size for the tenant.
NoteOnly tenants of OceanBase Database V4.x support setting the log disk size.
Only tenants of OceanBase Database V4.2.5 and later versions support setting the available IOPS.
Cluster instances of OceanBase Database V3.x and V4.x support the creation of tenants with 1 core and 4 GB of memory.
The total CPU and memory size of all tenants cannot exceed the specifications of the cluster instance. For V4.x versions, the total log disk size of all tenants cannot exceed the log disk capacity of the cluster.
Total available resources for a tenant = Resources allocated on a single node × Number of nodes for resource distribution × Number of replicas
VPC Network for Primary Endpoint
Select the ID of the virtual private cloud (VPC) where the database instance resides. Use the VPC where your business or application is located to reduce access latency.
If no suitable VPC is available, follow the on-screen instructions to create one. For more information, see What is a virtual private cloud (VPC)?.
Primary Zone for Tenant
Select the primary zone for the tenant. You can select multiple primary zones.
Primary Zone for Primary Endpoint
Select the zone where the primary endpoint agent is deployed.
NoteIf the zone of the primary endpoint agent is different from the primary data zone, there is a risk of data latency.
VSwitch for Primary Endpoint
Select the ID of the vSwitch to which the primary endpoint is bound. You can view the number of available private IP addresses. If the number of available private IP addresses is 0, you must select a new VPC and vSwitch.
If no suitable vSwitch is available, follow the on-screen instructions to create one. For more information, see Create and manage vSwitches.
Tenant Whitelist
The whitelist groups of the cluster instance are automatically synchronized to the tenant. Modifications to the cluster instance whitelist apply to all tenants in the cluster. You can add other whitelist groups for the tenant later. For more information, see Configure a whitelist group for a tenant.
Remarks (Optional)
The remarks cannot exceed 30 characters in length.
Click Create. You can view the creation progress of the tenant on the Instance List page.