exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 57 discussion

Actual exam question from Microsoft's 70-483
Question #: 57
Topic #: 2
[All 70-483 Questions]

DRAG DROP -
You have an application that accesses a Microsoft SQL Server database.
The database contains a stored procedure named Proc1. Proc1 accesses several rows of data across multiple tables.
You need to ensure that after Proc1 executes, the database is left in a consistent state. While Proc1 executes, no other operation can modify data already read or changed by Proc1. (Develop the solution by selecting and ordering the required code snippets.
You may not need all of the code snippets.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Note:
Box 1: Start with the sqlconnection
Box 2: Open the SQL transaction (RepeatableRead)
/ IsolationLevel
Specifies the isolation level of a transaction.
/ RepeatableRead
Volatile data can be read but not modified during the transaction. New data can be added during the transaction.
/ ReadCommitted
Volatile data cannot be read during the transaction, but can be modified.
/ ReadUncommitted
Volatile data can be read and modified during the transaction.

Box 3: Try the query -

Box 4: commit the transaction -
Box 5: Catch the exception (a failed transaction)

Box 6: Rollback the transaction -

Box 7: Final cleanup -
Box 8: Clean up (close command and connection).
Reference: SqlConnection.BeginTransaction Method

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
demoinq
4 years, 5 months ago
Have a look here: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.begintransaction?view=dotnet-plat-ext-5.0 The transation.BeginTransaction() is executed after the connection has been opened.
upvoted 2 times
...
Epit2021
4 years, 5 months ago
Looks correct.
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago