Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.58 KB

cancel-job.md

File metadata and controls

51 lines (36 loc) · 1.58 KB
title summary toc
CANCEL JOB
The CANCEL JOB statement stops long-running jobs, which include enterprise BACKUP and RESTORE tasks.
true

New in v1.1: The CANCEL JOB statement lets you stop long-running jobs, which include enterprise BACKUP and RESTORE tasks.

Limitations

  • This feature currently only works with enterprise features. However, in the future, we plan to let you cancel any job, including schema changes.
  • When an enterprise RESTORE is canceled, partially restored data is properly cleaned up. This can have a minor, temporary impact on cluster performance.

Required Privileges

By default, only the root user can cancel a job.

Synopsis

{% include {{ page.version.version }}/sql/diagrams/cancel_job.html %}

Parameters

Parameter Description
job_id The ID of the job you want to cancel, which can be found with SHOW JOBS.

Examples

Cancel a Restore

> SHOW JOBS;
+----------------+---------+-------------------------------------------+...
|       id       |  type   |               description                 |...
+----------------+---------+-------------------------------------------+...
| 27536791415282 | RESTORE | RESTORE db.* FROM 'azure://backup/db/tbl' |...
+----------------+---------+-------------------------------------------+...
> CANCEL JOB 27536791415282;

See Also