Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
##Example 1: Export and replay
.\Query_Store_Replay.ps1 -SourceServer ServerA -SourceDatabase DatabaseA -TimeWindow 4 -TargetServer ServerB -TargetDatabase DatabaseB
The command above will extract all unique execution plans executed in the last 4 hours from DatabaseA that resides on ServerA and replays them against DatabaseB on ServerB.
##Example 2: Export only
\Query_Store_Replay.ps1 -SourceServer ServerA -SourceDatabase DatabaseA -TimeWindow 2 -ExportOnly $true
The command above will extract all the unique execution plans executed in the last 2 hours from DatabaseA on ServerA. There will be no replay of these queries against another database.