-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
MigrationValidation.json
413 lines (413 loc) · 13.2 KB
/
MigrationValidation.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
{
"swagger": "2.0",
"info": {
"title": "Azure Database Migration Service (classic) Resource Provider",
"version": "2022-03-30-preview"
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {},
"definitions": {
"MigrationValidationOptions": {
"type": "object",
"description": "Types of validations to run after the migration",
"properties": {
"enableSchemaValidation": {
"type": "boolean",
"description": "Allows to compare the schema information between source and target."
},
"enableDataIntegrityValidation": {
"type": "boolean",
"description": "Allows to perform a checksum based data integrity validation between source and target for the selected database / tables ."
},
"enableQueryAnalysisValidation": {
"type": "boolean",
"description": "Allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries."
}
}
},
"MigrationReportResult": {
"type": "object",
"description": "Migration validation report result, contains the url for downloading the generated report.",
"properties": {
"id": {
"type": "string",
"description": "Migration validation result identifier"
},
"reportUrl": {
"type": "string",
"description": "The url of the report."
}
}
},
"MigrationValidationResult": {
"type": "object",
"description": "Migration Validation Result",
"properties": {
"id": {
"type": "string",
"description": "Migration validation result identifier",
"readOnly": true
},
"migrationId": {
"type": "string",
"description": "Migration Identifier",
"readOnly": true
},
"summaryResults": {
"type": "object",
"description": "Validation summary results for each database",
"additionalProperties": {
"$ref": "#/definitions/MigrationValidationDatabaseSummaryResult"
}
},
"status": {
"$ref": "#/definitions/ValidationStatus",
"description": "Current status of validation at the migration level. Status from the database validation result status will be aggregated here.",
"readOnly": true
}
}
},
"MigrationValidationDatabaseSummaryResult": {
"type": "object",
"description": "Migration Validation Database level summary result",
"properties": {
"id": {
"type": "string",
"description": "Result identifier",
"readOnly": true
},
"migrationId": {
"type": "string",
"description": "Migration Identifier",
"readOnly": true
},
"sourceDatabaseName": {
"type": "string",
"description": "Name of the source database",
"readOnly": true
},
"targetDatabaseName": {
"type": "string",
"description": "Name of the target database",
"readOnly": true
},
"startedOn": {
"type": "string",
"format": "date-time",
"description": "Validation start time",
"readOnly": true
},
"endedOn": {
"type": "string",
"format": "date-time",
"description": "Validation end time",
"readOnly": true
},
"status": {
"$ref": "#/definitions/ValidationStatus",
"description": "Current status of validation at the database level",
"readOnly": true
}
}
},
"MigrationValidationDatabaseLevelResult": {
"type": "object",
"description": "Database level validation results",
"properties": {
"id": {
"type": "string",
"description": "Result identifier",
"readOnly": true
},
"migrationId": {
"type": "string",
"description": "Migration Identifier",
"readOnly": true
},
"sourceDatabaseName": {
"type": "string",
"description": "Name of the source database",
"readOnly": true
},
"targetDatabaseName": {
"type": "string",
"description": "Name of the target database",
"readOnly": true
},
"startedOn": {
"type": "string",
"format": "date-time",
"description": "Validation start time",
"readOnly": true
},
"endedOn": {
"type": "string",
"format": "date-time",
"description": "Validation end time",
"readOnly": true
},
"dataIntegrityValidationResult": {
"description": "Provides data integrity validation result between the source and target tables that are migrated.",
"$ref": "#/definitions/DataIntegrityValidationResult",
"readOnly": true
},
"schemaValidationResult": {
"description": "Provides schema comparison result between source and target database",
"$ref": "#/definitions/SchemaComparisonValidationResult",
"readOnly": true
},
"queryAnalysisValidationResult": {
"description": "Results of some of the query execution result between source and target database",
"$ref": "#/definitions/QueryAnalysisValidationResult",
"readOnly": true
},
"status": {
"$ref": "#/definitions/ValidationStatus",
"description": "Current status of validation at the database level",
"readOnly": true
}
}
},
"DataIntegrityValidationResult": {
"type": "object",
"description": "Results for checksum based Data Integrity validation results",
"properties": {
"failedObjects": {
"type": "object",
"description": "List of failed table names of source and target pair",
"additionalProperties": {
"type": "string"
}
},
"validationErrors": {
"type": "array",
"description": "List of errors that happened while performing data integrity validation",
"$ref": "#/definitions/ValidationError"
}
}
},
"SchemaComparisonValidationResult": {
"type": "object",
"description": "Results for schema comparison between the source and target",
"properties": {
"schemaDifferences": {
"type": "array",
"description": "List of schema differences between the source and target databases",
"$ref": "#/definitions/SchemaComparisonValidationResultType"
},
"validationErrors": {
"type": "array",
"description": "List of errors that happened while performing schema compare validation",
"$ref": "#/definitions/ValidationError"
},
"sourceDatabaseObjectCount": {
"type": "object",
"description": "Count of source database objects",
"additionalProperties": {
"type": "integer",
"format": "int64"
}
},
"targetDatabaseObjectCount": {
"type": "object",
"description": "Count of target database objects",
"additionalProperties": {
"type": "integer",
"format": "int64"
}
}
}
},
"SchemaComparisonValidationResultType": {
"type": "object",
"description": "Description about the errors happen while performing migration validation",
"properties": {
"objectName": {
"type": "string",
"description": "Name of the object that has the difference"
},
"objectType": {
"type": "object",
"$ref": "./TasksCommon.json#/definitions/DatabaseObjectType",
"description": "Type of the object that has the difference. e.g (Table/View/StoredProcedure)"
},
"updateAction": {
"type": "string",
"description": "Update action type with respect to target",
"$ref": "#/definitions/UpdateActionType"
}
}
},
"UpdateActionType": {
"type": "string",
"description": "Type of the actual difference for the compared object, while performing schema comparison",
"enum": [
"DeletedOnTarget",
"ChangedOnTarget",
"AddedOnTarget"
],
"x-ms-enum": {
"name": "UpdateActionType",
"modelAsString": true
}
},
"QueryAnalysisValidationResult": {
"type": "object",
"description": "Results for query analysis comparison between the source and target",
"properties": {
"queryResults": {
"type": "array",
"description": "List of queries executed and it's execution results in source and target",
"$ref": "#/definitions/QueryExecutionResult"
},
"validationErrors": {
"type": "array",
"description": "Errors that are part of the execution",
"$ref": "#/definitions/ValidationError"
}
}
},
"QueryExecutionResult": {
"type": "object",
"description": "Describes query analysis results for execution in source and target",
"properties": {
"queryText": {
"type": "string",
"description": "Query text retrieved from the source server"
},
"statementsInBatch": {
"type": "integer",
"format": "int64",
"description": "Total no. of statements in the batch"
},
"sourceResult": {
"type": "object",
"description": "Query analysis result from the source",
"$ref": "#/definitions/ExecutionStatistics"
},
"targetResult": {
"type": "object",
"description": "Query analysis result from the target",
"$ref": "#/definitions/ExecutionStatistics"
}
}
},
"ExecutionStatistics": {
"type": "object",
"description": "Description about the errors happen while performing migration validation",
"properties": {
"executionCount": {
"type": "integer",
"format": "int64",
"description": "No. of query executions"
},
"cpuTimeMs": {
"type": "number",
"format": "float",
"description": "CPU Time in millisecond(s) for the query execution"
},
"elapsedTimeMs": {
"type": "number",
"format": "float",
"description": "Time taken in millisecond(s) for executing the query"
},
"waitStats": {
"type": "object",
"description": "Dictionary of sql query execution wait types and the respective statistics",
"additionalProperties": {
"type": "object",
"$ref": "#/definitions/WaitStatistics"
}
},
"hasErrors": {
"type": "boolean",
"description": "Indicates whether the query resulted in an error"
},
"sqlErrors": {
"type": "array",
"description": "List of sql Errors",
"items": {
"type": "string"
}
}
}
},
"WaitStatistics": {
"type": "object",
"description": "Wait statistics gathered during query batch execution",
"properties": {
"waitType": {
"type": "string",
"description": "Type of the Wait"
},
"waitTimeMs": {
"type": "number",
"format": "float",
"default": 0,
"description": "Total wait time in millisecond(s) "
},
"waitCount": {
"type": "integer",
"format": "int64",
"description": "Total no. of waits"
}
}
},
"Severity": {
"type": "string",
"description": "Severity of the validation error",
"enum": [
"Message",
"Warning",
"Error"
],
"x-ms-enum": {
"name": "Severity",
"modelAsString": true
}
},
"ValidationError": {
"type": "object",
"description": "Description about the errors happen while performing migration validation",
"properties": {
"text": {
"type": "string",
"description": "Error Text"
},
"severity": {
"type": "string",
"description": "Severity of the error",
"$ref": "#/definitions/Severity"
}
}
},
"ValidationStatus": {
"type": "string",
"description": "Current status of the validation",
"enum": [
"Default",
"NotStarted",
"Initialized",
"InProgress",
"Completed",
"CompletedWithIssues",
"Stopped",
"Failed"
],
"x-ms-enum": {
"name": "ValidationStatus",
"modelAsString": true
}
}
}
}