SQL Server 分布式重播SQL Server Distributed Replay

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

MicrosoftMicrosoft SQL ServerSQL Server Distributed Replay 功能可帮助你评估即将进行的 SQL ServerSQL Server 升级的影响。The MicrosoftMicrosoft SQL ServerSQL Server Distributed Replay feature helps you assess the impact of future SQL ServerSQL Server upgrades. 您还可以使用它来帮助评估硬件和操作系统升级以及 SQL ServerSQL Server 优化的影响。You can also use it to help assess the impact of hardware and operating system upgrades, and SQL ServerSQL Server tuning.

分布式重播的优点Benefits of Distributed Replay

与 SQL Server Profiler 类似,你可以使用 Distributed Replay 针对升级后的测试环境重播捕获的跟踪。Similar to SQL Server Profiler, you can use Distributed Replay to replay a captured trace against an upgraded test environment. 与 SQL Server Profiler 不同的是,Distributed Replay 并不仅限于从单台计算机重播工作负载。Unlike SQL Server Profiler, Distributed Replay is not limited to replaying the workload from a single computer.

与 SQL Server Profiler 相比,Distributed Replay 提供了一个更具伸缩性的解决方案。Distributed Replay offers a more scalable solution than SQL Server Profiler. 使用分布式重播,您可以从多台计算机重播工作负荷,并更好地模拟关键任务型工作负荷。With Distributed Replay, you can replay a workload from multiple computers and better simulate a mission-critical workload.

MicrosoftMicrosoft SQL ServerSQL Server Distributed Replay 功能可以从多台计算机重播跟踪数据,并模拟关键任务型工作负载。The MicrosoftMicrosoft SQL ServerSQL Server Distributed Replay feature can use multiple computers to replay trace data and simulate a mission-critical workload. 可使用分布式重播进行应用程序兼容性测试、性能测试或容量规划。Use Distributed Replay for application compatibility testing, performance testing, or capacity planning.

何时使用分布式重播When to Use Distributed Replay

SQL Server Profiler 和 Distributed Replay 在功能上有些重复。SQL Server Profiler and Distributed Replay provide some overlap in functionality.

你可以使用 SQL Server Profiler 针对已升级的测试环境重播捕获的跟踪。You may use SQL Server Profiler to replay a captured trace against an upgraded test environment. 还可以分析重播结果以查找潜在的功能和性能不兼容问题。You can also analyze the replay results to look for potential functional and performance incompatibilities. 但是,SQL Server Profiler 只能从单台计算机重播工作负载。However, SQL Server Profiler can only replay a workload from a single computer. 重播具有许多活动的并发连接或较高吞吐量的密集型 OLTP 应用程序时,SQL Server Profiler 可能会成为资源瓶颈。When replaying an intensive OLTP application that has many active concurrent connections or high throughput, SQL Server Profiler can become a resource bottleneck.

与 SQL Server Profiler 相比,Distributed Replay 提供了一个更具伸缩性的解决方案。Distributed Replay offers a more scalable solution than SQL Server Profiler. 使用分布式重播可以从多台计算机重播工作负荷,并更好地模拟关键任务型工作负荷。Use Distributed Replay to replay a workload from multiple computers and better simulate a mission-critical workload.

下表介绍了适当使用每种工具的情况。The following table describes when to use each tool.

工具Tool 使用场景Use When...
SQL Server ProfilerSQL Server Profiler 您希望在单台计算机上使用传统的重播机制。You want to use the conventional replay mechanism on a single computer. 特别是,你需要逐行调试功能,如“步骤”、“运行至光标处”和“切换断点”命令。In particular, you need line-by-line debugging capabilities, such as the Step, Run to Cursor, and Toggle Breakpoint commands.

您要重播 Analysis ServicesAnalysis Services 跟踪。You want to replay an Analysis ServicesAnalysis Services trace.
分布式重播Distributed Replay 您要评估应用程序兼容性。You want to evaluate application compatibility. 例如,您要测试 SQL ServerSQL Server 和操作系统升级方案、硬件升级或索引优化。For example, you want to test SQL ServerSQL Server and operating system upgrade scenarios, hardware upgrades, or index tuning.

捕获的跟踪中的并发率过高,以致于单个重播客户端不足以对其进行模拟。The concurrency in the captured trace is so high that a single replay client can't sufficiently simulate it.

分布式重播概念Distributed Replay Concepts

以下组件组成分布式重播环境:The following components make up the Distributed Replay environment:

  • Distributed Replay 管理工具:一个控制台应用程序 DReplay.exe, 可用来与分布式重播控制器进行通信。Distributed Replay administration tool: A console application, DReplay.exe, used to communicate with the distributed replay controller. 使用管理工具可控制分布式的重播。Use the administration tool to control the distributed replay.

  • Distributed Replay 控制器:运行名为 SQL ServerSQL Server 的 Distributed Replay 控制器的 Windows 服务的一台计算机。Distributed Replay controller: A computer running the Windows service named SQL ServerSQL Server Distributed Replay controller. Distributed Replay 控制器协调分布式的重播客户端的操作。The Distributed Replay controller orchestrates the actions of the distributed replay clients. 在每个 Distributed Replay 环境中只能有一个控制器实例。There can only be one controller instance in each Distributed Replay environment.

  • Distributed Replay 客户端:运行名为 SQL ServerSQL Server Distributed Replay 客户端的 Windows 服务的一台或多台计算机(物理或虚拟)。Distributed Replay clients: One or more computers (physical or virtual) running the Windows service named SQL ServerSQL Server Distributed Replay client. 多个 Distributed Replay 客户端一起来模拟 SQL ServerSQL Server实例的工作负荷。The Distributed Replay clients work together to simulate workloads against an instance of SQL ServerSQL Server. 在每个 Distributed Replay 环境中可以有一个或多个客户端。There can be one or more clients in each Distributed Replay environment.

  • 目标服务器:Distributed Replay 客户端可用于重播跟踪数据的 SQL ServerSQL Server 实例。Target server: An instance of SQL ServerSQL Server that the Distributed Replay clients can use to replay trace data. 建议将目标服务器置于测试环境中。We recommend that the target server is located in a test environment.

分布式重播管理工具、控制器和客户端可安装在不同计算机或同一计算机上。The Distributed Replay administration tool, controller, and client can be installed on different computers or the same computer. 一台计算机上只能运行分布式重播控制器或客户端服务的一个实例。There can be only one instance of the Distributed Replay controller or client service that is running on the same computer.

下图展示了 SQL ServerSQL Server 分布式重播物理体系结构:The following figure shows the SQL ServerSQL Server Distributed Replay physical architecture:

Distributed Replay 体系结构Distributed Replay Architecture

分布式重播任务Distributed Replay Tasks

任务说明Task Description 主题Topic
介绍如何配置分布式重播。Describes how to configure Distributed Replay. 配置 Distributed ReplayConfigure Distributed Replay
介绍如何准备输入跟踪数据。Describes how to prepare the input trace data. 准备输入跟踪数据Prepare the Input Trace Data
介绍如何重播跟踪数据。Describes how to replay trace data. 重播跟踪数据Replay Trace Data 介绍如何查看分布式重播跟踪数据结果。Describes how to review the Distributed Replay trace data results. 查看重播结果Review the Replay Results
介绍如何使用管理工具以启动、监视和取消控制器上的操作。Describes how to use the administration tool to initiate, monitor, and cancel operations on the controller. 管理工具命令行选项(Distributed Replay 实用工具)Administration Tool Command-line Options (Distributed Replay Utility)

另请参阅See Also

SQL Server Distributed Replay 论坛SQL Server Distributed Replay Forum