RESUME JOB
The RESUME JOB
statement lets you resume pausedIMPORT
jobs, enterprise BACKUP
and RESTORE
jobs, and changefeeds
.
Note:
You cannot pause schema changes.
Required privileges
By default, only the root
user can control a job.
Synopsis
Parameters
Parameter | Description |
---|---|
job_id | The ID of the job you want to resume, which can be found with SHOW JOBS . |
select_stmt | A selection query that returns job_id (s) to resume. |
Examples
Pause a job
> SHOW JOBS;
+----------------+---------+-------------------------------------------+...
| id | type | description |...
+----------------+---------+-------------------------------------------+...
| 27536791415282 | RESTORE | RESTORE db.* FROM 'azure://backup/db/tbl' |...
+----------------+---------+-------------------------------------------+...
> PAUSE JOB 27536791415282;
Resume a single job
> RESUME JOB 27536791415282;
Resume multiple jobs
To resume multiple jobs, nest a SELECT
clause that retrieves job_id
(s) inside the RESUME JOBS
statement:
> RESUME JOBS (SELECT job_id FROM [SHOW JOBS]
WHERE user_name = 'maxroach');
All jobs created by maxroach
will be resumed.
See also
当前内容版权归 cockroachlabs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 cockroachlabs.com .