Denormalize the table to 5th Normal Form Answer A is correct.. Changes up from row lock to table locks.. Lock escalation occurs when SQL Server changes many fine-grained locks for fewer
Trang 1A ALTER PARTION FUNCTION… SPLIT
B ALTER TABLE … SWITCH
C ALTER TABLE … SPLIT
D Denormalize the table to 5th Normal Form
Answer A is correct The partition function controls the boundary between
partitions and will allow a new partition to be created Alter table switch will
transfer data, but won’t change the active partition for inserts Alter table split is not a valid option Schema changes are not necessary
8 When a new SQL Server session is started that meets none of the criteria
defined in the Classifier function, to which resource pool is the session
assigned?
A Internal
B Default
C Custom-1
D None
The correct answer is B; all nonassigned sessions are executed by resources in
the default resource pool Internal is resource pool for SQL Server internal
operations Answers C and D are also incorrect.
9 You’re the Administrator for a SQL Server used by a number of departments
within your organization At the end of each month the Accounts department
runs a number of reports that calculate complex ratios and analytics During
this time other users frequently receive timeouts and poor performance
What’s the best solution to limit the impact of these CPU-intensive reports
run by Accounts?
A Implement table partitioning
B Separate data and log files
C Use Resource Governor
D Request Accounting users run reports only at night
The correct answer is C Use Resource Governor to configure a maximum
CPU threshold for Accounting users Answers A and B are good practice,
but won’t necessary limit the impact of accounts’ reports Answer D is a nice
idea, but couldn’t guarantee this would actually happen
Trang 210 You’re a Systems Engineer responsible for SQL Server, and a case had been escalated via the helpdesk where a user reported an exception in an applica-tion—the error included deadlock victim You’d like to implement monitoring
to capture details of the deadlocked processes and locks held with minimum overhead Should you:
A Start a SQL Profiler Trace
B Capture Lock\Deadlocks per second with Windows System Monitor
C Enable trace flag 1222
D Review the sys.dm_tran_locks DMV
The correct answer is C; trace flag 1222 is the most lightweight method to
capture the required information SQL trace would provide this information,
however there’s a performance impact when running a trace Answers B and D
are incorrect because neither will provide the required information
11 A developer is using locking hints within a stored procedure and has some questions about lock escalation You describe lock escalation as the time when SQL Server:
A Changes down from table locks to row locks
B Changes from SHARED to UPDATE locks
C Changes up from row lock to table locks
D Changes from an UPDATE lock to EXCLUSIVE lock
The correct answer is C Lock escalation occurs when SQL Server changes
many fine-grained locks for fewer coarse grained locks, such as moving from many row locks to a single table lock All other options are incorrect
12 You’re working with an external vendor on a patch to their application They’ve applied the patch to the test environment and would like to simulate some production-like workload to assess the success of the patch You’ve decided to capture a SQL trace Which trace template will you use?
A TSQL_Replay
B Tuning
C Standard (default)
D Capture_test_server
The correct answer is A The replay trace template was designed for capturing
enough information to replay a trace on another server
Trang 313 You’re responsible for SQL Server in the organization and the IT manager
would like to forecast the remaining storage capacity that exists on the disk
Which SQL Server tools could help with capacity planning?
A SP_spaceused
B Resource Governor
C SQL Profiler
D Performance Data Collector
Answer D is correct The performance data collector tracks data and log file
size and can help with capacity planning sp_spaceused shows free space within
a file, but doesn’t help in itself with capacity planning Neither options B
or C will help with capacity planning
14 You’re responsible for SQL Server performance and one of the developers
reports INSERTS are particularly slow You suspect that a previous developer
has created some redundant nonclustered indexes and these are hindering
INSERT performance How can you tell if an index is used?
A Sys.dm_db_index_usage_stats
B Sys.dm_db_index_request_count
C Sys.dm_redundant_indexes
D Sys.dm_db_missing_index_details
Answer A is correct; index usage stats includes a count of user seeks and user
scans, which can be useful to determine whether the optimizer has used an
index since last restart Options B and C are invalid DMVs Answer D shows
suggestions for new indexes to create, does not include details on usefulness of existing indexes
15 There is blocking occurring on your production SQL Server, you’ve found the session at the head of the blocking chain, and retrieved the SQL_HANDLE
Now you need to find the query executed by the user Which DMV can help?
A Sys.dm_exec_requests
B sys.dm_exec_sql_text
C sys.dm_db_query_plans
D sys.dm_stored_proc_text
The correct answer is B; passing the SQL handle to this DMV will return the
text of the actual query executed by the user causing blocking Answer A can
Trang 4be useful to find the user causing blocking, but not the query text Neither options C or D are valid DMVs
16 Which SQL Server versions can be monitored by the Performance Data Collector?
A SQL Server 2008
B SQL Server 2005
C SQL Server 2000
D SQL Server 2005 Enterprise Edition
The correct answer is A The Performance Data Collector only works with
SQL Server 2008 instances currently
17 What’s the best method to run a SQL Trace with minimum overhead on the server being traced?
A Run SQL Profiler from your desktop
B Run SQL Profiler from the server
C Run a server-side trace to a database on the server
D Run a server-side trace to a file on a fast local disk
The correct answer is D The best method to minimize the overhead of
running a SQL trace is to output the trace to a file on a fast local disk Once the trace is stopped, the file can be copied to a workstation or another
server for analysis Answers A, B, and C are all valid options, but none are
the best
18 Which of the following collections could be monitored by the Performance Data Collector?
A SQL Trace
B T-SQL Queries
C Query Activity
D Client Response Statistics
E Performance Counters
The correct answers are A, B, C, and E; all could be included in a custom data
collection Client response statistics could not be collected
Trang 519 Which component of table partitioning determines the boundary between
partitions?
A Partition function
B Partition scheme
C Partition index
D Partition view
The correct answer is A The partition function determines the boundary
between partitions
20 Which transaction property ensures changes are still present following a crash
or system failure?
A Atomicity
B Consistency
C Isolation
D Durability
The correct answer is D Durability ensures all changes are written to the
transaction log before being acknowledged to the application Once written
to the log, SQL Server guarantees durability of committed transactions
Chapter 14: Implementing Objects
1 You are creating a view named WeeklySales This view is used to create a sales
report that is presented to management at the beginning of each week You
want to ensure that the underlying tables on which this view is based are not
accidentally modified causing the report to break What is the easiest way to
implement this?
A Use a CREATE VIEW WITH CHECK constraint to create a view.
B Use a CREATE VIEW WITH SCHEMABINDING statement to create
the view
C Do nothing When a view is based on a table, the underlying table cannot
be modified until the view is dropped
D Use a DDL trigger to roll back any statement that attempts to modify the
table that the view depends on