Skip to main content

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​

TaskStatement family or queryRead first
View execution nodesSHOW XNODESXnode Registration and Maintenance
Register nodes, change authentication, or unregister nodesCREATE XNODE, ALTER XNODE, DROP XNODERegistration ownership, authentication purpose, and maintenance risks
Drain nodes or change execution placementDRAIN XNODE, REBALANCE XNODE JOB, REBALANCE XNODE JOBSMulti-Node Takeover and Maintenance; files and caches are not copied automatically
View tasks and jobsSHOW XNODE TASKS, SHOW XNODE JOBSDaily Operations
Create, start, stop, modify, or delete tasksCorresponding task statements in the Xnode SQL manualManagement differences between ordinary and dual-active tasks; save definitions and data boundaries first
View and maintain proxiesSHOW XNODE AGENTS and corresponding create, alter, and drop statementsAgent Deployment and Maintenance
Restart the management daemonRESTART XNODERequires NODE ALTER; does not restart remote taosX
View licensesSHOW GRANTS, SHOW GRANTS FULLLicensing 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.

warning

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.