After you convert the restored standby tenant into a primary tenant, if you restore backup data from a lower version to a cluster of a higher version, you must upgrade the tenant.
Prerequisites
The restored standby tenant has been converted into a primary tenant. For more information about how to convert a standby tenant into a primary tenant, see Convert a standby tenant into a primary tenant.
Procedure
Log in as the
rootuser to thesystenant of the cluster where the newly restored tenant resides.Execute the following statement to upgrade the tenant:
ALTER SYSTEM RUN UPGRADE JOB "UPGRADE_ALL" TENANT = tenant_name;Here,
tenant_nameis the name of the newly restored tenant. You can upgrade multiple restored tenants at the same time. Separate the tenant names with commas (,).After the upgrade, execute the following statement to check whether the tenant is upgraded successfully:
A sample query is as follows:
obclient [(none)]> SELECT count(*) FROM oceanbase.DBA_OB_CLUSTER_EVENT_HISTORY WHERE event = 'UPGRADE_ALL' AND value3 ='4.6.2.0' AND value5 = '1004';The parameters in the statement are described as follows:
4.6.2.0indicates the four-part version number of the current cluster.1004is thetenant_idof the tenant to be checked. You can obtain thetenant_idby querying theDBA_OB_TENANTSview.
If the query result is not
0, the tenant is upgraded successfully.