> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# SUSPEND or RESUME PIPE

> 暂停或重新启动 Pipe 的导入作业执行。

## 功能

暂停或重新启动 Pipe：

* 当导入作业正在进行时（即，处于 `RUNNING` 状态），暂停 (`SUSPEND`) Pipe 会中断正在执行的作业。
* 当出现导入错误时，重新启动 (`RESUME`) Pipe 会继续执行出错的作业。

该命令自 3.2 版本起支持。

## 语法

```SQL theme={null}
ALTER PIPE <pipe_name> { SUSPEND | RESUME [ IF SUSPENDED ] }
```

## 参数说明

### pipe\_name

Pipe 的名称。

## 示例

### 暂停 Pipe

暂停数据库 `mydatabase` 下名为 `user_behavior_replica` 的 Pipe（Pipe 当前处于 `RUNNING` 状态）：

```SQL theme={null}
USE mydatabase;
ALTER PIPE user_behavior_replica SUSPEND;
```

通过 [SHOW PIPES](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/SHOW_PIPES.md) 查看该 Pipe，可以看到 Pipe 的状态变为 `SUSPEND`。

### 重新启动 Pipe

重新启动数据库 `mydatabase` 下名为 `user_behavior_replica` 的 Pipe：

```SQL theme={null}
USE mydatabase;
ALTER PIPE user_behavior_replica RESUME;
```

通过 [SHOW PIPES](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/SHOW_PIPES.md) 查看该 Pipe，可以看到 Pipe 的状态变为 `RUNNING`。

## 相关文档

* [CREATE PIPE](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/CREATE_PIPE.md)
* [ALTER PIPE](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/ALTER_PIPE.md)
* [DROP PIPE](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/DROP_PIPE.md)
* [SHOW PIPES](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/SHOW_PIPES.md)
* [RETRY FILE](/documents/cn/4.2/sql-reference/sql-statements/loading_unloading/pipe/RETRY_FILE.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.