exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 121 discussion

Actual exam question from Microsoft's 70-762
Question #: 121
Topic #: 1
[All 70-762 Questions]

Your company runs end-of-the-month accounting reports. While the reports run, other financial records are updated in the database.
Users report that the reports take longer than expected to run.
You need to reduce the amount of time it takes for the reports to run. The reports must show committed data only.
What should you do?

  • A. Use the NOLOCK option.
  • B. Execute the DBCC UPDATEUSAGE statement.
  • C. Use the max worker threads option.
  • D. Use a table-valued parameter.
  • E. Set SET ALLOW_SNAPSHOT_ISOLATION to ON.
  • F. Set SET XACT_ABORT to ON.
  • G. Execute the ALTER TABLE T1 SET (LOCK_ESCALATION = AUTO); statement.
  • H. Use the OUTPUT parameters.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️
Snapshot isolation enhances concurrency for OLTP applications.
Once snapshot isolation is enabled, updated row versions for each transaction are maintained in tempdb. A unique transaction sequence number identifies each transaction, and these unique numbers are recorded for each row version. The transaction works with the most recent row versions having a sequence number before the sequence number of the transaction. Newer row versions created after the transaction has begun are ignored by the transaction.
References:
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server

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
ASQL
Highly Voted 4 years, 6 months ago
answer is SET ALLOW_SNAPSHOT_ISOLATION to ON
upvoted 7 times
kiri2020
4 years, 5 months ago
Although set ALLOW_SNAPSHOT_ISOLATION to ON is the only right choice here, it is not enough, have to set READ_COMMITTED_SNAPSHOT ON
upvoted 4 times
...
...
Cococo
Most Recent 4 years, 7 months ago
Looks like questions 121, 122 and 123 have the same list of answers (hidden subgroup of questions) and NOLOCK is the answer for the 122 (You need to change the dashboard queries to improve concurrency and to support reading uncommitted data.) So, for the 121 it should be E. (Snapshot)
upvoted 2 times
Cococo
4 years, 7 months ago
+ Question 135 uses the same set of answers, it is about returning HTML fragment with the answer - H
upvoted 1 times
...
...
MML
4 years, 9 months ago
By setting ALLOW_SNAPSHOT_ISOLATION=On for the database, is not enough you have to make additional changes to the transactions.. Also it says that the reports are about "end-of-the-month" accounting reports And while the reports run, "OTHER" financial records are updated in the database. So the NOLOCK option it seems to me to be more complete answer.
upvoted 4 times
Lukis92
4 years, 8 months ago
MML is right. This is a tricky question.
upvoted 1 times
...
lh2607
4 years, 5 months ago
There is a requirement of no Dirty Reads, NOLOCK is definitely not the answer as it causes dirty reads. I'd agree with the given answer.
upvoted 1 times
...
ARehman
4 years, 5 months ago
In Accounting, dirty reads are Discouraged... so we should use ALLOW_SNAPSHOT_ISOLATION=ON instead off NOLOCK Hint.
upvoted 1 times
...
Lukis92
4 years, 9 months ago
NOLOCK causes dirty reads. The requirement is to read committed records.
upvoted 10 times
...
...
AndroJS
4 years, 10 months ago
"Newer row versions created after the transaction has begun are ignored by the transaction" ... Doesn´t this meas that commited information won´t be showed by the report ?
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago