Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Self Test

The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer. Choose all correct answers for each question.

Monitor and Resolve Blocks and Deadlocks

1.You are the DBA for a SQL Server-based application. The users have called saying that all of their queries are at a standstill. Nothing seems to be working as they try to reissue queries, and they are getting no immediate errors. Is it more likely that deadlocks are occurring or that blocking is occurring and why?
  1. Blocking. Because deadlocks do not occur if there are more than two connections to the SQL Server.

  2. Blocking. Because more than one user is impacted and there is no immediate error message.

  3. Deadlocks. Because deadlocks occur when more than one user tries to access the same data object.

  4. Deadlocks. Because there are many users who have stalled.

2.A user has issued a SELECT statement against a table in your database. The statement reads data from the table and does not modify anything. What kind of lock is most likely acquired?
  1. Shared lock

  2. Exclusive lock

  3. Update lock

  4. Deadlock

3.A user has issued an UPDATE statement against a table in your database. The statement updates the row where the rowid column is equal to 12. What kind of lock is most likely acquired?
  1. Shared lock

  2. Exclusive lock

  3. Update lock

  4. Deadlock

4.You are trying to modify data in a table through a transaction. When the transaction is executed, you receive a 1205 error. What does this mean?
  1. A deadlock has occurred.

  2. Blocking has occurred.

  3. The database is corrupt.

  4. The DEADLOCK_PRIORITY is set too high for your query.

5.You are an application developer and you need to write a transaction for your application that is more likely to win when a deadlock occurs. To do this, you understand that you need to set the priority to the highest level for the DEADLOCK_PRIORITY setting. What is the highest level?
  1. Normal

  2. 0

  3. 10

  4. Low


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial