PAUSE JOB

2020-02-16

The PAUSE JOB statement lets you pause IMPORT jobs, enterprise BACKUP and RESTORE jobs, and, as of v2.1, changefeeds.

After pausing jobs, you can resume them with RESUME JOB.

{{site.data.alerts.callout_info}}You cannot pause schema changes.{{site.data.alerts.end}}

Required privileges

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

Synopsis

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

Parameters

Parameter Description
job_id The ID of the job you want to pause, which can be found with SHOW JOBS.
select_stmt A selection query that returns job_id(s) to pause.

Examples

Pause a single job

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

Pause multiple jobs

New in v2.1: To pause multiple jobs, nest a SELECT clause that retrieves job_id(s) inside the PAUSE JOBS statement:

> PAUSE JOBS (SELECT job_id FROM [SHOW JOBS]
      WHERE user_name = 'maxroach');

All jobs created by maxroach will be paused.

See also