

# Reading move status

To follow a data movement job in a database cluster group for Aurora, read its row in `dbclustergroup_data_movement.move_info`.

## Description
<a name="databaseclustergroups-sql-move-info-description"></a>

The table has one row for each job. The row shows the job's status and current phase, its source and target member cluster aliases, its replication lag, the rows copied against the estimated total, and the errors and warnings that it reported. For every column, see [move\_info](databaseclustergroups-sysviews-move-info.md).

## Syntax
<a name="databaseclustergroups-sql-move-info-syntax"></a>

```sql
SELECT { * | {{column}} [, ...] }
  FROM dbclustergroup_data_movement.move_info
  [WHERE { job_id = '{{job_id}}' | status = '{{status}}' }];
```

## Parameters and options
<a name="databaseclustergroups-sql-move-info-parameters"></a>

The statement takes the following parameters.

{{column}}  
A column of `move_info`, such as `job_id`, `status`, `phase`, `progress_details`, `errors`, or `warnings`. Select columns by name, rather than relying on their order or count.

WHERE job\_id = '{{job\_id}}'  
Optional. Returns the row of one job. `job_id` is the job ID that the move statement returned.

WHERE status = '{{status}}'  
Optional. Returns the jobs that have this status. `status` is `Running`, `Paused`, `Completed`, `Cancelled`, or `Error`.

You can give only one filter. Without a `WHERE` clause, the query returns every job in the group.

## Where it runs and required privileges
<a name="databaseclustergroups-sql-move-info-privileges"></a>

Run the statement at the routing endpoint, in a session that isn't pinned. The table accepts a plain `SELECT` only.

Your router user needs the `dbclustergroup_metadata_read_only` privilege or the `dbclustergroup_move_admin` privilege to read `move_info`.

## Usage notes
<a name="databaseclustergroups-sql-move-info-usage"></a>

Keep the following in mind when you use the statement.
+ The `phase` column shows the job's current phase. A job moves through the phases in this order: `Initializing`, `Precheck`, `Seeding`, `Cdc`, `CutoverInit`, and `CutoverFlip`.
+ Jobs publish progress periodically, so a read shows the last published state.
+ A job's row stays readable after the job ends, so you can confirm a success or read a failure reason.
+ The table refuses `ORDER BY`. Sort and combine conditions in your client. For the filters that the system tables accept, see [Filters the system tables accept](databaseclustergroups-system-views.md#databaseclustergroups-sysviews-filters).

The `status` column reads `Running`, `Paused`, `Completed`, `Cancelled`, or `Error`. `Paused` means that the service stopped the job for a time, for example while it replaces the data mover compute that runs the job. You can't pause or resume a job yourself.

## Examples
<a name="databaseclustergroups-sql-move-info-examples"></a>

The following query reads one job's status, phase, and progress.

```sql
SELECT job_id, status, phase, progress_details, errors, warnings
  FROM dbclustergroup_data_movement.move_info
  WHERE job_id = '4a6f1c2e-7d3b-4c1a-9e2f-5b8d0c6a1f30';
```

## Errors
<a name="databaseclustergroups-sql-move-info-errors"></a>

The statement can return the following error. For the error text and other refusals, see [Routing and data mapping errors](databaseclustergroups-errors-routing.md).


| Aurora MySQL | Meaning | 
| --- | --- | 
| [1235](databaseclustergroups-errors-routing.md) (42000) | ORDER BY is not supported on this table: the query sorts. Use a plain SELECT and sort in your client. | 

## Related statements
<a name="databaseclustergroups-sql-move-info-related"></a>

For more information, see the following:
+ [ALTER DBCLUSTERGROUP MOVE COLLOCATION](databaseclustergroups-sql-move-collocation.md)
+ [ALTER DBCLUSTERGROUP CUTOVER JOB](databaseclustergroups-sql-switch-job.md)
+ [ALTER DBCLUSTERGROUP CANCEL JOB](databaseclustergroups-sql-cancel-job.md)