New Updated Microsoft MCSE 70-464 Real Exam Questions and Answers Download Topic 2, Scenario 2

Ensurepass

Application Information

You have two servers named SQL1 and SQL2 that have SQL Server 2012 installed.

 

You have an application that is used to schedule and manage conferences.

 

Users report that the application has many errors and is very slow.

 

You are updating the application to resolve the issues.

 

You plan to create a new database on SQL1 to support the application. A junior database administrator has created all the scripts that will be used to create the database. The script that you plan to use to create the tables for the new database is shown in Tables.sql. The script that you plan to use to create the stored procedures for the new database is shown in StoredProcedures.sql. The script that you plan to use to create the indexes for the new database is shown in Indexes.sql. (Line numbers are included for reference only.)

 

A database named DB2 resides on SQL2. DB2 has a table named SpeakerAudit that will audit changes to a table named Speakers.

 

A stored procedure named usp_UpdateSpeakersName will be executed only by other stored procedures. The stored procedures executing usp_UpdateSpeakersName will always handle transactions.

 

A stored procedure named usp_SelectSpeakersByName will be used to retrieve the names of speakers. Usp_SelectSpeakersByName can read uncommitted data.

 

A stored procedure named usp_GetFutureSessions will be used to retrieve sessions that will occur in the future.

 

Procedures.sql

 

clip_image001

clip_image003

 

Indexes.sql

clip_image004

 

Tables.sql

clip_image006

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 11

You need to provide referential integrity between the Sessions table and Speakers table. Which code segment should you add at line 47 of Tables.sql?

 

clip_image007

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

Explanation:

http://msdn.microsoft.com/en-us/library/ms189049.aspx http://msdn.microsoft.com/en-us/library/ms179610.aspx http://msdn.microsoft.com/en-us/library/ff878370.aspx

 

 

QUESTION 12

You execute usp_TestSpeakers. You discover that usp_SelectSpeakersByName uses inefficient execution plans. You need to update usp_SelectSpeakersByName to ensure that the most efficient execution plan is used. What should you add at line 30 of Procedures.sql?

 

A.

OPTION (FORCESCAN)

B.

OPTION (FORCESEEK)

C.

OPTION (OPTIMIZE FOR UNKNOWN)

D.

OPTION (OPTIMIZE FOR (@LastName= ‘Anderson’))

 

Correct Answer: C

Explanation:

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

 

 

QUESTION 13

You need to recommend a solution to ensure that SQL1 supports the auditing requirements of usp_UpdateSpeakerName. What should you include in the recommendation?

 

A.

The Distributed Transaction Coordinator (DTC)

B.

Transactional replication

C.

Change data capture

D.

Change tracking

 

Correct Answer: A

 

 

QUESTION 14

You are evaluating the table design. You need to recommend a change to Tables.sql that reduces the amount of time it takes for usp_AttendeesReport to execute. What should you add at line 14 of Tables.sql?

 

A.

FullName nvarchar(100) NOT NULL CONSTRAINT DF_FuIlName DEFAULT

(dbo.CreateFullName (FirstName, LastName)),

B.

FullName AS (FirstName +` ‘+ LastName),

C.

FullName nvarchar(100) NOT NULL DEFAULT (dbo.CreateFullName (FirstName, LastName)).

D.

FullName AS (FirstName +` ‘+ LastName) PERSISTED,

 

Correct Answer: D

Explanation:

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

 

 

QUESTION 15

You need to modify usp_SelectSpeakersByName to support server-side paging. The solution must minimize the amount of development effort required. What should you add to usp_SelectSpeakersByName?

 

A.

A table variable

B.

An OFFSET-FETCH clause

C.

The ROWNUMBER keyword

D.

A recursive common table expression

 

Correct Answer: B

Explanation:

http://www.mssqltips.com/sqlservertip/2696/comparing-performance-for-different-sql- serverpaging-methods/

http://msdn.microsoft.com/en-us/library/ms188385.aspx http://msdn.microsoft.com/en-us/library/ms180152.aspx http://msdn.microsoft.com/en-us/library/ms186243.aspx http://msdn.microsoft.com/en-us/library/ms186734.aspx http://www.sqlserver-training.com/how-to-use-offset-fetch-option-in-sql-server-order- byclause/-

http://www.sqlservercentral.com/blogs/juggling_with_sql/2011/11/30/using-offset-and-fetch/

 

 

QUESTION 16

You need to add a new column named Confirmed to the Attendees table. The solution must meet the following requirements:

 

clip_image009Have a default value of false.

clip_image009[1]Minimize the amount of disk space used.

 

Which code block should you use?

 

A.

ALTER TABLE Attendees

ADD Confirmed bit DEFAULT 0;

B.

ALTER TABLE Attendees

ADD Confirmed char(l) DEFAULT ‘1’;

C.

ALTER TABLE Attendees

ADD Confirmed bit DEFAULT 1;

D.

ALTER TABLE Attendees

ADD Confirmed char(l) DEFAULT `1′;

 

Correct Answer: A

Explanation:

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

 

 

QUESTION 17

You need to create the object used by the parameter of usp_InsertSessions. Which statement should you use?

 

A.

CREATE XML SCHEMA COLLECTION SessionDataTable

B.

CREATE TYPE SessionDataTable AS Table

C.

CREATE SCHEMA SessionDataTable

D.

CREATE TABLE SessionDataTable

 

Correct Answer: B

 

 

QUESTION 18

Developers report that usp_UpdateSessionRoom periodically returns error 3960. You need to prevent the error from occurring. The solution must ensure that the stored procedure returns the original values to all of the updated rows. What should you configure in Procedures.sql?

 

A.

Replace line 46 with the following code:

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

B.

Replace line 46 with the following code:

SET TRANSACTION ISOLATION LEVEL REPEATABLE READ

C.

Move the SELECT statement at line 49 to line 57.

D.

Move the SET statement at line 46 to line 53.

 

Correct Answer: A

 

 

QUESTION 19

You discover that usp.SelectSpeakersByName executes slowly if usp_UpdateSpeakerName executes simultaneously. You need to minimize the execution time of usp.SelectSpeakersByName. The solution must not affect the performance of the other stored procedures. What should you update?

 

A.

Usp_UpdateSpeakerName to use the NOLOCK query hint

B.

Usp_UpdateSpeakerName to use snapshot isolation

C.

Usp_SelectSpeakersByName to use the NOLOCK query hint

D.

Usp_SelectSpeakersByName to use snapshot isolation

 

Correct Answer: C

Explanation:

NOLOCK

Is equivalent to READUNCOMMITTED.

READUNCOMMITTED

Specifies that dirty reads are allowed.

 

 

QUESTION 20

While testing usp.GetFutureSessions, you discover that IX_Sessions is accessed by a scan rather than a seek. You need to minimize the amount of time it takes to execute usp_GetFutureSessions. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

 

clip_image010

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

F.

Option F

 

Correct Answer: BE

Explanation:

Future delivery dates.

 

 

QUESTION 21

You need to ensure that if any of the statements in usp_UpdateSpeakerName return an error message, all of the changes executed by usp_UpdateSpeakerName are not committed to the database. What should you do in Procedures.sql? (Each correct answer presents part of the solution. Choose all that apply.)

 

clip_image011

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

 

Correct Answer: BD

 

 

QUESTION 22

You are evaluating the index design. You need to recommend a change to Indexes.sql that will minimize the amount of time it takes for usp_AttendeesReport to execute. The solution must minimize the amount of database fragmentation. Which line of code should you use to replace line 12 of Indexes.sql?

 

A.

(LastName);

B.

(FirstName) INCLUDE (LastName);

C.

(LastName, FirstName);

D.

(LastName) INCLUDE (FirstName);

 

Correct Answer: C

 

 

QUESTION 23

You need to create the object used by the parameter of usp_InsertSessions. Which statement should you use?

 

A.

CREATE SCHEMA SessionDataTable

B.

CREATE TYPE SessionDataTable AS Table

C.

CREATE TABLE SessionDataTable

D.

CREATE XML SCHEMA COLLECTION SessionDataTable

 

Correct Answer: A

 

Instant Access to Download Latest Complete Collection of Microsoft MCSE 70-464 Real Exam

Try Microsoft MCSE 70-464 Free Demo