SQL Management
Common Xnode query statements, change statements, and starting points for read-only inspections are listed by task. Successful SQL execution means only that the management request was processed, not that data has caught up.
Where to operate: taosExplorer Data Browser or the taos CLI. The management cluster may differ from the source and target clusters. Confirm the connected cluster before executing statements.
For complete syntax, output, and permission requirements, the authoritative reference is Data Ingestion Xnode SQL.
1. Find Statements by Task
| Task | Statement family or query | Read first |
|---|---|---|
| View execution nodes | SHOW XNODES | Xnode Registration and Maintenance |
| Register nodes, change authentication, or unregister nodes | CREATE XNODE, ALTER XNODE, DROP XNODE | Registration ownership, authentication purpose, and maintenance risks |
| Drain nodes or change execution placement | DRAIN XNODE, REBALANCE XNODE JOB, REBALANCE XNODE JOBS | Multi-Node Takeover and Maintenance; files and caches are not copied automatically |
| View tasks and jobs | SHOW XNODE TASKS, SHOW XNODE JOBS | Daily Operations |
| Create, start, stop, modify, or delete tasks | Corresponding task statements in the Xnode SQL manual | Management differences between ordinary and dual-active tasks; save definitions and data boundaries first |
| View and maintain proxies | SHOW XNODE AGENTS and corresponding create, alter, and drop statements | Agent Deployment and Maintenance |
| Restart the management daemon | RESTART XNODE | Requires NODE ALTER; does not restart remote taosX |
| View licenses | SHOW GRANTS, SHOW GRANTS FULL | Licensing and Versions |
2. Starting Point for Read-Only Inspections
Run in taosExplorer Data Browser or the taos CLI:
SELECT SERVER_VERSION();
SHOW XNODES;
SHOW XNODE TASKS;
SHOW XNODE JOBS;
SHOW XNODE AGENTS;
Record object IDs, status, execution nodes, and complete reasons, not just row counts. If no rows are returned, check the cluster and permissions before concluding that tasks are missing. While a task is running, still check data using the target database, actual table names, and a fixed time window.
3. Permissions and Change Boundaries
Viewing, node management, task management, and business database writes require different privileges. For authorization requirements, see Full-Chain Authentication. Verify with the actual service identity; do not elevate every identity to administrator just to run a read-only statement.
Before starting, stopping, modifying, draining, deleting, or changing management authentication, record the original definition and execution placement, and clarify interruptions, source retention, caches, and rollback paths. Successful SQL execution means only that the management request was processed; it does not automatically prove data has caught up. Verify operations with asynchronous states, such as dual-active deletion, according to Disaster Recovery and Dual-Active.