2016 Apr 70-459 Study Guide Questions:

Q76. You have a database named DB1.

You plan to create a stored procedure that will insert rows into three different tables. Each insert must use the same identifying value for each table, but the value must increase from one invocation of the stored procedure to the next.

Occasionally, the identifying value must be reset to its initial value.

You need to design a mechanism to hold the identifying values for the stored procedure to use.

What should you do?

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

A. Create a sequence object that holds the next value in the sequence. Retrieve the next value by using the stored procedure. Reset the value by using an ALTER SEQUENCE statement as needed.

B. Create a fourth table that holds the next value in the sequence. At the end each transaction, update the value by using the stored procedure. Reset the value as needed by using an UPDATE statement.

C. Create a sequence object that holds the next value in the sequence. Retrieve the next value by using the stored procedure. Increment the sequence object to the next value by using an ALTER SEQUENCE statement. Reset the value as needed by using a different ALTER SEQUENCE statement.

D. Create an identity column in each of the three tables. Use the same seed and the same increment for each table. Insert new rows into the tables by using the stored procedure.

Use the DBCC CHECKIDENT command to reset the columns as needed.

Answer: A

Q77. DRAG DROP

You are designing an authentication strategy for a new server that has SQL Server 2012 installed.

The strategy must meet the following business requirements:

The account used to generate reports must be allowed to make a connection during certain hours only.

Failed authentication requests must be logged.

You need to recommend a technology that meets each business requirement. The solution must minimize the amount of events that are logged.

Which technologies should you recommend?

To answer, drag the appropriate solution to the correct business requirement in the answer area.

Answer:

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

. Have a default value of TRUE.

. Minimize the amount of disk space used.

Which code segment should you use?

A. ALTER TABLE Employees

ADD Confirmed bit DEFAULT 0;

B. ALTER TABLE Employees

ADD Confirmed char(1) DEFAULT "1";

C. ALTER TABLE Employees

ADD Confirmed char(1) DEFAULT '0'

D. ALTER TABLE Employees

ADD Confirmed bit DEFAULT 1;

Answer: D

Q79. You need to create a function that will use a SELECT statement in ProductsByProductType.sql.

Which code segment should you use to complete the function?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: D

Q80. You are planning the ManufacturingSteps table.

You need to define the ProductID column in the CREATE TABLE statement.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: A

Rebirth 70-459 practice question:

Q81. You are troubleshooting an application that runs a query. The application frequently causes deadlocks.

You need to identify which transaction causes the deadlock.

What should you do?

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