【 使用环境 】生产环境 or 测试环境
【 OB or 其他组件 】
【 使用版本 】
【问题描述】在sys租户中使用以下语句查询不出来__all_core_table的leader所在位置,请问怎么查询__all_core_table的主副本所在位置
select
t2.tenant_name,
t2.table_name,
t2.database_name,
t1.svr_ip,
t1.zone,
t1.partition_id,
t1.role
from
oceanbase.gv$partition t1
join oceanbase.gv$table t2 on t1.table_id = t2.table_id where table_name = ‘__all_core_table’ and role =1;
__all_core_table的主副本位于RootService master上,受通过sys租户的primary zone配置影响。可以通过以下SQL查找到__all_core_table主副本所在位置:
select SVR_IP from GV$OB_LOG_STAT where tenant_id=1 and ls_id=1 and role='LEADER'
大哥,我的版本是3.2.4的,没有gv$ob_log_stat表,有3.2.4版本的查询方式吗?