【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】社区版 4.3.4
【问题描述】扩容后,根据文档指导查看进度,如下:
SELECT * FROM oceanbase.DBA_OB_TENANT_JOBS WHERE JOB_TYPE=‘ALTER_RESOURCE_TENANT_UNIT_NUM’ ;
查看租户名信息,获取其 TENANT_ID 。
SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME = ‘mysql001’;
根据TENANT_ID查询unit规格信息
SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;
业务租户下查询
select * from cdb_ob_balance_jobs where tenant_id=xxxx;
select * from cdb_ob_balance_tasks where tenant_id=xxxx and job_id=xxxx;
select * from CDB_OB_TRANSFER_TASK_HISTORY where tenant_id=xxxx and BALANCE_TASK_ID=xxxx;
select * from dba_ob_server_event_history
where value2=‘Y32520BA2D9BF-00061E7FFDC0FCA7-0-0’; --查看trace_id信息
–查一下资源信息
SELECT ZONE,SVR_IP,SVR_PORT,
CPU_CAPACITY,
CPU_ASSIGNED,
CPU_CAPACITY-CPU_ASSIGNED AS CPU_MIN_FREE,
CPU_CAPACITY_MAX,
CPU_ASSIGNED_MAX,
CPU_CAPACITY_MAX-CPU_ASSIGNED_MAX AS CPU_MAX_FREE,
ROUND(MEMORY_LIMIT/1024/1024/1024,2) AS MEMORY_TOTAL_GB,
ROUND((MEMORY_LIMIT-MEM_CAPACITY)/1024/1024/1024,2) AS SYSTEM_MEMORY_GB,
ROUND(MEM_ASSIGNED/1024/1024/1024,2) AS MEM_ASSIGNED_GB,
ROUND((MEM_CAPACITY-MEM_ASSIGNED)/1024/1024/1024,2) AS MEMORY_FREE_GB,
ROUND(LOG_DISK_CAPACITY/1024/1024/1024,2) AS LOG_DISK_CAPACITY_GB,
ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,2) AS LOG_DISK_ASSIGNED_GB,
ROUND((LOG_DISK_CAPACITY-LOG_DISK_ASSIGNED)/1024/1024/1024,2) AS LOG_DISK_FREE_GB,
ROUND((DATA_DISK_CAPACITY/1024/1024/1024),2) AS DATA_DISK_GB,
ROUND((DATA_DISK_IN_USE/1024/1024/1024),2) AS DATA_DISK_USED_GB,
ROUND((DATA_DISK_CAPACITY-DATA_DISK_IN_USE)/1024/1024/1024,2) AS DATA_DISK_FREE_GB,
round(DATA_DISK_IN_USE/DATA_DISK_CAPACITY,2)*100 as data_disk_used_pct
FROM GV$OB_SERVERS
order by zone,data_disk_used_pct desc;
select * from cdb_ob_balance_jobs where tenant_id=1002;
select * from cdb_ob_balance_tasks where tenant_id=1002;
select * from CDB_OB_TRANSFER_TASK_HISTORY where tenant_id=1002;
以上根据tenant_id查询均无记录
select * from dba_ob_server_event_history
where value2=‘Y32520BA2D9BF-00061E7FFDC0FCA7-0-0’; --查看trace_id信息
根据value2查询没有记录
select tenant_id, tenant_role from oceanbase.DBA_OB_TENANTS;
select * from oceanbase.GV$OB_PARAMETERS where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
select * from _all_virtual_tenant_parameter_info where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
注意字符的转译
select tenant_id, tenant_role from oceanbase.DBA_OB_TENANTS;
select * from oceanbase.GV$OB_PARAMETERS where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
select * from _all_virtual_tenant_parameter_info where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
系统租户下无_all_virtual_tenant_parameter_info视图