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

# SHOW LOGICAL REPLICATION JOBS

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

export const version = "v25.4";

<Note>
  **This feature is in <InternalLink path="cockroachdb-feature-availability">preview</InternalLink>** and subject to change. To share feedback and/or issues, contact [Support](https://support.cockroachlabs.com).
</Note>

Logical data replication is only supported in CockroachDB self-hosted clusters.
The `SHOW LOGICAL REPLICATION JOBS` statement shows details of <InternalLink path="logical-data-replication-overview">**logical data replication (LDR)**</InternalLink> jobs on a cluster.

This page is a reference for the `SHOW LOGICAL REPLICATION JOBS` SQL statement, which includes information on its parameters and possible options. For more details on monitoring LDR, refer to the <InternalLink path="logical-data-replication-monitoring">Monitor Logical Data Replication</InternalLink> page.

## Required privileges

You must have one of the following to run `SHOW LOGICAL REPLICATION JOBS`:

* The <InternalLink path="security-reference/authorization#admin-role">`admin` role</InternalLink>.
* The <InternalLink path="security-reference/authorization">`VIEWJOB` system privilege</InternalLink>, which can view all jobs (including `admin` -owned jobs).

Use the <InternalLink path="grant">`GRANT SYSTEM`</InternalLink> statement:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
GRANT SYSTEM VIEWJOB TO user;
```

## Synopsis

xml version="1.0" encoding="UTF-8"?

<img src="https://mintcdn.com/cockroachlabs/Swn09slAIJ_7Fs9R/images/generated/docs/v25.4/show-logical-replication-jobs/syntax-diagram-6193a815c782.svg?fit=max&auto=format&n=Swn09slAIJ_7Fs9R&q=85&s=7b640bc3bb4182b214b56f04fae7b486" alt="SQL syntax diagram" width="839" height="69" data-path="images/generated/docs/v25.4/show-logical-replication-jobs/syntax-diagram-6193a815c782.svg" />

### Parameters

| Parameter                                   | Description                              |
| ------------------------------------------- | ---------------------------------------- |
| `show\_logical\_replication\_jobs\_options` | [Option](#options) to modify the output. |

## Options

| Option    | Description                                                                                               |
| --------- | --------------------------------------------------------------------------------------------------------- |
| `details` | Includes the additional columns: `replication\_start\_time`, `conflict\_resolution\_type`, `description`. |

## Responses

| Field                        | Response                                                                                                                                                                                                                                                                                                                               |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `job\_id`                    | The job's ID. Use with <InternalLink path="cancel-job">`CANCEL JOB`</InternalLink>, <InternalLink path="pause-job">`PAUSE JOB`</InternalLink>, <InternalLink path="resume-job">`RESUME JOB`</InternalLink>, <InternalLink path="show-jobs">`SHOW JOB`</InternalLink>.                                                                  |
| `status`                     | The job's current state. Possible values: `pending`, `paused`, `pause-requested`, `failed`, `succeeded`, `canceled`, `cancel-requested`, `running`, `retry-running`, `retry-reverting`, `reverting`, `revert-failed`.  Refer to <InternalLink path="show-jobs#job-status">Jobs status</InternalLink> for a description of each status. |
| `tables`                     | The fully qualified name of the table(s) that are part of the LDR job.                                                                                                                                                                                                                                                                 |
| `replicated\_time`           | The latest <InternalLink path="timestamp">timestamp</InternalLink> at which the destination cluster has consistent data. This time advances automatically as long as the LDR job proceeds without error. `replicated\_time` is updated periodically (every 30s).                                                                       |
| `replication\_start\_time`   | The start time of the LDR job.                                                                                                                                                                                                                                                                                                         |
| `conflict\_resolution\_type` | The type of <InternalLink path="manage-logical-data-replication#conflict-resolution">conflict resolution</InternalLink>: `LWW` last write wins.                                                                                                                                                                                        |
| `command`                    | Description of the job including the replicating table(s) and the cluster connections.                                                                                                                                                                                                                                                 |

## Example

In the destination cluster's SQL shell, you can query `SHOW LOGICAL REPLICATION JOBS` to view the LDR jobs running on the cluster:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW LOGICAL REPLICATION JOBS;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
        job_id        | status  |          tables           | replicated_time
----------------------+---------+---------------------------+------------------
1012877040439033857   | running | {database.public.table}   | NULL
(1 row)
```

For additional detail on each LDR job, use the `WITH details` option:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
SHOW LOGICAL REPLICATION JOBS WITH details;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
        job_id        |  status  |            tables              |        replicated_time        |    replication_start_time     | conflict_resolution_type |                                      command
----------------------+----------+--------------------------------+-------------------------------+-------------------------------+--------------------------+-----------------------------------------------------------------------------------------
  1010959260799270913 | running  | {movr.public.promo_codes}      | 2024-10-24 17:50:05+00        | 2024-10-10 20:04:42.196982+00 | LWW                      | LOGICAL REPLICATION STREAM into movr.public.promo_codes from external://cluster_a
  1014047902397333505 | canceled | {defaultdb.public.office_dogs} | 2024-10-24 17:30:25+00        | 2024-10-21 17:54:20.797643+00 | LWW                      | LOGICAL REPLICATION STREAM into defaultdb.public.office_dogs from external://cluster_a
```

## See also

* <InternalLink path="create-logical-replication-stream">`CREATE LOGICAL REPLICATION STREAM`</InternalLink>
* <InternalLink path="set-up-logical-data-replication">Set Up Logical Data Replication</InternalLink>
