Skip to content

Commit 053a7f2

Browse files
Merge pull request #44829 from vchske/master
Added validation switch parameters and example
2 parents fd579a1 + 7d1dd57 commit 053a7f2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

articles/dms/howto-sql-server-to-azure-sql-powershell.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ Use the `New-AzDataMigrationTask` cmdlet to create and start a migration task. T
176176
- *SourceCred*. [PSCredential](https://docs.microsoft.com/dotnet/api/system.management.automation.pscredential?redirectedfrom=MSDN&view=powershellsdk-1.1.0) object for connecting to source server.
177177
- *TargetCred*. [PSCredential](https://docs.microsoft.com/dotnet/api/system.management.automation.pscredential?redirectedfrom=MSDN&view=powershellsdk-1.1.0) object for connecting to target server.
178178
- *SelectedDatabase*. AzDataMigrationSelectedDB object representing the source and target database mapping.
179+
- *SchemaValidation*. (optional, switch parameter) Following the migration, performs a comparison of the schema information between source and target.
180+
- *DataIntegrityValidation*. (optional, switch parameter) Following the migration, performs a checksum-based data integrity validation between source and target.
181+
- *QueryAnalysisValidation*. (optional, switch parameter) Following the migration, performs a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target.
179182

180183
The following example creates and starts a migration task named myDMSTask:
181184

@@ -192,6 +195,24 @@ $migTask = New-AzDataMigrationTask -TaskType MigrateSqlServerSqlDb `
192195
-SelectedDatabase $selectedDbs `
193196
```
194197

198+
The following example creates and starts the same migration task as above but also performs all three validations:
199+
200+
```powershell
201+
$migTask = New-AzDataMigrationTask -TaskType MigrateSqlServerSqlDb `
202+
-ResourceGroupName myResourceGroup `
203+
-ServiceName $service.Name `
204+
-ProjectName $project.Name `
205+
-TaskName myDMSTask `
206+
-SourceConnection $sourceConnInfo `
207+
-SourceCred $sourceCred `
208+
-TargetConnection $targetConnInfo `
209+
-TargetCred $targetCred `
210+
-SelectedDatabase $selectedDbs `
211+
-SchemaValidation `
212+
-DataIntegrityValidation `
213+
-QueryAnalysisValidation `
214+
```
215+
195216
## Monitor the migration
196217
You can monitor the migration task running by querying the state property of the task as shown in the following example:
197218

0 commit comments

Comments
 (0)