| title | Pause and resume data migration | |||
|---|---|---|---|---|
| description | Pause and resume data migration (Stretch Database) | |||
| author | MikeRayMSFT | |||
| ms.author | mikeray | |||
| ms.reviewer | randolphwest | |||
| ms.date | 07/25/2022 | |||
| ms.service | sql-server-stretch-database | |||
| ms.topic | conceptual | |||
| helpviewer_keywords |
|
[!INCLUDE sqlserver2016-windows-only]
Important
Stretch Database is deprecated in [!INCLUDE sssql22-md]. [!INCLUDE ssNoteDepFutureAvoid-md]
To pause or resume data migration to Azure, select Stretch for a table in SQL Server Management Studio, and then select Pause to pause data migration or Resume to resume data migration. You can also use Transact-SQL to pause or resume data migration.
Pause data migration on individual tables when you want to troubleshoot problems on the local server or to maximize the available network bandwidth.
-
In SQL Server Management Studio, in Object Explorer, select the Stretch-enabled table for which you want to pause data migration.
-
Right-click and select Stretch > Pause.
Run the following command.
USE [<Stretch-enabled database name>];
GO
ALTER TABLE [<Stretch-enabled table name>]
SET ( REMOTE_DATA_ARCHIVE ( MIGRATION_STATE = PAUSED ) );
GO-
In SQL Server Management Studio, in Object Explorer, select the Stretch-enabled table for which you want to resume data migration.
-
Right-click and select Stretch > Resume.
Run the following command.
USE [<Stretch-enabled database name>];
GO
ALTER TABLE [<Stretch-enabled table name>]
SET ( REMOTE_DATA_ARCHIVE ( MIGRATION_STATE = OUTBOUND ) );
GOIn SQL Server Management Studio, open Stretch Database Monitor and check the value of the Migration State column. For more info, see Monitor and troubleshoot data migration.
Query the catalog view sys.remote_data_archive_tables and check the value of the is_migration_paused column. For more info, see sys.remote_data_archive_tables.