Tenants lay the foundation for database object management and resource management. They serve as containers for both database objects and resources such as CPU, memory, and I/O resources. You can create and manage tenants in the ApsaraDB for OceanBase console.
Prerequisites
You have created a cluster instance. For more information, see Purchase an instance.
Limitations
You can calculate the maximum number of tenants that can be created under a single cluster instance according to the following rules:
Maximum number of tenants = min (number of CPUs per cluster node * number of cluster nodes, maximum number of tenants allowed by the cluster), where the maximum number of tenants allowed by the cluster is 50.
In the 2F (two full-featured replicas) scenario, a cluster instance supports the creation of up to 32 tenants; in the 3F (three full-featured replicas) scenario, a cluster instance supports the creation of up to 50 tenants.
Procedure
Log in to the ApsaraDB for OceanBase console.
In the left-side navigation pane, click Instances.

In the instance list, click the name of the target cluster instance to go to the Cluster Instance Workspace page.
In the upper-right corner of the page that appears, click Create Tenant.
Configure the tenant parameters as needed.
Parameter
Description
Tenant Name
The name of the tenant.
The name must be 2 to 64 characters in length and can contain Chinese characters, digits, letters, underscores (_), and hyphens (-). The name is case-sensitive and must start with a letter or underscore. It cannot be set to sys.
Tenant Mode
The tenant mode, which can be Oracle or MySQL.
Parameter Template
The ApsaraDB for OceanBase console provides four different parameter templates. For more information about the parameters and variables, see Parameter templates.
NoteYou can configure a parameter template only for OceanBase Database V4.3.3 and later.
Simple OLTP: suitable for core systems for Internet businesses that require point queries with high concurrency, such as online order transactions and payments. The SQL statements executed are simple, ensuring a fast response speed.
Complex OLTP: suitable for online transaction systems with complex transactions. This includes handling long-running and large transactions that involve complex joins, subqueries, and batch jobs written in PL. If a cluster instance is dedicated for online transaction processing (OLTP) workloads, we recommend that you optimize the value of the
large_query_thresholdparameter from the default 600 seconds to 5 seconds.HTAP: suitable for systems that simultaneously run OLTP and online analytical processing (OLAP) workloads for improved performance in online analysis though a vectorized engine.
OLAP: suitable for real-time data warehouses that require OLAP. By default, tables created use columnar storage and an optimized vectorized engine to enhance performance for complex analysis. If a cluster instance is dedicated for OLAP workloads, we recommend that you optimize system variables and cluster parameters. This includes enabling adaptive parallel computation, optimizing SQL sort memory, configuring timeout settings for SQL statements and transactions, and adjusting large query strategies. We also recommend that you use the character set
utf8mb4_binfor tenants.
Character Set
The character set of the database.
The following character sets are supported for a MySQL tenant:
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
The following character sets are supported for an Oracle tenant:
utf8
gbk
NoteWhen you create a tenant in a Standard Edition (Key-Value) cluster instance, only the utf8mb4 character set is supported and cannot be modified.
Table Name Case Sensitivity
Specifies whether table names are case-sensitive.
NoteYou must configure this parameter when Tenant Mode is set to MySQL. By default, table names are case-insensitive.
This parameter cannot be modified after the tenant is created.
Time Zone
The time zone of the tenant.
Number of Units
The number of resource units for the tenant.
To increase the number of resource units for a tenant, you must first add nodes to the cluster. For more information, see Add or delete nodes.
Allocated Resources
The number of CPU cores and size of memory for the tenant on a single node. You can expand More Advanced Settings to set the available IOPS and log disk size for the tenant.
NoteYou can specify the log disk size for a tenant only in OceanBase Database V4.x.
You can specify the available IOPS for a tenant only in OceanBase Database V4.2.5 and later.
You can create a tenant with specifications of 1C4G (1 CPU core and 4 GB of memory) in a cluster instance of OceanBase Database V3.x and V4.x.
The sum of the CPU and memory resources of all tenants in a cluster instance cannot exceed the specifications of the cluster instance. In ApsaraDB for OceanBase V4.x, the sum of the log disk sizes of all tenants cannot exceed the log disk capacity of the cluster.
Total available resources of a tenant = Single-node resources × Number of resource distribution nodes × Number of replicas
Primary Endpoint VPC
The ID of the VPC where the database instance resides. We recommend that you use the VPC where your business or application resides to effectively reduce the access latency.
If no suitable VPC is available, create a VPC as prompted. For more information, see What is a VPC?
Tenant Primary Zone
The primary zone of the tenant. You can select multiple primary zones.
Primary Zone of Primary Endpoint
The zone where the primary address proxy of the tenant is deployed.
NoteIf the zone for the primary address proxy and the data primary zone are different, data latency exists.
Primary Endpoint vSwitch
The ID of the vSwitch to which the primary address is bound. You can view the number of available private IP addresses. When the number of available private IP addresses is 0, you must select another VPC and vSwitch.
If no appropriate vSwitch is available, create one as prompted. For more information, see Create and manage vSwitches.
Tenant Whitelist
The allowlists of the tenant, which are automatically synchronized from the cluster instance. The allowlist modifications made in the cluster instance take effect for all tenants in the cluster instance. You can add more allowlists for the tenant later. For more information, see Set tenant allowlists.
Remarks (Optional)
Additional information about the tenant. The remarks cannot exceed 30 characters in length.
Click Create. You can view the tenant creation progress on the Instances page.