After you create a stream in Datastream, you can control its execution
to match your replication and maintenance needs. You can
[start](https://docs.cloud.google.com/datastream/docs/run-a-stream#startastream) the stream to begin transferring data,
[pause](https://docs.cloud.google.com/datastream/docs/run-a-stream#pauseastream) it to temporarily stop data transfer, and
[resume](https://docs.cloud.google.com/datastream/docs/run-a-stream#resumeastream) it to continue replication.

## Start the stream

When you [created a stream](https://docs.cloud.google.com/datastream/docs/create-a-stream#createthestream), you either created the stream and started it immediately, or created the stream without starting it.

If you created the stream, but you didn't start it, then you can do so now. By starting the stream, Datastream can transfer data, schemas, and tables from the source database to the destination.

1. Go to the **Streams** page in the Google Cloud Console.

   [Go to the Streams page](https://console.cloud.google.com/datastream/streams)
2. Select the checkbox to the left of the stream that you want to start.

3. Click **START**.

4. In the dialog, click **START** . The status of the stream changes from `Not started` to `Starting` to `Running`.

   > [!NOTE]
   > It takes about 30 seconds for the stream to start running. Background resources need to start so that the stream can start.
   >
   > For more information about the states and transitions of a stream, see [Stream lifecycle](https://docs.cloud.google.com/datastream/docs/stream-states-and-actions).

After starting a stream, you can [monitor it](https://docs.cloud.google.com/datastream/docs/monitor-a-stream)
to verify that Datastream transferred data from the source database to
the destination.

## Pause the stream

After [starting a stream](https://docs.cloud.google.com/datastream/docs/run-a-stream#startastream), you can pause it. When a stream is
paused, Datastream doesn't pull any new data from the source database
into the destination. However, some data may continue to be written to the
destination as data "in flight" continues to flow.

In some cases, if you pause a stream, then the source database must retain the
data until you [resume the stream](https://docs.cloud.google.com/datastream/docs/run-a-stream#resumeastream). The retention period for the
source database may be limited. If the stream is paused for longer than the
source retention period, and then the stream is resumed, this can cause the
stream to fail. If this occurs, [delete the
stream](https://docs.cloud.google.com/datastream/docs/delete-a-stream), [create a new
one](https://docs.cloud.google.com/datastream/docs/create-a-stream), and then start it so that
Datastream can transfer data, schemas, and tables from the source
database to the destination.

1. Go to the **Streams** page in the Google Cloud Console.

   [Go to the Streams page](https://console.cloud.google.com/datastream/streams)
2. Select the checkbox to the left of the stream that you want to pause.

3. Click **PAUSE**.

4. In the dialog, click **PAUSE** . The status of the stream changes from `Running` to `Draining`. Draining a stream is the process of emptying the stream so that it doesn't contain any data.

   After the stream is drained of all data, then the status of the stream changes from `Draining` to `Paused`.

   > [!NOTE]
   > For more information about the states and transitions of a stream, see [Stream lifecycle](https://docs.cloud.google.com/datastream/docs/stream-states-and-actions).

After pausing a stream, you can [resume it](https://docs.cloud.google.com/datastream/docs/run-a-stream#resumeastream) so that
Datastream can transfer new data from the source database to the
destination.

## Resume the stream

You can resume a stream that you [paused](https://docs.cloud.google.com/datastream/docs/run-a-stream#pauseastream). By resuming the
stream, Datastream can transfer new data from the source database to
the destination.

1. Go to the **Streams** page in the Google Cloud Console.

   [Go to the Streams page](https://console.cloud.google.com/datastream/streams)
2. Select the checkbox to the left of the stream that you want to resume.

3. Click **RESUME** . The status of the stream changes from `Paused` to `Running`.

   > [!NOTE]
   > For more information about the states and transitions of a stream, see [Stream lifecycle](https://docs.cloud.google.com/datastream/docs/stream-states-and-actions).

After resuming a stream, you can [monitor it](https://docs.cloud.google.com/datastream/docs/monitor-a-stream)
to verify that Datastream transferred new data from the source database
to the destination.

## What's next

- To learn more about streams, see [Stream lifecycle](https://docs.cloud.google.com/datastream/docs/stream-states-and-actions).
- To learn how to modify your streams, see [Modify a stream](https://docs.cloud.google.com/datastream/docs/modify-a-stream).
- To learn how to recover a stream, see [Recover a stream](https://docs.cloud.google.com/datastream/docs/recover-a-stream).
- To learn how to delete an existing stream, see [Delete a stream](https://docs.cloud.google.com/datastream/docs/delete-a-stream).