Microsoft 70-465 Exam Practice Questions (P. 2)
- Full Access (64 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
You use SQL Server 2014 to maintain the data used by applications at your company.
You want to execute two statements.
You need to guarantee that either both statements succeed, or both statements fail together as a batch.
Which code should you use?

You want to execute two statements.
You need to guarantee that either both statements succeed, or both statements fail together as a batch.
Which code should you use?

- AOption A
- BOption B
- COption C
- DOption D
- EOption E
Correct Answer:
D
Structure should be:
BEGIN TRY -
BEGIN TRANSACTION -
COMMIT TRANSACTION -
END TRY -
BEGIN CATCH -
ROLLBACK TRANSACTION -
END CATCH.
Reference:
TRY...CATCH (Transact-SQL)
D
Structure should be:
BEGIN TRY -
BEGIN TRANSACTION -
COMMIT TRANSACTION -
END TRY -
BEGIN CATCH -
ROLLBACK TRANSACTION -
END CATCH.
Reference:
TRY...CATCH (Transact-SQL)
send
light_mode
delete
Question #7
You deploy a SQL Server instance named SQLProd that uses SQL Server 2014.
You need to recommend a solution to monitor the transactions that are running currently against SQLProd. The solution must minimize the amount of custom code required.
What should you recommend?
You need to recommend a solution to monitor the transactions that are running currently against SQLProd. The solution must minimize the amount of custom code required.
What should you recommend?
- AStatistics
- BA dynamic management view
- CA trigger
- DUser-defined views
Correct Answer:
B
Dynamic management views and functions return server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance.
Transactions can be monitored.
Reference:
Dynamic Management Views and Functions (Transact-SQL)
B
Dynamic management views and functions return server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance.
Transactions can be monitored.
Reference:
Dynamic Management Views and Functions (Transact-SQL)
send
light_mode
delete
Question #8
You have a SQL Azure database named Database1.
You need to design the schema for a table named table1. Table1 will have less than one million rows. Table1 will contain the following information for each row:

The solution must minimize the amount of space used to store each row.
Which data types should you recommend for each column?
To answer, drag the appropriate data type to the correct column in the answer area.
Select and Place:

You need to design the schema for a table named table1. Table1 will have less than one million rows. Table1 will contain the following information for each row:

The solution must minimize the amount of space used to store each row.
Which data types should you recommend for each column?
To answer, drag the appropriate data type to the correct column in the answer area.
Select and Place:

send
light_mode
delete
Question #9
You have an SQL Server 2014 instance named SQL1.
SQL1 creates error events in the Windows Application event log.
You need to recommend a solution that will run an application when SQL1 logs a specific error in the Application log.
Which SQL elements should you include in the recommendation? (Each correct answer presents part of the solution. Choose all that apply.)
SQL1 creates error events in the Windows Application event log.
You need to recommend a solution that will run an application when SQL1 logs a specific error in the Application log.
Which SQL elements should you include in the recommendation? (Each correct answer presents part of the solution. Choose all that apply.)
- AA policy
- BA maintenance plan
- CAn alert
- DA job
- EA trigger
Correct Answer:
DE
Use a trigger that starts a job which executes the application.
Reference: http://technet.microsoft.com/en-us/library/hh849759.aspx
DE
Use a trigger that starts a job which executes the application.
Reference: http://technet.microsoft.com/en-us/library/hh849759.aspx
send
light_mode
delete
Question #10
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.
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.
- ACreate 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.
- BCreate 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.
- CCreate 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.
- DCreate 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
Correct Answer:
A
* an application can obtain the next sequence number without inserting the row by calling the NEXT VALUE FOR function.
* ALTER SEQUENCE
Includes argument:
RESTART [ WITH <constant> ]
The next value that will be returned by the sequence object. If provided, the RESTART WITH value must be an integer that is less than or equal to the maximum and greater than or equal to the minimum value of the sequence object. If the WITH value is omitted, the sequence numbering restarts based on the original
CREATE SEQUENCE options.
* CREATE SEQUENCE
Creates a sequence object and specifies its properties. A sequence is a user-defined schema bound object that generates a sequence of numeric values according to the specification with which the sequence was created. The sequence of numeric values is generated in an ascending or descending order at a defined interval and can be configured to restart (cycle) when exhausted.
Sequence Numbers
A
* an application can obtain the next sequence number without inserting the row by calling the NEXT VALUE FOR function.
* ALTER SEQUENCE
Includes argument:
RESTART [ WITH <constant> ]
The next value that will be returned by the sequence object. If provided, the RESTART WITH value must be an integer that is less than or equal to the maximum and greater than or equal to the minimum value of the sequence object. If the WITH value is omitted, the sequence numbering restarts based on the original
CREATE SEQUENCE options.
* CREATE SEQUENCE
Creates a sequence object and specifies its properties. A sequence is a user-defined schema bound object that generates a sequence of numeric values according to the specification with which the sequence was created. The sequence of numeric values is generated in an ascending or descending order at a defined interval and can be configured to restart (cycle) when exhausted.
Sequence Numbers
send
light_mode
delete
All Pages