Stretch Database - sys.dm_db_rda_migration_status
Applies to: SQL Server 2016 (13.x) and later versions
Contains one row for each batch of migrated data from each Stretch-enabled table on the local instance of SQL Server. Batches are identified by their start time and end time.
Stretch Database is deprecated in SQL Server 2022 (16.x). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
sys.dm_db_rda_migration_status is scoped to the current database context. Make sure you're in the database context of the Stretch-enable tables for which you want to see migration status.
In SQL Server 2016 (13.x), the output of sys.dm_db_rda_migration_status is limited to 200 rows.
|Column name||Data type||Description|
|table_id||int||The ID of the table from which rows were migrated.|
|database_id||int||The ID of the database from which rows were migrated.|
|migrated_rows||bigint||The number of rows migrated in this batch.|
|start_time_utc||datetime||The UTC time at which the batch started.|
|end_time_utc||datetime||The UTC time at which the batch finished.|
|error_number||int||If the batch fails, the error number of the error that occurred; otherwise, null.|
|error_severity||int||If the batch fails, the severity of the error that occurred; otherwise, null.|
|error_state||int||If the batch fails, the state of the error that occurred; otherwise, null.
The error_state indicates the condition or location where the error occurred.