Developing Microsoft SQL Server 2012/2014 Databases

Here you have the best Microsoft 70-464 practice exam questions

  • You have 72 total questions to study from
  • Each page has 5 questions, making a total of 15 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 26, 2024
Question 1 of 72

You have a table named Rooms that contains three columns.

You run the following Transact-SQL statement:

You discover the execution plan shown in the exhibit. (Click the Exhibit button.)

You need to recommend a solution to reduce the amount of time it takes to execute the query.

What should you do?

More than one answer choice may achieve the goal. Select the BEST answer.

    Correct Answer: A

    The execution plan shows that the query is using a nonclustered index (Room_IX) on the RoomName column and then performing a RID lookup on the heap to retrieve the Id and Position columns. This indicates that the index does not cover all the columns needed for the query, resulting in additional lookup operations. To make the index covering and avoid the RID lookup, including the RoomName and Position columns in the existing Room_IX index would ensure that all the necessary data is retrieved from the index itself, thus improving query performance.

Question 2 of 72

You have a database named database1.

Database developers report that there are many deadlocks.

You need to implement a solution to monitor the deadlocks. The solution must meet the following requirements:

✑ Support real-time monitoring.

✑ Be enabled and disabled easily.

✑ Support querying of the monitored data.

What should you implement?

More than one answer choice may achieve the goal. Select the BEST answer.

    Correct Answer: D

    To monitor deadlocks in real-time, you should implement an Extended Events session. Extended Events provide a lightweight and highly customizable framework for monitoring and troubleshooting problems in SQL Server. They can be easily enabled and disabled, and the data collected can be queried efficiently. This makes them suitable for fulfilling the requirements of real-time monitoring, easy manageability, and query support for monitored data.

Question 3 of 72

DRAG DROP -

You have a table named Table1. Table1 has 1 million rows.

Table1 has a columnstore index for a column named Column1.

You need to import data to Table1. The solution must minimize the amount of time it takes to import the data.

What should you do?

To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Select and Place:

    Correct Answer:

    Box 1: Create a table named Table2 by using the same schema as Table1.

    Note: Table2 is the staging table.

    Box 2: Partition Table1 -

    Box 3: Import the data to Table2.

    Box 4: Create a columnstore index on Table2 for Column1.

    Box 5: Switch Table2 to Table1 -

    Note:

    * An xVelocity memory optimized columnstore index, groups and stores data for each column and then joins all the columns to complete the whole index.

    Columnstore indexes can transform the data warehousing experience for users by enabling faster performance for common data warehousing queries such as filtering, aggregating, grouping, and star-join queries.

    * Tables that have a columnstore index cannot be updated.

    There are three ways to work around this problem.

    A) To update a table with a columnstore index, drop the columnstore index, perform any required INSERT, DELETE, UPDATE, or MERGE operations, and then rebuild the columnstore index. B) (applies in this scenario) Partition the table and switch partitions. For a bulk insert, insert data into a staging table, build a columnstore index on the staging table, and then switch the staging table into an empty partition. For other updates, switch a partition out of the main table into a staging table, disable or drop the columnstore index on the staging table, perform the update operations, rebuild or re-create the columnstore index on the staging table, and then switch the staging table back into the main table.

    C) Place static data into a main table with a columnstore index, and put new data and recent data likely to change, into a separate table with the same schema that does not have a columnstore index.

    Reference: Best Practices: Updating Data in a Columnstore Index

Question 4 of 72

DRAG DROP -

You are designing two stored procedures named Procedure1 and Procedure2.

You identify the following requirements:

✑ Procedure1 must take a parameter that ensures that multiple rows of data can pass into the stored procedure.

✑ Procedure2 must use business logic that resides in a Microsoft .NET Framework assembly.

You need to identify the appropriate technology for each stored procedure.

Which technologies should you identify?

To answer, drag the appropriate technology to the correct stored procedure in the answer area. (Answer choices may be used once, more than once, or not at all.)

Select and Place:

    Correct Answer:

    References:

    http://msdn.microsoft.com/en-us/library/ms131102.aspx

    http://msdn.microsoft.com/en-us/library/bb522446.aspx

    http://msdn.microsoft.com/en-us/library/bb510489.aspx

Question 5 of 72

You have an application that uses a view to access data from multiple tables.

You need to ensure that you can insert rows into the underlying tables by using the view.

What should you do?

    Correct Answer: A

    To ensure that you can insert rows into the underlying tables by using the view, you should create an INSTEAD OF trigger on the view. An INSTEAD OF trigger is executed instead of the data modification statement on which the trigger is defined (INSERT, UPDATE, or DELETE). This allows you to define the specific actions that must happen to process the data modification statement, effectively making the view updatable.