This section describes common issues related to OceanBase tenant management.
Feature support
Q1: Can I rename a tenant?
A: Yes, OCP V4.3.2 supports the tenant renaming feature. For more information, see Rename a tenant.
Q2: Can I control the concurrent business traffic of a tenant in OCP?
A: No, there is no plan to support this feature.
Q3: If the password of the sys tenant created by using OCP is lost, can I retrieve it?
A: Yes. For OCP V2.5.1 and earlier, you can obtain the ciphertext from the Password Box of OCP and contact Technical Support to obtain the decryption method. For OCP V2.5.1 and later, you can reset the password. We recommend that you reset the password.
Display issues
Q1: After I click TopSQL of a tenant, the corresponding page does not appear. What is the reason?
A: We recommend that you upgrade your browser to Chrome 88.
Tenant management
Q1: What is a reasonable value for the number of connections of a single OceanBase tenant?
A: The number of connections for a tenant of OceanBase Database does not have practical significance. It only affects alerts in OCP. The meaningful value is the maximum number of single-machine connections of OBS, which is 256,000.
Q2: An OceanBase cluster has three zones. After I use OCP to delete a replica of a tenant, an error Operation on OB failed. Error message: tenant already exists is reported when I add a new replica for the tenant. How do I solve this issue?
A: The replica deletion is performed by calling the drop resource pool command in OceanBase Database. However, after the resource pool is deleted, the units in the resource pool are asynchronously deleted. When a new replica is added, the error tenant already exists is reported because the units in the tenant are not deleted. You can wait until the units are deleted and then retry the operation.
You can observe whether the units are deleted by using one of the following methods:
- If OceanBase Database is V4.0.0.0 or later, query the
GV$OB_UNITSview. If the view does not contain data about the units, the units are deleted. - If OceanBase Database is earlier than V4.0.0.0, you can query the
__all_virtual_partition_infoview to check whether the tenant replicas exist on the server to determine whether the units are deleted.
Q3: If only a read-only role is granted in OCP, can I manage the unit specifications?
A: Currently, read-only users can perform some non-destructive operations. Whether to disable the modification permission for read-only users is still under discussion in future designs.
Q4: Why is the tenant recycle bin disabled by default in OCP, which is different from earlier versions?
A: The default configuration is modified in the kernel. Enabling the recycle bin may cause some issues in OceanBase Database.
Q5: Why does the tenant resource management page still display deleted databases?
A: This table is refreshed on a daily basis, so the data is not updated in real time.
Q6: What do I do if I create a tenant specification by mistake?
A: Run the DELETE FROM ob_unit_spec WHERE `name` = 'test' AND type = 'CUSTOM'; statement in the MetaDB database, where test is the name of the specification.
Q7: After I change the tenant name on the GUI, OCP displays that the tenant is unavailable and sends relevant alerts. What is the cause and solution?
A: After you change the tenant name on the GUI, OCP cannot recognize the tenant name and displays that the tenant is unavailable and sends relevant alerts. You can change the tenant name back to the original name on the GUI using the same method, and then use the Rename a tenant feature provided by OCP.
Create and drop a tenant
Q1: How do I create an Oracle tenant that uses the gbk character set?
A: Run the vi /home/admin/obztools_agent/src/task/obauto_plus/ob_operate_plus.py command to modify the ob_operate_plus.py file.
def create_tenant(tenant_name, primary_zone, resource_pool_list, obregion_name, rs_list=[], white_list='%', locality=None, tenant_mode=None):
if primary_zone is None or 0 == len(primary_zone):
sql_tenant = "create tenant {0} resource_pool_list=('{1}')".format(tenant_name, "', '".join(resource_pool_list))
else:
sql_tenant = "create tenant {0} primary_zone='{1}',resource_pool_list=('{2}')".format(tenant_name, primary_zone, "', '".join(resource_pool_list))
if locality is not None:
sql_tenant += ", locality='{0}'".format(locality)
# create_tenant function: add this line to set the gbk character set.
sql_tenant += ", charset=gbk"
Q2: Why does the tenant status remain TENANT_STATUS_DROPPING after I drop a tenant on the CLI?
A: After you drop a tenant on the CLI, the tenant remains in the TENANT_STATUS_DROPPING state for about 7 days.
Manage tenant resources
Q1: How do I scale out a tenant?
A: On the Overview page of the tenant, you can scale out the tenant replicas by adjusting the unit specifications or the number of units in the current zone.
Q2: When I scale down a tenant, can I delete a specific unit?
A: No, the administrator selects the unit to delete. On the Topology page of the tenant, select the unit and delete it.
Q3: What causes the task to fail at the Wait alter resource... step when I reduce the number of tenant units?
A: Contact OceanBase Database Technical Support.
Q4: What does the error The specified tenant xxx is not in a supported state for this operation mean when I adjust the tenant units?
A: This error may occur if another tenant modification task is still in progress.
Q5: How do I create a small-unit tenant, such as a 0.5C2GB unit, if it is not available? A: If OceanBase Database is V2.0.0 or later, you cannot create a tenant with a unit memory resource smaller than 5 GB by default. This is reflected in the absence of small-unit options when creating or modifying tenant specifications. In non-production environments like demo setups, if OCP is V2.5.1 or later, you can remove this restriction by modifying OCP system parameters. The method is as follows:
Connect to MetaDB.
Execute the following SQL statement to set the value of ocp.operation.ob.tenant.allow-small-unit in the config_properties table to true.
update ocp.config_properties set value = 'true' WHERE `key` = 'ocp.operation.ob.tenant.allow-small-unit';
Performance and monitoring
Q1: In the resource management section of the OCP tenant, when querying by schema, the second business user created in the Oracle tenant cannot be found, but it can be viewed in other monitoring information.
A: Resource trend data is collected once a day at 5 a.m. Therefore, you cannot view the resource trend data of a tenant created or migrated before 5 a.m. If needed, run the following command to manually trigger the collection.
# Replace the actual values of the two lines with those in the curl command below, modify the collectTime, and then run the curl command.
# SITE_URL=http://xxx.xxx.xxx.xxx:8080
# CLUSTER_ID=1
curl -i --location --request POST \
"
${SITE_URL}
/api/v2/ob/clusters/
${CLUSTER_ID}
/collectDailyMetric" \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cm9vdA==' \
-d '{
"
collectTime
":"2020-11-10T00:00:00Z",
"aggAheadSeconds": 300
}'
Q2: How is the CPU usage collected in the resource management section of the "OceanBase Cloud Platform > Tenants > xx Tenant" section of the OCP console?
A: Run the following statement:
gv$sysstat:
SELECT * from gv$sysstat WHERE con_id=tenant ID AND `name` LIKE '%cpu%'
Q3: What does the concurrent wait time mean on the TopSQL tab of the SQL diagnostics page of a tenant?
A: The wait time during the execution of the SQL statement.