exam questions

Exam 70-464 All Questions

View all questions & answers for the 70-464 exam

Exam 70-464 topic 7 question 12 discussion

Actual exam question from Microsoft's 70-464
Question #: 12
Topic #: 7
[All 70-464 Questions]

You need to modify usp_GetOrdersAndItems to ensure that an order is NOT retrieved by usp_GetOrdersAndItems while the order is being updated.
What should you add to usp_getOrdersAndItems?

  • A. Add SET TRANSACTION ISOLATION LEVEL SERIALIZABLE to line 44
  • B. Add WITH (UPDLOCK) to the end of line 42
  • C. Add SET TRANSACTION ISOLATION LEVEL SNAPSHOT to line 44
  • D. Add WITH (READPAST) to the end of line 42
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
The SET TRANSACTION ISOLATION LEVEL SERIALIZABLE statement specifies that no other statement can read data that has been modified but not yet committed by other transactions.
Incorrect Answers:
B: The WITH (UPDLOCK) table hint specifies that the database engine will not update or delete a row that is locked by other transactions.
C: The SET TRANSACTION ISOLATION LEVEL SNAPSHOT statement specifies that data read by any statement in a transaction will be the transactionally consistent version of the data that existed at the start of the transaction. It does not prevent data that is being updated from being read.
D: The WITH (READPAST) table hint specifies that the database engine will skip past a row that is locked by other transactions. However, READPAST can only be specified for a table referenced in an UPDATE or DELETE statement, or for table referenced in a FROM clause.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql?view=sql-server-2017 https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-2017

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
Luzix
4 years, 7 months ago
READPAST WORKS: https://blog.sqlauthority.com/i/e/readpast.jpg
upvoted 1 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 ...