数据迁移的监视与故障排除 (Stretch Database)Monitor and troubleshoot data migration (Stretch Database)

适用于:是SQL Server(仅从 2016 开始的 Windows)否Azure SQL 数据库否Azure SQL 数据仓库否并行数据仓库APPLIES TO: yesSQL Server (Windows only starting with 2016) noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

在 SQL Server Management Studio 中选择数据库的“任务 | Stretch | 监视”以监视 Stretch Database 监视器中的数据迁移。To monitor data migration in Stretch Database Monitor, select Tasks | Stretch | Monitor for a database in SQL Server Management Studio .

检查 Stretch Database 监视器中数据迁移的状态Check the status of data migration in the Stretch Database Monitor

在 SQL Server Management Studio 中选择数据库的“任务 | Stretch | 监视”以打开 Stretch Database 监视器并监视数据迁移。Select Tasks | Stretch | Monitor for a database in SQL Server Management Studio to open Stretch Database Monitor and monitor data migration.

  • 此监视器的上半部分显示有关已启用拉伸的 SQL Server 数据库和远程 Azure 数据库的常规信息。The top portion of the monitor displays general information about both the Stretch-enabled SQL Server database and the remote Azure database.

  • 监视器的下半部分显示数据库中每个已启用拉伸的表的数据迁移状态。The bottom portion of the monitor displays the status of data migration for each Stretch-enabled table in the database.

    Stretch Database 监视器Stretch Database Monitor

检查动态管理视图中数据迁移的状态Check the status of data migration in a dynamic management view

打开动态管理视图 sys.dm_db_rda_migration_status 以查看有多少批数据和数据行已迁移。Open the dynamic management view sys.dm_db_rda_migration_status to see how many batches and rows of data have been migrated. 有关详细信息,请参阅 sys.dm_db_rda_migration_status (Transact-SQL)For more info, see sys.dm_db_rda_migration_status (Transact-SQL).

数据迁移故障排除Troubleshoot data migration

我的已启用拉伸的表中的行未迁移到 Azure。这是什么问题?Rows from my Stretch-enabled table are not being migrated to Azure. What's the problem?
有几个问题可能会影响迁移。There are several problems that can affect migration. 请检查以下事项。Check the following things.

  • 检查 SQL Server 计算机的网络连接。Check network connectivity for the SQL Server computer.

  • 确保 Azure 防火墙未阻止你的 SQL Server 连接到远程端点。Check that the Azure firewall is not blocking your SQL Server from connecting to the remote endpoint.

  • 检查动态管理视图 sys.dm_db_rda_migration_status ,了解最新批处理的状态。Check the dynamic management view sys.dm_db_rda_migration_status for the status of the latest batch. 如果出现错误,请检查此批处理的 error_number、error_state 和 error_severity 值。If an error has occurred, check the error_number, error_state, and error_severity values for the batch.

    Azure 防火墙阻止了来自我的本地服务器的连接。The Azure firewall is blocking connections from my local server.
    你可能需要在 Azure 服务器的 Azure 防火墙设置中添加一条规则,让 SQL Server 与远程 Azure 服务器进行通信。You may have to add a rule in the Azure firewall settings of the Azure server to let SQL Server communicate with the remote Azure server.

另请参阅See Also

对 Stretch Database 进行管理和故障排除Manage and troubleshoot Stretch Database