Performance Tuning and Optimizing SQL Databases Quiz Questions and Answers

Answer :
  • TRUE

Explanation :

locks are not used; instead, the state of the affected data is recorded at the start of a data operation. This state is checked again at the end of the operation, before any changes are written. If the state has not changed, new changes are written. If the state has changed, the new changes are discarded and the operation fails.
Answer :
  • True

Explanation :

locks are not used; instead, the state of the affected data is recorded at the start of a data operation. This state is checked again at the end of the operation, before any changes are written. If the state has not changed, new changes are written. If the state has changed, the new changes are discarded and the operation fails.
Answer :
  • A user or an application sends the UPDATE query to SQL Server
  • If any transaction already has an incompatible lock on the affected data, the UPDATE query waits for the existing lock to be acquired
  • Because this UPDATE statement is highly selective (affecting only two rows) the database engine uses row level locking to acquire an update lock on each of the two rows being modified.

Explanation :

Because this UPDATE statement is highly selective (affecting only two rows) the database engine uses row level locking to acquire an update lock on each of the two rows being modified.
Answer :
  • A user or an application sends the UPDATE query to SQL Server
  • If any transaction already has an incompatible lock on the affected data, the UPDATE query waits for the existing lock to be acquired
  • Because this UPDATE statement is highly selective (affecting only two rows) the database engine uses row level locking to acquire an update lock on each of the two rows being modified.

Explanation :

Because this UPDATE statement is highly selective (affecting only two rows) the database engine uses row level locking to acquire an update lock on each of the two rows being modified.
Answer :
  • All the above

Explanation :

Whenever a highpriority process requires CPU time, the low-priority process is preempted or forced out of the processor in the middle of its execution.
Answer :
  • It consists of operating system components such as non-preemptive scheduling, memory management, resource monitoring, exception handling, synchronization, deadlock detection, extended events, and asynchronous I/O
  • SQLOS provides highly detailed reporting and metrics to give administrators insight into how a SQL Server instance is performing through Dynamic Management Views (DMVs).
  • It fetch resource from other application
  • SQLOS was introduce from sqlserver starting

Explanation :

The abstraction layer that is provided by SQLOS avoids the need for resource-related code to be present throughout the SQL Server Database Engine code.
Answer :
  • It consists of operating system components such as non-preemptive scheduling, memory management, resource monitoring, exception handling, synchronization, deadlock detection, extended events, and asynchronous I/O.
  • SQLOS provides highly detailed reporting and metrics to give administrators insight into how a SQL Server the instance is performing through Dynamic Management Views (DMVs).
  • It fetches resources from other applications.
  • SQLOS was introduced from the SQL server starting.

Explanation :

The abstraction layer that is provided by SQLOS avoids the need for resource-related code to be present throughout the SQL Server Database Engine code.
Answer :
  • A) The operating system makes sure that the CPU is shared among all executing processes.
    B) It is not possible for a process or an application to monopolize the CPU.
    C) Whenever a high-priority process requires CPU time, the low-priority process is preempted or forced out of the processor in the middle of its execution.
    All of the above

Explanation :

Whenever a highpriority process requires CPU time, the low-priority process is preempted or forced out of the processor in the middle of its execution.
Answer :
  • Rebuilds one or more indexes for a table in the specified database

Explanation :

The DBCC DBREINDEX command will not automatically rebuild all of the indexes on all the tables in a database; it can only work on one table at a time.
Answer :
  • True

Explanation :

locks are used to ensure that only one user can access one data item at a time. While a data item is locked to one user, other users cannot access it