If you know the table_id of a table, you can query the partition names of all partitions in the table from the CDB_OB_TABLE_LOCATIONS view (for the sys tenant) or the DBA_OB_TABLE_LOCATIONS view (for a user tenant).
Sys tenant
In the sys tenant, you can use the following statement to query:
obclient> SELECT * FROM oceanbase.CDB_OB_TABLE_LOCATIONS WHERE TENANT_ID=tenant_id AND TABLE_ID=table_id;User tenant
In a MySQL-compatible user tenant, you can use the following statement to query:
obclient> SELECT * FROM oceanbase.DBA_OB_TABLE_LOCATIONS WHERE TABLE_ID=table_id;In an Oracle-compatible user tenant, you can use the following statement to query:
obclient> SELECT * FROM SYS.DBA_OB_TABLE_LOCATIONS WHERE TABLE_ID=table_id;