Which TransactionScopeOption values should you use?

Posted by: Pdfprep Category: AZ-302 Tags: , ,

You are developing a .NET Core on-premises application that updates multiple Azure SQL Database instances. The application must log all update commands attempted to a separate Azure SQL Database instance named AuditDb.

You define an outer TransactionScope with a loop to enumerate and run the SQL commands on each customer database connection and an inner TransactionScope to record all transactions attempted within the outer TransactionScope to the AuditDb database.

You need to develop a method to perform the updates to the databases.

The solution must meet the following requirements:

• All rows written to the AuditDb database must be committed even if the outer transaction tails.

• If an error occurs writing to the AuditDb database, the outer transaction must be rolled back

• If an error occurs writing to the Customer databases only the outer transaction must be rolled back

• Values for TransactionScopeOption must be specified for the customer databases,

• Values tor TransactionScopeOptton must be specified for the AuditDb database.

Which TransactionScopeOption values should you use?
A . Required for CustomerTranScopeOption and Required for AuditTranScopeOption
B . Required for CustomerTranScopeOption and Suppress for AuditTranScopeOption
C . Suppress for CustomerTranScopeOption and Suppress for AuditTranScopeOption
D . Suppress for CustomerTranScopeOption and RequiresNew tor AuditTranScopeOption

Answer:

Leave a Reply

Your email address will not be published.