Stretch Database - sys.dm_db_rda_migration_status

适用于:SQL Server 2016 (13.x) 及更高版本

对于 SQL Server 本地实例上每个已启用 Stretch 的表的每个迁移数据批次,包含一行。 批处理按开始时间和结束时间进行标识。

重要

SQL Server 2022 (16.x) 和 Azure SQL 数据库中已弃用 Stretch Database。 在数据库引擎的未来版本中将删除此功能。 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

sys.dm_db_rda_migration_status 范围限定为当前数据库上下文。 请确保位于要查看迁移状态的 Stretch-enable 表的数据库上下文中。

在 SQL Server 2016(13.x)中,sys.dm_db_rda_migration_status输出限制为 200 行。

列名称 数据类型 描述
table_id int 从中迁移行的表的 ID。
database_id int 从中迁移行的数据库的 ID。
migrated_rows bigint 在此批处理中迁移的行数。
start_time_utc datetime 批处理启动的 UTC 时间。
end_time_utc datetime 批处理完成的 UTC 时间。
error_number int 如果批处理失败,则发生错误的错误号;否则为 null。
error_severity int 如果批处理失败,则发生的错误的严重性;否则为 null。
error_state int 如果批处理失败,则发生错误的状态;否则为 null。

error_state指示发生错误的条件或位置。

另请参阅