exam questions

Exam AZ-203 All Questions

View all questions & answers for the AZ-203 exam

Exam AZ-203 topic 20 question 4 discussion

Actual exam question from Microsoft's AZ-203
Question #: 4
Topic #: 20
[All AZ-203 Questions]

DRAG DROP -
You need to ensure disaster recovery requirements are met.
What code should you add at line PC16?
To answer, drag the appropriate code fragments to the correct locations. Each code fragment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Scenario: Disaster recovery. Regional outage must not impact application availability. All DR operations must not be dependent on application running and must ensure that data in the DR region is up to date.

Box 1: DirectoryTransferContext -
We transfer all files in the directory.
Note: The TransferContext object comes in two forms: SingleTransferContext and DirectoryTransferContext. The former is for transferring a single file and the latter is for transferring a directory of files.
Box 2: ShouldTransferCallbackAsync
The DirectoryTransferContext.ShouldTransferCallbackAsync delegate callback is invoked to tell whether a transfer should be done.

Box 3: False -
If you want to use the retry policy in Copy, and want the copy can be resume if break in the middle, you can use SyncCopy (isServiceCopy = false).
Note that if you choose to use service side copy ('isServiceCopy' set to true), Azure (currently) doesn't provide SLA for that. Setting 'isServiceCopy' to false will download the source blob loca
References:
https://docs.microsoft.com/en-us/azure/storage/common/storage-use-data-movement-library https://docs.microsoft.com/en-us/dotnet/api/microsoft.windowsazure.storage.datamovement.directorytransfercontext.shouldtransfercallbackasync?view=azure- dotnet

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AK89
Highly Voted 5 years, 1 month ago
Box 1: singletransferContext Box 2: ShouldOverwriteCallbackAsync Box 3: true
upvoted 16 times
saeza100
5 years ago
Box3:false, cause wir download the file and then upload to blob !
upvoted 3 times
...
Juanlu
4 years, 3 months ago
I'm not sure if it's the answer, but it's the one that convince me !
upvoted 1 times
...
...
boldarev
Highly Voted 5 years, 4 months ago
Box1 SingletransferContext and Box2 shoul have ShouldOverwriteCallbackAsync, because it's only exists on SingletransferContext
upvoted 9 times
saeza100
5 years ago
It is correct
upvoted 4 times
...
...
bugimachi
Most Recent 4 years, 5 months ago
Note, that a method / property shouldTRANSFERCallbackAsync does not even exist on that class: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.datamovement.singletransfercontext?view=azure-dotnet
upvoted 3 times
...
Ave
4 years, 7 months ago
Box 1: singletransferContext Box 2: ShouldOverwriteCallbackAsync Box 3: true Its in the loop, therefore single. ShouldTransferCallbackAsync does not exist for single
upvoted 2 times
...
Larry616
4 years, 10 months ago
Box 1: SingleTransferContext It transfers a single blob in the code Box 2: ShouldTransferCallbackAsync It copies blog to another blob for DR, so nothing related to "overwirte" Box 3: Ture This is blog-to-blog copy, so it's service side copy
upvoted 2 times
...
mdmchewsg
4 years, 11 months ago
In this case, what is the correct answer for Box 3 -? Thanks
upvoted 1 times
chaudh
4 years, 11 months ago
Box3 is True "must ensure that data in the DR region is up to date."
upvoted 2 times
...
...
Mvii
5 years, 1 month ago
"All DR operations must not be dependent on application running..." IsServiceCopy: true If false, the app will have to run while it's doing the transfer.
upvoted 7 times
Lkk51
5 years ago
isServiceCopy : A flag indicating whether the copy is service-side asynchronous copy or not. If this flag is set to true, service-side asychronous copy will be used; if this flag is set to false, file is downloaded from source first, then uploaded to destination.
upvoted 2 times
LTiwana
4 years, 11 months ago
I think Mvii is right. It should be true (IsServiceCopy: true) as well because otherwise, the processing.cs would have to wait for each and every blob to be downloaded/uploaded which will stall the whole application.
upvoted 1 times
...
...
...
realbart
5 years, 2 months ago
var copyOptions = new CopyOptions(); var context = new SingleFileTransferContext(ms); context.ShouldTransferCallbackAsync = (source, destination) => Task.FromResult(true); await TransferManager.CopyAsync(blob, GetDRBlob(blob), isServiceCopy:true, context:context, options:copyOptions); sourceUriUri The Uri of the source file. destFileCloudFile The CloudFile that is the destination Azure file. isServiceCopyBoolean A flag indicating whether the copy is service-side asynchronous copy or not. If this flag is set to true, service-side asychronous copy will be used; if this flag is set to false, file is downloaded from source first, then uploaded to destination. optionsCopyOptions A CopyOptions object that specifies additional options for the operation. contextSingleTransferContext A SingleTransferContext object that represents the context for the current operation.
upvoted 3 times
...
bombjack70
5 years, 3 months ago
SingleTransferContext for box1...the snippet has to be inserted in a loop that enumerates file in the container
upvoted 5 times
...
KK_uniq
5 years, 4 months ago
And it should be overwrite.
upvoted 1 times
...
KK_uniq
5 years, 4 months ago
Right, directorycontext is only used for copydirectory
upvoted 1 times
...
IrfanSheikh
5 years, 7 months ago
Box1 should have singletransferContext as it is copying one blob. Reference: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-data-movement-library
upvoted 8 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...