A tenant is a container for database objects and resources such as CPU, memory, and I/O. You can create a primary tenant in a cluster based on your business requirements.
Prerequisites
Make sure that the current login user in the OCP console has the following permissions:
- The Cluster Management resource permission.
- The Overview menu permission.
The created tenant must belong to the main cluster and the cluster status must be "Running".
(Optional) You have created a parameter template. For more information, see Manage tenant parameter templates.
If you need to create multiple tenants with the same parameter configurations, you can use a parameter template to avoid the need to repeatedly configure the same parameters.
Before you select to enable arbitration for the tenant, make sure that the following conditions are met:
The tenant's cluster has added arbitration service and the arbitration service is in the RUNNING state.
The tenant to which you want to enable arbitration has the Locality value of 2F (F: full feature replicas) or 4F.
The remaining resources on the host where the arbitration service is located are sufficient to meet the resource requirements.
You can modify the resource requirements in the system parameters. For more information, see Modify system parameters.
ocp.arbitration.min.remain.disk.size: specifies the minimum size of the CLOG disk on the arbitration service host when you enable tenant arbitration. The unit is MB. The format (a,b) specifies the values for 2F and 4F tenant replicas respectively. Default value: [12,24].ocp.arbitration.max.cpu.used.percentage: specifies the maximum CPU usage on the arbitration service host when you enable tenant arbitration. The unit is %, default value: 90.ocp.arbitration.max.memory.used.percentage: specifies the maximum memory usage on the arbitration service host when you enable tenant arbitration. The unit is %, default value: 90.
If the tenant's OceanBase cluster version is earlier than V4.2.1.7, V4.2.2 to V4.2.4, or V4.3.0 to V4.3.2, when you use RHEL 8 or later, make sure that the host where OBServer is located has created a soft link for Python. You can run the
ln -s /usr/bin/python3 /usr/bin/pythoncommand for reference.- (-∞, V4.2.1.7)
- [V4.2.2, V4.2.4)
- [V4.3.0, V4.3.2)
Procedure
Log in to the OCP console.
In the left-side navigation pane, click Tenant. The Tenants page automatically appears.
On the Tenants page, click Create Tenant.

On the Basic Settings tab, specify the following parameters. The following table describes the parameters.
ParameterDescriptionTenant Type Select Primary Tenant. Description
If the version of the cluster to which the tenant belongs is earlier than V4.2, you cannot select the tenant type. The default value is the primary tenant.Cluster Select the cluster to which the tenant belongs. Description
If you create a primary tenant on the tenant management page of the specified cluster, the default value is the specified cluster.Tenant Name The tenant name must start with an English letter and end with an English letter or a number. The name can contain English letters, numbers, and underscores. The length must be 2 to 32 characters. Administrator Password The password of the tenant administrator. Random passwords are supported. - For the MySQL mode, the administrator account is root.
- For the Oracle mode, the administrator account is SYS.
- The length must be 8 to 32 characters.
- At least three of the following four types of characters must be included: numbers (0-9), uppercase letters (A-Z), lowercase letters (a-z), and special characters. The supported special characters are
~!@#%^&*_-+=|(){}[]:;,.?/.
Character Set and Encoding - For the MySQL mode, the available character sets are binary, utf8mb4, gbk, gb18030, latin1, gb18030_2022, ascii, and tis620. The default value is utf8mb4.
- For the Oracle mode, the available character sets are utf8mb4, gbk, and gb18030. The default value is utf8mb4.
Collation The detailed collation corresponding to the character set. Service Name Optional. OceanBase Database provides a new database access method through service names, which can be considered an alias for the cluster name and tenant name. Applications can access databases through service names. For more information about service names, see Manage service names. - The service name must start with an English letter, contain English letters, numbers, and underscores, and be 2 to 64 characters in length.
- To configure a service name for the tenant, the following version requirements must be met:
- OceanBase Database: V4.2.1.9, [V4.2.4.0, V4.3.0.0), and [V4.3.3.0, +∞).
- OBProxy: [V4.3.1.0, +∞).
Remarks Optional. The remarks. Load Type You can select a load type for the tenant. To avoid affecting the database performance, select a load type based on your actual load. The following table describes the load types. - Express OLTP: This load type applies to trade and payment core systems and high-throughput Internet applications. It does not have limitations on foreign keys, does not support stored procedures, does not support long transactions, does not support large transactions, does not support complex joins, and does not support complex subqueries.
Version restriction: This load type applies to OceanBase Database V4.2.5 and later. - HTAP: This load type applies to hybrid OLAP and OLTP workloads. It is usually used to obtain insights from active operational data, fraud detection, and personalized recommendations.
Version restriction: This load type applies to OceanBase Database V4.2.5 and later. - OLAP: This load type applies to real-time data warehouse analysis scenarios.
Version restriction: This load type applies to OceanBase Database V4.3.0 and later. - Complex OLTP: This load type applies to bank and insurance systems. These systems usually have complex joins, complex correlated subqueries, PL-based batch jobs, long transactions, and large transactions. Parallel execution is sometimes used for queries that run for a short time.
Version restriction: This load type applies to OceanBase Database V4.2.5 and later. - OBKV: This load type applies to key-value workloads and wide-column workloads similar to HBase. These workloads usually have very high throughput and are sensitive to latency.
Version restriction: This load type applies to OceanBase Database V4.2.5 and later.
Note
- We recommend that you set the load type of the tenant to the same value as that of the cluster to which the tenant belongs.

On the Replica Settings tab, specify the following parameters.
By default, the system displays a list of configurable zones based on the zones of the cluster to which you want to add the tenant. If a zone does not require a replica, click the delete icon next to the zone to delete the zone entry. The following table describes the parameters.
ParameterDescriptionReplica Type Select multiple all-purpose replicas to ensure that the majority of the replicas are all-purpose. - All-purpose replica: A general-purpose replica that supports all features such as transaction logs, MemTables, and SSTables. It can quickly switch to a leader to provide services.
- Read-only replica: A replica that contains complete logs, MemTables, and SSTables. It does not participate in Paxos voting as a member but serves as an observer to catch up with the logs of the Paxos members and replay the logs locally.
- Log replica: A replica that contains only logs. It does not contain MemTables or SSTables. It participates in log voting and provides log services. It can participate in the restore of other replicas but cannot become a leader to provide database services.
- Read-only column store replica: A replica that does not participate in Paxos voting. All baseline data of user tables is stored only in column store format. It supports only read operations and adapts to TP-enhanced hybrid workloads (near-real-time decision analysis).
When you select a read-only column store replica, the OceanBase cluster must be associated with at least two OBProxy clusters to ensure that there is an independent OBProxy cluster for forwarding client requests related to read-only column store. The OBProxy cluster must be V4.3.2 or later and must meet the following parameter requirements:alter proxyconfig set route_target_replica_type='ColumnStore';alter proxyconfig set proxy_route_policy='TARGET_REPLICA_TYPE_FOLLOWER_ONLY';alter proxyconfig set init_sql='set @@ob_route_policy = COLUMN_STORE_ONLY';alter proxyconfig set obproxy_read_only=0;alter proxyconfig set obproxy_read_consistency=1;
Note
- When the cluster is a distributed cluster of V4.3.3 or later, Full-featured Replica, Read-only Replica, and Read-only Columnstore Replica are supported.
- When the cluster is a distributed cluster of V4.2.0 or later but earlier than V4.3.3, Full-featured Replica and Read-only Replica are supported.
- When the cluster is a distributed cluster of V4.0.0 or later but earlier than V4.2.0, only Full-featured Replica is supported.
- When the cluster is a distributed cluster of V3.x, Full-featured Replica, Read-only Replica, and Log Replica are supported.
- When the database of the tenant is Standalone Centralized, only Full-featured Replica is supported.
Unit Specifications OCP provides a list of unit specifications. Select one from the list or click Add Specification at the bottom of the list to add a custom specification. Notice
- We recommend that you set the same unit specification and quantity for all-purpose replicas. Different unit specifications and quantities may cause performance or stability issues.
- When the cluster to which the tenant belongs is V4.0.0 or later, the following settings are not supported: setting different unit quantities for different zones and setting a unit quantity less than 1 for a zone. All zones must have the same unit quantity (1 by default).
Units Specifies the number of units in the zone. The unit quantity cannot exceed the number of servers in the zone. - When the cluster to which the tenant belongs is V4.0 or later, the following settings are not supported: setting different unit quantities for different zones and setting a unit quantity less than 1 for a zone. All zones must have the same unit quantity (1 by default).
- When the cluster to which the tenant belongs is earlier than V4.0, multiple zones can have different unit quantities.
Note
When the database of the tenant is Standalone Centralized, the unit quantity is 1 by default and cannot be modified.
Zone Priority Rankings Specifies whether to set the priority of zones for the tenant. The priority setting affects the primary zone of the sys tenant. - If no priority is specified, the default priority is inherited from the sys tenant.
- If you enable "Zone Priority Sorting" but do not specify any zone priorities, the default priority is random.
- To specify zone priorities, you can move one or more zones from the left-side list to the right-side list. The left-side list displays all zones of the cluster. By default, the zones that are selected first have a higher priority than those that are selected later. The priorities of multiple zones that are selected at the same time are the same. After the zones are moved to the right-side list, you can drag them to adjust the order. The zones at the top of the list have a higher priority than those at the bottom.
Note
When the database of the tenant is Standalone Centralized, zone priority sorting is not displayed. The default priority is Zone1.
Enable Arbitration Service Specifies whether to enable the arbitration service for the tenant. The default value is disabled. 
On the Security Settings tab, specify the following parameters.
All IP addresses are allowed: All IP addresses can access the tenant.
Notice
There is a security risk in this method. Proceed with caution.
Custom: Specify the list of allowed client IP addresses. Supported formats include IP address, subnet/mask, fuzzy match, mixed formats, and special notes. Example:
FormatExampleIP Address xxx.xxx.xxx.1,xxx.xxx.xxx.2 Subnet/Mask xxx.xxx.xxx.1/24 Fuzzy Match xxx.xxx.xxx.% or xxx.xxx.xxx._ Mixed Formats xxx.xxx.xxx.1,xxx.xxx.xxx.2,xxx.xxx.xxx.%,xxx.xxx.xxx._,xxx.xxx.xxx.1/24 Special Notes % indicates that all clients can connect. Notice
The IP address of the OCP server and the IP address of the OBProxy on which OCP relies must be in the list. Otherwise, OCP cannot manage the tenant.

Go to the Parameter Configuration module and configure the tenant parameters.
If you set a load type on the Basic Settings tab, the system will use the corresponding parameter template by default.
You can click ① in the figure to add each startup parameter and set its value.
You can also click ② in the figure and select a parameter template from the drop-down list Select Parameter Template. The system will automatically fill in the parameters in the template and the configuration. If no tenant parameter template is created, you can click Create Tenant Template to create a tenant parameter template. For more information, see Manage tenant parameter templates.
The system provides the following four built-in templates, which contain commonly used parameter settings. You can directly apply the templates for cluster initialization. The following table describes the built-in templates.
TemplateDescriptionDefault Parameter Template for Complex OLTP This template applies to the Complex OLTP load type and is only supported in OceanBase Database V4.2.5 and later. Default Parameter Template for HTAP This template applies to the HTAP load type and is only supported in OceanBase Database V4.2.5 and later. Default Parameter Template for OLAP This template applies to the OLAP load type and is only supported in OceanBase Database V4.3.0 and later. Default Parameter Template for Express OLTP This template applies to the Express OLTP load type and is only supported in OceanBase Database V4.2.5 and later.
Note
If your tenant mode is MySQL and the parameter template contains only Oracle-defined parameters, you need to delete these parameters after the template is filled in.

Click Submit. The system displays a message indicating that the Tenant creation task submitted. task is submitted. On this page, you can view the task information.
To view the task details, click View Task Details. On the page that appears, you can view the execution progress of the task.
You can also click Return to Tenants List to return to the tenants page. On the tenants page, you can view the creation status and task details of the new tenant and delete a tenant that failed to be created.

Note
The tenant is created successfully when the task status is Completed and the status of the new tenant is Running in the Tenants list on the Cluster Management page.
