If you restore a tenant from backup files of OceanBase Database to a cluster of a later version, after the restore job is completed, you must upgrade the restored tenant.
Limitations
Only OceanBase Database V4.1.0.0 and later allow you to upgrade a restored tenant.
Procedure
Log on as the
rootuser to thesystenant of the cluster where the restored tenant resides.Run the upgrade command to upgrade the restored tenant.
The syntax is as follows:
ALTER SYSTEM RUN UPGRADE JOB "UPGRADE_ALL" TENANT = tenant_name;Here,
tenant_namespecifies the name of the restored tenant. You can upgrade multiple tenants at a time. Separate the tenant names with commas (,).After the upgrade, check whether the tenant is successfully upgraded based on the version of the current OceanBase cluster.
obclient [(none)]> SELECT distinct(value) FROM oceanbase.GV$OB_PARAMETERS WHERE tenant_id =1004;Here,
1004is thetenant_idvalue of the upgraded tenant. You can obtain the value oftenant_idby querying theDBA_OB_TENANTSview.If the query result is a row and the
valuecolumn displays the four-digit version number of the current cluster, such as 4.2.0.0, the tenant upgrade is successful.