exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 82 discussion

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

Case Study -

Background -
You have a database named HR1 that includes a table named Employee.
You have several read-only, historical reports that contain regularly changing totals. The reports use multiple queries to estimate payroll expenses. The queries run concurrently. Users report that the payroll estimate reports do not always run. You must monitor the database to identify issues that prevent the reports from running.
You plan to deploy the application to a database server that supports other applications. You must minimize the amount of storage that the database requires.

Employee Table -
You use the following Transact-SQL statements to create, configure, and populate the Employee table:


Application -
You have an application that updates the Employees table. The application calls the following stored procedures simultaneously and asynchronously:
✑ UspA: This stored procedure updates only the EmployeeStatus column.
✑ UspB: This stored procedure updates only the EmployeePayRate column.
The application uses views to control access to data. Views must meet the following requirements:
✑ Allow users access to all columns in the tables that the view accesses.
✑ Restrict updates to only the rows that the view returns.

Exhibit -

Both of the stored procedures experience blocking issues. UspB must not abort if UspA commits changes to a row before UspB commits changes to the same row. UspA must not abort if UspB commits changes to a row before UspA commits changes to the same row.
You need to specify the transaction isolation levels to enable row versioning.
How should you complete the Transact-SQL statements? To answer, drag the Transact-SQL segments to the correct locations. Each Transact-SQL segment 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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
References:
https://technet.microsoft.com/en-us/library/ms175095(v=sql.105).aspx https://technet.microsoft.com/en-us/library/ms173763(v=sql.105).aspx

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
Anette
Highly Voted 4 years, 10 months ago
I think the answer is correct
upvoted 9 times
...
SoupDJ
Highly Voted 4 years, 6 months ago
When READ_COMMITTED_SNAPSHOT is enabled at the beginning, any transaction iso-level set as READ_COMMITTED automatically becomes READ_COMMITTED_SNAPSHOT; that means that each transaction will be using its own SNAPSHOT to read from, and cannot be blocked from reading by the other .
upvoted 6 times
...
newsyk
Most Recent 4 years, 3 months ago
Shouldn't you first enable snapshot in DB? SET_ALLOW_SNAPSHOT_ISOLATION ON and then set transaction levels?
upvoted 1 times
RajinderKaur
4 years, 3 months ago
No. The answer is definitely correct https://www.mssqltips.com/sqlservertip/6368/sql-server-readcommittedsnapshot-database-option-and-read-commited-transaction-isolation-level/
upvoted 1 times
...
...
NhiN
4 years, 3 months ago
Correct. ALTER DATABASE ExamBook762Ch3 SET READ_COMMITTED_SNAPSHOT ON; With this setting enabled, all queries that normally execute using the READ COMMITTED isolation level switch to using the READ_COMMITTED_SNAPSHOT isolation level without requiring you to change the query code
upvoted 2 times
...
Jay2
4 years, 11 months ago
I wouldn't insert those statements inside the procedures if that is an option on the exam...
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