Microsoft 70-462 Exam Practice Questions (P. 4)
- Full Access (320 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 #31
You administer a Microsoft SQL Server 2012 database.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following statements:

You attempt to restore the Orders database and the restore fails. You copy the encryption file to the original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the encryption files to their original location. However, you are unable to access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?

You configure Transparent Data Encryption (TDE) on the Orders database by using the following statements:

You attempt to restore the Orders database and the restore fails. You copy the encryption file to the original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the encryption files to their original location. However, you are unable to access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?

send
light_mode
delete
Question #32
DRAG DROP -
You administer a Microsoft SQL Server 2012 server that has multiple databases.
You need to ensure that users are unable to create stored procedures that begin with sp_.
Which three actions should you perform in sequence? (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:

You administer a Microsoft SQL Server 2012 server that has multiple databases.
You need to ensure that users are unable to create stored procedures that begin with sp_.
Which three actions should you perform in sequence? (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:
Step 1: Create a Condition named StoredProcNamingConvention by using the Stored Procedure facet that has a single expression. Set the Field to @Name,
Operator to NOT LIKE, and Value to 'sp[_]%'.
Step 2: Create a Policy named StoredProcNamingPolicy Set the Check condition to StoredProcNamingConvention and Evaluation Mode to On Change: Prevent
Step 3: Enable StoredProcNamingPolicy
Policies are created and managed by using Management Studio. The process includes the following steps:
1. Select a Policy-Based Management facet that contains the properties to be configured.
2. Define a condition that specifies the state of a management facet.
3. Define a policy that contains the condition, additional conditions that filter the target sets, and the evaluation mode.
4. Check whether an instance of SQL Server is in compliance with the policy.
Evaluation modes -
There are four evaluation modes, three of which can be automated:
✑ On demand. This mode evaluates the policy when directly specified by the user.
✑ On change: prevent. This automated mode uses DDL triggers to prevent policy violations.
Important:
If the nested triggers server configuration option is disabled, On change: prevent will not work correctly. Policy-Based Management relies on DDL triggers to detect and roll back DDL operations that do not comply with policies that use this evaluation mode. Removing the Policy-Based Management DDL triggers or disabling nest triggers, will cause this evaluation mode to fail or perform unexpectedly.
✑ On change: log only. This automated mode uses event notification to evaluate a policy when a relevant change is made.
✑ On schedule. This automated mode uses a SQL Server Agent job to periodically evaluate a policy.
Reference:
http://msdn.microsoft.com/en-us/library/bb510667.aspx

Step 1: Create a Condition named StoredProcNamingConvention by using the Stored Procedure facet that has a single expression. Set the Field to @Name,
Operator to NOT LIKE, and Value to 'sp[_]%'.
Step 2: Create a Policy named StoredProcNamingPolicy Set the Check condition to StoredProcNamingConvention and Evaluation Mode to On Change: Prevent
Step 3: Enable StoredProcNamingPolicy
Policies are created and managed by using Management Studio. The process includes the following steps:
1. Select a Policy-Based Management facet that contains the properties to be configured.
2. Define a condition that specifies the state of a management facet.
3. Define a policy that contains the condition, additional conditions that filter the target sets, and the evaluation mode.
4. Check whether an instance of SQL Server is in compliance with the policy.
Evaluation modes -
There are four evaluation modes, three of which can be automated:
✑ On demand. This mode evaluates the policy when directly specified by the user.
✑ On change: prevent. This automated mode uses DDL triggers to prevent policy violations.
Important:
If the nested triggers server configuration option is disabled, On change: prevent will not work correctly. Policy-Based Management relies on DDL triggers to detect and roll back DDL operations that do not comply with policies that use this evaluation mode. Removing the Policy-Based Management DDL triggers or disabling nest triggers, will cause this evaluation mode to fail or perform unexpectedly.
✑ On change: log only. This automated mode uses event notification to evaluate a policy when a relevant change is made.
✑ On schedule. This automated mode uses a SQL Server Agent job to periodically evaluate a policy.
Reference:
http://msdn.microsoft.com/en-us/library/bb510667.aspx
send
light_mode
delete
Question #33
You administer a Microsoft SQL Server 2012 database.
You provide temporary securityadmin access to User1 to the database server.
You need to know if User1 adds logins to securityadmin.
Which server-level audit action group should you use?
You provide temporary securityadmin access to User1 to the database server.
You need to know if User1 adds logins to securityadmin.
Which server-level audit action group should you use?
- ASERVER_STATE_CHANGE_GROUP
- BSERVER_PRINCIPAL_IMPERSONATION_GROUP
- CSUCCESSFUL_LOGIN_GROUP
- DSERVER_ROLE_MEMBER_CHANGE_GROUP
Correct Answer:
D
The SERVER_ROLE_MEMBER_CHANGE_GROUP event is raised whenever a login is added or removed from a fixed server role. This event is raised for the sp_addsrvrolemember and sp_dropsrvrolemember stored procedures. Equivalent to the Audit Add Login to Server Role Event Class.
Incorrect Answers:
A. The SERVER_STATE_CHANGE_GROUP event is raised when the SQL Server service state is modified. Equivalent to the Audit Server Starts and Stops Event
Class.
B. The SERVER_PRINCIPAL_IMPERSONATION_GROUP event is raised when there is an impersonation within server scope, such as EXECUTE AS <login>.
Equivalent to the Audit Server Principal Impersonation Event Class.
C. The SUCCESSFUL_LOGIN_GROUP Indicates that a principal has successfully logged in to SQL Server. Events in this class are raised by new connections or by connections that are reused from a connection pool. Equivalent to the Audit Login Event Class.
Reference:
http://technet.microsoft.com/en-us/library/cc280663.aspx
D
The SERVER_ROLE_MEMBER_CHANGE_GROUP event is raised whenever a login is added or removed from a fixed server role. This event is raised for the sp_addsrvrolemember and sp_dropsrvrolemember stored procedures. Equivalent to the Audit Add Login to Server Role Event Class.
Incorrect Answers:
A. The SERVER_STATE_CHANGE_GROUP event is raised when the SQL Server service state is modified. Equivalent to the Audit Server Starts and Stops Event
Class.
B. The SERVER_PRINCIPAL_IMPERSONATION_GROUP event is raised when there is an impersonation within server scope, such as EXECUTE AS <login>.
Equivalent to the Audit Server Principal Impersonation Event Class.
C. The SUCCESSFUL_LOGIN_GROUP Indicates that a principal has successfully logged in to SQL Server. Events in this class are raised by new connections or by connections that are reused from a connection pool. Equivalent to the Audit Login Event Class.
Reference:
http://technet.microsoft.com/en-us/library/cc280663.aspx
send
light_mode
delete
Question #34
You administer a Microsoft SQL Server 2012 instance.
You need to stop a blocking process that has an SPID of 64 without stopping other processes
What should you do?
You need to stop a blocking process that has an SPID of 64 without stopping other processes
What should you do?
- AExecute the following Transact-SQL statement: EXECUTE sp_KillSPID 64
- BRestart the SQL Server service.
- CExecute the following Transact-SQL statement: KILL 64
- DExecute the following Transact-SQL statement: ALTER SESSION KILL '64'
Correct Answer:
C
Reference:
http://msdn.microsoft.com/en-us/library/ms173730.aspx
C
Reference:
http://msdn.microsoft.com/en-us/library/ms173730.aspx
send
light_mode
delete
Question #35
DRAG DROP -
You administer a Microsoft SQL Server database server.
A variety of issues occur from time to time in the production environment. You need to identify the appropriate tool for each issue.
Which tool or tools should you use? (To answer, drag the appropriate tool or tools to the correct issue or issues in the answer area. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

You administer a Microsoft SQL Server database server.
A variety of issues occur from time to time in the production environment. You need to identify the appropriate tool for each issue.
Which tool or tools should you use? (To answer, drag the appropriate tool or tools to the correct issue or issues in the answer area. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

send
light_mode
delete
Question #36
You administer a Microsoft SQL Server database.
Users report that an application that accesses the database displays an error, but the error does not provide meaningful information. No entries are found in the
SQL Server log or Windows event logs related to the error.
You need to identify the root cause of the issue by retrieving the error message.
What should you do?
Users report that an application that accesses the database displays an error, but the error does not provide meaningful information. No entries are found in the
SQL Server log or Windows event logs related to the error.
You need to identify the root cause of the issue by retrieving the error message.
What should you do?
- AFlag all stored procedures for recompilation by using sp_recompile.
- BCreate an Extended Events session by using the sqlserver.error_reported event.
- CCreate a Performance Monitor session to capture the SQLServer:SQL Errors object.
- DCreate a SQL Profiler session to capture all ErrorLog and EventLog events.
Correct Answer:
B
Event sqlserver.error_reported: This event gets fired every time that an error happens in the server
Reference:
http://msdn.microsoft.com/en-us/library/bb630282.aspx
B
Event sqlserver.error_reported: This event gets fired every time that an error happens in the server
Reference:
http://msdn.microsoft.com/en-us/library/bb630282.aspx
send
light_mode
delete
Question #37
You administer a Microsoft SQL Server database server. One of the databases on the server supports a highly active OLTP application.
Users report abnormally long wait times when they submit data into the application.
You need to identify which queries are taking longer than 1 second to run over an extended period of time.
What should you do?
Users report abnormally long wait times when they submit data into the application.
You need to identify which queries are taking longer than 1 second to run over an extended period of time.
What should you do?
- Ause SQL Profiler to trace all queries that are processing on the server. Filter queries that have a Duration value of more than 1,000.
- BUse sp_configure to set a value for blocked process threshold. Create an extended event session.
- CUse the Job Activity monitor to review all processes that are actively running. Review the Job History to find out the duration of each step.
- DRun the sp_who command from a query window.
- ERun the DBCC TRACEON 1222 command from a query window and review the SQL Server event log.
Correct Answer:
A
Use SQL Profiler to trace all queries that are processing on the server. Filter queries that have a Duration value of more than 1,000.
Incorrect:
Not B: The SQL Server lock monitor is responsible for implementing the logic to detect a blocking scenario if the blocked process threshold value is greater than
0. However, the lock monitor only wakes up every 5 seconds to detect this condition (it is also looking for other conditions such as deadlocks). Therefore, if you set a blocked process threshold value to 1, it will not detect a process that has been blocking for 1 second. The minimum time it can detect a blocked process is 5 seconds.
Not E: The Traceflag 1222 Shows Deadlocks, not the Duration of an query.
References:
https://docs.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler
A
Use SQL Profiler to trace all queries that are processing on the server. Filter queries that have a Duration value of more than 1,000.
Incorrect:
Not B: The SQL Server lock monitor is responsible for implementing the logic to detect a blocking scenario if the blocked process threshold value is greater than
0. However, the lock monitor only wakes up every 5 seconds to detect this condition (it is also looking for other conditions such as deadlocks). Therefore, if you set a blocked process threshold value to 1, it will not detect a process that has been blocking for 1 second. The minimum time it can detect a blocked process is 5 seconds.
Not E: The Traceflag 1222 Shows Deadlocks, not the Duration of an query.
References:
https://docs.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler
send
light_mode
delete
Question #38
DRAG DROP -
You administer a Microsoft SQL Server database that is used by an application.
Users of the application report performance issues.
You need to choose the appropriate tool for performance-tuning of SQL Server databases.
Which tool or tools should you use? (To answer, drag the appropriate tool or tools to their corresponding task or tasks in the answer area. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

You administer a Microsoft SQL Server database that is used by an application.
Users of the application report performance issues.
You need to choose the appropriate tool for performance-tuning of SQL Server databases.
Which tool or tools should you use? (To answer, drag the appropriate tool or tools to their corresponding task or tasks in the answer area. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Correct Answer:
References:
http://msdn.microsoft.com/en-us/library/bb630282.aspx
http://msdn.microsoft.com/en-us/library/ms191246.aspx
http://msdn.microsoft.com/en-us/library/ms181091.aspx

References:
http://msdn.microsoft.com/en-us/library/bb630282.aspx
http://msdn.microsoft.com/en-us/library/ms191246.aspx
http://msdn.microsoft.com/en-us/library/ms181091.aspx
send
light_mode
delete
Question #39
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
What should you do?
You need to ensure that the size of the transaction log file does not exceed 2 GB.
What should you do?
- AExecute sp_configure 'max log size', 2G.
- Buse the ALTER DATABASE...SET LOGFILE command along with the maxsize parameter.
- CIn SQL Server Management Studio, right-click the instance and select Database Settings. Set the maximum size of the file for the transaction log.
- DIn SQL Server Management Studio, right-click the database, select Properties, and then click Files. Open the Transaction log Autogrowth window and set the maximum size of the file.
Correct Answer:
D
D
send
light_mode
delete
Question #40
You administer a Microsoft SQL Server server. The MSSQLSERVER service uses a domain account named CONTOSO\SQLService.
You plan to configure Instant File Initialization.
You need to ensure that Data File Autogrow operations use Instant File Initialization.
What should you do? Choose all that apply.
You plan to configure Instant File Initialization.
You need to ensure that Data File Autogrow operations use Instant File Initialization.
What should you do? Choose all that apply.
- ARestart the SQL Server Agent Service.
- BDisable snapshot isolation.
- CRestart the SQL Server Service.
- DAdd the CONTOSO\SQLService account to the Perform Volume Maintenance Tasks local security policy.
- EAdd the CONTOSO\SQLService account to the Server Operators fixed server role.
- FEnable snapshot isolation.
Correct Answer:
CD
How To Enable Instant File Initialization
1. Open Local Security Policy and go to Local Policies --> User Rights Assignment.
Double click Perform Volume Maintenance Tasks and add your SQL Server database engine service account.
2. Restart the SQL Server service using SQL Server Configuration Manager and this setting should now be enabled.
References:
http://msdn.microsoft.com/en-us/library/ms175935.aspx
http://www.mssqltips.com/sqlservertip/2752/effect-of-instant-file-initialization-within-sql-server/
CD
How To Enable Instant File Initialization
1. Open Local Security Policy and go to Local Policies --> User Rights Assignment.
Double click Perform Volume Maintenance Tasks and add your SQL Server database engine service account.
2. Restart the SQL Server service using SQL Server Configuration Manager and this setting should now be enabled.
References:
http://msdn.microsoft.com/en-us/library/ms175935.aspx
http://www.mssqltips.com/sqlservertip/2752/effect-of-instant-file-initialization-within-sql-server/
send
light_mode
delete
All Pages