OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase OAgent

V2.2.0
  • Product overview
    • What is OAgent?
    • Key features
    • System architecture
    • Use cases
  • Quick start
  • Deployment
  • Overview
  • Sessions and diagnosis
    • Manage sessions
    • Switch dialogue models
    • Use @ to mention the analysis target
    • View the tool invocation process
    • Upload an attachment
    • Data visualization
    • FAQ
    • Export a report
  • Tools
  • Skill Management
  • Channel management
  • Knowledge base
    • Built-in knowledge base
    • Custom knowledge base
  • Scheduled tasks
    • Overview of scheduled tasks
    • Create a scheduled task
  • View usage
  • Model configuration
    • Manage model services
    • Model scoring
  • Settings and security
    • Product management
    • Experimental features
  • Best practices
    • Perform a cluster health inspection
    • Query cluster and topology information
    • Query resource metrics and task status
    • Read-only queries
    • Alert query and troubleshooting guide
    • Root cause analysis of exceptions
    • ASH diagnostic report
    • Analyze slow SQL, TopSQL, and abnormal SQL
    • SQL pre-analysis and tuning recommendations
    • Interpret execution plans
    • Diagnostic information statistics
    • Parameter check and change governance
    • Database change ticket
  • Appendix
    • Feature list
    • Built-in Skills
  • Release notes
    • OAgent V2.2.0 Release note
    • OAgent V2.1.0 Release note
    • OAgent V2.0.0 Release note
    • OAgent V1.8.0 Release note

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase OAgent
  3. V2.2.0

Use cases

Last Updated:2026-11-20 07:25:11

Scenario 1: Comprehensive health assessment
Background
Requirement
Solution
Scenario 2: SQL performance optimization
Background
Requirement
Solution
Scenario 3: Event-level root cause analysis
Background
Requirement
Solution
Scenario 4: Capacity forecasting and proactive scaling
Background
Requirement
Solution

OAgent is an intelligent O&M diagnostic agent for the OceanBase Database ecosystem. DBAs, O&M engineers, and development teams can initiate inquiries from the console or integrated collaboration channels to query data, diagnose issues, or schedule routine inspections for instances, tenants, and time periods within their authorized scope. OAgent understands O&M objectives, autonomously selects knowledge, skills, and tools, obtains on-site data through OCP, OAS, and ODC, and completes analysis and controlled execution. When business performance slows down, it can trace load fluctuations back to specific SQL statements and execution samples; when alerts are triggered, it can collate the trigger time, resource status, and related evidence for verification. Inspection results remain in the session, allowing teams to continue follow-up questions or use them for handover and retrospective analysis.

This topic describes OAgent's capabilities and value in large-scale database O&M for scenarios including comprehensive health assessment, SQL performance optimization, event-level root cause analysis, capacity forecasting, and proactive scaling.

Scenario 1: Comprehensive health assessment

One of the core tasks of database O&M personnel is to determine whether an instance is currently healthy and whether immediate intervention is required. During daily duty shifts, before and after changes, and during team handovers, it is often necessary to switch between multiple consoles to manually verify instance status, recent load, resource capacity, and historical alerts, and then rely on experience to determine which issues warrant follow-up.

Background

  • Information scattered across multiple systems: Instance lifecycle status, load curves, resource usage, and alert records are distributed across different interfaces such as OCP and OAS. Checking each item individually is time-consuming and prone to omissions.
  • Inconsistent handover procedures: During duty handovers, different personnel focus on different aspects, lacking a structured, reusable health report as a common basis.
  • Routine inspections rely on manual effort: Daily inspections require repeating the same steps, consuming the energy of duty personnel and making it difficult to ensure consistent coverage each time.

Requirement

The O&M team hopes that after selecting an instance, the platform can automatically summarize its current state, load, resource capacity, and historical alerts, generate an inspection report with clear conclusions and prioritized issues, and schedule routine inspections as scheduled tasks, actively delivering the results to the collaboration group.

Solution

OAgent extends from single inspections to automated delivery, risk tracking, and team collaboration in the field of database O&M. The O&M team does not need to switch between multiple systems or repeat the same steps; a complete process from health assessment to scheduled inspection deployment can be completed in one conversation.

  • Identify objects and windows: Select a project and instance, and specify how long to view load and alerts respectively.
  • Check four types of signals: Verify the instance lifecycle status, recent load, resource capacity, and historical alerts.
  • Summarize conclusions and pending tasks: The report first provides an overall status, then lists current anomalies, recovered alerts, and data gaps. Duty personnel can continue investigation on any one of these items in the original session.
  • Schedule routine inspections: Generate a task draft. After users verify resources, cycle, timezone, and inspection content, they create the task, and the result is reviewed in the session.
  • Deliver to collaboration channels: Inspections and periodic summaries run as planned, with results delivered to DingTalk, Lark, WeCom, or Telegram.

In the production environment of a financial institution with over 1,000 physical nodes and 10,000+ tenants, daily inspections have shifted to automated delivery. The diagnostic process forms an auditable chain of evidence, structured reports are directly generated, and the risk status is continuously tracked.

Scenario 2: SQL performance optimization

When developers notice SQL execution slowing down, they often see abnormally high execution times in the execution plan but struggle to determine whether the bottleneck lies in indexes, data distribution, parameters, or load changes. Traditional troubleshooting requires DBAs to flip through logs, compare metrics, and match execution samples one by one, taking dozens of minutes to locate a single statement requiring handling. Developers lack self-diagnostic capabilities and can only wait in line for DBA support.

Background

  • Difficult to narrow down candidate statements: Among a batch of top SQLs and slow SQLs, it is necessary to combine execution time and frequency to determine which one deserves handling. Manual screening is inefficient.
  • High threshold for interpreting execution plans: Execution plans, wait events, and operator behavior involve kernel implementation logic. Non-kernel experts find it difficult to determine the cause of execution time.
  • Optimization suggestions lack basis: Vague optimization directions cannot be executed directly. Development requires specific, executable suggestions on indexes, rewriting, or parameters, and verification against internal specifications.
  • Diagnostic experience is hard to transfer: Decades of experience for senior DBAs is tacit knowledge, difficult to describe simply in documentation, and hard to retain after personnel changes.

Requirement

The development and DBA teams hope that after selecting a tenant and time period, the platform can automatically generate a slow SQL list and narrow it down to key statements. Further analysis of their execution plans, time trends, and slow execution samples should provide verifiable, traceable optimization suggestions. The suggestions should also be submitted to the internal specification review platform to make them actionable.

Solution

OAgent extends its role in SQL performance optimization from candidate statement narrowing to execution plan interpretation, optimization suggestion generation, and coordination with standard review processes. Developers can now diagnose and optimize SQL performance issues independently, without waiting in line for a DBA.

  • Narrow candidate statements: View top SQL and slow SQL within a selected tenant and time period, focusing on key points based on execution time and frequency.
  • Analyze individual SQL: Provide the SQL ID to view the SQL text, time trends, execution plans, and available slow execution samples, analyzing clues such as wait times and plan changes.
  • Generate optimization suggestions: Offer multi-dimensional solutions including index recommendations, rewrite suggestions, and parameter suggestions, explaining the causes of time consumption and verifiable optimization paths.
  • Verify kernel basis: The diagnostic method aligns with the implementation logic of OceanBase's kernel. The Q&A logic has been validated by kernel experts, and conclusions are supported by evidence sources such as execution plans, metric data, and knowledge base references.
  • Coordinate with standard review: Optimization plans are integrated into the internal standard review platform, making suggestions executable and auditable.

In the production environment of a financial institution, developers' self-service Q&A volume has significantly increased, while technical ticket volume has correspondingly decreased. DBAs are no longer occupied with repetitive basic diagnostics, focusing instead on complex optimizations and knowledge accumulation. The adoption rate of intelligent diagnostic suggestions has markedly improved, and the optimization cycle has been reduced from days to hours or even minutes.

Scenario 3: Event-level root cause analysis

After a database alert is triggered, the first step for operations personnel is often to determine which alerts require immediate attention, then to investigate the root cause of a single event. Behind a slow SQL alert may lie changes in the execution plan, load spikes, parameter adjustments, or data distribution skew. Traditional troubleshooting requires scattered comparison of the alert time, resource status, original SQL, and execution samples, resulting in a lengthy and multi-step process that can take tens of minutes to identify the specific SQL and its triggering context.

Background

  • Difficulty in prioritizing alerts: Alerts are mixed with resolved events, lacking a unified view by object, time, and level. On-call personnel struggle to quickly distinguish priorities.
  • Scattered evidence requiring verification: Trigger time, resource status, original SQL, and execution samples are distributed across different systems. Manually gathering them for verification is time-consuming and prone to missing correlations.
  • Root cause inference relies on experience: Deriving the root cause from symptoms requires multidimensional data and expert experience. The reasoning path of senior DBAs is difficult to systematize and reuse.
  • Slow reduction of impact scope: A single alert may affect multiple tenants or sessions. Manual assessment of the impact scope is time-consuming, making it difficult to quickly determine the scope of action.

Requirement

The operations team wishes to view alerts by object, time, and level, distinguishing between ongoing and resolved alerts. After providing the alert ID, the platform should automatically verify the triggering context using metrics, the original SQL, and execution samples, continuously gather evidence along the evidence gap, locate the root cause and impact scope, and explain the judgments supported by existing evidence and what needs to be verified next.

Solution

OAgent extends its role in incident analysis from alert classification to triggering context verification, root cause location, and impact scope assessment. The operations team does not need to manually verify evidence across multiple systems; a single conversation can complete the entire process from alert identification to root cause location. Conclusions are supported by evidence sources, making them traceable and auditable.

  • View alerts by classification: View alerts by object, time, and level, distinguishing between ongoing and resolved alerts, and first determine which need handling.
  • Verify triggering context: After providing the alert ID, verify the triggering context using available metrics, the original SQL, and execution samples.
  • Correlate multidimensional evidence: Correlate alert, monitoring, change, session, and SQL evidence, continuously gather evidence along the evidence gap.
  • Locate root cause and impact scope: Explain the judgments supported by existing evidence, what needs to be verified next, provide the scope of action and a verifiable next step.
  • Traceable conclusions: Each conclusion is supported by an evidence source, and execution plans, metric data, and knowledge base references are traceable.

In the production environment of a financial institution, the fault location cycle has been reduced from tens of minutes to minutes. The diagnostic process forms an auditable chain of evidence. Necessary operations enter approval and have their status automatically reviewed after execution.

Scenario 4: Capacity forecasting and proactive scaling

Database capacity management requires determining whether sufficient margin exists before business growth, and then deciding whether to scale up in advance. In traditional methods, operations personnel must separately read resource allocation, current usage, and effective capacity limits, then manually judge the growth trend based on historical disk usage. Insufficient samples make it difficult to provide credible forecasts, often leading to passive response only when a capacity alert is triggered.

Background

  • Scattered verification of margin and limit: Resource allocation, current usage, and effective capacity limits need to be queried separately on different interfaces, making it difficult to instantly judge the current margin.
  • Trend judgment relies on manual effort: Historical disk usage must be manually read and calculated, lacking quantitative basis for judging the growth trend and the timing of scaling.
  • Forecast assumptions are opaque: Manual estimates often do not specify the observation range and assumptions, making conclusions difficult to review and impossible to determine when re-evaluation is needed.
  • Delayed scaling decision: When samples are insufficient, only the current margin can be provided, lacking guidance on indicators that require continued observation. Scaling decisions often lag behind actual needs.

Requirement

The operations team hopes that the platform can read resource allocation, current usage, and the upper limit of effective capacity, view historical disk usage, assess future capacity risks based on growth trends, explain the estimation assumptions and observation scope, and provide the current margin and metrics to continue observing when samples are insufficient.

Solution

In the field of capacity management, OAgent extends from margin query to trend assessment, stress test validation, and proactive scaling decisions. The operations team no longer needs to manually read and calculate historical data; a complete process from current capacity status to scaling recommendations can be completed in one interaction, with transparent and reviewable estimation assumptions.

  • Read capacity status: Read resource allocation, current usage, and the upper limit of effective capacity, and view historical disk usage.
  • Assess capacity risk: When data availability is predictable or historical samples are sufficient, assess future capacity risks based on growth trends.
  • Explain estimation assumptions: Explain the estimation assumptions and observation scope to make the conclusions reviewable, and indicate when a capacity reassessment is needed.
  • Handling insufficient samples: When samples are insufficient, report the current margin and metrics to continue observing to avoid blind calculation.
  • Connect to stress test validation: Combine performance stress testing and load simulation to provide capacity assessment and load basis for scaling decisions.

In the production practice of a financial institution, the stress test report generation cycle has been reduced from hours to minutes, improving efficiency by dozens of times. Capacity risks can now be proactively identified before business growth, reducing reactive responses.

Previous topic

System architecture
Last

Next topic

Quick start
Next
on this page
Scenario 1: Comprehensive health assessment
Background
Requirement
Solution
Scenario 2: SQL performance optimization
Background
Requirement
Solution
Scenario 3: Event-level root cause analysis
Background
Requirement
Solution
Scenario 4: Capacity forecasting and proactive scaling
Background
Requirement
Solution