Download as pdf or txt
Download as pdf or txt
You are on page 1of 384

KillTest

*KIJGT  3 WCNKV [   $ GV V GT  5 GT X KE G

Q&A

NZZV ]]]QORRZKYZIUS

=KULLKXLXKK[VJGZKYKX\OIKLUXUTK_KGX
The safer , easier way to help you pass any IT exams. 

Exam : 70-764

Title : Administering a SQL


Database Infrastructure

Version : V11.02

1 / 383
The safer , easier way to help you pass any IT exams. 

1.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You need to configure a Microsoft SQL Server instance to ensure that a user named Mail1 can send mail
by using Database Mail.
Solution: You add the DatabaseMailUserRole to Mail1 in the tempdb database.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
Database Mail is guarded by the database role DatabaseMailUserRole in the msdb database, not the
tempdb database, in order to prevent anyone from sending arbitrary emails. Database users or roles must
be created in the msdb database and must also be a member of DatabaseMailUserRole in order to send
emails with the exception of sysadmin who has all privileges.
Note: Database Mail was first introduced as a new feature in SQLServer 2005 and replaces the SQL Mail
feature found in previous versions.
References:
http://www.idevelopment.info/data/SQLServer/DBA_tips/Database_Administration/DBA_20.shtml

2.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You need to configure a Microsoft SQL Server instance to ensure that a user named Mail1 can send mail
by using Database Mail.
Solution: You add the DatabaseMailUserRole to Mail1 in the msdb database.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
Database Mail is guarded by the database role DatabaseMailUserRole in the msdb database in order to
prevent anyone from sending arbitrary emails. Database users or roles must be created in the msdb
database and must also be a member of DatabaseMailUserRole in order to send emails with the
exception of sysadmin who has all privileges.
Note: Database Mail was first introduced as a new feature in SQL Server 2005 and replaces the SQL Mail
feature found in previous versions.
References:
http://www.idevelopment.info/data/SQLServer/DBA_tips/Database_Administration/DBA_20.shtml

2 / 383
The safer , easier way to help you pass any IT exams. 

3.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You need to configure a Microsoft SQL Server instance to ensure that a user named Mail1 can send mail
by using Database Mail.
Solution: You add the DatabaseMailUserRole to Mail1 in the master database.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
Database Mail is guarded by the database role DatabaseMailUserRole in the msdb database, not the
master database, in order to prevent anyone from sending arbitrary emails. Database users or roles must
be created in the msdb database and must also be a member of DatabaseMailUserRole in order to send
emails with the exception of sysadmin who has all privileges.
Note: Database Mail was first introduced as a new feature in SQL Server 2005 and replaces the SQL Mail
feature found in previous versions.
References:
http://www.idevelopment.info/data/SQLServer/DBA_tips/Database_Administration/DBA_20.shtml

4.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has a server that runs Microsoft SQL Server 2016 Web edition. The server has a default
instance that hosts a database named DB1.
You need to ensure that you can perform auditing at the database level for DB1.
Solution: You migrate DB1 to the default instance on a server that runs Microsoft SQL Server 2016
Standard edition.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
All editions of SQL Server support server level audits. All editions support database level audits beginning
with SQL Server 2016 SP1. Prior to that, database level auditing was limited to Enterprise, Developer,
and Evaluation editions.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-eng
ine

3 / 383
The safer , easier way to help you pass any IT exams. 

5.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has a server that runs Microsoft SQL Server 2016 Web edition. The server has a default
instance that hosts a database named DB1.
You need to ensure that you can perform auditing at the database level for DB1.
Solution: You migrate DB1 to a named instance on a server that runs Microsoft SQL Server 2016
Enterprise edition.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
All editions of SQL Server support server level audits. All editions support database level audits beginning
with SQL Server 2016 SP1. Prior to that, database level auditing was limited to Enterprise, Developer,
and Evaluation editions.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-eng
ine

6.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has a server that runs Microsoft SQL Server 2016 Web edition. The server has a default
instance that hosts a database named DB1.
You need to ensure that you can perform auditing at the database level for DB1.
Solution: You migrate DB1 to a named instance on a server than runs Microsoft SQL Server 2016
Standard edition.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
All editions of SQL Server support server level audits. All editions support database level audits beginning
with SQL Server 2016 SP1. Prior to that, database level auditing was limited to Enterprise, Developer,
and Evaluation editions.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-eng
ine

4 / 383
The safer , easier way to help you pass any IT exams. 

7.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database
instances. The environment hosts several customer databases.
One customer reports that their database is not responding as quickly as the service level agreements
dictate. You observe that the database is fragmented.
You need to optimize query performance.
Solution: You reorganize all indexes.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
You can remedy index fragmentation by either reorganizing an index or by rebuilding an index.
References: https://msdn.microsoft.com/en-us/library/ms189858(v=sql.105).aspx

8.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database
instances. The environment hosts several customer databases.
One customer reports that their database is not responding as quickly as the service level agreements
dictate. You observe that the database is fragmented.
You need to optimize query performance.
Solution: You rebuild all indexes.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
You can remedy index fragmentation by either reorganizing an index or by rebuilding an index.
References: https://msdn.microsoft.com/en-us/library/ms189858(v=sql.105).aspx

9.Note: This question is part of a series of questions that present the same scenario. Each question in the
series contains a unique solution that might meet the stated goals. Some question sets might have more
than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database

5 / 383
The safer , easier way to help you pass any IT exams. 

instances. The environment hosts several customer databases.


One customer reports that their database is not responding as quickly as the service level agreements
dictate. You observe that the database is fragmented.
You need to optimize query performance.
Solution: You run the DBCC CHECKDB command.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
DBCC CHECKDB only checks the logical and physical integrity of all the objects in the specified database.
It does not update any indexes, and does not improve query performance.
References:
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql

10.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are the database administrator for a company that hosts Microsoft SQL Server. You manage both
on-premises and Microsoft Azure SQL Database environments.
One instance hosts a user database named HRDB. The database contains sensitive human resources
data.
You need to grant an auditor permission to view the SQL Server audit logs while following the principle of
least privilege.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View Server State
G. View Definition
H. sysadmin
Answer: F
Explanation:
Unless otherwise specified, viewing catalog views requires a principal to have one of the following:
Membership in the sysadmin fixed server role.
The CONTROL SERVER permission.
The VIEW SERVER STATE permission.
The ALTER ANY AUDIT permission.
The VIEW AUDIT STATE permission (gives only the principal access to the sys.server_audits catalog
view).
References: https://technet.microsoft.com/en-us/library/cc280386(v=sql.110).aspx

6 / 383
The safer , easier way to help you pass any IT exams. 

11.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You manage a Microsoft SQL Server environment. You implement Transparent Data Encryption (TDE).
A user will assist in managing TDE.
You need to ensure that the user can view the TDE metadata while following the principle of lease
privilege.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View Server State
G. View Definition
H. sysadmin
Answer: G
Explanation:
Viewing the metadata involved with TDE requires the VIEW DEFINITION permissionon the certificate.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption
-tde

12.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are the database administrator for a company that hosts Microsoft SQL Server. You manage both
on-premises and Microsoft Azure SQL Database environments.
You have a user database named HRDB that contains sensitive human resources data. The HRDB
backup files must be encrypted.
You need to grant the correct permission to the service account that backs up the HRDB database.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View Server State
G. View Definition
H. sysadmin
Answer: G

7 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Restoring the encrypted backup: SQL Server restore does not require any encryption parameters to be
specified during restores. It does require that the certificate or the asymmetric key used to encrypt the
backup file be available on the instance that you are restoring to. The user account performing the restore
must have VIEW DEFINITION permissions on the certificate or key.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-encryption

13.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are the database administrator for a company that hosts Microsoft SQL Server. You manage both
on-premises and Microsoft Azure SQL Database environments.
You plan to delegate encryption operations to a user.
You need to grant the user permission to implement cell-level encryption while following the principle of
least privilege.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View ServerState
G. View Definition
H. sysadmin
Answer: G
Explanation:
The following permissions are necessary to perform column-level encryption, or cell-level encryption.
CONTROL permission on the database.
CREATE CERTIFICATE permission on the database. Only Windows logins, SQL Server logins, and
application roles can own certificates. Groups and roles cannot own certificates.
ALTER permission on the table.
Some permission on the key and must not have been denied VIEW DEFINITION permission.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/encrypt-a-column-of-data

14.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database
instances. The environment hosts a customer database named DB1.
Customers connect to hosted database instances by using line-of-business applications. Developers
connect by using SQL Server Management Studio (SSMS).

8 / 383
The safer , easier way to help you pass any IT exams. 

You need to grant the developers permission to alter views for DB1 while following the principle of least
privilege.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View Server State
G. View Definition
H. sysadmin
Answer: A
Explanation:
To execute ALTER VIEW, at a minimum, ALTER permission on OBJECT is required.
Members of the db_ddladmin fixed database role can run any Data Definition Language (DDL) command
in a database.
References: https://technet.microsoft.com/en-us/library/ms190667(v=sql.90).aspx

15.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are the database administrator for a company that hosts Microsoft SQL Server. You manage both
on-premises and Microsoft Azure SQL Database environments.
Clients connect to databases by using line-of-business applications. Developers connect by using SQL
Server Management Studio (SSMS).
You need to provide permissions to a service account that will be used to provision a new database for a
client.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View Server State
G. View Definition
H. sysadmin
Answer: C
Explanation:
Members of the dbcreator fixed server role can create, alter, drop, and restore any database.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/server-level-role
s

9 / 383
The safer , easier way to help you pass any IT exams. 

16.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are examining information about users, sessions, and processed in an on-premises Microsoft SQL
Server Database Engine instance.
You need to return information about processes that are not idle, that belong to a specific user, or that
belong to a specific session.
What should you use?
A. Activity Monitor
B. sp_who3
C. SQL Server Management Studio (SSMS) Object Explorer
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: B
Explanation:
Use sp_who3 to first view the current system load and to identify a session of interest. You should
execute the query several times to identify which session id is most consuming teh system resources.
Parameters
sp_who3 null - who is active;
sp_who3 1 or 'memory' - who is consuming the memory;
sp_who3 2 or 'cpu' - who has cached plans that consumed the most cumulative CPU (top 10);
sp_who3 3 or 'count' - who is connected and how many sessions it has;
sp_who3 4 or 'idle' - who is idle that has open transactions;
sp_who3 5 or 'tempdb' - who is running tasks that use tempdb (top 5); and,
sp_who3 6 or 'block' - who is blocking.

17.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You observe that several indexes are fragmented.
You need to rebuild the indexes.
What should you use?
A. Activity Monitor
B. Sp_who3
C. Object Explorer in the SQL Server Management Studio (SSMS)
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: C
Explanation:
How to: Rebuild an Index (SQL Server Management Studio)

10 / 383
The safer , easier way to help you pass any IT exams. 

To rebuild an index
In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that
instance.
Expand
Databases, expand the database that contains the table with the specified index, and then expand Tables.
Expand the table in which the index belongs and then expand Indexes.
Right-click the index to rebuild and then click Rebuild.
To start the rebuild operation, click OK.
References: https://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx

18.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You need to examine information about logins, CPU times, and Disk I/O on a particular database in
Microsoft Azure.
What should you use?
A. Activity Monitor
B. Sp_who3
C. SQL Server Management Studio (SSMS) Object Explorer
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: A
Explanation:
Activity Monitor displays information about SQL Server processes and how these processes affect the
current instance of SQL Server.
Activity Monitor is a tabbed document window with the following expandable and collapsible panes:
Overview, Active User Tasks, Resource Waits, Data File I/O, and Recent Expensive Queries.
The Activity User Tasks Pane shows information for active user connections to the instance, including the
following column:
* Login: The SQL Server login name under which the session is currently executing.
The Recent Expensive Queries Pane shows information about the most expensive queries that have
been run on the instance over the last 30 seconds, including the following column:
* CPU (ms/sec): The rate of CPU use by the query
References: https://technet.microsoft.com/en-us/library/cc879320(v=sql.105).aspx

19.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You collect performance metrics on multiple Microsoft SQL Server instances and store the data in a single
repository.
You need to examine disk usage, query statistics, and server activity without building custom counters.

11 / 383
The safer , easier way to help you pass any IT exams. 

What should you use?


A. Activity Monitor
B. Sp_who3 stored procedure
C. Object Explorer in the Microsoft SQL Server Management Studio (SSMS)
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: D
Explanation:
The data collector is a core component of the data collection platform for SQL Server 2017 and the tools
that are provided by SQL Server. The data collector provides one central point for data collection across
your database servers and applications. This collection point can obtain data from a variety of sources
and is not limited to performance data

20.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are examining information about users, sessions, and processes in an on-premises Microsoft SQL
Server 2016 Standard Edition server.
You need to identify waits for resources and return only the following information:
a list of all databases on the SQL Server instance, along with information about the database files, their
paths, and names
a list of the queries recently executed that use most of memory, disk, and network resources
What should you use?
A. Activity Monitor
B. Sp_who3
C. SQL Server Management Studio (SSMS) Object Explorer
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: E
Explanation:
SQL Server Data Tools (SSDT) is a Microsoft Visual Studio environment for creating business intelligence
solutions. SSDT features the Report Designer authoring environment, where you can open, modify,
preview, save, and deploy Reporting Services paginated report definitions, shared data sources, shared
datasets, and report parts.
References: https://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx

21.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You have an on-premises server that runs Microsoft SQL Server 2016 Standard Edition.

12 / 383
The safer , easier way to help you pass any IT exams. 

You need to identify missing indexes.


What should you use?
A. Activity Monitor
B. Sp_who3
C. SQL Server Management Studio (SSMS) Object Explorer
D. SQL Server Data Collector
E. SQL Server Data Tools (SSDT)
F. SQL Server Configuration Manager
Answer: D
Explanation:
Data Collector can gather performance information from multiple SQL Server instances and store it in a
single repository. It has three built-in data collecting specifications (data collectors) designed to collect the
most important performance metrics. The information collected by default is about disk usage, query
statistics, and server activity.
The Query Statistics data collection set collects information about query statistics, activity, execution plans
and text on the SQL Server instance.
Missing indexes can be found with the execution plans.
References: https://www.sqlshack.com/sql-server-performance-monitoring-data-collector/

22.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer
databases, and each customer uses a dedicated instance. The environments that you manage are shown
in the following table.

13 / 383
The safer , easier way to help you pass any IT exams. 

You need to configure monitoring for Tailspin Toys.


In the table below, identify the monitoring tool that you must use for each activity.
NOTE: Make only one selection in each column.

14 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Monitoring from application: Transact-SQL
Transact-SQL can be used to monitor a customized application.
Trend analysis: System Monitor
System Monitor can provide trend analysis.
From question:
Tailspin Toys has a custom application that accesses a hosted database named TSpinDB. The application
will monitor TSpinDB and capture information over time about which database objects are accessed and
how frequently they are accessed.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/performance/performance-monitoring-and-tuni
ng-tools

23.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer

15 / 383
The safer , easier way to help you pass any IT exams. 

databases, and each customer uses a dedicated instance.


The environments that you manage are shown in the following table.

You need to implement a process for importing data into WingDB.


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.

16 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

17 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1: Perform a full backup of the database and enable the bulk-logged recovery model.
Not: Simple recovery model.
With the Simple recovery model we cannot minimize data loss.
Step 2: Import the data
Step 3: Backup the tail of the transaction log.
For databases that use full and bulk-logged recovery, database backups are necessary but not sufficient.
Transaction log backups are also required.
Note: Three recovery models exist: simple, full, and bulk-logged. Typically, a database uses the full
recovery model or simple recovery model. A database can be switched to another recovery model at any
time.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server

24.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer
databases, and each customer uses a dedicated instance.
The environments that you manage are shown in the following table.

18 / 383
The safer , easier way to help you pass any IT exams. 

You need to configure auditing for the Adventure Works environment.


How should you complete the Transact-SQL statement? To answer, select the appropriate options in the
answer area.
NOTE: Each correct selection is worth one point.

19 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

20 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Box 1: CREATE SERVER AUDIT
Create the server audit.
You must implement auditing to record access to data that is considered sensitive by the company.
Create database audit
Box 2: ALTER SERVER AUDIT
Enable the server audit.
Box 3: CREATE DATABASE AUDIT
Create the database audit specification.

21 / 383
The safer , easier way to help you pass any IT exams. 

Box 4: FOR SERVER AUDIIT


You must implement auditing for all objects in the ADVSchema.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/create-a-server-audit-and-dat
abase-audit-specification

25.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer
databases, and each customer uses a dedicated instance.
The environments that you manage are shown in the following table.

22 / 383
The safer , easier way to help you pass any IT exams. 

You need to configure the Contoso instance.


How should you complete the Transact-SQL statement? To answer, select the appropriate Transact-SQL
segments in the answer area.

23 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: show advanced options
Advanced configuration options are displayed by first setting show advanced option to 1.
Box 2: max worker threads
SQL Server uses the native thread services of the operating systems so that one or more threads support

24 / 383
The safer , easier way to help you pass any IT exams. 

each network that SQL Server supports simultaneously, another thread handles database checkpoints,
and a pool of threads handles all users. The default value for max worker threads is 0. This enables SQL
Server to automatically configure the number of worker threads at startup. The default setting is best for
most systems.
References:
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-max-worker-thre
ads-server-configuration-option

26.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer
databases, and each customer uses a dedicated instance.
The environments that you manage are shown in the following table.

25 / 383
The safer , easier way to help you pass any IT exams. 

You need to monitor WingDB and gather information for troubleshooting issues.
What should you use?
A. sp_updatestats
B. sp_lock
C. sys.dm_os_waiting_tasks
D. sys.dm_tran_active_snapshot_database_transactions
E. Activity Monitor
Answer: B
Explanation:
The sp_lock system stored procedure is packaged with SQL Server and will give you insight into the locks

26 / 383
The safer , easier way to help you pass any IT exams. 

that are happening on your system. This procedure returns much of its information from the syslock info in
the master database, which is a system table that contains information on all granted, converting, and
waiting lock requests.
Note: sp_lock will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new
development work, and plan to modify applications that currently use this feature. To obtain information
about locks in the SQL Server Database Engine, use the sys.dm_tran_locks dynamic management view.
sys.dm_tran_locks returns information about currently active lock manager resources in SQL Server
2008and later. Each row represents a currently active request to the lock manager for a lock that has
been granted or is waiting to be granted.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-lock-transact-sql

27.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You are a database administrator for a company that has an on-premises Microsoft SQL Server
environment and Microsoft Azure SQL Database instances. The environment hosts several customer
databases, and each customer uses a dedicated instance.
The environments that you manage are shown in the following table.

27 / 383
The safer , easier way to help you pass any IT exams. 

You need to configure auditing for WDWDB.


In the table below, identify the event type that you must audit for each activity.

28 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

28.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance. The topology for the environment is shown in the following diagram.

29 / 383
The safer , easier way to help you pass any IT exams. 

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The recovery point objective (RPO) for each instance is shown in the following table.

30 / 383
The safer , easier way to help you pass any IT exams. 

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to create the connection strings for the operations and reporting systems.
In the table below, identify the option that must be specified in each connection string.
NOTE: Make only one selection in each column.

Answer:

31 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Reporting system: Connect to any current read-only replica instance
We configure Read-OnlyAccess on an Availability Replica. We select Read-intent only. Only read-only
connections are allowed to secondary databases of this replica. The secondary database(s) are all
available for read access.
From Scenario: Reporting system: This solution accesses data inDB1with a login that is mapped to a
database user that is a member of the db_datareader role. The user has EXECUTE permissions on the
database. Queries make no changes to the data. The queries must be load balanced over variable
read-only replicas.
Operating system: Connect to the current primary replica SQL instance
By default, both read-write and read-intent access are allowed to the primary replica and no connections
are allowed to secondary replicas of an Always On availability group.
From scenario: Operations system: This solution accesses data inDB1with a login that is mapped to a
database user that is a member of the db_datareader and db_datawriter roles. The user has EXECUTE
permissions on the database. Queries from the operations system will perform both DDL and DML
operations.
References:
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-read-only-ac
cess-on-an-availability-replica-sql-server

29.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance. The topology for the environment is shown in the following diagram.

32 / 383
The safer , easier way to help you pass any IT exams. 

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The recovery point objective (RPO) for each instance is shown in the following table.

33 / 383
The safer , easier way to help you pass any IT exams. 

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to propose a new process for the StagedExternal database.


Which five actions should you recommended be performed in sequence? To answer, move the
appropriate actions from the list of actions to the answer area and arrange them in the correct order.

34 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

35 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
From scenario: Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process
loads data into an empty table that has a rowstore clustered index and two nonclustered rowstore
indexes.
You must minimize the growth of the StagedExternaldatabase log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
All databases use the full recovery model.
References: https://technet.microsoft.com/en-us/library/ms190421(v=sql.105).aspx

30.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance.
The topology for the environment is shown in the following diagram.

36 / 383
The safer , easier way to help you pass any IT exams. 

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The recovery point objective (RPO) for each instance is shown in the following table.

37 / 383
The safer , easier way to help you pass any IT exams. 

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to analyze the wait type and statistics for specific instanced in the environment.
Which object should you use to gather information about each instance? To answer, drag the appropriate
objects to the correct instances. Each object 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.
NOTE: Each correct selection is worth one point.

38 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:

39 / 383
The safer , easier way to help you pass any IT exams. 

Instance 1: sys.dm_exec_query_stats
From Scenario: Instance1 requirement: Aggregate statistics since last server restart.
sys.dm_exec_query_stats returns aggregate performance statistics for cachedquery plans in SQL Server.
Instance 4: sys.dm_os_wait_stats
sys.dm_os_wait_statsreturns information about all the waits encountered by threads that executed.
From Scenario: Instance4 requirement: Identify the most prominent wait types.

Instance 5:sys.dm_exec_session_wait_stats
From Scenario: Instance5 requirement: Identify all wait types for queries currently running on the server.
sys.dm_exec_session_wait_stats returns information about all the waits encountered by threads that
executed for each session.

31.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance. The topology for the environment is shown in the following diagram.

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

40 / 383
The safer , easier way to help you pass any IT exams. 

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The details for AG1 are shown in the following table.

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to configure a new replica of AG1 on Instance6.


How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL
statements to the correct locations. Each Transact-SQL segment 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.

41 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

42 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Scenario: You plan to add a new instance named Instance6 to a datacenter that is geographically distant
from Site1 and Site2. You must minimize latency between the nodes in AG1.
Box 1: REPLICA
MODIFY REPLICA ON modifies any of the replicas ofthe availability group.
Box 2: SYNCHRONOUS_COMMIT
You must minimize latency between the nodes in AG1
AVAILABILITY_MODE = {SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT}
Specifies whether the primary replica has to wait for the secondary availability group to acknowledge the
hardening (writing) of the log records to disk before the primary replica can commit the transaction on a
given primary database.

43 / 383
The safer , easier way to help you pass any IT exams. 

FAILOVER AUTOMATIC (box 4) requires SYNCHRONOUS_COMMIT


Box 3: REPLICA
MODIFY REPLICA ON modifies any of the replicas of the availability group.
Box 4: AUTOMATIC
You must minimize latency between the nodes in AG1
FAILOVER_MODE = {AUTOMATIC | MANUAL}
Specifies the failover mode of the availability replica that you are defining.
FAILOVER_MODE is required in the ADD REPLICA ON clause and optional in the MODIFY REPLICA ON
clause.
AUTOMATIC enables automatic failover. AUTOMATIC is supported only if you also specify
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-availability-group-transact-sql

32.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance.
The topology for the environment is shown in the following diagram.

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

44 / 383
The safer , easier way to help you pass any IT exams. 

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The details for AG1 are shown in the following table.

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to create a backup plan for Instance4.


Which backup plan should you create?
A. Weekly full backups, nightly differential. No transaction log backups are necessary.
B. Weekly full backups, nightly differential backups, transaction log backups every 5 minutes.
C. Weekly full backups, nightly differential backups, transaction log backups every 12 hours.
D. Full backups every 60 minutes, transaction log backups every 30 minutes.
Answer: B

45 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
From scenario: Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write
I/O. The recovery point objective of Instancse4 is 60 minutes. RecoveryPoint Objectives are commonly
described as the amount of data that was lost during the outage and recovery period. You should
minimize both the time required to restore the databases and the space required to store backups.
References: http://sqlmag.com/blog/sql-server-recovery-time-objectives-and-recovery-point-objectives

33.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance. The topology for the environment is shown in the following diagram.

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT

46 / 383
The safer , easier way to help you pass any IT exams. 

operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The details for AG1 are shown in the following table.

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

You need to reduce the amount of time it takes to backup OperationsMain.


What should you do?
A. Modify the backup script to use the keyword SKIP in the FILE_SNAPSHOT statement.
B. Modify the backup script to use the keyword SKIP in the WITH statement
C. Modify the backup script to use the keyword NO_COMPRESSION in the WITH statement.
D. Modify the full database backups script to stripe the backup across multiple backup files.
Answer: D
Explanation:
One of the filegroup is read_only should be as it only need to be backup up once. Partial backups are
useful whenever you want to exclude read-only filegroups. A partial backup resembles a full database
backup, but a partial backup does not contain all the filegroups. Instead, for a read-write database, a
partial backup contains the data in the primary filegroup, every read-write filegroup, and, optionally, one or
more read-only files. A partial backup of a read-only database contains only the primary filegroup.
From scenario: Instance1 experiences heavy read-write traffic. The instance hosts a database named

47 / 383
The safer , easier way to help you pass any IT exams. 

OperationsMainthat is four terabytes (TB) in size. The database has multiple data files and filegroups.
One of the filegroups is read_only and is half of the total database size.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/partial-backups-sql-server

34.DRAG DROP
You have a database.
The existing backups for the database and their corresponding files are listed in the following table.

You purchase a new server. You must restore the database to the new server.
You need to restore the data to the most recent time possible.
Which three files should you restore in sequence? To answer, move the appropriate files from the list of
files to the answer area and arrange them in the correct order.

Answer:

48 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1: Full.
Start with the full backup.
Step 2: Diff_20160503_1700.bak
Followed by the most recent differential backup.
Step 3: Log_20160503_1900.bak
And finally the most recent log backup (the only log backup done after the most recent differential
backup).
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/differential-backups-sql-server

35.A Microsoft SQL Server database named DB1 has two filegroups named FG1 and FG2. You
implement a backup strategy that creates backups for the filegroups.
DB1 experiences a failure. You must restore FG1 and then FG2.
You need to ensure that the database remains in the RECOVERING state until the restoration of FG2
completes. After the restoration of FG2 completes, the database must be online.
What should you specify when you run the recovery command?
A. the WITH NORECOVERY clause for FG1 and the WITH RECOVERY clause for FG2
B. the WITH RECOVERY clause for FG1 and the WITH RECOVERY clause for FG2
C. the WITH RECOVERY clause for both FG1 and FG2
D. the WITH NORECOVERY clause for both FG1 and FG2
Answer: A

36.DRAG DROP
You have a test server that contains a database named DB1. Backups of the database are written to a

49 / 383
The safer , easier way to help you pass any IT exams. 

single backup device. The backup device has a full, differential, and transaction log backup.
You discover that the database is damaged. You restore the database to the point at which the differential
backup was taken.
You need to rebuild the database with data stored in the latest transaction logs.
How should you complete the Transact-SQL statement? To answer. drag the appropriate Transact-SQL
segments to the correct locations. Each Transact-SQL segment 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.

Answer:

Explanation:
Box 1: RESTORE

50 / 383
The safer , easier way to help you pass any IT exams. 

Box 2: RECOVERY
The RESTORE ... WITH RECOVERY option puts the database into a useable state, so users can access
a restored database.
References:
https://www.mssqltips.com/sqlservertutorial/112/recovering-a-database-that-is-in-the-restoring-state/

37.You have a database named DB1 that is configured to use the full recovery model. You have a full
daily backup job that runs at 02:00. The job backs up data from DB1 to the file B:\DB1.bak.
You need to restore the DB1 database to the point in time of May 25, 2016 at 02:23 and ensure that the
database is functional and starts to accept connections.
Which Transact-SQL statement should you run?

A. Option A
B. Option B
C. Option C
D. Option D
Answer: B

38.HOTSPOT
You manage a Microsoft-SQL Server database named sales Orders.
You need to verify the integrity of the database and attempt to repair any errors that are found. Repair
must not cause any data to be lost in the database.
How should you complete the DBCC command? To answer, select the appropriate options in the answer
area.

51 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: CHECKDB
DBCC CHECKDB checks the logical and physical integrity of all the objects in the specified database.
Partial syntax:
DBCC CHECKDB
[ ( database_name | database_id | 0
[ , NOINDEX
| , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]
….
Box 2: REPAIR_REBUILD
DBCC CHECKDB …REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST |REPAIR_REBUILD specifies that
DBCC CHECKDB repair the found errors.
REPAIR_REBUILD performs repairs that have no possibility of data loss. This can include quick repairs,
such as repairing missing rows in non-clustered indexes, and more time-consuming repairs, such as
rebuilding an index.
References:
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql

39.HOTSPOT
You manage a Microsoft SQL Server environment. You have a database named salesOrders that includes
a table named Table1.
Table1 becomes corrupt. You repair the table.
You need to verify that all the data in Table1 complies with the schema.
How should you complete the Transact-SQL code statement? To answer, select the appropriate
Transact-SQL code segments in the dialog box in the answer area.

52 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: CHECKCONSTRAINTS
DBCC CHECKCONSTRAINTS checks the integrity of a specified constraint or all constraints on a
specified table in the current database.
Box 2: ALL_CONSTRAINTS
ALL_CONSTRAINTS checks all enabled and disabled constraints on the table if the table name is
specified or if all tables are checked;otherwise, checks only the enabled constraint.
Note: Syntax: DBCC CHECKCONSTRAINTS
[
(
table_name | table_id | constraint_name | constraint_id
)
]
[ WITH
[ { ALL_CONSTRAINTS | ALL_ERRORMSGS } ]
[ , ] [NO_INFOMSGS ]
]
References:
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkconstraints-transact-s
ql

40.DRAG DROP
You are configuring a new Microsoft SQL Server Always On Availability Group. You plan to configure a
shared network location at \\DATA-CI1\SQL.
You need to create an availability group listener named AGL1 on port 1433.
In which order should you perform the actions? To answer, move all actions from the list of actions to the
answer area and arrange them in the correct order.

53 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Step 1: Launch the Failover Cluster Manager and..
To support theAlways On availability groups feature, ensure that every computer that is to participate in

54 / 383
The safer , easier way to help you pass any IT exams. 

one or more availability groups meets requirements including:


* Ensure that each computer is a node in a WSFC (Windows Server Failover Clustering).
Step 2: Add andconfigure the replica and…
All the server instances that host availability replicas for an availability group must use the same SQL
Server collation.
Step 3: Enable the SQL Server 2016 Always On Availability Group feature.
Enable the Always On availability groups feature on each server instance that will host an availability
replica for any availability group. On a given computer, you can enable as many server instances for
Always On availability groups as your SQL Server installation supports.
Step 4: Create the Always On Availability Group and..
Using Transact-SQL to create or configure an availability group listener
Step 5: Select the Full data synchronization method and…
References: https://technet.microsoft.com/en-us/library/jj899851(v=sc.12).aspx
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/create-or-configure-an
-availability-group-listener-sql-server

41.HOTSPOT
You are configuring log shipping for a Microsoft SQL Server database named salesOrders.
You run the following Transact-SQL script:

55 / 383
The safer , easier way to help you pass any IT exams. 

You need to determine the changes that the script has on the environment.
How does the script affect the environment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

56 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: is
The dedicated backup file share is \\localhost\Backup
Box 2: does not run
The only thing with a name related to ADATM-SQL11 is the schedule name.

57 / 383
The safer , easier way to help you pass any IT exams. 

Box 3: 72 hours
4320 minutes equals 72 hours.
Note: @backup_retention_period= ] backup_retention_period
Isthe length of time, in minutes, to retain the log backup file in the backup directory on the primary server.
backup_retention_period is int, with no default, and cannot be NULL.
Box 4: 15 minutes.
[ @freq_subday_type = ] freq_subday_type
Specifies the units for freq_subday_interval. freq_subday_typeis int, with a default of 0, and can be one of
these values.
Here it is 4, which means minutes.
[ @freq_subday_interval = ] freq_subday_interval
The number of freq_subday_type periods to occur between eachexecution of a job.
freq_subday_intervalis int, with a default of 0.
Note: Interval should be longer than 10 seconds. freq_subday_interval is ignored in those cases where
freq_subday_type is equal to 1.
Here it is 15.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-schedule-tra
nsact-sql
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-log-shipping
-primary-database-transact-sql

42.HOTSPOT
You are planning the deployment of two new Always On Failover Cluster Instances (FCIs) of Microsoft
SQL Server to a single Windows Server Cluster with three nodes.
The planned configuration for the cluster is shown in the Server Layout exhibit. (Click the Exhibit button.)

The SAN team has configured storage for the cluster and sent the configuration to you in the email shown
in the SAN Team Email exhibit. (Click the Exhibit button.)

58 / 383
The safer , easier way to help you pass any IT exams. 

Each node of the cluster has identical local storage available as shown in the Local Storage exhibit. (Click
the Exhibit button.)

All local storage is on SSD.


You need to plan specific configurations for the new cluster.
For each of the following statement, select Yes if the statement is true. Otherwise, select No.

Answer:

59 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Box 1: Yes
tempdb on local storage. FCIs now support placement of tempdb on local non-shared storage, such as a
local solid-state-drive, potentially offloading a significant amount of I/O from a shared SAN.
Prior to SQL Server 2012, FCIs required tempdb to be located on a symmetrical shared storage volume
that failed over with other system databases.
Box 2: No
The VNN is set on the group level, not on the instance level.
Database client applications can connect directly to a SQL Server instance network name, or they may
connect to a virtual network name (VNN) that is bound to an availability group listener. The VNN abstracts
the WSFC cluster and availability group topology, logically redirecting connection requests to the
appropriate SQL Server instance and database replica.
The logical topology of a representative AlwaysOn solution is illustrated in this diagram:

60 / 383
The safer , easier way to help you pass any IT exams. 

Box 3: No
You don't configure the SAN from a SQL Server, instead you can use a Microsoft Server server.
References:
http://download.microsoft.com/download/d/2/0/d20e1c5f-72ea-4505-9f26-fef9550efd44/microsoft%20sql
%20server%20alwayson%20solutions%20guide%20for%20high%20availability%20and%20disaster%20
recovery.docx

43.HOTSPOT
You are planning to deploy log shipping for Microsoft SQL Server and store all backups on a dedicated
fileshare.
You need to configure the servers to perform each log shipping step.
Which server instance should you configure to perform each action? To answer, select the appropriate
server instances in the dialog box in the answer area.

61 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

62 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Note: Before you configure log shipping, you must create a share to make the transaction log backups
available to the secondary server.
SQL Server Log shipping allows you to automatically send transaction log backups from a primary
database on a primary server instance to one or more secondary databases on separate secondary
server instances. The transaction log backups are applied to each of the secondary databases individually.
An optional third server instance, known as the monitor server, records the history and status of backup
and restore operations and, optionally, raises alerts if these operations fail to occur as scheduled.
Box 1: Primary server instance.
The primary server instance runs the backup job to back up the transaction log on the primary database.
backup job: A SQL Server Agent job that performs the backup operation, logs history to the local server
and the monitor server, and deletes old backup files and history information. When log shipping is
enabled, the job category "Log Shipping Backup" is created on the primary server instance.
Box 2: Secondary server instance
Each of the three secondary server instances runs its own copy job to copy the primary log-backup file to
its own local destination folder.
copy job: A SQL Server Agent job that copies the backup files from the primary server to a configurable
destination on the secondary server and logs history on the secondary server and the monitor server.
When log shipping is enabled on a database, the job category "Log Shipping Copy" is created on each
secondary server in a log shipping configuration.

63 / 383
The safer , easier way to help you pass any IT exams. 

Box 3: Secondary server instance.


Each secondary server instance runs its own restore job to restore the log backup from the local
destination folder onto the local secondary database.
restore job: A SQL Server Agent job that restores the copied backup files to the secondary databases. It
logs history on the local server and the monitor server, and deletes old files and old history information.
When log shipping is enabled on a database, the job category "Log Shipping Restore" is created on the
secondary server instance.
References:
https://docs.microsoft.com/en-us/sql/database-engine/log-shipping/about-log-shipping-sql-server

44.HOTSPOT
You manage a Microsoft SQL Server instance. You have a user named User1.
You need to grant the minimum permissions necessary to allow User1 to review audit logs.
For each action, which option should you use? To answer, select the appropriate options in the answer
area.

Answer:

64 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Box 1: securityadmin
To access log files for instances of SQL Server that are online, this requires membership in the
securityadmin fixed server role.
Box 2: sys.server_audit_specifications
sys.server_audit_specifications contains information about the server audit specifications in a SQL Server
audit on a server instance.

45.DRAG DROP
You administer a Microsoft SQL Server database named Contoso.
You create a stored procedure named Sales.ReviewInvoice by running the following Transact-SQL
statement:

You need to create a Windows-authenticated login named ContosoSearch and ensure that
ContosoSearch can run the Sales.ReviewInvoices stored procedure.
Which three Transact-SQL segments should you use to develop the solution? To answer, move the
appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and
arrange them in the correct order.

65 / 383
The safer , easier way to help you pass any IT exams. 

Answer:
Explanation:

66 / 383
The safer , easier way to help you pass any IT exams. 

46.You have a database that stores information for a shipping company.


You create a table named Customers by running the following Transact-SQL statement. (Line numbers
are included for reference only.)

67 / 383
The safer , easier way to help you pass any IT exams. 

You need to ensure that salespeople can view data only for the customers that are assigned to them.
Which Transact-SQL segment should you insert at line 07?
A. RETURNS varchar (20) WITH Schemabinding
B. RETURNS dbo.CustomersORDER BY @salesPerson
C. RETURNS tableORDER BY @salesPerson
D. RETURNS tableWITH Schemabinding
Answer: D
Explanation:
The return value can either be a scalar (single) value or a table.
SELECT 1 just selects a 1 for every row, of course.
What it's used for in this case is testing whether any rows exist that match the criteria: if a row exists that
matches the WHERE clause, then it returns 1, otherwise it returns nothing.
Specify the WITH SCHEMABINDING clause when you are creating the function. This ensures that the
objects referenced in the function definition cannot be modified unless the function is also modified.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql

47.You manage a Microsoft SQL Server environment. You plan to encrypt data when you create backups.
You need to configure the encryption options for backups.
What should you configure?
A. a certificate
B. an MD5 hash
C. a DES key
D. an AES 256-bit key
Answer: D
Explanation:
To encrypt during backup, you must specify an encryption algorithm, and an encryptor to secure the
encryption key. The following are the supported encryption options:
Encryption Algorithm: The supported encryption algorithms are: AES 128, AES 192, AES 256, and Triple
DES
Encryptor: A certificate or asymmetric Key
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-encryption

48.You have a database named DB1 that stores more than 700 gigabyte (GB) of data and serves millions
of requests per hour.
Queries on DB1 are taking longer than normal to complete.

68 / 383
The safer , easier way to help you pass any IT exams. 

You run the following Transact-SQL statement:


SELECT * FROM sys.database_query_store_options
You determine that the Query Store is in Read-Only mode.
You need to maximize the time that the Query Store is in Read-Write mode.
Which Transact-SQL statement should you run?
A. ALTER DATABASE DB1SET QUERY_STORE (QUERY_CAPTURE_MODE = ALL)
B. ALTER DATABASE DB1SET QUERY_STORE (MAX_STORAGE_SIZE_MB = 50)
C. ALTER DATABASE DB1SET QUERY_STORE (CLEANUP_POLICY =
(STALE_QUERY_THRESHOLD_DAYS = 14));
D. ALTER DATABASE DB1SET QUERY_STORE (QUERY_CAPTURE_MODE = NONE)
Answer: C
Explanation:
Stale Query Threshold (Days): Time-based cleanup policy that controls the retention period of persisted
runtime statistics and inactive queries.
By default, Query Store is configured to keep the data for 30 days which may be unnecessarily long for
your scenario.
Avoid keeping historical data that you do not plan to use. This will reduce changes to read-only status.
The size of Query Store data as well as the time to detect and mitigate the issue will be more predictable.
Use Management Studio or the following script to configure time-based cleanup policy:
ALTER DATABASE [QueryStoreDB]
SET QUERY_STORE (CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 14));
References:
https://docs.microsoft.com/en-us/sql/relational-databases/performance/best-practice-with-the-query-store

49.HOTSPOT
You deploy a Microsoft SQL Server instance to support a global sales application. The instance includes
the following tables: TableA and TableB.
TableA is a partitioned table that uses an incrementing integer number for partitioning. The table has
millions of rows in each partition. Most changes to the data in TableA affect recently added data. The
UPDATE STATISTICS for TableA takes longer to complete than the allotted maintenance window.
Thousands of operations are performed against TableB each minute. You observe a large number of Auto
Update Statistics events for TableB.
You need to address the performance issues with each table.
In the table below, identify the action that will resolve the issues for each table.
NOTE: Make only one selection in each column.

69 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Table A: Auto_update statistics off
Table A does not change much. There is no need to update the statistics on this table.
Table B: SET AUTO_UPDATE_STATISTICS_ASYNC ON
You can set the database to update statistics asynchronously:
ALTER DATABASE YourDBName
SET AUTO_UPDATE_STATISTICS_ASYNC ON

70 / 383
The safer , easier way to help you pass any IT exams. 

If you enable this option then the Query Optimizer will run the query first and update the outdated
statistics afterwards. When you set this option to OFF, the Query Optimizer will update the outdated
statistics before compiling the query. This option can be useful in OLTP environments
References:
https://www.mssqltips.com/sqlservertip/2766/sql-server-auto-update-and-auto-create-statistics-options/

50.DRAG DROP
You administer a database that is used for reporting purposes. The database has a large fact table that
contains three hundred million rows. The table includes a clustered columnstore index and a nonclustered
index on the Product ID column. New rows are inserted into the table every day.
Performance of queries that filter the Product ID column have degraded significantly.
You need to improve the performance of the queries.
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.

Answer:

71 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1: Drop the clustered columnstore index
Step 2: Create a clustered rowstore index on ProductID.
Rowstore indexes perform best on queries that seek into the data, searching for a particular value, or for
queries on a small range of values. Use rowstore indexes with transactional workloads since they tend to
require mostly table seeks instead of table scans.
Step 3: Create a nonclustered index on ProductID

51.HOTSPOT
You are the database administrator of a Microsoft SQL Server instance. Developers are writing stored
procedures to send emails using sp_send_dbmail. Database Mail is enabled.
You need to configure each account’s profile security and meet the following requirements:
Account SMTP1_Account must only be usable by logins that have been given explicit permissions to use
the SMTP1_profile.
Account SMTP2_Account must only be usable by logins who are a member of the
[DatabaseMailUserRole] role in msdb.
In the table below. identify the profile type that must be used for each account.
NOTE: Make only one selection in each column.

72 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
SMTP1_Account1: Private Profile
When no profile_name is specified, sp_send_dbmail uses the default private profile for the current user. If
the user does not have a default private profile, sp_send_dbmail uses the default public profile for
the msdb database.
SMTP1_Account2: Default Profile
Execute permissions forsp_send_dbmail default to all members of the DatabaseMailUser database role in
the msdb database.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-send-dbmail-tran
sact-sql

52.HOTSPOT
You have a Microsoft SQL Server instance that hosts a database named DB1 that contains 800 gigabyte
(GB) of data. The database is used 24 hours each day. You implement indexes and set the value of the
Auto Update Statistics option set to True.
Users report that queries take a long time to complete.
You need to identify statistics that have not been updated for a week for tables where more than 1,000
rows changed.
How should you complete the Transact-SQL statement? To answer, configure the appropriate
Transact-SQL segments in the answer area.

73 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: stats_date
See example below.

74 / 383
The safer , easier way to help you pass any IT exams. 

Box 2: rowmodctr
See examplebelow.
Box 3: stats_date
You need to identify statistics that have not been updated for a week.
Box 4: rowmodctr
You need to identify that more than 1,000 rows changed.
Rowmodctr counts the total number of inserted, deleted, or updated rows since the last time statistics
were updated for the table.
Example: We will query every statistics object which was not updated in the last day and has rows
modified since the last update. We will use the rowmodctr field of sys.sysindexes because it shows how
many rows were inserted, updated or deleted since the last update occurred. Please note that it is not
always 100% accurate in SQL Server 2005 and later, but it can be used to check if any rows were
modified.
--Get the list of outdated statistics
SELECTOBJECT_NAME(id),name,STATS_DATE(id, indid),rowmodctr
FROM sys.sysindexes
WHERE STATS_DATE (id, indid)<=DATEADD(DAY,-1,GETDATE())
AND rowmodctr>0
AND id IN (SELECT object_id FROM sys.tables)
GO
After collecting this information, we can decide which statistics require an update.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-compatibility-views/sys-sysindexes-tran
sact-sql
https://www.mssqltips.com/sqlservertip/2628/how-to-find-outdated-statistics-in-sql-server-2008/

53.DRAG DROP
You are the database administrator for a Microsoft SQL Server instance. You develop an Extended Events
package to look for events related to application performance.
You need to change the event session to include SQL Server errors that are greater than error severity
15.
Which five Transact-SQL segments should you use to develop the solution? To answer, move the
appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and
arrange them in the correct order.

75 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Step 1: ALTER EVENT SESSION Contoso1 ON SERVER
Step 2: ADD EVENT …

76 / 383
The safer , easier way to help you pass any IT exams. 

Step 3: (ACTION ...


Step 4: WHERE...
Step 5: ) GO
Example: To start an Extended Events sessions in order to trap SQL Server errors with severity greater
than 10,just run the following script:
CREATE EVENT SESSION [error_trap] ON SERVER
ADD EVENT sqlserver.error_reported
(
ACTION
(package0.collect_system_time,package0.last_error,sqlserver.client_app_name,sqlserver.client_hostna
me,sqlserver.database_id,sqlserver.database_name,sqlserver.nt_username,
sqlserver.plan_handle,sqlserver.query_hash,sqlserver.session_id,sqlserver.sql_text,sqlserver.tsql_frame,
sqlserver.tsql_stack,sqlserver.username)
WHERE ([severity]>10)
)
ADD TARGET package0.event_file
(
SET filename=N'D:\Program Files\Microsoft SQL
Server\MSSQL11.MSSQLSERVER\MSSQL\XEvents\error_trap.xel'
)
WITH
(
STARTUP_STATE=OFF
)
GO
References:
http://sqlblog.com/blogs/davide_mauri/archive/2013/03/17/trapping-sql-server-errors-with-extended-even
ts.aspx

54.HOTSPOT
You manage a Microsoft SQL Server environment. A server fails and writes the following event to the
application event log:
MSG_AUDIT_FORCED_SHUTDOWN
You configure the SQL Server startup parameters as shown in the following graphic:

77 / 383
The safer , easier way to help you pass any IT exams. 

Use the drop-down menus to select the answer choice that answers each question.
NOTE: Each correct selection is worth one point.

Answer:

78 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Box 1: single-user
The startup option -m starts an instance of SQL Server in single-user mode.
Box 2: sysadmin
Starting SQL Server in single-user mode enables anymember of the computer's local Administrators
group to connect to the instance of SQL Server as a member of the sysadmin fixed server role.
References:
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/database-engine-service-startu
p-options

55.HOTSPOT
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database
instanced. The environments host several customer databases.
You host a local database and a Stretch database that has a table named Members for one specific
customer.
You need to provide the customer with information about the space used in the databases.
In the table below, identify the query that provides the required information for each database.
NOTE: Make only one selection in each column.

Answer:

79 / 383
The safer , easier way to help you pass any IT exams. 

56.You have configured Resource Governor with three resource pools.


You have assigned the first resource pool a minimum CPU and memory value of 20%.
You have assigned the second resource pool a minimum CPU and memory value of 30%.
You want to assign maximum CPU and memory values to the third resource pool.
What is the maximum CPU and memory value you can assign to this resource pool?
A. 30%
B. 50%
C. 70%
D. 100%
Answer: B
Explanation:
The maximum resource value assigned to the third pool is 100%; the sum of the minimum resource
values assigned to the other pools is 50%.

57.You administer a single server that contains a Microsoft SQL Server 2016 default instance on which
several production databases have been deployed.
You plan to install a new ticketing application that requires the deployment of a database on the server.
The SQL login for this application requires sysadmin permissions. You need to ensure that the login for
the ticketing application cannot access other production databases.
What should you do?
A. Use the SQL Server default instance and enable Contained Databases.
B. Use the SQL Server default instance and configure a user-defined server role. Add the login for the
ticketing application to this role.
C. Install a new named SQL Server instance on the server.
D. Install a new default SQL Server instance on the server.
Answer: C
Explanation:
SQL Server supports multiple instances of SQL Server on a single server or processor, but only one
instance can be the default instance. All others must be named instances. A computer can run multiple
instances of SQL Server concurrently, and each instance runs independently of other instances.
References: https://msdn.microsoft.com/en-us/library/ms143531(v=SQL.105).aspx

80 / 383
The safer , easier way to help you pass any IT exams. 

58.You administer a Microsoft SQL Server 2016 failover cluster that contains two nodes named Node A
and Node B.
A single instance of SQL Server is installed on the cluster.
An additional node named Node C has been added to the existing cluster.
You need to ensure that the SQL Server instance can use all nodes of the cluster.
What should you do?
A. Create a ConfigurationFile.ini file from Node B, and then run the AddNode command-line tool on Node
A.
B. Use Node A to install SQL Server on Node C.
C. Run the Add Node to SQL Server Failover Cluster Wizard on Node C.
D. Use Cluster Administrator to add a new Resource Group to Node B.
Answer: C
Explanation:
To add a node to an existing SQL Server failover cluster
Insert the SQL Server installation media, and from the root folder, double-click Setup.exe. To install from a
network share, navigate to the root folder on the share, and then double-click Setup.exe.
The Installation Wizard will launch the SQL Server Installation Center. To add a node to an existing
failover cluster instance, click Installation in the left-hand pane. Then, select Add node to a SQL Server
failover cluster.
Etc.
References:
https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/install/add-or-remove-nodes-in-a-sql-ser
ver-failover-cluster-setup

59.You plan to integrate an on-premises Microsoft SQL Server environment with Microsoft Azure.
You need to create the authentication object so that you can connect to Azure.
Which Windows PowerShell command or commands should you run?
A. Invoke-Sqlcmd “CREATE EXTERNAL DATA SOURCE MyAzureStorage WITH (LOCATION =
‘wasbs://Azure@myaccount.blob.core.windows.net/”, CREDENTIAL = Pa$$w0rd)”
B.
New-SqlAzureKeyVaultColumnMasterKeySettings-KeyUrlhttps://myvault.vault.contoso.net:443/keys/CM
K/4c05fla41b12488f9cba2ea964b6a700
C. Invoke-Sqlcmd “CREATE CREDENTIAL AzureCred WITH IDENTITY = ‘AzureKey’, SECRET =
‘Pa$$w0rd”
D. Invoke-Sqlcmd “CREATE LOGIN AzureCred WITH CREDENTIAL = ‘AzureKey’, PASSWORD =
‘Pa$$w0rd”
Answer: C
Explanation:
Invoke-Sqlcmd runs a script containing statements supported by the SQL Server SQLCMD utility.
The following example creates a SQL Server credential for the Database Engine to use when accessing
the Azure Key Vault using the SQL Server Connector for Microsoft Azure Key Vault.
CREATE CREDENTIAL Azure_EKM_TDE_cred
WITH IDENTITY = 'ContosoKeyVault',
SECRET = 'EF5C8E094D2A4A769998D93440D8115DSECRET_DBEngine'

81 / 383
The safer , easier way to help you pass any IT exams. 

FOR CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM_Prov ;


References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-credential-transact-sql

60.You are creating an application that will connect to the AgentPortal database by using a SQL login
named AgentPortalUser. Stored procedures in the database will use sp_send_dbmail to send email
messages.
You create a user account in the msdb database for the AgentPortalUser login.
You use the Database Mail Configuration Wizard to create a Database Mail profile. Security has not been
configured for the Database Mail profile.
You need to ensure that AgentPortalUser can send email messages.
What should you do?
A. In the Database Mail Configuration Wizard, configure the Database Mail profile as a private profile for
the AgentPortalUser account.
B. Disable the guest user in the msdb database.
C. Use the sysmail_help_profileaccount_sp stored procedure to add accounts to the Database Mail
profile.
D. In the Database Mail Configuration Wizard, create an email account for each recipient's email address
in the Database Mail profile.
Answer: A
Explanation:
You enable and configure Database Mail using the Database Mail Configuration Wizard.
Profiles are either public or private. A private profile is accessible only to specific users or roles.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/database-mail/configure-database-mail

61.You administer a Microsoft SQL Server 2016 default instance. The instance is hosted by a server that
has a local firewall configured.
The firewall only allows inbound connections on port 1433. The server only hosts a single instance of SQL
Server.
You need to ensure that the instance is configured to allow remote connections even if the SQL Server is
unresponsive to client connections.
What should you do?
A. Enable inbound connections on TCP port 1434 in the Windows Firewall on the server.
B. Execute the following Transact-SQL command: sp_configure 'remote admin connections',
C. Execute the Reconfigure command.
D. Execute the following Transact-SQL command: sp_configure 'remote access', 1
E. Restart the SQL Server Agent Service.
F. Enable inbound connections on TCP port 135 in the Windows Firewall on the server.
Answer: A,B,C
Explanation:
SQL Server provides a dedicated administrator connection (DAC). The DAC lets an administrator access
a running server to execute diagnostic functions or Transact-SQL statements, or to troubleshoot problems
on the server, even when the server is locked or running in an abnormal state and not responding to a
SQL Server Database Engine connection. By default, the DAC is only available from a client on the server.

82 / 383
The safer , easier way to help you pass any IT exams. 

To enable client applications on remote computers to use the DAC, use the remote admin connections
option of sp_configure.
By default, the DAC only listens on the loop-back IP address (127.0.0.1), port 1434
The following example enables the DAC from a remote computer.
sp_configure 'remote admin connections', 1;
GO
RECONFIGURE;
GO
References:
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/remote-admin-connections-ser
ver-configuration-option

62.You administer all the deployments of Microsoft SQL Server 2016 in your company.
You need to ensure that an OLTP database that includes up-to-the-minute reporting requirements can be
off- loaded from the primary database to another server.
You also need to be able to add indexes to the secondary database.
Which configuration should you use?
A. Two servers configured in different data centers SQL Server Availability Group configured in
Synchronous-Commit Availability Mode One server configured as an Active Secondary
B. Two servers configured in the same data center SQL Server Availability Group configured in
Asynchronous-Commit Availability Mode One server configured as an Active Secondary
C. Two servers configured in the same data center A primary server configured to perform log-shipping
every 10 minutes A backup server configured as a warm standby
D. Two servers configured in different data centers SQL Server Availability Group configured in
AsynchronousCommit Availability Mode
E. Two servers configured on the same subnet SQL Server Availability Group configured in
Synchronous-Commit Availability Mode
F. SQL Server that includes an application database configured to perform transactional replication
G. SQL Server that includes an application database configured to perform snapshot replication
H. Two servers configured in a Windows Failover Cluster in the same data center SQL Server configured
as a clustered instance
Answer: F
Explanation:
References:
https://docs.microsoft.com/en-us/sql/relational-databases/replication/transactional/transactional-replicatio
n

63.You administer all the deployments of Microsoft SQL Server 2016 in your company.
You need to ensure that data changes are sent to a non-SQL Server database server in near real time.
You also need to ensure that data on the primary server is unaffected.
Which configuration should you use?
A. SQL Server that includes an application database configured to perform transactional replication
B. Two servers configured in different data centers SQL Server Availability Group configured in
AsynchronousCommit Availability Mode

83 / 383
The safer , easier way to help you pass any IT exams. 

C. Two servers configured in different data centers SQL Server Availability Group configured in
Synchronous-Commit Availability Mode One server configured as an Active Secondary
D. SQL Server that includes an application database configured to perform snapshot replication
E. Two servers configured in the same data center SQL Server Availability Group configured in
AsynchronousCommit Availability Mode One server configured as an Active Secondary
F. Two servers configured on the same subnet SQL Server Availability Group configured in
Synchronous-Commit Availability Mode
G. Two servers configured in a Windows Failover Cluster in the same data center SQL Server configured
as a clustered instance
H. Two servers configured in the same data center A primary server configured to perform log-shipping
every 10 minutes A backup server configured as a warm standby
Answer: A
Explanation:
SQL Server supports the following heterogeneous scenarios for transactional and snapshot replication:
Publishing data from SQL Server to non- SQL Server Subscribers.
Publishing data to and from Oracle has some restrictions.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/replication/non-sql/heterogeneous-database-re
plication

64.You administer all the deployments of Microsoft SQL Server 2016 in your company.
A database contains a large product catalog that is updated periodically.
You need to be able to send the entire product catalog to all branch offices on a monthly basis.
Which configuration should you use?
A. Two servers configured in the same data center A primary server configured to perform log-shipping
every 10 minutes A backup server configured as a warm standby
B. SQL Server that includes an application database configured to perform transactional replication
C. Two servers configured in the same data center SQL Server Availability Group configured in
AsynchronousCommit Availability Mode One server configured as an Active Secondary
D. Two servers configured in a Windows Failover Cluster in the same data center SQL Server configured
as a clustered instance
E. SQL Server that includes an application database configured to perform snapshot replication
F. Two servers configured in different data centers SQL Server Availability Group configured in
Synchronous-Commit Availability Mode One server configured as an Active Secondary
G. Two servers configured on the same subnet SQL Server Availability Group configured in
Synchronous-Commit Availability Mode
H. Two servers configured in different data centers SQL Server Availability Group configured in
AsynchronousCommit Availability Mode
Answer: E
Explanation:
Snapshot replication distributes data exactly as it appears at a specific moment in time and does not
monitor for updates to the data. When synchronization occurs, the entire snapshot is generated and sent
to Subscribers.
Using snapshot replication by itself is most appropriate when one or more of the following is true:

84 / 383
The safer , easier way to help you pass any IT exams. 

Data changes infrequently.


It is acceptable to have copies of data that are out of date with respect to the Publisher for a period of
time.
Replicating small volumes of data.
A large volume of changes occurs over a short period of time.
References: https://docs.microsoft.com/en-us/sql/relational-databases/replication/snapshot-replication

65.You administer all the deployments of Microsoft SQL Server 2016 in your company.
You need to ensure that an OLTP database that uses a storage area network (SAN) remains available if
any of the servers fail.
You also need to minimize the amount of storage used by the database.
Which configuration should you use?
A. Two servers configured in different data centers SQL Server Availability Group configured in
Synchronous-Commit Availability Mode One server configured as an Active Secondary
B. SQL Server that includes an application database configured to perform transactional replication
C. Two servers configured in the same data center SQL Server Availability Group configured in
AsynchronousCommit Availability Mode One server configured as an Active Secondary
D. Two servers configured in different data centers SQL Server Availability Group configured in
AsynchronousCommit Availability Mode
E. Two servers configured in the same data center A primary server configured to perform log-shipping
every 10 minutes A backup server configured as a warm standby
F. Two servers configured on the same subnet SQL Server Availability Group configured in
Synchronous-Commit Availability Mode
G. SQL Server that includes an application database configured to perform snapshot replication
H. Two servers configured in a Windows Failover Cluster in the same data center SQL Server configured
as a clustered instance
Answer: H
Explanation:
A Windows Server Failover Cluster (WSFC) is a group of independent servers that work together to
increase the availability of applications and services. SQL Server takes advantage of WSFC services and
capabilities to support Always On availability groups and SQL Server Failover Cluster Instances.
References:
https://docs.micosoft.com/en-us/sql/sql-server/failover-clusters/windows/windows-server-failover-clusteri
ng-wsfc-with-sql-server

66.You administer a Microsoft SQL Server 2016 server that hosts a transactional database and a
reporting database.
The transactional database is updated through a web application and is operational throughout the day.
The reporting database is only updated from the transactional database.
The recovery model and backup schedule are configured as shown in the following table:

85 / 383
The safer , easier way to help you pass any IT exams. 

The differential backup of the reporting database fails.


Then, the reporting database fails at 14:00 hours.
You need to ensure that the reporting database is restored.
You also need to ensure that data loss is minimal.
What should you do?
A. Restore the latest full backup, and restore the latest differential backup. Then, restore the latest log
backup.
B. Perform a point-in-time restore.
C. Restore the latest full backup.
D. Restore the latest full backup, and restore the latest differential backup. Then, restore each log backup
taken before the time of failure from the most recent differential backup.
E. Restore the latest full backup. Then, restore the latest differential backup.
F. Restore the latest full backup. Then, restore each differential backup taken before the time of failure
from the most recent full backup.
G. Perform a page restore.
H. Perform a partial restore.
Answer: C
Explanation:
The differential backup of the reporting database has failed, so it can't be used.

86 / 383
The safer , easier way to help you pass any IT exams. 

67.You administer a Microsoft SQL Server 2016 server that hosts a transactional database and a
reporting database. The transactional database is updated through a web application and is operational
throughout the day.
The reporting database is only updated from the transactional database.
The recovery model and backup schedule are configured as shown in the following table:

At 14:00 hours, you discover that pages 71, 520, and 713 on one of the database files are corrupted on
the reporting database.
You need to ensure that the databases are restored.
You also need to ensure that data loss is minimal.
What should you do?
A. Perform a partial restore.
B. Restore the latest full backup, and restore the latest differential backup. Then, restore each log backup
taken before the time of failure from the most recent differential backup.
C. Restore the latest full backup.
D. Restore the latest full backup, and restore the latest differential backup. Then, restore the latest log
backup.
E. Perform a page restore.
F. Restore the latest full backup. Then, restore each differential backup taken before the time of failure
from the most recent full backup.
G. Perform a point-in-time restore.

87 / 383
The safer , easier way to help you pass any IT exams. 

H. Restore the latest full backup. Then, restore the latest differential backup.
Answer: H
Explanation:
At restore time, before you restore a differential backup, you must restore its base. Then, restore only the
most recent differential backup to bring the database forward to the time when that differential backup
was created. Typically, you would restore the most recent full backup followed by the most recent
differential backup that is based on that full backup.
References: https://technet.microsoft.com/en-us/library/ms345448(v=sql.105).aspx

68.You administer a Microsoft SQL Server 2016 server that hosts a transactional database and a
reporting database.
The transactional database is updated through a web application and is operational throughout the day.
The reporting database is only updated from the transactional database.
The recovery model and backup schedule are configured as shown in the following table:

At 16:20 hours, you discover that pages 17, 137, and 205 on one of the database files are corrupted on
the transactional database. You need to ensure that the transactional database is restored. You also need
to ensure that data loss is minimal.
What should you do?
A. Perform a partial restore.
B. Restore the latest full backup, and restore the latest differential backup. Then, restore each log backup

88 / 383
The safer , easier way to help you pass any IT exams. 

taken before the time of failure from the most recent differential backup.
C. Perform a point-in-time restore.
D. Restore the latest full backup.
E. Restore the latest full backup, and restore the latest differential backup. Then, restore the latest log
backup.
F. Perform a page restore.
G. Restore the latest full backup. Then, restore each differential backup taken before the time of failure
from the most recent full backup.
H. Restore the latest full backup. Then, restore the latest differential backup.
Answer: F
Explanation:
The goal of a page restore is to restore one or more damaged pages without restoring the whole database.
Typically, pages that are candidates for restore have been marked as "suspect" because of an error that is
encountered when accessing the page.
Note: Requirements for Restoring Pages
A page restore is subject to the following requirements:
The databases must be using the full or bulk-logged recovery model.
Etc.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-pages-sql-server

69.You administer several Microsoft SQL Server 2016 database servers.


Merge replication has been configured for an application that is distributed across offices throughout a
wide area network (WAN). Many of the tables involved in replication use the XML and varchar (max) data
types.
Occasionally, merge replication fails due to timeout errors.
You need to reduce the occurrence of these timeout errors.
What should you do?
A. Set the Merge agent on the problem subscribers to use the slow link agent profile.
B. Create a snapshot publication, and reconfigure the problem subscribers to use the snapshot
publication.
C. Change the Merge agent on the problem subscribers to run continuously.
D. Set the Remote Connection Timeout on the Publisher to 0.
Answer: A
Explanation:
You might have different profiles for different instances of an agent. For example, a Merge Agent that
connects to the Publisher and Distributor over a dialup connection could use a set of parameters that are
better suited to the slower communications link by using the slow link profile.
Note: When replication is configured, a set of agent profiles is installed on the Distributor. An agent profile
contains a set of parameters that are used each time an agent runs: each agent logs in to the Distributor
during its startup process and queries for the parameters in its profile.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/replication/agents/replication-agent-profiles

89 / 383
The safer , easier way to help you pass any IT exams. 

70.You create an availability group named HaContoso that has replicas named Server01/HA,
Server02/HA, and Server03/HA.
Currently, Server01l/HA is the primary replica.
You need to ensure that the following requirements are met:
Backup operations occur on Server02/HA.
If Server02/HA is unavailable, backup operations occur on Server03/HA.
Backup operations do not occur on Server01/HA.
How should you configure HaContoso?
A. Set the backup preference of HaContoso to Prefer Secondary. Set the backup priority of Server02/HA
to 20. Set the backup priority of Server03/HA to 10.
B. Set the backup preference of HaContoso to Secondary only. Set the backup priority of Server02/HA to
20. Set the backup priority of Server03/HA to 10.
C. Set the backup preference of HaContoso to Secondary only. Set the backup priority of Server02/HA to
10. Set the backup priority of Server03/HA to 20.
D. set the exclude replica of Server01/HA to true. Set the backup priority of Server02/HA to 10. Set the
backup priority of Server03/HA to 20.
Answer: B
Explanation:
Secondary only: Specifies that backups should never be performed on the primary replica. If the primary
replica is the only replica online, the backup should not occur.
Backup Priority (Lowest=1, Highest=100)
Specifies your priority for performing backups on this replica relative to the other replicas in the same
availability group. The value is an integer in the range of 0..100. 1 indicates the lowest priority, and 100
indicates the highest priority. If Backup Priority = 1, the availability replica would be chosen for performing
backups only if no higher priority availability replicas are currently available.
References:
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-backup-on-a
vailability-replicas-sql-server

71.You administer a Microsoft SQL Server 2016 instance that has several SQL Server Agent jobs
configured.
SQL Server Agent jobs fail, the error messages returned by the job steps are truncated.
The following error message is an example of the truncated error message:
"Executed as user CONTOSO\ServiceAccount. ...0.4035.00 for 64-bit Copyright (C) Microsoft Corp
1984-2011. All rights reserved. Started 63513 PM Error 2012-06-23 183536.87 Code 0XC001000E
Source UserImport Description Code 0x00000000 Source Log Import Activity Descript... The package
execution fa... The step failed."
You need to ensure that all the details of the job step failures are retained for SQL Server Agent jobs.
What should you do?
A. Expand agent logging to include information from all events.
B. Disable the Limit size of job history log feature.
C. Configure event forwarding.
D. Configure output files.
Answer: D

90 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
When you have a multiple-step job, then log all steps against a single file. Check the 'Append output to
existing file' checkbox for all steps in the job that execute after the initial step. This results in a log file with
all of the job steps from the last job execution. Each time the first step executes (each time the job is
kicked-off) the file will be overwritten, so we have a record of the last set of output.
References: https://www.mssqltips.com/sqlservertip/1411/verbose-sql-server-agent-logging/

72.You administer a Microsoft SQL Server 2016 server that has SQL Server Integration Services (SSIS)
installed.
You plan to deploy new SSIS packages to the server.
The SSIS packages use the Project Deployment Model together with parameters and Integration
Services environment variables.
You need to configure the SQL Server environment to support these packages.
What should you do?
A. Create SSIS configuration files for the packages.
B. Create an Integration Services catalog.
C. Install Data Quality Services.
D. Install Master Data services.
Answer: B
Explanation:
Use can use Project Deployment Model for a project, containing packages and parameters, which is
deployed to the SSISDB catalog on an instance of SQL Server.
References:
https://docs.microsoft.com/en-us/sql/integration-services/packages/deploy-integration-services-ssis-proje
cts-and-packages

73.You administer a Microsoft SQL Server 2016 server.


When transaction logs grow, SQL Server must send an email message to the database administrators.
You need to configure SQL Server to send the email messages.
What should you configure?
A. SQL Mail
B. An Extended Events session
C. Alerts and operators in SQL Server Agent
D. Policies under Policy-Based Management
Answer: C
Explanation:
Operators are aliases for people or groups that can receive electronic notification when jobs have
completed or alerts have been raised. The SQL Server Agent service supports the notification of
administrators through operators. Operators enable notification and monitoring capabilities of SQL Server
Agent.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/database-mail/configure-sql-server-agent-mail-
to-use-database-mail

91 / 383
The safer , easier way to help you pass any IT exams. 

74.You administer two instances of Microsoft SQL Server 2016.


You deploy an application that uses a database on the named instance.
The application is unable to connect to the database on the named instance.
You need to ensure that the application can connect to the named instance.
What should you do?
A. Use the Data Quality Client to configure the application.
B. Start the SQL Server Browser Service.
C. Use the Master Data Services Configuration Manager to configure the application.
D. Start the SQL Server Integration Services Service.
Answer: B
Explanation:
The SQL ServerBrowser program runs as a Windows service. SQL Server Browser listens for incoming
requests for Microsoft SQL Server resources and provides information about SQL Server instances
installed on the computer. SQL Server Browser contributes to the following actions:
Browsing a list of available servers
Connecting to the correct server instance
Etc.
References: https://docs.microsoft.com/en-us/sql/tools/configuration-manager/sql-server-browser-service

75.You administer a Microsoft SQL Server 2016 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?
A. Create an Extended Events session by using the sqlserver.error_reported event.
B. Create a SQL Profiler session to capture all ErrorLog and EventLog events.
C. Flag all stored procedures for recompilation by using sp_recompile.
D. Execute sp_who.
Answer: A
Explanation:
Trapping SQL Server Errors with Extended Events
One very useful usage of Extended Events is the ability to trap SQL Server error without the need to have
a server trace running (which, btw, is deprecated), with the additional feature of being able to query the
data as soon as it comes in. This means that we a solution to monitor and trap errors as soon as they
happen can be easily created, in order to help developers to fix problems as soon as they are detected.
This is really, really, really helpful especially in very big applications, where the code base is quite old and
there is no-one really knowing everything of the solution.
To start a Extended Events sessions in order to trap SQL Server errors with severity greater than 10, just
run the following script:
CREATE EVENT SESSION [error_trap] ON SERVER
ADD EVENT sqlserver.error_reported
Etc.
References:

92 / 383
The safer , easier way to help you pass any IT exams. 

http://sqlblog.com/blogs/davide_mauri/archive/2013/03/17/trapping-sql-server-errors-with-extended-even
ts.aspx

76.You administer a Microsoft SQL Server 2016 instance that contains a financial database hosted on a
storage area network (SAN). The financial database has the following characteristics:
A data file of 2 terabytes is located on a dedicated LUN (drive D).
A transaction log of 10 GB is located on a dedicated LUN (drive E).
Drive D has 1 terabyte of free disk space.
Drive E has 5 GB of free disk space.
The database is continually modified by users during business hours from Monday through Friday
between 09:00 hours and 17:00 hours.
Five percent of the existing data is modified each day.
The Finance department loads large CSV files into a number of tables each business day at 11:15 hours
and 15:15 hours by using the BCP or BULK INSERT commands.
Each data load adds 3 GB of data to the database.
These data load operations must occur in the minimum amount of time. A full database backup is
performed every Sunday at 10:00 hours.
Backup operations will be performed every two hours (11:00, 13:00, 15:00, and 17:00) during business
hours.
You implement log shipping of the financial database to another SQL Server 2016 instance. You decide to
failover to this secondary database.
You need to ensure that all transactions will be replicated to the secondary database.
Which backup option should you use?
A. Differential
B. Transaction Log
C. FULL
D. SIMPLE
E. SKIP
F. RESTART
G. STANDBY
H. CHECKSUM
I. DBO_ONLY
J. COPY_ONLY
K. NORECOVERY
L. NO_CHECKSUM
M. CONTINUE_AFTER_ERROR
N. BULK_LOGGED
Answer: K
Explanation:
Roll back is controlled by the RESTORE statement through the [ RECOVERY | NORECOVERY ] options:
NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next
statement in the sequence.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql

93 / 383
The safer , easier way to help you pass any IT exams. 

77.You use Microsoft SQL Server 2016 to write code for a transaction that contains several statements.
There is high contention between readers and writers on several tables used by your transaction. You
need to minimize the use of the tempdb space.
You also need to prevent reading queries from blocking writing queries.
Which isolation level should you use?
A. SERIALIZABLE
B. SNAPSHOT
C. READ COMMITTED SNAPSHOT
D. REPEATABLE READ
Answer: C
Explanation:
For most applications, read committed isolation using row versioning is recommended over snapshot
isolation for the following reasons:
It consumes less tempdb space than snapshot isolation.
Etc.
References: https://msdn.microsoft.com/en-us/library/ms188277.aspx

78.You plan to migrate the db to azure.


You verify that all objects are valid for azure sql database. You need to ensure that users and logins are
migrated to azure.
What should you do?
A. Use the Copy Database wizard
B. Use the Database Transfer wizard
C. Use the SQL Management Studio to deploy the db to azure
D. Back up the databasae from the local server and restore it to azure
Answer: C,D

79.You administer a Microsoft SQL Server 2016 database instance.


You create a new user named UserA. You need to ensure that UserA is able to create SQL Server Agent
jobs and to execute SQL Server Agent jobs.
To which role should you add UserA?
A. Securityadmin
B. RSExecRole
C. SQLAgentUserRole
D. DatabaseMailUserRole
Answer: C

80.You are the administrator of a Microsoft SQL Server 2016 server. Some applications consume
significant resources.
You need to manage the server workload by restricting resource-intensive applications.
You need to dynamically limit resource consumption.
What should you do?
A. Set up Service Broker to ensure that applications are not allowed to consume more than the specified
amount of resources.

94 / 383
The safer , easier way to help you pass any IT exams. 

B. Configure Resource Pools, Workload Groups, and Classifier Function, and then enable the Resource
Governor.
C. Configure Extended Events to monitor and restrict resource limits allowed by each application type.
D. Create a new Plan Guide with a Scope Type of sql and define the resource limits for each application.
Answer: B

81.You administer a Microsoft SQL Server 2016 database that includes a table named dbo.Log. This table
contains millions of records about user activity in an application.
Records in dbo.Log that are more than 90 days old are purged nightly. When records are purged, table
locks are causing contention withinserts.
You need to be able to modify dbo.Log without requiring any changes to the applications that utilize
dbo.Log.
Which type of solution should you use?
A. Extended events
B. Columnstore index
C. Partitioned tables
D. Read committed snapshot
Answer: C

82.You administer a Microsoft SQL Server 2016 database named Orders.


Users report that during peak usage periods, certain operations are taking more time than expected. Your
initial analysis suggests that blocking is the cause.
You need to gather more data to be able to determine which processes are being blocked and to identify
the root cause.
What should you do?
A. Start a trace using SQL Server Profiler to catch the Lock: Deadlock event.
B. Use sp_configure to set the blocked process threshold. Start a trace using SQL Server Profiler to catch
the Blocked Process Report event.
C. Schedule a SQL Agent job to run every 60 seconds and insert the results of executing the
sys.dm_os_wait_stats DMV into a table.
D. Use System Monitor to catch the Lock Waits/sec event.
Answer: B

83.You administer a Microsoft SQL Server 2016 database.


Users report that a billing application becomes unresponsive during busy times of the day.
While investigating, you notice large number of processes taking or waiting for table locks.
You suspect that SQL Server is assigning stronger locks to queries.
You start a SQL Profiler trace.
Which event should you select?
A. Deadlock graph
B. Lock: Escalation
C. Lock: Timeout
D. Lock: Deadlock
Answer: B

95 / 383
The safer , easier way to help you pass any IT exams. 

84.You install Microsoft SQL Server 2016 on a new server.


After setup is complete, you attempt to start the SQL Server service.
After being in a starting state for a few moments, the service goes back to a stopped state.
You need to determine the cause of the failure.
Which file should you use?
A. %programfiles%\Microsoft SQLServer\MSSQL11.MSSQLSERVER|MSSQL\Log\Errorlog
B. %programfiles%\Microsoft SQL Server\110\setupBootstrap\Log\Summary.txt
C. %programfiles%\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.idf
D. %programfiles%\Microsoft SQLServer\110\Shared\ErrorDmpr[XXXX] .mdmp
Answer: A

85.You administer a Windows Azure SQL Database database named Inventory that contains a stored
procedure named p_AddInventory.
Users need to be able to SELECT from all tables in the database and execute the stored procedure.
You need to grant only the necessary permissions.
What should you do?
A. Grant EXECUTE permission on p_AddInventory to all users. Grant VIEW DEFINITION to all users.
B. Grant EXECUTE permission on p_AddInventory to all users. Add all users to the db_datawriter role.
C. Add all users to the db_owner role.
D. Grant EXECUTE permission on p_Add!nventory to all users. Add all users to the db_datareader role.
Answer: D

86.You administer a SQL Server 2016 database instance.


You need to configure the SQL Server Database Engine service on a failover cluster.
Which user account should you use?
A. A domain user
B. The BUILTIN\SYSTEM account
C. A local user with Run as Service permissions
D. The SQLBrowser account
Answer: A
Explanation:
Account of the person who installs the cluster: The person who installs the cluster must use an account
with the following characteristics:
The account must be a domain account. It does not have to be a domain administrator account. It can be
a domain user account if it meets the other requirements in this list.
Etc.
References:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc
731002(v=ws.10)

87.You administer a Windows Azure SQL Database database named Human_Resources. The database
contains 2 tables named Employees and SalaryDetails. You add two Windows groups as logins for the
server:

96 / 383
The safer , easier way to help you pass any IT exams. 

CORP\Employees - All company employees


CORP\HRAdmins - HR administrators only
HR Administrators are also company employees.
You need to grant users access according to the following requirements:
CORP\Employees should have SELECT access to the Employees table.
Only users in CORP\HRAdmins should have SELECT access to the SalaryDetails table.
Logins are based only on Windows security groups.
What should you do?
A. Create a database role called Employees.Add CORP\Employees to the db_datareader role.Add all
company employees except HR administrators to the Employees role.Deny SELECT access to the
SalaryDetails table to the Employees role.
B. Create a database role called HRAdmins.Add all company employees except HR administrators to the
db_datareader role, Add all HR administrators to the HRAdmins role.Grant SELECT access to the
SalaryDetails table to the HRAdmins role.Deny SELECT access to the SalaryDetails table to the
db_datareader role.
C. Create two database roles: Employees and HRAdmins.Add all company employees to the Employees
role.Add HR administrators to the HRAdmins role.Grant SELECT access to all tables except
SalaryDetails to the Employees role.Grant SELECT access to the SalaryDetails table to the HRAdmins
role.Deny SELECT access to the SalaryDetails table to the Employees role.
D. Create a database role called Employees.Add all HR administrators to the db_datareader role.Add all
company employees to the Employees role.Grant SELECT access to all tables except the SalaryDetails
table to the Employees role.Deny SELECT access to the SalaryDetails table to the Employees role.
Answer: D

88.You administer a Microsoft SQL Server 2016 database instance.


You plan to migrate the database to Windows Azure SQL Database.
You verify that all objects contained in the database are compatible with Windows Azure SQL Database.
You need to ensure that database users and required server logins are migrated to Windows Azure SQL
Database.
What should you do?
A. Use the Copy Database wizard.
B. Back up the database from the local server and restore it to Windows Azure SQL Database.
C. Use the Database Transfer wizard.
D. Use SQL Server Management Studio to deploy the database to Windows Azure SQL Database.
Answer: D

89.You administer a Microsoft SQL Server 2016 database.


The database is currently configured to log ship to a secondary server.
You are preparing to cut over to the secondary server by stopping log-shipping and bringing the
secondary database online.
You want to perform a tail-log backup. You need to leave the primary database in a restoring state.
Which option of the BACKUP LOG command should you use?
A. NO_TRUNCATE
B. NORECOVERY

97 / 383
The safer , easier way to help you pass any IT exams. 

C. STANDBY
D. FORMAT
Answer: B

90.You administer a Microsoft SQL Server 2016 database.


You want to make a full backup of the database to a file on disk.
In doing so, you need to output the progress of the backup.
Which backup option should you use?
A. STATS
B. COMPRESSION
C. CHECKSUM
D. IN IT
Answer: A

91.You administer two Microsoft SQL Server 2016 servers named ProdSrv1 and ProdSrv2. ProdSrv1 is
configured as a Distributor.
Both servers are configured to use the Windows NT Service virtual accounts for all SQL Services.
You are configuring snapshot replication from ProdSrv1 to ProdSrv2 by using ProdSrv2 as a pull
subscriber.
The distribution agent on ProdSrv2 regularly fails, displaying the following error message:
"Cannot access the file. Operating system error code 5 (Access is denied.)."
You need to configure the distribution agent by granting only the minimum required access to all
accounts.
What should you do?
A. Configure the Subscriber to use the Local System account.
B. Configure the SQL Server Agent service to run under the Local System account. Configure the
Subscriber to use the SQL Server Agent service account.
C. Configure the SQL Server Agent service to run under a Windows domain account. Configure the
Subscriber to use the SQL Server Agent service account. Grant FULL CONTROL access for the domain
account to the ReplData share on ProdSrv1.
D. Configure the Subscriber to use a Windows domain account. Grant READ access for the domain
account to the ReplData share on ProdSrv1.
Answer: D

92.You are a database administrator for a Microsoft SQL Server 2016 environment.
You want to deploy a new application that will scale out the workload to at least five different SQL Server
instances.
You need to ensure that for each copy of the database, users are able to read and write data that will then
be synchronized between all of the database instances.
Which feature should you use?
A. Database Mirroring
B. Peer-to-Peer Replication
C. Log Shipping
D. Availability Groups

98 / 383
The safer , easier way to help you pass any IT exams. 

Answer: B

93.You administer a Microsoft SQL Server 2016 instance that has multiple databases.
You have a two-node SQL Server failover cluster.
The cluster uses a storage area network (SAN). You discover I/O issues. The SAN is at capacity and
additional disks cannot be added.
You need to reduce the I/O workload on the SAN at a minimal cost.
What should you do?
A. Move user databases to a local disk.
B. Expand the tempdb data and log files.
C. Modify application code to use table variables.
D. Move the tempdb files to a local disk.
Answer: D
Explanation:
You can configure TempDB on a local disk when you, for example, installing your SQL Server cluster.
References:
https://www.mssqltips.com/sqlservertip/2817/sql-server-2012-cluster-with-tempdb-on-local-disk/

94.You administer a Microsoft SQL Server 2016 database that includes a table named Application.Events.
Application.Events contains millions of records about user activity in an application.
Records in Application.Events that are more than 90 days old are purged nightly.
When records are purged, table locks are causing contention with inserts.
You need to be able to modify Application.Events without requiring any changes to the applications that
utilize Application.Events.
Which type of solution should you use?
A. Partitioned tables
B. Online index rebuild
C. Change data capture
D. Change tracking
Answer: A

95.You administer a Microsoft SQL Server 2016 environment.


One of the SQL Server 2016 instances contains a database named Sales.
You plan to migrate Sales to Windows Azure SQL Database.
To do so, you need to implement a contained database.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Set database containment to AZURE.
B. Enable server property contained database authentication.
C. Disable server property cross db ownership chaining.
D. Set database containment to PARTIAL.
E. Disable server property contained database authentication.
F. Set database containment to FULL.
Answer: B,D

99 / 383
The safer , easier way to help you pass any IT exams. 

96.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.
You need to track all SELECT statements issued in the Contoso database only by users in a role named
Sales.
What should you create?
A. An Alert
B. A Resource Pool
C. An Extended Event session
D. A Server Audit Specification
E. A SQL Profiler Trace
F. A Database Audit Specification
G. A Policy
H. A Data Collector Set
Answer: F

97.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.
You need to collect data for a long period of time to troubleshoot wait statistics when querying Contoso.
You also need to ensure minimum impact to the server.
What should you create?
A. An Alert
B. A Resource Pool
C. An Extended Event session
D. A Server Audit Specification
E. A SQL Profiler Trace
F. A Database Audit Specification
G. A Policy
Answer: C

98.You plan to install Microsoft SQL Server 2016 for a web hosting company.
The company plans to host multiple web sites, each supported by a SQL Server database.
You need to select an edition of SQL Server that features backup compression of databases, basic data
integration features, and low total cost of ownership.
Which edition should you choose?
A. Express Edition with Tools
B. Standard Edition
C. Web Edition
D. Express Edition with Advanced Services
Answer: B
Explanation:
Backup compression is supported on SQL Server 2016 editions: Enterprise, Standard, and Developer.
References: https://docs.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2016

99.You plan to install a Microsoft SQL Server 2016 instance.


The instance will support a database that has the following requirements:
Store Excel workbooks on the file system.

100 / 383
The safer , easier way to help you pass any IT exams. 

Access the workbooks through Transact-SQL.


Include the workbooks in database backups.
During installation, you need to ensure that the requirements will be met.
Which feature should you use?
A. Excel Services
B. FILESTREAM
C. SQL Server Integration Services (SSIS)
D. OpenXML
Answer: B

100.You administer a Microsoft SQL Server 2016 database.


You have a SQL Server Agent job instance that runs using the service account.
You have a job step within the job that requires elevated privileges.
You need to ensure that the job step can run using a different user account.
What should you use?
A. a schedule
B. an alert
C. an operator
D. a proxy
Answer: D

101.You install a Microsoft SQL Server 2016 instance.


The instance will store data extracted from two databases running on Windows Azure SQL Database.
You hire a data steward to perform interactive data cleansing and ad hoc querying and updating of the
database.
You need to ensure that the data steward is given the correct client tools to perform these tasks.
Which set of tools should you install?
A. SQL Server Management Studio and Distributed Replay Client
B. Master Data Services and Data Quality Client
C. Data Quality Client and Distributed Replay Client
D. Data Quality Client and SQL Server Management Studio
Answer: B

102.You administer a Microsoft SQL Server 2016 instance.


You discover that the SQL Agent Error Log file is rapidly growing in size.
You need to ensure that the SQL Agent Error Log file does not grow rapidly when SQL Server agent jobs
execute.
What should you do?
A. Execute the sp_cycle_agent_errorlog stored procedure.
B. Configure event forwarding.
C. Enable the Auto Shrink option on the master database.
D. Enable the Auto Shrink option on the msdb database.
E. Disable the Include execution trace messages feature.
Answer: E

101 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Because the Include execution trace messages option can cause the error log to become large, only
include execution trace messages in SQL Server Agent error logs when investigating a specific SQL
Server Agent problem.
References:
https://docs.microsoft.com/en-us/sql/ssms/agent/write-execution-trace-messages-to-sql-server-agent-log
-ssms

103.You are a database administrator for a Microsoft SQL Server 2016 instance.
You need to ensure that data can be replicated from a production server to two reporting servers in real
time.
You also need to ensure that data on the reporting server is always accessible.
Which solution should you use?
A. Availability Groups
B. Extended Events
C. Snapshot Replication
D. Policy Based Management
Answer: A

104.You administer a Microsoft SQL Server 2016 database that contains a table named
AccountTransaction.
You discover that query performance on the table is poor due to fragmentation on the
IDX_AccountTransaction_AccountCode non-clustered index.
You need to defragment the index.
You also need to ensure that user queries are able to use the index during the defragmenting process.
Which Transact-SQL batch should you use?
A. ALTER INDEX IDX_AccountTransaction_AccountCode ONAccountTransaction.AccountCode
REORGANIZE
B. ALTER INDEX ALL ON AccountTransaction REBUILD
C. ALTER INDEX IDX_AccountTransaction_AccountCode ONAccountTransaction.AccountCode
REBUILD
D. CREATE INDEX IDXAccountTransactionAccountCode ONAccountTransaction.AccountCode WITH
DROP EXISTING
Answer: A

105.You administer a Microsoft SQL Server 2016 failover cluster.


You need to ensure that a failover occurs when the server diagnostics returns query_processing error.
Which server configuration property should you set?
A. SqlOumperDumpFlags
B. FailureConditionLevel
C. HealthCheckTimeout
D. SqlDumperDumpPath
Answer: B
Explanation:

102 / 383
The safer , easier way to help you pass any IT exams. 

The SQL Server Database Engine resource DLL determines whether the detected health status is a
condition for failure using the FailureConditionLevel property. The FailureConditionLevel property defines
which detected health statuses cause restarts or failovers. Multiple levels of options are available, ranging
from no automatic restart or failover to all possible failure conditions resulting in an automatic restart or
failover.
References:
https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/failover-policy-for-failover-cluste
r-instances

106.You want to simulate read, write, checkpoint, backup, sort, and read-ahead activities for your
organization's SQL Server 2016 deployment.
Which of the following tools would you use to accomplish this goal?
A. SQLIO
B. SQLIOSim
C. SQLIOStress
D. chkdsk
Answer: B
Explanation:
The SQLIOSim utility has been upgraded from the SQLIOStress utility. The SQLIOSim utility more
accurately simulates the I/O patterns of Microsoft SQL Server.
References:
https://support.microsoft.com/en-us/help/231619/how-to-use-the-sqliosim-utility-to-simulate-sql-server-ac
tivity-on-a-d

107.You are planning on deploying a server that will be dedicated for ETL (Extraction, Transformation,
and Loading) processes.
You want to ensure that SSIS (SQL Server Integration Services) packages will run on this dedicated ETL
server and not on any other server on which they were started.
Which of the following features must you install on the ETL server in addition to SSIS to accomplish this
goal?
A. Database Engine
B. SQL Server Reporting Services
C. SQL Server Analysis Services
D. Client Tools SDK
Answer: A

108.You want to reproduce the same SQL Server 2016 installation configuration across five servers.
Which of the following files will you generate by using SQL Server Setup to accomplish this goal?
A. Configuration.xml
B. Setup.ini
C. Setup.xml
D. ConfigurationFile.ini
Answer: D

103 / 383
The safer , easier way to help you pass any IT exams. 

109.Which feature should you enable and configure so session requests addressed to a specific instance
can be allocated different processor resources based on session request properties?
A. Resource Governor
B. Windows System Resource Manager
C. Processor affinity
D. I/O affinity
Answer: A
Explanation:
Resource Governor enables you to allocate session requests to different resources based on the
characteristics of the session request properties.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/resource-governor/resource-governor

110.You are implementing a SQL Server 2016 five-node failover cluster.


You need to choose a quorum configuration.
Which configuration should you use?
A. Distributed File System (DFS)
B. Node Majority
C. Cluster Shared Volume (CSV)
D. Node and Disk Majority
Answer: D
Explanation:
Node and Disk Majority (recommended for clusters with an even number of nodes)

111.You administer a Microsoft SQL Server 2016 database named Contoso that contains a single
user-defined database role namedBillingUsers.
All objects in Contoso are in the dbo schema.
You need to grant EXECUTE permissions for all stored procedures in Contoso to BillingUsers.
Which Transact-SQL statement should you use?
A. EXEC sp_addrolemember'db_procexecutor', 'BillingUsers'
B. CREATE ROLE proc_caller GRANT EXECUTE ON ALL PROCEDURES TO proc_caller ALTER
MEMBER BillingUsers ADD TO ROLE proc_caller
C. GRANT EXECUTE ON Schema::dbo TO BillingUsers
D. GRANT EXECUTE ON Contoso::dbo TOBillingUsers
Answer: D

112.You administer a Microsoft SQL Server 2016 database that has multiple tables in the Sales schema.
Some users must be prevented from deleting records in any of the tables in the Sales schema. You need
to manage users who are prevented from deleting records in the Sales schema.
You need to achieve this goal by using the minimum amount of administrative effort.
What should you do?
A. Create a custom database role that includes the users. Deny Delete permissions on the Sales schema
for the custom database role.
B. Include the Sales schema as an owned schema for the db_denydatawriter role. Add the users to the

104 / 383
The safer , easier way to help you pass any IT exams. 

db_denydatawriter role.
C. Deny Delete permissions on each table in the Sales schema for each user.
D. Create a custom database role that includes the users. Deny Delete permissions on each table in the
Sales schema for the custom database role.
Answer: A

113.You are the lead database administrator (DBA) of a Microsoft SQL Server 2016 environment. All
DBAs are members of the DOMAIN\JrDBAs Active Directory group.
You grant DOMAIN\JrDBAs access to the SQL Server.
You need to create a server role named SpecialDBARole that can perform the following functions:
View all databases.
View the server state.
Assign GRANT, DENY, and REVOKE permissions on logins.
You need to add DOMAIN\JrDBAs to the server role.
You also need to provide the least level of privileges necessary.
Which SQL statement or statements should you use? Choose all that apply.
A. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION setupadmin;
B. ALTER SERVER ROLE [SpecialDBARole] ADD MEMBER [DOMAIN\JrDBAs];
C. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION securityadmin;
D. GRANT VIEW DEFINITION TO [SpecialDBARole];
E. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION serveradmin;
F. GRANT VIEW SERVER STATE, VIEW ANY DATABASE TO [SpecialDBARole];
Answer: B,C,F

114.You administer a Microsoft SQL Server 2016 database that has Trustworthy set to On.
You create a stored procedure that returns database-level information from Dynamic Management Views.
You grant User1 access to execute the stored procedure.
You need to ensure that the stored procedure returns the required information when User1 executes the
stored procedure.
You need to achieve this goal by granting the minimum permissions required.
What should you do? (Each correct answer presents a complete solution. Choose all that apply.)
A. Create a SQL Server login that has VIEW SERVER STATE permissions. Create an application role and
a secured password for the role.
B. Modify the stored procedure to include the EXECUTE AS OWNER statement. Grant VIEW SERVER
STATE permissions to the owner of the stored procedure.
C. Create a SQL Server login that has VIEW SERVER STATE permissions. Modify the stored procedure
to include the EXECUTE AS {newlogin} statement.
D. Grant the db_owner role on the database to User1.
E. Grant the sysadmin role on the database to User1.
Answer: B,C
Explanation:
References:
http://msdn.microsoft.com/en-us/library/ms187861.aspx
http://msdn.microsoft.com/en-us/library/ms191291.aspx

105 / 383
The safer , easier way to help you pass any IT exams. 

115.You are migrating a database named Orders to a new server that runs Microsoft SQL Server 2016.
You attempt to add the [Corpnet\User1] login to the database.
However, you receive the following error message:
"User already exists in current database."
You need to configure the [Corpnet\User1] login to be able to access the Orders database and retain the
original permissions.
You need to achieve this goal by using the minimum required permissions.
Which Transact-SQL statement should you use?
A. DROP USER [User1]; CREATE USER [Corpnet\User1] FOR LOGIN [Corpnet\User1]; ALTER ROLE
[db_owner] ADD MEM3ER [Corpnet\User1];
B. ALTER SERVER RCLS Isysadmin] ADD MEMBER [Corpnet\User1];
C. ALTER USER [Corpnet\User1] WITH LOGIN [Corpnet\User1];
D. ALTER ROLE [db owner] ADD MEMBBR [Corpnet\User1];
Answer: C

116.You administer a Microsoft SQL Server 2016 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?
A. SERVER_STATE_CHANGE_GROUP
B. SERVER_PRINCIPAL_IMPERSONATION_GROUP
C. SUCCESSFUL_LOGIN_GROUP
D. SERVER_ROLE_MEMBER_CHANGE_GROUP
Answer: D
Explanation:
SERVER_ROLE_MEMBER_CHANGE_GROUP
This 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.
References: http://technet.microsoft.com/en-us/library/cc280663.aspx

117.You administer a Microsoft SQL Server 2016 instance.


You need to stop a blocking process that has an SPID of 64 without stopping other processes.
What should you do?
A. Execute the following Transact-SQL statement: EXECUTE sp_KillSPID 64
B. Restart the SQL Server service.
C. Execute the following Transact-SQL statement: KILL 64
D. Execute the following Transact-SQL statement: ALTER SESSION KILL '64'
Answer: C
Explanation:
KILL can be used to terminate a normal connection, which internally terminates the transactions that are
associated with the specified session ID.
References: http://msdn.microsoft.com/en-us/library/ms173730.aspx

106 / 383
The safer , easier way to help you pass any IT exams. 

118.You administer a Microsoft SQL Server 2016 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?
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.
B. Use sp_configure to set a value for blocked process threshold. Create an extended event session.
C. Use the Job Activity monitor to review all processes that are actively running. Review the Job History to
find out the duration of each step.
D. Run the sp_who command from a query window.
E. Run the DBCC TRACEON 1222 command from a query window and review the SQL Server event log.
Answer: B

119.You administer a Microsoft SQL Server 2016 database.


You need to ensure that the size of the transaction log file does not exceed 2 GB.
What should you do?
A. Execute sp_configure 'max log size', 2G.
B. use the ALTER DATABASE...SET LOGFILE command along with the maxsize parameter.
C. In SQL Server Management Studio, right-click the instance and select Database Settings. Set the
maximum size of the file for the transaction log.
D. in 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.
Answer: D

120.You administer a Microsoft SQL Server 2016 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.
A. Restart the SQL Server Agent Service.
B. Disable snapshot isolation.
C. Restart the SQL Server Service.
D. Add the CONTOSO\SQLService account to the Perform Volume Maintenance Tasks local security
policy.
E. Add the CONTOSO\SQLService account to the Server Operators fixed server role.
F. Enable snapshot isolation.
Answer: C,D
Explanation:
How To Enable Instant File Initialization
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.

107 / 383
The safer , easier way to help you pass any IT exams. 

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

121.You administer a Microsoft SQL Server 2016 database.


The database contains a Product table created by using the following definition:

You need to ensure that the minimum amount of disk space is used to store the data in the Product table.
What should you do?
A. Convert all indexes to Column Store indexes.
B. Implement Unicode Compression.
C. Implement row-level compression.
D. Implement page-level compression.
Answer: D

122.You administer a Microsoft SQL Server 2016 instance.


After a routine shutdown, the drive that contains tempdb fails.
You need to be able to start the SQL Server.
What should you do?
A. Modify tempdb location in startup parameters.
B. Start SQL Server in minimal configuration mode.
C. Start SQL Server in single-user mode.
D. Configure SQL Server to bypass Windows application logging.
Answer: B

123.You administer a single server that contains a Microsoft SQL Server 2016 default instance.
You plan to install a new application that requires the deployment of a database on the server. The
application login requires sysadmin permissions.
You need to ensure that the application login is unable to access other production databases.
What should you do?
A. Use the SQL Server default instance and configure an affinity mask.
B. Install a new named SQL Server instance on the server.
C. Use the SQL Server default instance and enable Contained
Databases.
D. Install a new default SQL Server instance on the server.
Answer: B
Explanation:

108 / 383
The safer , easier way to help you pass any IT exams. 

SQL Server supports multiple instances of SQL Server on a single server or processor, but only one
instance can be the default instance. All others must be named instances. A computer can run multiple
instances of SQL Server concurrently, and each instance runs independently of other instances.
References: https://msdn.microsoft.com/en-us/library/ms143531(v=SQL.105).aspx

124.You administer a Microsoft SQL Server 2016 Enterprise Edition server that uses 64 cores.
You discover performance issues when large amounts of data are written to tables under heavy system
load.
You need to limit the number of cores that handle I/O.
What should you configure?
A. Processor affinity
B. Lightweight pooling
C. Max worker threads
D. I/O affinity
Answer: D
Explanation:
References: http://msdn.microsoft.com/en-us/library/ms189629.aspx

125.You administer a Microsoft SQL Server 2016 instance. The instance contains a database that
supports a retail sales application.
The application generates hundreds of transactions per second and is online 24 hours per day and 7 days
per week. You plan to define a backup strategy for the database.
You need to ensure that the following requirements are met:
No more than 5 minutes worth of transactions are lost.
Data can be recovered by using the minimum amount of administrative effort.
What should you do? Choose all that apply.
A. Configure the database to use the SIMPLE recovery model.
B. Create a DIFFERENTIAL database backup every 4 hours.
C. Create a LOG backup every 5 minutes.
D. Configure the database to use the FULL recovery model.
E. Create a FULL database backup every 24 hours.
F. Create a DIFFERENTIAL database backup every 24 hours.
Answer: B,C,D,E
Explanation:
If there are only three options, the CDE (exclude differential backup), is the best answer.

126.You administer a Microsoft SQL Server 2016 database that contains a table named OrderDetail. You
discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented.
You need to reduce fragmentation.
You need to achieve this goal without taking the index offline.
Which Transact-SQL batch should you use?
A. CREATE INDEX NCI_OrderDetail_CustomerIDON OrderDetail.CustomerID WITH DROP EXISTING
B. ALTER INDEX NCI_OrderDetail_CustomerID ONOrderDetail.CustomerID REORGANIZE
C. ALTER INDEX ALL ON OrderDetail REBUILD

109 / 383
The safer , easier way to help you pass any IT exams. 

D. ALTER INDEX NCI_OrderDetail_CustomerID ONOrderDetail.CustomerID REBUILD


Answer: B
Explanation:
References: http://msdn.microsoft.com/en-us/library/ms188388.aspx

127.You administer a Microsoft SQL Server database named Sales.


The database is 3 terabytes in size.
The Sales database is configured as shown in the following table.

You discover that all files except Sales_2.ndf are corrupt.


You need to recover the corrupted data in the minimum amount of time.
What should you do?
A. Perform a restore from a full backup.
B. Perform a transaction log restore.
C. Perform a file restore.
D. Perform a filegroup restore.
Answer: A
Explanation:
References: http://technet.microsoft.com/en-us/library/ms187048.aspx

128.You administer a Microsoft SQL Server 2016 server.


You plan to deploy new features to an application.
You need to evaluate existing and potential clustered and non-clustered indexes that will improve
performance.
What should you do?
A. Query the sys.dm_db_index_usage_stats DMV.
B. Query the sys.dm_db_missing_index_details DMV.
C. Use the Database Engine Tuning Advisor.
D. Query the sys.dm_db_missing_index_columns DMV.
Answer: C
Explanation:
The Microsoft Database Engine Tuning Advisor (DTA) analyzes databases and makes recommendations
that you can use to optimize query performance. You can use the Database Engine Tuning Advisor to
select and create an optimal set of indexes, indexed views, or table partitions without having an expert
understanding of the database structure or the internals of SQL Server. Using the DTA, you can perform
the following tasks.
Troubleshoot the performance of a specific problem query

110 / 383
The safer , easier way to help you pass any IT exams. 

Tune a large set of queries across one or more databases


Perform an exploratory what-if analysis of potential physical design changes
Manage storage space
References:
https://docs.microsoft.com/en-us/sql/relational-databases/performance/database-engine-tuning-advisor

129.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.
You need to write messages to the Application Log when users are added to or removed from a fixed
server role in Server01.
What should you create?
A. a Database Audit Specification
B. a Policy
C. an Alert
D. a SQL Profiler Trace
E. a Resource Pool
F. an Extended Event session
G. a Server Audit Specification
Answer: G
Explanation:
The SQL Server Audit feature enables you to audit server-level and database-level groups of events and
individual events.
Audits can have the following categories of actions:
Server-level. These actions include server operations, such as management changes and logon and
logoff operations.
Database-level. These actions encompass data manipulation languages (DML) and data definition
language (DDL) operations.
Audit-level. These actions include actions in the auditing process.
References: http://technet.microsoft.com/en-us/library/cc280663(v=sql.105).aspx

130.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.
You need to be notified immediately when fatal errors occur on Server01.
What should you create?
A. an Alert
B. a Server Audit Specification
C. an Extended Event session
D. a Resource Pool
E. a Policy
F. a SQL Profiler Trace
G. a Database Audit Specification
Answer: A
Explanation:
References: http://www.sqlskills.com/blogs/glenn/creating-sql-server-agent-alerts-for-critical-errors/

131.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.

111 / 383
The safer , easier way to help you pass any IT exams. 

You need to diagnose deadlocks that happen when executing a specific set of stored procedures by
recording events and playing them back on a different test server.
What should you create?
A. an Extended Event session
B. a Policy
C. a Database Audit Specification
D. an Alert
E. a Server Audit Specification
F. a SQL Profiler Trace
G. a Resource Pool
Answer: F
Explanation:
References: http://msdn.microsoft.com/en-us/library/ms188246.aspx

132.You administer a Microsoft SQL Server 2016 database named Contoso on a server named Server01.
You need to prevent users from disabling server audits in Server01.
What should you create?
A. an Alert
B. a Resource Pool
C. an Extended Event session
D. a Policy
E. a Database Audit Specification
F. a SQL Profiler Trace
G. a Server Audit Specification
Answer: D

133.DRAG DROP
You need to recommend a backup process for an Online Transaction Processing (OLTP) database. The
process must meet the following requirements:
Ensure that if a hardware failure occurs, you can bring the database online with a minimum amount of
data loss.
Minimize the amount of administrative effort required to restore any lost data.
What should you include in the recommendation? To answer, move the appropriate actions from the list of
actions to the answer area and arrange them in the correct order.

112 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

134.DRAG DROP
You use SQL Server 2014 Enterprise Edition.
Your database contains a partitioned table named AuditData. AuditData is partitioned by year. Partition 1
contains data from the year 2010 and prior.
Management has decided to archive all AUDITDATA records from 2010 and prior.
Management wants the records to be removed from the database entirely and provided to the backup
team as a zipped text file. The data must no longer reside in the database.
There is very little tolerance for performance degradation in your environment. You need to remove all

113 / 383
The safer , easier way to help you pass any IT exams. 

2010 and prior data from the AuditData table by using the least amount of system resources possible.
Develop the solution by selecting and arranging the required SQL actions in the correct order.
You may not need all of the actions.

Answer:

114 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Note:
- Create a new partitioned table with the partition function you want, and then insert the data from the old
table into the new table by using an INSERT INTO...SELECT FROM statement.
- SPLIT RANGE ( boundary_value )
Adds one partition to the partition function. boundary_value determines the range of the new partition, and
must differ from the existing boundary ranges of the partition function. Based on boundary_value, the
Database Engine splits one of the existing ranges into two.
Of these two, the one where the new boundary_value resides is considered the new partition.
- BCP can be used top produce the zipped text file.
- Example: plitting a partition of a partitioned table or index into two partitions
The following example creates a partition function to partition a table or index into four partitions.
ALTER PARTITION FUNCTION splits one of the partitions into two to create a total of five partitions.
CREATE PARTITION FUNCTION myRangePF1 (int)
AS RANGE LEFT FOR VALUES ( 1, 100, 1000 );
GO
-Split the partition between boundary_values 100 and 1000
-to create two partitions between boundary_values 100 and 500
--and between boundary_values 500 and 1000.
ALTER PARTITION FUNCTION myRangePF1 ()
SPLIT RANGE (500);

135.DRAG DROP
You are planning to deploy a database to Windows Azure SQL Database.
You need to design a stored procedure to update rows. The stored procedure must meet the following
requirements:
If more than one row is updated, an error must be raised to the application and the update must be
discarded.
The stored procedure must be designed to maximize concurrency.
What should you include in the design? To answer, move the appropriate actions from the list of actions to
the answer area and arrange them in the correct order.

115 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:

116 / 383
The safer , easier way to help you pass any IT exams. 

Note:
- Read Committed is SQL Server's default isolation level.
- @@ROWCOUNT eturns the number of rows affected by the last statement.
- Using TRY...CATCH in a transaction
The following example shows how a TRY...CATCH block works inside a transaction.
The statement inside the TRY block generates a constraint violation error.

- Generate a constraint violation error.

136.You are designing a monitoring application for a new SQL Server 2014 instance.
You need to recommend a solution to generate a report that displays the 10 most frequent wait types that
occur for the instance.
What should you include in the recommendation? More than one answer choice may achieve the goal.
Select the BEST answer.
A. The SQL Server error log
B. The sys.dm_os_wait_stats dynamic management view
C. The DBCC SQLPERF(WAITSTATS) command
D. SQL Server Profiler
Answer: B
Explanation:
sys.dm_os_wait_stats
Returns information about all the waits encountered by threads that executed. You can use this
aggregated view to diagnose performance issues with SQL Server and also with specific queries and
batches.
Columns include:

117 / 383
The safer , easier way to help you pass any IT exams. 

waiting_tasks_count
Number of waits on this wait type.
This counter is incremented at the start of each wait.

137.DRAG DROP
You have two servers named SQL1 and SQL2 that have SQL Server 2012 installed.
SQL1 contains a database that is mirrored asynchronously to SQL2. The database contents are updated
once a month.
You need to upgrade the database to SQL Server 2014. The solution must minimize downtime.
Which upgrade steps should you recommend? To answer, move the appropriate actions from the list of
actions to the answer area and arrange them in the correct order.

Answer:

Explanation:
References:https://docs.microsoft.com/en-us/sql/database-engine/database-mirroring/upgrading-mirrore
d-instances?view=sql-server-2017

138.You deploy a database by using SQL Server 2012.


The database contains a table named Table1.
You need to recommend a solution that meets the following requirements:
Stores the most recent data from Table1 by using the fastest storage solution possible.
Stores the historical data from Table1 by using a slower storage solution.
What should you recommend?

118 / 383
The safer , easier way to help you pass any IT exams. 

A. partitioned views
B. a database snapshot
C. change data capture
D. table partitioning
Answer: D

139.DRAG DROP
You plan to deploy SQL Server 2014.
Your company identifies the following monitoring requirements for the database:
An e-mail message must be sent when a user logs in.
An e-mail message must be sent if CPU utilization exceeds 90 percent
You need to identify which feature meets each monitoring requirement.
Which features should you identify? To answer, drag the appropriate feature to the correct monitoring
requirement in the answer area.

Answer:

119 / 383
The safer , easier way to help you pass any IT exams. 

140.You are creating a database that will store usernames and passwords for an application.
You need to recommend a solution to store the passwords in the database.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. One-way encryption
B. Transparent Data Encryption (TDE)
C. Encrypting File System (EFS)
D. Reversible encryption
Answer: B
Explanation:
Transparent Data Encryption (TDE) is a special case of encryption using a symmetric key. TDE encrypts
an entire database using that symmetric key called the database encryption key. The database encryption
key is protected by other keys or certificates which are protected either by the database master key or by
an asymmetric key stored in an EKM module.
SQL Server provides the following mechanisms for encryption:
Transact-SQL functions
Asymmetric keys
Symmetric keys
Certificates
Transparent Data Encryption

141.DRAG DROP
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:

120 / 383
The safer , easier way to help you pass any IT exams. 

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.

Answer:

Explanation:
References:
http://msdn.microsoft.com/en-US/library/ms187752.aspx

142.DRAG DROP
You need to recommend the actions that are required to partition a table.

121 / 383
The safer , easier way to help you pass any IT exams. 

In which order should the four actions be performed? To answer, move the actions from the list of actions
to the answer area and arrange them in the correct order.

Answer:

Explanation:
References: http://technet.microsoft.com/en-us/library/ms188730.aspx

143.You have a SQL Server 2014 environment That contains 20 servers.


The corporate security policy states that all SQL Server 2014 instances must meet specific security
standards.
You need to recommend a management strategy for the SQL Server 2014 servers.
What should you include in the recommendation? More than one answer choice may achieve the goal.
Select the BEST answer.
A. Multi server jobs
B. Policy-Based Management
C. Common criteria compliance
D. Maintenance plans
Answer: B
Explanation:
Policy-Based Management is a system for managing one or more instances of SQL Server. When SQL
Server policy administrators use Policy-Based Management, they use SQL Server Management Studio to
create policies to manage entities on the server, such as the instance of SQL Server, databases, or other
SQL Server objects.

144.DRAG DROP

122 / 383
The safer , easier way to help you pass any IT exams. 

You are designing a database for a university.


The database will contain two tables named Classes and Enrollment that have the following
specifications:
Classes will store brochures in the XPS format. The brochures must be structured in folders and must be
accessible by using UNC paths.
Enrollment will store information about students and their classes. Performance must be enhanced for
queries of the current enrollments.
You need to identify which SQL Server technology meets the specifications of each table.
Which technologies should you identify? To answer, drag the appropriate technology to the correct table
in the answer area.

Answer:

Explanation:
The FileTable feature brings support for the Windows file namespace and compatibility with Windows
applications to the file data stored in SQL Server. FileTable lets an application integrate its storage and
data management components, and provides integrated SQL Server services including full-text search
and semantic search-over unstructured data and metadata. In other words, you can store files and
documents in special tables in SQL Server called FileTables, but access them from Windows applications
as if they were stored in the file system, without making any changes to your client applications.

145.You deploy a database by using SQL Server 2014.


The database contains a table named Table1.
You need to recommend a solution to track all of the deletions executed on Table1. The solution must
minimize the amount of custom code required.
What should you recommend?
A. Change data capture
B. Statistics

123 / 383
The safer , easier way to help you pass any IT exams. 

C. A trigger
D. Master Data Services
Answer: A
Explanation:
Change data capture is designed to capture insert, update, and delete activity applied to SQL Server
tables, and to make the details of the changes available in an easily consumed relational format. The
change tables used by change data capture contain columns that mirror the column structure of a tracked
source table, along with the metadata needed to understand the changes that have occurred.

146.You have four databases that are accessed by using an Online Transaction Processing (OLTP)
application.
The databases are stored on a server named SQL1 that has SQL Server 2014 installed. You plan to
deploy an additional server that has SQL Server 2014 installed. You need to design a high-availability
solution for the databases that meets the following requirements:
If SQL1 fails, the databases must be available.
Users must be able to run reports against a secondary copy of the databases.
What should you include in the design? More than one answer choice may achieve the goal. Select the
BEST answer.
A. AlwaysOn availability groups
B. Database mirroring
C. Log shipping
D. Failover Clustering
Answer: A
Explanation:
The AlwaysOn Availability Groups feature is a high-availability and disaster-recovery solution that
provides an enterprise-level alternative to database mirroring. Introduced in SQL Server 2012, AlwaysOn
Availability Groups maximizes the availability of a set of user databases for an enterprise. An availability
group supports a failover environment for a discrete set of user databases, known as availability
databases, that fail over together.

147.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.
A. Query the sys.dm_exec_requests dynamic management view.
B. Create a trace in SQL Server Profiler that contains the Deadlock graph event.
C. Query the sys.dm_exec_sessions dynamic management view.
D. Create an extended events session to capture deadlock information.
Answer: D
Explanation:
Troubleshooting deadlocks
You have been receiving reports from users indicating that certain applications are returning deadlock
errors. To maximize the effectiveness of troubleshooting these problems, you decide to focus on the
deadlocks that are hit most frequently. You create an Extended Events session that:
Configures deadlock event tracking for the session.

124 / 383
The safer , easier way to help you pass any IT exams. 

Specifies a target that aggregates based on an identifier for the deadlock.


You run the Extended Events session, and after additional deadlocks are reported you are able to obtain
aggregated deadlock information, along with the complete XML deadlock graph for each source. Using
this information, you are able to pin point the most common deadlocks and start working on a solution.

148.DRAG DROP
You have a server named SQL1 that has SQL Server 2012 installed. SQL1 hosts a database named
Database1. Database1 contains a table named Table1. Table1 is partitioned across five filegroups based
on the Date field.
The schema of Table1 is configured as shown in the following table.

Table1 contains the indexes shown in the following table.

You need to recommend an index strategy to maximize performance for the queries that consume the
indexes available to Table1.
Which type of index storage should you recommend? To answer, drag the appropriate index storage type
to the correct index in the answer area.

Answer:

125 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Index Storage Type
Designing a partitioned index independently (unaligned) of the base table can be useful in the following
cases:
- The base table has not been partitioned.
- The index key is unique and it does not contain the partitioning column of the table.
- You want the base table to participate in collocated joins with more tables using different join columns.

149.DRAG DROP
You plan to deploy SQL Server 2014. Your company identifies the following monitoring requirements:
Tempdb must be monitored for insufficient free space.
Deadlocks must be analyzed by using Deadlock graphs.
You need to identify which feature meets each monitoring requirement.
Which features should you identify? To answer, drag the appropriate feature to the correct monitoring
requirement in the answer area.

Answer:

Explanation:

126 / 383
The safer , easier way to help you pass any IT exams. 

You can use the sys.dm_db_file_space_usage dynamic management view to monitor the disk space
used by the user objects, internal objects, and version stores in the tempdb files. Additionally, to monitor
the page allocation or deallocation activity in tempdb at the session or task level, you can use the
sys.dm_db_session_space_usage and sys.dm_db_task_space_usage dynamic management views.
These views can be used to identify large queries, temporary tables, or table variables that are using a
large amount of tempdb disk space.
Use SQL Server Profiler to identify the cause of a deadlock. A deadlock occurs when there is a cyclic
dependency between two or more threads, or processes, for some set of resources within SQL Server.
Using SQL Server Profiler, you can create a trace that records, replays, and displays deadlock events for
analysis.
SQL Server Profiler and SQL Server Management Studio use a deadlock wait-for graph to describe a
deadlock. The deadlock wait-for graph contains process nodes, resource nodes, and edges representing
the relationships between the processes and the resources. References: Troubleshooting Insufficient
Disk Space in tempdb
References: Analyze Deadlocks with SQL Server Profiler

150.You plan to create a database.


The database will be used by a Microsoft .NET application for a special event that will last for two days.
During the event, data must be highly available.
After the event, the database will be deleted.
You need to recommend a solution to implement the database while minimizing costs.
The solution must not affect any existing applications.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. SQL Server 2014 Enterprise
B. SQL Server 2014 Standard
C. SQL Azure
D. SQL Server 2014 Express with Advanced Services
Answer: B
Explanation:
Programmability (AMO, ADOMD.Net, OLEDB, XML/A, ASSL) supported by Standard and Enterprise
editions only. References: Features Supported by the Editions of SQL Server 2014.

151.You are designing a database named DB1.


Changes will be deployed to DB1 every Wednesday night.
You need to recommend a strategy to deploy the changes to DB1.
The strategy must meet the following requirements:
• The strategy must not disrupt backup operations.
• DB1 must be unavailable to users while the changes are deployed.
• You must be able to undo quickly the entire operation.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. Perform a copy-only database backup before the changes are deployed. If the deployment fails,
restore the database to another server and recover the original. Objects from the restored database.

127 / 383
The safer , easier way to help you pass any IT exams. 

B. Create a database snapshot.If the deployment fails, recover the objects from the database snapshot.
C. Create a database snapshot.If the deployment fails, revert the database to the database snapshot.
D. Perform a full database backup before the changes are deployed.If the deployment fails, restore the
database to another server and recover the original objects from the restored database.
Answer: C

152.DRAG DROP
You plan to deploy SQL Server 2014. You are designing two stored procedures named SP1 and SP2 that
have the following requirements:
- Prevent data read by SP1 from being modified by other active processes.
- Prevent SP2 from performing dirty reads.
You need to recommend the isolation level for each stored procedure.
The solution must maximize concurrency.
Which isolation levels should you recommend? To answer, drag the appropriate isolation level to the
correct stored procedure in the answer area.

Answer:

Explanation:
- REPEATABLE READ
This isolation level includes the guarantees given by SNAPSHOT isolation level. In addition,
REPEATABLE READ guarantees that for any row that is read by the transaction, at the time the
transaction commits the row has not been changed by any other transaction. Every read operation in the
transaction is repeatable up to the end of the transaction.
- Committed Read is SQL Server's default isolation level. It ensures that an operation will never read data
another application has changed but not yet committed.

153.DRAG DROP

128 / 383
The safer , easier way to help you pass any IT exams. 

You are designing an authentication strategy for a new server that has SQL Server 2014 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:

Explanation:
1. Logon triggers fire stored procedures in response to a LOGON event. This event is raised when a user
session is established with an instance of SQL Server. Logon triggers fire after the authentication phase of
logging in finishes, but before the user session is actually established.
You can use logon triggers to audit and control server sessions, such as by tracking login activity,
restricting logins to SQL Server, or limiting the number of sessions for a specific login.
2. Login auditing can be configured to write to the error log on the following events.
- Failed logins
- Successful logins
- Both failed and successful logins

154.You are designing a SQL Server database for an order fulfillment system.
You create a table named Sales.Orders by using the following script:

129 / 383
The safer , easier way to help you pass any IT exams. 

Each order is tracked by using one of the following statuses:


• Fulfilled
• Shipped
• Ordered
• Received
You need to design the database to ensure that you can retrieve the status of an order on a given date.
The solution must ensure that new statuses can be added in the future.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
A. To the Sales.Orders table, add a column named Status that will store the order status. Update the
Status column as the order status changes.
B. Create a new table named Sales.OrderStatus that contains three columns named OrderID, StatusDate,
and Status. Insert new rows into the table as the order status changes.
C. Implement change data capture on the Sales.Orders table.
D. To the Sales.Orders table, add three columns named FulfilledDate, ShippedDate, and ReceivedDate.
Update the value of each column from null to the appropriate date as the order status changes.
Answer: A

155.You have two SQL Server 2012 instances named SQLDev and SQLProd.
You plan to create a new database on SQLProd that will use SQL Server Authentication.
You need to ensure that when the new database is copied from SQLProd to SQLDev, users can connect
to the database on SQLDev if they do not have a login on the SQLDev instance.
What should you use? More than one answer choice may achieve the goal. Select the BEST answer.
A. SQL Server Integration Services (SSIS) scripts
B. Extended Events
C. Triggers
D. SQL Server Analysis Services (SSAS) scripts
E. Contained database
Answer: E
Explanation:
A fully contained database includes all the settings and metadata required to define the database and has
no configuration dependencies on the instance of the SQL Server Database Engine where the database
is installed.

156.Your company has offices in Seattle and Montreal.


The network contains two servers named Server1 and Server2 that have SQL Server 2012 installed. The
servers are located in separate building within your campus.
The latency of the WAN link between the buildings is less than 10 ms.
You plan to implement an AlwaysOn availability group on both servers.
You need to recommend a failover type for the availability group.
What should you recommend?
A. Asynchronous automatic failover
B. Synchronous manual failover
C. Asynchronous manual failover
D. Synchronous automatic failover

130 / 383
The safer , easier way to help you pass any IT exams. 

Answer: D

157.DRAG DROP
You plan to deploy SQL Server 2014.
You identify the following security requirements for the deployment:
Users must be prevented from intercepting and reading the T-SQL statements sent from the clients to the
database engine.
All database files and log files must be encrypted if the files are moved to another disk on another server.
You need to identify which feature meets each security requirement. The solution must minimize
processor overhead.
Which features should you identify? To answer, drag the appropriate feature to the correct requirement in
the answer area.

Answer:

Explanation:
- Secure Sockets Layer (SSL) encryption enables transmitting encrypted data across the network
between an instance of SQL Server and a client application.
- Transparent data encryption (TDE) performs real-time I/O encryption and decryption of the data and log
files.

131 / 383
The safer , easier way to help you pass any IT exams. 

158.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 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.
C. 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.
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
Explanation:
- 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.

159.You plan to create a database.


The database will be used by a Microsoft .NET application for a special event that will last for two days.
During the event, data must be highly available. After the event, the database will be deleted. You need to
recommend a solution to implement the database while minimizing costs. The solution must not affect any
existing applications.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. Max Degree of Parallelism
B. Resource Governor
C. Windows System Resource Manager (WSRM)

132 / 383
The safer , easier way to help you pass any IT exams. 

D. Processor affinity
Answer: D

160.You are building a stored procedure for a SQL Azure database. The procedure will add multiple rows
to a table. You need to design the stored procedure to meet the following requirements:
If any of the new rows violates a table constraint, then no further additions must be attempted and all
changes made by the stored procedure must be discarded.
If any errors occur, a row must be added to an audit table, and the original error must be returned to the
caller of the stored procedure.
What should you include in the design?
A. An implicit transaction that has XACT_ABORT enabled
B. An explicit transaction that has XACT_ABORT disabled
C. An implicit transaction that has error handling enabled
D. An explicit transaction that has error handling enabled
Answer: D
Explanation:
References:
http://technet.microsoft.com/en-us/library/ms175127(v=SQL.105).aspx

161.You have a SQL Server 2012 database named DB1.


You plan to import a large number of records from a SQL Azure database to DB1.
You need to recommend a solution to minimize the amount of space used in the transaction log during the
import operation.
What should you include in the recommendation?
A. a new log file
B. a new filegroup
C. the full recovery model
D. a new partitioned table
E. the bulk-logged recovery model
Answer: E
Explanation:
Compared to the full recovery model, which fully logs all transactions, the bulk-logged recovery model
minimally logs bulk operations, although fully logging other transactions. The bulk-logged recovery model
protects against media failure and, for bulk operations, provides the best performance and least log space
usage.
Note:
The bulk-logged recovery model is a special-purpose recovery model that should be used only
intermittently to improve the performance of certain large-scale bulk operations, such as bulk imports of
large amounts of data. Recovery Models (SQL Server)

162.You have two SQL Server instances named SQLDev and SQLProd that have access to various
storage media.
You plan to synchronize SQLDev and SQLProd.
You need to recommend a solution that meets the following requirements:

133 / 383
The safer , easier way to help you pass any IT exams. 

The database schemas must be synchronized from SQLDev to SQLProd.


The database on SQLDev must be deployed to SQLProd by using a package.
The package must support being deployed to SQL Azure.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. A database snapshot
B. A data-tier application
C. Change data capture
D. SQL Server Integration Services (SSIS)
Answer: B
Explanation:
* SIS supports connections to SQL Database by using the ADO.NET provider. OLEDB is not supported at
this time. You can build the SSIS package connecting to SQL Database and create the data flow tasks the
same way as you would against a typical on premise SQL Server.
http://technet.microsoft.com/en-us/library/ee210546.aspx

163.Your company has offices in Seattle and Montreal.


The network contains two servers named Server1 and Server2 that have SQL Server 2012 installed.
Server1 is located in the Seattle office. Server2 is located in the Montreal office. The latency of the WAN
link between the Montreal office and the Seattle office is more than 200 ms.
You plan to implement an AlwaysOn availability group on both servers.
You need to recommend a failover type for the availability group.
What should you recommend?
A. Synchronous manual failover
B. Synchronous automatic failover
C. Asynchronous automatic failover
D. Asynchronous manual failover
Answer: D

164.You have a server that has SQL Server 2014 installed.


The server contains 100 user databases.
You need to recommend a backup solution for the user databases.
The solution must meet the following requirements:
Perform a transaction log backup every hour.
Perform a full backup of each database every week.
Perform a differential backup of each database every day.
Ensure that new user databases are added automatically to the backup solution.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. A maintenance plan
B. SQL Server Agent jobs
C. Policy-Based Management
D. A Data Definition Language (DDL) trigger
Answer: A

134 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Maintenance plans create a workflow of the tasks required to make sure that your database is optimized,
regularly backed up, and free of inconsistencies.
Maintenance plans can be created to perform the following task (among others): Back up the database
and transaction log files. Database and log backups can be retained for a specified period. This lets you
create a history of backups to be used if you have to restore the database to a time earlier than the last
database backup. You can also perform differential backups.

165.DRAG DROP
You plan to deploy a database to SQL Azure. You are designing two stored procedures named USP_1
and USP_2 that have the following requirements:
Prevent data read by USP_1 from being modified by other active processes.
Allow USP_2 to perform dirty reads.
You need to recommend the isolation level for the stored procedures.
The solution must maximize concurrency.
Which isolation levels should you recommend? To answer, drag the appropriate isolation level to the
correct stored procedure in the answer area.

Answer:

Explanation:
Note:
- SP1: repeatable read a repeatable read scan retains locks on every row it touches until the end of the
transaction. Even rows that do not qualify for the query result remain locked. These locks ensure that the
rows touched by the query cannot be updated or deleted by a concurrent session until the current
transaction completes (whether it is committed or rolled back).
- SP2: read uncommitted permits repeatable reads

135 / 383
The safer , easier way to help you pass any IT exams. 

166.You have a 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.)
A. A policy
B. A maintenance plan
C. An alert
D. A job
E. A trigger
Answer: D,E
Explanation:
Use a trigger that starts a job which executes the application.
References: http://technet.microsoft.com/en-us/library/hh849759.aspx

167.DRAG DROP
You plan to deploy SQL Server 2012. You must create two tables named Table 1 and Table 2 that will
have the following specifications:
Table1 will contain a date column named Column1 that will contain a null value approximately 80 percent
of the time.
Table2 will contain a column named Column2 that is the product of two other columns in Table2.
Both Table1 and Table2 will contain more than 1 million rows.
You need to recommend which options must be defined for the columns. The solution must minimize the
storage requirements for the tables.
Which options should you recommend? To answer, drag the appropriate options to the correct column in
the answer area.

Answer:

Explanation:
- Sparse columns are ordinary columns that have an optimized storage for null values. Sparse columns

136 / 383
The safer , easier way to help you pass any IT exams. 

reduce the space requirements for null values at the cost of more overhead to retrieve nonnull values.
Consider using sparse columns when the space saved is at least 20 percent to 40 percent.
- A Persisted column would be faster to retrieve.
- A computed column is computed from an expression that can use other columns in the same table. The
expression can be a noncomputed column name, constant, function, and any combination of these
connected by one or more operators. Unless otherwise specified, computed columns are virtual columns
that are not physically stored in the table. Their values are recalculated every time they are referenced in
a query. The Database Engine uses the PERSISTED keyword in the CREATE TABLE and ALTER TABLE
statements to physically store computed columns in the table. Their values are updated when any
columns that are part of their calculation change.
References:
http://msdn.microsoft.com/en-us/library/cc280604.aspx
http://msdn.microsoft.com/en-us/library/ms186241.aspx

168.DRAG DROP
You plan to deploy a database by using SQL Server 2014. Your company identifies the following
requirements for the database:
The name of all stored procedures must start with "usp_"always.
All distribution statistics must be updated daily
You need to identify which feature must be used to meet each database requirement.
Which features should you identify? To answer, drag the appropriate feature to the correct database
requirement in the answer area.

Answer:

137 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
- Policy-Based Management Each Stored Procedure that are created and that will be created has to have
prefix "USP_".
- Maintenance plans create a workflow of the tasks required to make sure that your database is optimized,
regularly backed up, and free of inconsistencies.

169.DRAG DROP
You plan to deploy three highly available SQL Server environments that will use SQL Server 2014.
You identify the following specifications for each environment as shown following table.

You need to recommend which high-availability feature is required for each environment.
Which features should you identify? To answer, drag the appropriate feature to the correct requirement in
the answer area.

Answer:

138 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
- AlwaysOn availability groups
AlwaysOn Availability Groups feature is a high-availability and disaster-recovery solution that provides an
enterprise-level alternative to database mirroring. Introduced in SQL Server 2012, AlwaysOn Availability
Groups maximizes the availability of a set of user databases for an enterprise. Deploying AlwaysOn
Availability Groups requires a Windows Server Failover Clustering (WSFC) cluster.

170.You manage a SQL Server 2014 instance that contains a database named DB1.
Users report that some queries to DB1 take longer than expected.
Although most queries run in less than one second, some queries take up to 20 seconds to run. You need
to view all of the performance statistics for each database file.
Which method should you use?
A. Query the sys.dm_os_tasks dynamic management view.
B. Query the sys.dm_os_performance_counters dynamic management view.
C. Query the sys.dm_io_virtual_file_stats dynamic management function.
D. Examine the Data File I/O pane in Activity Monitor.
Answer: C
Explanation:
sys.dm_io_virtual_file_stats Returns I/O statistics for data and log files.

171.You are creating a database that will store usernames and credit card numbers for an application.
You need to recommend a solution to store and reuse the credit card numbers in the database.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. Data encryption
B. Transparent Data Encryption (TDE)
C. Encrypting File System (EFS)
D. Data hashing
Answer: A
Explanation:
If we are going to encrypt credit card number for storage, then we should have Data Encryption Key(DEK)
for encrypting the credit card number.

172.Overview
You are a database administrator for a company named Litware, Inc.

139 / 383
The safer , easier way to help you pass any IT exams. 

Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.

140 / 383
The safer , easier way to help you pass any IT exams. 

The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend an isolation level for usp_UpdateOrderDetails.
Which isolation level should recommend?
A. Read committed
B. Repeatable read
C. Read uncommitted
D. Serializable
Answer: B
Explanation:
- Scenario: Databasel will also contain a stored procedure named usp_UpdateOrderDetails. The stored
procedure is used to update order information. The stored procedure queries the Orders table twice each
time the procedure executes. The rows returned from the first query must be returned on the second
query unchanged along with any rows added to the table between the two read operations.
- REPEATABLE READ Specifies that statements cannot read data that has been modified but not yet
committed by other transactions and that no other transactions can modify data that has been read by the
current transaction until the current transaction completes.

173.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will

141 / 383
The safer , easier way to help you pass any IT exams. 

manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a solution for the deployment of SQL Server 2014. The solution must meet the
business requirements.
What should you include in the recommendation?
A. Create a new instance of SQL Server 2014 on the server that hosts the SQL Server 2008 instance.
B. Upgrade the existing SQL Server 2008 instance to SQL Server 2014.
C. Deploy two servers that have SQL Server 2014 installed and implement Failover Clustering.
D. Deploy two servers that have SQL Server 2014 installed and implement database mirroring.
Answer: C
Explanation:
Scenario: The databases must be available if the SQL Server service fails.

174.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and

142 / 383
The safer , easier way to help you pass any IT exams. 

Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a solution to improve the performance of usp.UpdateInventory.
The solution must minimize the amount of development effort.
What should you include in the recommendation?
A. A table variable
B. A common table expression
C. A subquery
D. A cursor
Answer: A
Explanation:
- Scenario: Database2 will contain a stored procedure named usp_UpdateInventory.

143 / 383
The safer , easier way to help you pass any IT exams. 

Usp_UpdateInventory will manipulate a table that contains a self-join that has an unlimited number of
hierarchies.
- A table variable can be very useful to store temporary data and return the data in the table format.
- Example: The following example uses a self-join to find the products that are supplied by more than one
vendor. Because this query involves a join of the ProductVendor table with itself, the ProductVendor table
appears in two roles. To distinguish these roles, you must give the ProductVendor table two different
aliases (pv1 and pv2) in the FROM clause. These aliases are used to qualify the column names in the rest
of the query.
This is an example of the self-join Transact-SQL statement:

175.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will

144 / 383
The safer , easier way to help you pass any IT exams. 

manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a disk monitoring solution that meets the business requirements.
What should you include in the recommendation?
A. a SQL Server Agent alert
B. a dynamic management view
C. a maintenance plan
D. an audit
Answer: B
Explanation:
Dynamic Management Views and Functions (Transact-SQL)

176.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.

145 / 383
The safer , easier way to help you pass any IT exams. 

All database files will be stored in a highly available SAN.


Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a solution for Application1 that meets the security requirements.
What should you include in the recommendation?
A. Encrypted columns
B. Certificate Authentication
C. Secure Socket Layer (SSL)
D. Signed stored procedures
Answer: D
Explanation:
- Scenario:
- Data from Database2 will be accessed periodically by an external application named Application1
- Application developers must be denied direct access to the database tables. Applications must be

146 / 383
The safer , easier way to help you pass any IT exams. 

denied direct access to the tables.


Tutorial: Signing Stored Procedures with a Certificate

177.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.

147 / 383
The safer , easier way to help you pass any IT exams. 

• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a feature to support your backup solution.
What should you include in the recommendation?
A. Transparent Data Encryption (TDE)
B. Column-level encryption
C. An NTFS file permission
D. A Secure Sockets Layer (SSL)
Answer: A
Explanation:
- Scenario: You must encrypt the backup files to meet regulatory compliance requirements. The
encryption strategy must minimize changes to the databases and to the applications.
- Transparent data encryption (TDE) performs real-time I/O encryption and decryption of the data and log
files. The encryption uses a database encryption key (DEK), which is stored in the database boot record
for availability during recovery.
Transparent Data Encryption (TDE)

178.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.

148 / 383
The safer , easier way to help you pass any IT exams. 

Inventory will contain over 100 GB of data.


The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a solution to allow application users to perform UPDATE operations on the
database tables. The solution must meet the business requirements.
What should you recommend?
A. Create stored procedures that use EXECUTE AS clauses.
B. Create a user-defined database role and add users to the role.
C. Create functions that use EXECUTE AS clauses.
D. Create a Policy-Based Management Policy.
Answer: A
Explanation:
- EXECUTE AS Clause (Transact-SQL)
In SQL Server you can define the execution context of the following user-defined modules: functions
(except inline table-valued functions), procedures, queues, and triggers.

179.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.

149 / 383
The safer , easier way to help you pass any IT exams. 

You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
You have the following requirements:
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a database reporting solution that meets the business requirements.
What should you include in the recommendation?
A. Data collection
B. Performance Monitor

150 / 383
The safer , easier way to help you pass any IT exams. 

C. A maintenance plan
D. A dynamic management view
Answer: A
Explanation:
1. Scenario: System administrators must be able to run real-time reports on disk usage.
2. The data collector provides an historical report for each of the System Data collection sets. Each of the
following reports use data that is stored in the management data warehouse:
You can use these reports to obtain information for monitoring system capacity and troubleshooting
system performance.

180.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.
The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements

151 / 383
The safer , easier way to help you pass any IT exams. 

You have the following requirements:


• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
You need to recommend a solution to synchronize Database2 to App1_Db1.
What should you recommend?
A. Change data capture
B. Snapshot replication
C. Master Data Services
D. Transactional replication
Answer: D
Explanation:
Scenario:
- Data from Database2 will be accessed periodically by an external application named
Application1. The data from Database2 will be sent to a database named App1_Db1 as soon as changes
occur to the data in Database2.
- All data in Database2 is recreated each day and does not change until the next data creation process.

181.Overview
You are a database administrator for a company named Litware, Inc.
Litware is a book publishing house. Litware has a main office and a branch office.
You are designing the database infrastructure to support a new web-based application that is being
developed.
The web application will be accessed at www.litwareinc.com. Both internal employees and external
partners will use the application.
You have an existing desktop application that uses a SQL Server 2008 database named App1_DB.
App1_DB will remain in production.

Requirements
Planned Changes
You plan to deploy a SQL Server 2014 instance that will contain two databases named Database1 and
Database2.
All database files will be stored in a highly available SAN.
Database1 will contain two tables named Orders and OrderDetails.
Database1 will also contain a stored procedure named usp_UpdateOrderDetails.

152 / 383
The safer , easier way to help you pass any IT exams. 

The stored procedure is used to update order information. The stored procedure queries the Orders table
twice each time the procedure executes.
The rows returned from the first query must be returned on the second query unchanged along with any
rows added to the table between the two read operations.
Database1 will contain several queries that access data in the Database2 tables.
Database2 will contain a table named Inventory.
Inventory will contain over 100 GB of data.
The Inventory table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.
Database2 wilt contains a stored procedure named usp_UpdateInventory. usp_UpdateInventory will
manipulate a table that contains a self-join that has an unlimited number of hierarchies. All data in
Database2 is recreated each day ad does not change until the next data creation process. Data from
Database2 will be accessed periodically by an external application named Application1. The data from
Database2 will be sent to a database named Appl_Dbl as soon as changes occur to the data in
Database2. Litware plans to use offsite storage for all SQL Server 2014 backups.

Business Requirements
• Costs for new licenses must be minimized.
• Private information that is accessed by Application must be stored in a secure format.
• Development effort must be minimized whenever possible.
• The storage requirements for databases must be minimized.
• System administrators must be able to run real-time reports on disk usage.
• The databases must be available if the SQL Server service fails.
• Database administrators must receive a detailed report that contains allocation errors and data
corruption.
• Application developers must be denied direct access to the database tables. Applications must be
denied direct access to the tables.
You must encrypt the backup files to meet regulatory compliance requirements.
The encryption strategy must minimize changes to the databases and to the applications.
During performance testing, you discover that database INSERT operations against the Inventory table
are slow.
You need to recommend a solution to reduce the amount of time it takes to complete the INSERT
operations.
What should you recommend?
A. Partition the nonclustered index.
B. Partition the Inventory table.snapshot replication
C. Create a column store index.Master Data Services
D. Drop the clustered index.change data capture
Answer: A
Explanation:
Scenario:
Database2 will contain a table named Inventory. Inventory will contain over 100 GB of data. The Inventory
table will have two indexes: a clustered index on the primary key and a nonclustered index.
The column that is used as the primary key will use the identity property.

153 / 383
The safer , easier way to help you pass any IT exams. 

182.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues

154 / 383
The safer , easier way to help you pass any IT exams. 

The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements

155 / 383
The safer , easier way to help you pass any IT exams. 

You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the index fragmentation and index width issue.
What should you include in the recommendation? (Each correct answer presents part of the solution.
Choose all that apply.)
A. Change the data type of the lastModified column to smalldatetime.
B. Remove the lastModified column from the clustered index.
C. Change the data type of the modifiedBy column to tinyint.
D. Change the data type of the id column to bigint.
E. Remove the modifiedBy column from the clustered index.
F. Remove the id column from the clustered index.
Answer: B,E
Explanation:
Scenario:
Index Fragmentation Issues Customers discover that clustered indexes often are fragmented. To resolve
this issue, the customers defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

183.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the

156 / 383
The safer , easier way to help you pass any IT exams. 

SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables. The following
shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is

157 / 383
The safer , easier way to help you pass any IT exams. 

unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the concurrency requirement.


What should you recommend?
A. Call the stored procedures in a Distributed Transaction Coordinator (DTC) transaction.
B. Modify the stored procedures to update tables in the same order for all of the stored procedures.
C. Make calls to Sales.Proc1 and Sales.Proc2 synchronously.
D. Break each stored procedure into two separate procedures, one that changes Sales.Table1 and one
that changes Sales.Table2.
Answer: B
Explanation:
- Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Proc1 and Sales.Proc2 execute.

158 / 383
The safer , easier way to help you pass any IT exams. 

184.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables. The following
shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues

159 / 383
The safer , easier way to help you pass any IT exams. 

The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements

160 / 383
The safer , easier way to help you pass any IT exams. 

You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the backup issue.


The solution must minimize the amount of development effort.
What should you include in the recommendation?
A. Indexed views
B. Filegroups
C. Table partitioning
D. Indexes
Answer: B
Explanation:
- Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.
- For very large databases (and by that, I mean, at least 500gb, but more like 5-10tb or more), it can
become too expensive to regularly run a straight full backup.
So, where needed, you can choose to backup smaller pieces of the database by choosing to back up one
of the files or file groups that make up a database.

185.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.

161 / 383
The safer , easier way to help you pass any IT exams. 

The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables. The following
shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

162 / 383
The safer , easier way to help you pass any IT exams. 

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend changes to the ERP application to resolve the search issue.
The solution must minimize the impact on other queries generated from the ERP application.
What should you recommend changing?
A. The collation of the Products table
B. The index on the ProductName column
C. The collation of the ProductName column
D. The data type of the ProductName column
Answer: C
Explanation:
References:
http://technet.microsoft.com/en-us/library/aa214408(v=sql.80).aspx

186.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application

163 / 383
The safer , easier way to help you pass any IT exams. 

used SQL Server 2008 R2.


The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues

164 / 383
The safer , easier way to help you pass any IT exams. 

Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

165 / 383
The safer , easier way to help you pass any IT exams. 

You need to recommend a solution that meets the data recovery requirement.
What should you include in the recommendation?
A. A differential backup
B. A transaction log backup
C. Snapshot isolation
D. A database snapshot
Answer: D

187.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

166 / 383
The safer , easier way to help you pass any IT exams. 

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

167 / 383
The safer , easier way to help you pass any IT exams. 

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that resolves the missing data issue.
The solution must minimize the amount of development effort.
What should you recommend?
A. Denormalize the Products table.
B. Denormalize the OrderDetails table.
C. Normalize the OrderDetails table.
D. Normalize the Products table.
Answer: D
Explanation:
- Scenario:
- Missing Data Issues
Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.
- The current database schema contains a table named OrderDetails. The OrderDetails table contains
information about the items sold for each purchase order. OrderDetails stores the product ID, quantities,
and discounts applied to each product in a purchase order.
The product price is stored in a table named Products.

188.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.

168 / 383
The safer , easier way to help you pass any IT exams. 

Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

169 / 383
The safer , easier way to help you pass any IT exams. 

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements

170 / 383
The safer , easier way to help you pass any IT exams. 

You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that reduces the time it takes to import the supplier data.
What should you include in the recommendation?
A. Enable instant file initialization.
B. Reorganize the indexes.
C. Disable Resource Governor.
D. Enable Auto Update Statistics.
Answer: C
Explanation:
- The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.

189.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

171 / 383
The safer , easier way to help you pass any IT exams. 

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

172 / 383
The safer , easier way to help you pass any IT exams. 

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the file storage requirements.
What should you include in the recommendation?
A. FileStream
B. FileTable
C. The varbinary data type
D. The image data type
Answer: B
Explanation:
- Scenario: File Storage Requirements The ERP database stores scanned documents that are larger than
2 MB. These files must only be accessed through the ERP application. File access must have the best
possible read and write performance.
- FileTables remove a significant barrier to the use of SQL Server for the storage and management of
unstructured data that is currently residing as files on file servers.
Enterprises can move this data from file servers into FileTables to take advantage of integrated
administration and services provided by SQL Server. At the same time, they can maintain Windows
application compatibility for their existing Windows applications that see this data as files in the file
system.

190.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.

173 / 383
The safer , easier way to help you pass any IT exams. 

Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

174 / 383
The safer , easier way to help you pass any IT exams. 

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements

175 / 383
The safer , easier way to help you pass any IT exams. 

You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the installation issues.


What should you include in the recommendation?
A. Windows logins
B. Server roles
C. Contained users
D. Database roles
Answer: C
Explanation:
- Scenario: Installation Issues The current version of the ERP application requires that several SQL
Server logins be set up to function correctly. Most customers set up the ERP application in multiple
locations and must create logins multiple times.
- Creating contained users enables the user to connect directly to the contained database. This is a very
significant feature in high availability and disaster recovery scenarios such as in an AlwaysOn solution. If
the users are contained users, in case of failover, people would be able to connect to the secondary
without creating logins on the instance hosting the secondary. This provides an immediate benefit.

191.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

176 / 383
The safer , easier way to help you pass any IT exams. 

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

177 / 383
The safer , easier way to help you pass any IT exams. 

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

You need to recommend a solution that addresses the security requirement.


What should you recommend?
A. Revoke user permissions on the tables. Create stored procedures that manipulate data. Grant the
users the EXECUTE permission on the stored procedures.
B. Grant the users the SELECT permission on the tables. Create views that retrieve data from the tables.
Grant the users the SELECT permission on the views.
C. Deny the users SELECT permission on the tables. Create views that retrieve data from the tables.
Grant the users the SELECT permission on the views.
D. Deny the users the SELECT permission on the tables. Create stored procedures that manipulate data.
Grant the users the EXECUTE permission on the stored procedures.
Answer: C
Explanation:
- Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

192.DRAG DROP
Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application

178 / 383
The safer , easier way to help you pass any IT exams. 

used SQL Server 2008 R2.


The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues

179 / 383
The safer , easier way to help you pass any IT exams. 

Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

180 / 383
The safer , easier way to help you pass any IT exams. 

You need to recommend which statement should be used to update SalesOrder.


How should you recommend completing the statement? To answer, drag the appropriate elements to the
correct locations. Each element 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.

Answer:

181 / 383
The safer , easier way to help you pass any IT exams. 

193.Overview
Application Overview
Contoso, Ltd., is the developer of an enterprise resource planning (ERP) application.
Contoso is designing a new version of the ERP application. The previous version of the ERP application
used SQL Server 2008 R2.
The new version will use SQL Server 2014.
The ERP application relies on an import process to load supplier data. The import process updates
thousands of rows simultaneously, requires exclusive access to the database, and runs daily.
You receive several support calls reporting unexpected behavior in the ERP application. After analyzing
the calls, you conclude that users made changes directly to the tables in the database.

Tables
The current database schema contains a table named OrderDetails.
The OrderDetails table contains information about the items sold for each purchase order. OrderDetails
stores the product ID, quantities, and discounts applied to each product in a purchase order.
The product price is stored in a table named Products. The Products table was defined by using the
SQL_Latin1_General_CP1_CI_AS collation.
A column named ProductName was created by using the varchar data type. The database contains a
table named Orders.
Orders contains all of the purchase orders from the last 12 months. Purchase orders that are older than
12 months are stored in a table named OrdersOld.
The previous version of the ERP application relied on table-level security.

182 / 383
The safer , easier way to help you pass any IT exams. 

Databases
The current version of the database contains stored procedures that change two tables.
The following shows the relevant portions of the two stored procedures:

Customer Problems
Installation Issues
The current version of the ERP application requires that several SQL Server logins be set up to function
correctly. Most customers set up the ERP application in multiple locations and must create logins multiple
times.

Index Fragmentation Issues


Customers discover that clustered indexes often are fragmented. To resolve this issue, the customers
defragment the indexes more frequently.
All of the tables affected by fragmentation have the following columns that are used as the clustered index
key:

Backup Issues
Customers who have large amounts of historical purchase order data report that backup time is
unacceptable.

Search Issues
Users report that when they search product names, the search results exclude product names that
contain accents, unless the search string includes the accent.

183 / 383
The safer , easier way to help you pass any IT exams. 

Missing Data Issues


Customers report that when they make a price change in the Products table, they cannot retrieve the
price that the item was sold for in previous orders.

Query Performance Issues


Customers report that query performance degrades very quickly. Additionally, the customers report that
users cannot run queries when SQL Server runs maintenance tasks. Import Issues During the monthly
import process, database administrators receive many supports call from users who report that they
cannot access the supplier data. The database administrators want to reduce the amount of time required
to import the data.

Design Requirements
File Storage Requirements
The ERP database stores scanned documents that are larger than 2 MB. These files must only be
accessed through the ERP application. File access must have the best possible read and write
performance.

Data Recovery Requirements


If the import process fails, the database must be returned to its prior state immediately.

Security Requirements
You must provide users with the ability to execute functions within the ERP application, without having
direct access to the underlying tables.

Concurrency Requirements
You must reduce the likelihood of deadlocks occurring when Sales.Prod and Sales.Proc2 execute.

What should you recommend for the updates to Sales.TransactionHistory?


A. a REPEATABLE READ isolation level
B. implicit transactions
C. query hints
D. a SNAPSHOT isolation level
Answer: A

194.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database

184 / 383
The safer , easier way to help you pass any IT exams. 

administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:
Classifications (Customers)

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

185 / 383
The safer , easier way to help you pass any IT exams. 

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a disaster recovery strategy for the Inventory database.
What should you include in the recommendation?
A. Log shipping
B. SQL Server Failover Clustering
C. AlwaysOn availability groups
D. Peer-to-peer replication
Answer: A
Explanation:
Scenario:
- You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Point Objective (RPO) of one hour.
- A. Datum Corporation has offices in Miami and Montreal.
- SQL Server Log shipping allows you to automatically send transaction log backups from a primary
database on a primary server instance to one or more secondary databases on separate secondary
server instances. The transaction log backups are applied to each of the secondary databases
individually.

195.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.

186 / 383
The safer , easier way to help you pass any IT exams. 

The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.

187 / 383
The safer , easier way to help you pass any IT exams. 

All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to minimize the amount of time it takes to execute USP_5.
What should you include in the recommendation?
A. Enable cross-database chaining.
B. Use a server role to group all logins.
C. Use the EXECUTE AS clause in USP_5.
D. Copy USP.5 to each database.
Answer: A
Explanation:
Scenario:
A stored procedure named USP_5 changes data in multiple databases. Security checks are performed
each time USP_5 accesses a database.
- Cross-database ownership chaining occurs when a procedure in one database depends on objects in
another database. A cross-database ownership chain works in the same way as ownership chaining
within a single database, except that an unbroken ownership chain requires that all the object owners are

188 / 383
The safer , easier way to help you pass any IT exams. 

mapped to the same login account. If the source object in the source database and the target objects in
the target databases are owned by the same login account, SQL Server does not check permissions on
the target objects.

196.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are

189 / 383
The safer , easier way to help you pass any IT exams. 

caused by USP_1 and USP_3.


A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to meet the security requirements of the junior database
administrators.
What should you include in the recommendation?
A. A server role
B. A database role
C. A credential
D. A shared login

190 / 383
The safer , easier way to help you pass any IT exams. 

Answer: C
Explanation:
- Scenario: A group of junior database administrators must be able to view the server state of the SQL
Server instance that hosts the Sales database. The junior database administrators will not have any other
administrative rights.
- Credentials provide a way to allow SQL Server Authentication users to have an identity outside of SQL
Server. Credentials can also be used when a SQL Server Authentication user needs access to a domain
resource, such as a file location to store a backup.

197.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.

191 / 383
The safer , easier way to help you pass any IT exams. 

After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a change to USP_3 to ensure that the procedure continues to execute even if
one of the UPDATE statements fails.

192 / 383
The safer , easier way to help you pass any IT exams. 

Which change should you recommend?


A. Set the XACT_ABORT option to off.
B. Set the XACT_ABORT option to on.
C. Set the IMPLICIT_TRANSACTIONS option to off.
D. Set the IMPLICIT_TRANSACTIONS option to on.
Answer: A
Explanation:
- Scenario: A stored procedure named USP_3 is used to update prices. USP_3 is composed of several
UPDATE statements called in sequence from within a transaction. Currently, if one of the UPDATE
statements fails, the stored procedure continues to execute.
- When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error
is rolled back and the transaction continues processing.

198.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

193 / 383
The safer , easier way to help you pass any IT exams. 

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.

194 / 383
The safer , easier way to help you pass any IT exams. 

You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a disaster recovery solution for the Dev database.
What should you include in the recommendation?
A. The simple recovery model and full backups
B. The full recovery model, full backups, and transaction log backups
C. The full recovery model, full backups, and differential backups
D. The bulk-logged recovery model and full backups
Answer: A
Explanation:
Scenario:
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.
- The simple recovery model provides the simplest form of backup and restore. This recovery model
supports both database backups and file backups, but does not support log backups. Transaction log data
is backed up only with the associated user data.
The absence of log backups simplifies managing backup and restore.
However, a database can be restored only to the end of the most recent backup.

199.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

195 / 383
The safer , easier way to help you pass any IT exams. 

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database

196 / 383
The safer , easier way to help you pass any IT exams. 

administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution for the planned changes to the customer classifications.
What should you recommend? (Each correct answer presents part of the solution. Choose all that apply.)
A. Add a row to the Customers table each time a classification changes.
B. Add columns for each classification to the Customers table.
C. Add a table to track any changes made to the classification of each customer.
D. Add a column to the Classifications table to track the status of each classification.
E. Implement change data capture.
Answer: C,D
Explanation:
Scenario:
You plan to change the way customers are classified.
The new classifications will have four levels based on the number of orders. Classifications may be
removed or added in the future.

200.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

197 / 383
The safer , easier way to help you pass any IT exams. 

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a

198 / 383
The safer , easier way to help you pass any IT exams. 

Recovery Time Objective (RTO) of 5 minutes.


You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a change to USP_3 to ensure that the procedure completes only if all of the
UPDATE statements complete.
Which change should you recommend?
A. Set the XACT_ABORT option to off
B. Set the XACT_ABORT option to on.
C. Set the IMPLICIT_TRANSACTIONS option to off.
D. Set the IMPLICIT_TRANSACTIONS option to on.
Answer: B
Explanation:
Scenario:
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure continues to execute.
- When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire
transaction is terminated and rolled back.

201.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases

199 / 383
The safer , easier way to help you pass any IT exams. 

Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.

200 / 383
The safer , easier way to help you pass any IT exams. 

The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution for the error handling of USP_3. The solution must minimize the
amount of custom code required.
What should you recommend?
A. Use the @@ERROR variable in the nested stored procedures.
B. Use a TRY CATCH block in the called stored procedures.
C. Use the @@ERROR variable in the called stored procedures.
D. Use the RAISERROR command in the nested stored procedures.
Answer: B
Explanation:
- Must catch and handle the error.
Scenario:
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure continues to execute.

202.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each

201 / 383
The safer , easier way to help you pass any IT exams. 

other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure

202 / 383
The safer , easier way to help you pass any IT exams. 

named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution that meets the data recovery requirement.
What should you include in the recommendation?
A. A database snapshot
B. A transaction log backup
C. Snapshot isolation
D. A differential backup
Answer: D
Explanation:
References:
http://stackoverflow.com/questions/5299812/alternatives-to-snapshot-functionality-sql-serverstandard

203.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each

203 / 383
The safer , easier way to help you pass any IT exams. 

other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure

204 / 383
The safer , easier way to help you pass any IT exams. 

named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to minimize the amount of time it takes to execute USP_2.
What should you recommend?
A. A database snapshot
B. A table variable
C. A temporary table
D. Snapshot isolation
Answer: C
Explanation:
Scenario:
A stored procedure named USP_2 is used to generate a product list.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses.

204.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.

205 / 383
The safer , easier way to help you pass any IT exams. 

The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.

206 / 383
The safer , easier way to help you pass any IT exams. 

All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution for the error handling of USP_4.
The solution must handle errors for nested stored procedures in the code for USP_4.
What should you recommend?
A. Use the @@ERROR variable in the nested stored procedures.
B. Use the @@ERROR variable in USP_4.
C. Use the RAISERROR command in the nested stored procedures.
D. Use the RAISERROR command in USP_4.
Answer: C
Explanation:
- A stored procedure named USP_4 calls stored procedures in the Sales, Customers, and Inventory
databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.

207 / 383
The safer , easier way to help you pass any IT exams. 

205.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named

208 / 383
The safer , easier way to help you pass any IT exams. 

USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to minimize the amount of time it takes to execute USP_1. With what
should you recommend replacing Table1?
A. A view
B. A temporary table
C. A table variable
D. A function
Answer: A
Explanation:
- A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.

209 / 383
The safer , easier way to help you pass any IT exams. 

206.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are
caused by USP_1 and USP_3.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.

210 / 383
The safer , easier way to help you pass any IT exams. 

Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to ensure that USP_4 adheres to the security requirements.
What should you include in the recommendation?
A. Enable SQL Server Audit.
B. Enable trace flags.
C. Configure data manipulation language (DML) triggers.
D. Enable C2 audit tracing.
Answer: A
Explanation:
Scenario:
A stored procedure named USP_4 calls stored procedures in the Sales, Customers, and Inventory

211 / 383
The safer , easier way to help you pass any IT exams. 

databases. The nested stored procedures read tables from the Sales, Customers, and Inventory
databases. USP_4 uses an EXECUTE AS clause.
Beginning in SQL Server 2008 Enterprise, you can set up automatic auditing by using SQL Server Audit.

207.Overview
General Overview
ADatum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices connect to each
other by using a WAN link that has 5-ms latency. A. Datum standardizes its database platform by using
SQL Server 2014 Enterprise edition.

Databases
Each office contains databases named Sales, Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the database
administrators have the same level of permissions on all of the servers and all of the databases.
The Customers database contains two tables named Customers and Classifications.
The following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is updated frequently.


The database is often used for reporting.
A full backup of the database currently takes three hours to complete.

Databases
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from Table1 sequentially several times. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. The product list contains the names
of products grouped by category.
USP_2 takes several minutes to run due to locks on the tables the procedure accesses. The locks are

212 / 383
The safer , easier way to help you pass any IT exams. 

caused by USP_1 and USP_3.


A stored procedure named USP_3 is used to update prices. USP_3 is composed of several UPDATE
statements called in sequence from within a transaction.
Currently, if one of the UPDATE statements fails, the stored procedure fails. A stored procedure named
USP_4 calls stored procedures in the Sales, Customers, and Inventory databases.
The nested stored procedures read tables from the Sales, Customers, and Inventory databases. USP_4
uses an EXECUTE AS clause.
All nested stored procedures handle errors by using structured exception handling. A stored procedure
named USP_5 calls several stored procedures in the same database. Security checks are performed
each time USP_5 calls a stored procedure.
You suspect that the security checks are slowing down the performance of USP_5. All stored procedures
accessed by user applications call nested stored procedures.
The nested stored procedures are never called directly.

Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You have a
Recovery Time Objective (RTO) of 5 minutes.
You must be able to recover data from the Dev database if data is lost accidentally. You have a Recovery
Point Objective (RPO) of one day.

Classification Changes
You plan to change the way customers are classified. The new classifications will have four levels based
on the number of orders. Classifications may be removed or added in the future. Management requests
that historical data be maintained for the previous classifications. Security A group of junior database
administrators must be able to manage security for the Sales database. The junior database
administrators will not have any other administrative rights. A. Datum wants to track which users run each
stored procedure.

Storage
ADatum has limited storage. Whenever possible, all storage space should be minimized for all databases
and all backups.

Error Handling
There is currently no error handling code in any stored procedure.
You plan to log errors in called stored procedures and nested stored procedures. Nested stored
procedures are never called directly.
You need to recommend a solution to minimize the amount of time it takes to execute USP_1. With what
should you recommend replacing Table1?
A. An indexed view
B. A function
C. A table variable
D. A temporary table
Answer: D

213 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Scenario:
A stored procedure named USP_1 generates millions of rows of data for multiple reports. USP_1
combines data from five different tables from the Sales and Customers databases in a table named
Table1.
After Table1 is created, the reporting process reads data from a table in the Products database and
searches for information in Table1 based on input from the Products table. After the process is complete,
Table1 is deleted.

208.General Overview
You are the Senior Database Administrator (DBA) for a manufacturing company named Fairstone
Manufacturing.
Fairstone Manufacturing is based in the New York area. The company has two offices: a main office in the
city and a branch office just outside the city. The company has four factories where their products are
manufactured. Two factories are in the New York area and the other two factories are in Washington.

Network Connectivity
The two offices are connected by a 10 Mbps dedicated WAN link.

SQL Server Environment


The main office has four SQL Server 2012 Standard Edition servers named MainDB1, MainDB2,
MainDB3 and MainDB4. The branch office has two SQL Server 2012 Standard Edition servers named
BranchDB1 and BranchDB2. The main office has a Development department. All databases used by the
Development department are hosted on MainDB3 and MainDB4.
MainDB1 and MainDB2 host the following databases:
• Products
• Manufacturing
• Sales
• HR

Customers
DailyReportsTemp
BranchDB1 and BranchDB2 host the same databases as MainDB1 and MainDB2. The DailyReportsTemp
database is a temporary database that is recreated every day and used for reporting purposes.
One of the tables in the Customer database lists all the customers. Another table linked to the customers
table contains a list of classifications for the customers. The classifications are Hot, Warm and Cold based
on the number of orders placed by the customers in the last year. The customers are classified according
to the following criteria:
Hot - Over 100 orders placed in a year.
Warm - Between 50 and 100 orders placed in a year.
Cold - Under 50 orders placed in a year.

Databases
Three tables in the Manufacturing database are modified by a stored procedure named ManProc1.

214 / 383
The safer , easier way to help you pass any IT exams. 

A segment of code from ManProc1 is as follows:

The same three tables are also modified by a stored procedure named ManProc2.
A segment of code from ManProc2 is as follows:

A product list in the Products database is updated using information from tables in the Manufacturing
database by a stored procedure named ProductUpdateProc. Locks on tables in the Manufacturing
database often cause ProductUpdateProc to take a long time to complete.
A list of manufacturing processes required to create each product is stored in tables in the Manufacturing
database and updated by a stored procedure named ProcessUpdateProc. The ProcessUpdateProc
stored procedure contains several UPDATE statements. The UPDATE statements are configured to be
called in a specific order. The ProcessUpdateProc stored procedure continues to run in the event of a
failure of one of the UPDATE statements.
This can cause inaccurate results in the manufacturing process list.

Sales Director Statement


The Sales Director has made the following observations about the current database design:
• The current customer classification system needs to be changed.
• Currently the customers are classified by the number of orders placed in the last year.
• This information is an unreliable guide as it does not take in to account the size of the orders.
• I would suggest a trial run of a classification system based on the revenue generated by the orders
placed in the last year.
• We may add more than the current three classification types in future.
• We should have a method of recording changes to the classifications.

IT Manager Statement
The IT Manager has listed the following requirements for the SQL Server and database environment:
• We need to provide a group of users from the IT and Manufacturing departments the minimum
administrative rights to view database information and server state for the Manufacturing database on
MainDB1.
• The Sales database takes too long to back up due to the large amount of historical sales order data in
the database. We need to reduce the backup time for this database.

215 / 383
The safer , easier way to help you pass any IT exams. 

• The DailyReportsTemp database takes four hours to back up. We need to be able to recover the
DailyReportsTemp database in less than one hour if the database storage hardware fails.
• We need to be able to immediately return the Manufacturing database to its previous state if the
ProcessUpdateProc stored procedure fails to update the process information correctly.
• I also want the ProcessUpdateProc stored procedure to stop running in the event of a failure of one of
the UPDATE statements.
• IT Administrators need to be able to monitor the disk space used on the SQL Servers by running
real-time reports on the disk usage.
• The Developers would like to install second instances of SQL Server on MainDB3 and MainDB4.
• They would like to assign each instance to specific processors on the SQL Servers.

You need to enable the Developers to assign SQL Server instances on MainDB3 and MainDB4 to specific
processors on the servers.
What should you configure?
A. Windows System Resource Manager (WSRM)
B. Resource Governor
C. A Maintenance Plan
D. Processor Affinity
Answer: D

209.You need to provide a group of users from the IT and Manufacturing departments the minimum
administrative rights to view database information and server state for the Manufacturing database on
MainDB1.
What should you do?
A. You should configure a Database Role.
B. You should configure a Server Role.
C. You should configure a Shared SQL Server Login.
D. You should configure a Local Security Group.
Answer: B

210.You need to recommend a solution to meet the recovery requirements for the manufacturing
database.
Your solution must minimize costs.
What should you recommend?
A. Database snapshots
B. Transaction log backups
C. Differential backups
D. SQL Server Failover Clustering
E. Peer-to-peer replication
Answer: A

211.You need to address the requirements for disc usage monitoring for the SQL Servers.
What should you do?
A. You should configure disc quotas.

216 / 383
The safer , easier way to help you pass any IT exams. 

B. You should configure a Dynamic Management View.


C. You should configure alerts sent by the SQL Server Agent.
D. You should configure a SQL Server Maintenance Plan.
Answer: B

212.You need to address the Sales Director's requirements regarding the customer classification. You
need to recommend a solution for changing the classifications.
What should you recommend?
A. Add each classification change to a new row in the Customers table.
B. Record each change to the classification of each customer in a new row in the Customers table.
C. Add a new row to the Customers table for each new classification.
D. Record each change to the classification of each customer in a new table in the Customers database.
Answer: D

213.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.

217 / 383
The safer , easier way to help you pass any IT exams. 

When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

The performance of the SPUpdate2 stored procedure needs to be improved.


Your solution must meet the design requirements.
What should your solution include?
A. A common table expression.
B. A derived table.
C. A Cursor.
D. A table variable.
Answer: A

214.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield

218 / 383
The safer , easier way to help you pass any IT exams. 

Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:

219 / 383
The safer , easier way to help you pass any IT exams. 

• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to configure a synchronization solution to copy data from the Current_Inventory database the
DesABCopAppDB database.
What should you configure?
A. Transactional Replication.
B. Database Mirroring.
C. Snapshot Replication.
D. Incremental Backups
Answer: A

215.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.

220 / 383
The safer , easier way to help you pass any IT exams. 

The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

221 / 383
The safer , easier way to help you pass any IT exams. 

You need to enable users to modify data in the database tables using UPDATE operations.
You need to implement a solution that meets the design requirements.
What should you configure?
A. You should configure a server role.
B. You should configure a database role.
C. You should configure functions that use the EXECUTE AS statement.
D. You should configure stored procedures that use the EXECUTE AS statement.
Answer: D

216.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

222 / 383
The safer , easier way to help you pass any IT exams. 

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to ensure that the account used to generate reports can only connect during certain hours.
What should you configure?
A. A CHECK constraint.
B. Windows Server Resource Manager (WSRM).
C. Logon Triggers.
D. Login Auditing.
Answer: C

217.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users

223 / 383
The safer , easier way to help you pass any IT exams. 

are trained to use the new webbased application.


You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.

224 / 383
The safer , easier way to help you pass any IT exams. 

• Deadlocks must be analyzed with the use of Deadlock Graphs.


• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to meet the design requirement for the ProductTypes table in the Product database.
Which of the following would be the best solution?
A. A PRIMARY KEY constraint.
B. A CHECK constraint.
C. A UNIQUE constraint.
D. A Data Definitions Language (DDL) trigger.
E. A FOREIGN KEY constraint.
Answer: B

218.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.

225 / 383
The safer , easier way to help you pass any IT exams. 

Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to plan the SQL Server 2012 deployment that meets the design requirements.
Which of the following steps should you perform?
A. Upgrade the existing SQL Server 2005 server to SQL Server 2012.
B. Install one new server running SQL Server 2012.

226 / 383
The safer , easier way to help you pass any IT exams. 

C. Install two new servers running SQL Server 2012


D. Configure Failover Clustering
E. Configure AllwaysOn
Answer: A,B,E

219.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

227 / 383
The safer , easier way to help you pass any IT exams. 

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to recommend a solution to meet the design requirement of logging all failed authentication
requests.
What should you recommend?
A. Object Access Auditing
B. C2 Audit Mode
C. Logon Triggers.
D. Login Auditing.
Answer: D

220.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases

228 / 383
The safer , easier way to help you pass any IT exams. 

You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.
A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.

229 / 383
The safer , easier way to help you pass any IT exams. 

• The Tempdb databases must be monitored for insufficient free space.


• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

The performance of the SPUpdate2 stored procedure needs to be improved.


Your solution must meet the design requirements.
What should your solution include?
A. A common table expression.
B. A derived table.
C. A Cursor.
D. A table variable.
Answer: A

221.General Overview
You are the Senior Database Administrator (DBA) for a software development company named Leafield
Solutions. The company develops software applications custom designed to meet customer
requirements.
Requirements Leafield Solutions has been asked by a customer to develop a web-based Enterprise
Resource Planning and Management application. The new application will eventually replace a desktop
application that the customer is currently using. The current application will remain in use while the users
are trained to use the new webbased application.
You need to design the SQL Server and database infrastructure for the web-based application.

Databases
You plan to implement databases named Customers, Sales, Products, Current_Inventory, and
TempReporting.
The Sales database contains a table named OrderTotals and a table named SalesInfo.
A stored procedure named SPUpdateSalesInfo reads data in the OrderTotals table and modifies data in
the SalesInfo table.
The stored procedure then reads data in the OrderTotals table a second time and makes further changes
to the information in the SalesInfo table.
The Current_Inventory database contains a large table named Inv_Current. The Inv_Current table has a
clustered index for the primary key and a nonclustered index. The primary key column uses the identity
property.
The data in the Inv_Current table is over 120GB in size. The tables in the Current_Inventory database are
accessed by multiple queries in the Sales database.
Another table in the Current_Inventory database contains a self-join with an unlimited number of
hierarchies. This table is modified by a stored procedure named SPUpdate2.
An external application named ExternalApp1 will periodically query the Current_Inventory database to
generate statistical information. The TempReporting database contains a single table named GenInfo.

230 / 383
The safer , easier way to help you pass any IT exams. 

A stored procedure named SPUPdateGenInfo combines data from multiple databases and generates
millions of rows of data in the GenInfo table.
The GenInfo table is used for reports.
When the information in GenInfo is generated, a reporting process reads data from the Inv_Current table
and queries information in the GenInfo table based on that data.
The GenInfo table is deleted after the reporting process completes. The Products database contains
tables named ProductNames and ProductTypes.

Current System
The current desktop application uses data stored in a SQL Server 2005 database named
DesABCopAppDB. This database will remain online and data from the Current_Inventory database will be
copied to it as soon as data is changed in the Current_Inventory database.

SQL Servers
A new SQL Server 2012 instance will be deployed to host the databases for the new system. The
databases will be hosted on a Storage Area Network (SAN) that provides highly available storage.

Design Requirements
Your SQL Server infrastructure and database design must meet the following requirements:
• Confidential information in the Current_ Inventory database that is accessed by ExternalApp1 must be
securely stored.
• Direct access to database tables by developers or applications must be denied.
• The account used to generate reports must have restrictions on the hours when it is allowed to make a
connection.
• Deadlocks must be analyzed with the use of Deadlock Graphs.
• In the event of a SQL Server failure, the databases must remain available.
• Software licensing and database storage costs must be minimized.
• Development effort must be minimized.
• The Tempdb databases must be monitored for insufficient free space.
• Failed authentication requests must be logged.
• Every time a new row is added to the ProductTypes table in the Products database, a user defined
function that validates the row must be called before the row is added to the table.
• When SPUpdateSalesInfo queries data in the OrderTotals table the first time, the same rows must be
returned along with any newly added rows when SPUpdateSalesInfo queries data in the OrderTotals table
the second time.

You need to configure a synchronization solution to copy data from the Current_Inventory database the
DesABCopAppDB database.
What should you configure?
A. Transactional Replication.
B. Database Mirroring.
C. Snapshot Replication.
D. Incremental Backups
Answer: A

231 / 383
The safer , easier way to help you pass any IT exams. 

222.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
The sales and marketing departments contain a total of 60 users. Each user uses a custom application
that stores data in a SQL Server database.
Each user has a separate database.
A server named ABC-SQL1 hosts the 60 databases.
You need to configure a backup solution for all the databases.
The solution must ensure that any new databases configured on ABC-SQL1 are automatically added to
the backup schedule. The backup schedule consists of a full backup every night, a differential backup
every hour and a transaction log backup every 15 minutes.
How should you configure the backup solution?
A. You should configure SQL Server Agent jobs.
B. You should configure Change Data Capture.
C. You should configure Policy-Based Management.
D. You should configure a Maintenance Plan.
Answer: D

223.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
You are configuring a highly-available database solution using an AlwaysOn availability group on two
servers running SQL Server 2012.
The two servers are in separate datacenters.
The two datacenters are connected by a fast WAN link with a network latency of less than 10ms.
Which of the following failover types should you configure for the availability group?
A. You should configure the asynchronous manual failover failover type.
B. You should configure the synchronous manual failover failover type.
C. You should configure the synchronous automatic failover failover type.
D. You should configure the Asynchronous automatic failover failover type.
Answer: C

224.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
You are configuring a highly-available database solution using an AlwaysOn availability group on two
servers running SQL Server 2012. The two servers are in separate datacenters.
The two datacenters are connected by a WAN link with a network latency of more than 200ms.
Which of the following failover types should you configure for the availability group?
A. You should configure the asynchronous manual failover failover type.
B. You should configure the synchronous manual failover failover type.
C. You should configure the synchronous automatic failover failover type.
D. You should configure the Asynchronous automatic failover failover type.
Answer: A

225.You work as a Database Administrator (DBA) for a company named ABC.com.

232 / 383
The safer , easier way to help you pass any IT exams. 

The company uses a Microsoft SQL Server 2012 infrastructure.


You have a database named CorpDB.
A full backup of CorpDB is taken every week.
A differential backup of CorpDB is taken every night at midnight.
A transaction log backup of CorpDB is taken at 8am, 12pm, 4pm and 8pm.
You plan to deploy some changes to CorpDB at after the 4pm log backup completes.
You need to ensure that you can undo the changes quickly if the deployment fails.
During the deployment of the changes, no other changes must be made by users to the database. You
need a backup and recovery strategy for deploying the changes.
Which two of the following actions would meet the backup and recovery requirements whilst ensuring the
regular backup schedule is not disrupted? (Choose two.)
A. Take a full backup of the database before deploying the changes.
B. Take a copy-only backup of the database before deploying the changes.
C. Take a snapshot of the database before deploying the changes.
D. Restore the database from the backup.
E. Restore the snapshot to another server and recover the required objects from the snapshot.
F. Revert the database to the snapshot.
Answer: C,F

226.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
You have a database named CorpDB. CorpDB contains 2TB of data.
You plan to import a large amount of data into tables in CorpDB.
You want to minimize the size of the transaction log while the data is imported.
What should you do?
A. You should configure the recovery model of the database to Full.
B. You should configure the recovery model of the database to Bulk-Logged.
C. You should start a new transaction log file.
D. You should configure a new filegroup for the existing log file.
Answer: B

227.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
You have a database named CorpDB. CorpDB contains a table named SalesInfo.
You discover that some table has been deleted from the SalesInfo table.
You are unable to find out who deleted the information.
You need to implement a solution to monitor the deletion of any further information from the SalesInfo
table. You want to minimize the development effort required for the solution.
What should you configure?
A. You should configure table permissions.
B. You should configure a user role.
C. You should configure change data capture.
D. You should configure a trigger.
Answer: C

233 / 383
The safer , easier way to help you pass any IT exams. 

228.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
You have a database named CorpDB.
You plan to create a stored procedure to access data in CorpDB.
You need to ensure that the stored procedure supports dirty reads.
What should you do?
A. You should configure the stored procedure to use the READ UNCOMMITTED isolation level.
B. You should configure the stored procedure to use the READ COMMITTED isolation level.
C. You should configure the stored procedure to use the READ SERIALIZABLE isolation level.
D. You should configure the stored procedure to use the REPEATABLE READ isolation level.
E. You should configure the stored procedure to use the SNAPSHOT isolation level.
Answer: A

229.You work as a Developer at ABC.com.


All databases are hosted on Windows Server 2012 servers running SQL Server 2012.
The company has a database named Products.
Tables in the Products database contain data including part numbers, product name, color, type and size.
Users in the Marketing department have created brochures for each product.
The brochures have been created in the XML Paper Specification (XPS) format.
You have been asked to add a table to the Products database to store the product brochures.
The brochures need to be stored in a folder structure.
Company users will also need to access the brochures from Windows applications using UNC paths.
How can you meet these requirements?
A. By implementing the XMLNAMESPACES feature.
B. By implementing the FILEGROUP feature.
C. By implementing the FILETABLE feature.
D. By implementing the FILESTREAM feature.
Answer: C

230.You work as a Developer at ABC.com.


All databases are hosted on Windows Server 2012 servers running SQL Server 2012.
You are developing a custom CRM application named CorpCRM.
The application will store usernames and passwords in a SQL Server 2012 database named
CorpCRMDB1.
You need to ensure the usernames and passwords are secure.
Which of the following would be most suitable password storage solution?
A. One-way encryption
B. Reversible encryption
C. Encrypting File System (EFS)
D. Secure Sockets Layer (SSL)
Answer: A

231.You need to ensure that a stored procedure fails if an INSERT statement within the stored procedure

234 / 383
The safer , easier way to help you pass any IT exams. 

fails.
What action should you take?
A. THROW 51000, 'Abort!'
B. SET XACT_ABORT OFF
C. SET XACT_ABORT ON
D. TRY....CATCH
Answer: C

232.You need to grant access to an OLTP database regardless of the user operating the application.
Which strategy should you use?
A. Application role
B. Database user
C. Server login
D. Server role
Answer: A

233.You use a contained database named ContosoDb within a domain. You need to create a user who
can log on to the ContosoDb database.
You also need to ensure that you can port the database to different database servers within the domain
without additional user account configurations.
Which type of user should you create?
A. User mapped to a certificate
B. SQL user without login
C. Domain user
D. SQL user with login
Answer: C

234.You create a stored procedure that retrieves all of the rows from a table named Table1.
You need to recommend a solution to ensure that all of the statements in the stored procedure can be
executed if another transaction is modifying rows in Table1 simultaneously.
What should you recommend?
A. Snapshot isolation
B. A database snapshot
C. Filegroups
D. Indexes
Answer: A
Explanation:
Once snapshot isolation is enabled, updated row versions for each transaction are maintained in tempdb.
A unique transaction sequence number identifies each transaction, and these unique numbers are
recorded for each row version.
The transaction works with the most recent row versions having a sequence number before the sequence
number of the transaction.
Newer row versions created after the transaction has begun are ignored by the transaction.

235 / 383
The safer , easier way to help you pass any IT exams. 

235.You have a SQL Server instance on a server named Server1.


You need to recommend a solution to perform the following tasks every week:
• Rebuild the indexes by using a new fill factor.
• Run a custom T-SQL command.
• Back up the databases.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. A trigger
B. An alert
C. A maintenance plan
D. Windows PowerShell
E. A system policy
Answer: C
Explanation:
Maintenance plans create a workflow of the tasks required to make sure that your database is optimized,
regularly backed up, and free of inconsistencies.

236.You create an availability group that has replicas named HA/Server01 and HA/Server02. Currently,
HA/Server01 is the primary replica.
You have multiple queries that read data and produce reports from the database.
You need to offload the reporting workload to the secondary replica when HA/Server01 is the primary
replica.
What should you do?
A. Set the Availability Mode property of HA/Server02 to Asynchronous commit.
B. Set the Readable Secondary property of HA/Server02 to Read-intent only.
C. Set the Connections in Primary Role property of HA/Server01 to Allow read/write connections.
D. Set the Availability Mode property of HA/Server01 to Asynchronous commit.
Answer: B
Explanation:
References: https://msdn.microsoft.com/en-us/library/jj542414.aspx

237.You administer two Microsoft SQL Server 2012 servers.


Each server resides in a different, untrusted domain.
You plan to configure database mirroring.
You need to be able to create database mirroring endpoints on both servers.
What should you do?
A. Configure the SQL Server service account to use Network Service.
B. Use a server certificate.
C. Use a database certificate.
D. Configure the SQL Server service account to use Local System.
Answer: B

238.You administer a Microsoft SQL Server 2012 instance.


You need to configure a new database to support FILETABLES.

236 / 383
The safer , easier way to help you pass any IT exams. 

What should you do? Choose all that apply.


A. Disable FILESTREAM on the Database.
B. Enable FILESTREAM on the Server Instance.
C. Configure the Database for Partial Containment.
D. Create a non-empty FILESTREAM file group.
E. Enable Contained
Databases on the Server Instance.
F. Set the FILESTREAM directory name on the Database.
Answer: B,D,F
Explanation:
References: http://msdn.microsoft.com/en-us/library/gg509097.aspx

239.You work as a Database Administrator (DBA) at ABC.com.


All databases are hosted on Windows Server 2012 servers running SQL Server 2012.
The Sales department uses a database named SalesDB.
SalesDB contains a large table named Orders that lists every order ever received by the company. You
want to improve the performance of SalesDB.
You want to configure the database to provide the fastest possible access to the most recent orders.
Historical orders can be stored using a slower storage solution.
How can you achieve this goal?
A. By configuring database mirroring.
B. By configuring a failover cluster.
C. By partitioning the Orders table.
D. By partitioning a partitioned view of the Orders table.
Answer: C

240.You work as a Database Administrator (DBA) at ABC.com.


You are in the process of deploying new servers running SQL Server 2012.
You need to deploy a SQL Server 2012 server to host databases used to host databases used by
Research and Development department.
The databases used by the Research and Development department will store sensitive data.
A company security policy states that if Research and Development department database files are moved
to another server, the files must be encrypted.
Which of the following solutions would meet the encryption requirement?
A. Encrypting File System (EFS).
B. Transparent Data Encryption (TDE).
C. Windows Bitlocker Drive Encryption.
D. Secure Sockets Layer (SSL)
Answer: B

241.You work as a Database Administrator (DBA) for a company named ABC.com.


The company has a Windows Azure subscription.
The company uses a cloud based SQL Server environment hosted on SQL Azure.
Developers in your company are creating an ecommerce website.

237 / 383
The safer , easier way to help you pass any IT exams. 

You are designing a database for the website.


The database will be hosted on SQL Azure.
The database will store and reuse web site login details and customer credit card numbers.
You need to ensure the username, passwords and credit card details are securely stored in the database.
Which of the following would be the most suitable secure storage solution?
A. Secure Sockets Layer (SSL)
B. IPSec
C. Data encryption
D. Transparent Data Encryption (TDE)
E. Encrypting File System (EFS)
Answer: C

242.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure.
A server named ABC-SQL1 hosts multiple databases that are accessed using OLTP (Online Transaction
Processing) applications.
You are concerned about the lack of redundancy provided by this single server solution.
You want to configure a solution that ensures high-availability for the databases while minimizing costs.
You need to ensure that the databases remain online in the event of a hardware failure of ABCSQL1.
You configure a second server named ABC-SQL2 and install SQL Server 2012.
Which of the following solutions would provide the high-availability and enable users to run reports on
both copies of the databases?
A. AlwaysOn availability groups
B. A failover cluster
C. Database mirroring
D. Transaction log shipping
Answer: A

243.You work as a Database Administrator (DBA) for a company named ABC.com.


The company uses a Microsoft SQL Server 2012 infrastructure. Computer users use custom applications
that store data in SQL Server databases hosted on a server named ABC-SQL1.
You discover that the Windows Application event log on ABC-SQL1 contains error events.
You need to configure a solution that will run an application whenever an event with a specific event ID
number is generated in the Windows Application event log.
What should you configure?
A. You should configure an alert and a job.
B. You should configure an alert and a maintenance plan.
C. You should configure a trigger and a maintenance plan.
D. You should configure a trigger and a job.
E. You should configure an alert and a trigger.
Answer: A

244.You need to move a database in between servers.


You need to guarantee database users will be able to login in the database with a minimum of

238 / 383
The safer , easier way to help you pass any IT exams. 

management effort.
A. Application role
B. Database user
C. Server login
D. Server role
Answer: B

245.You need to validate rows before they are added to a table every time a row is added using a
user-defined function.
What should you use? More than one answer may achieve the goal. Select the BEST answer.
A. DML Trigger
B. Default constraint
C. Foreign key
D. CHECK constraint
Answer: D

246.You have a SQL Server 2012 database named DB1.


You have a backup device named Device1.
You discover that the log file for the database is full.
You need to ensure that DB1 can complete transactions.
The solution must not affect the chain of log sequence numbers (LSNs).
Which code segment should you execute?
A. BACKUP LCG DB1 TO Device1 WITH COPY_ONLY
B. BACKUP LOG DB1 TO Device1
C. BACKUP LOG DB1 TO Device1 WITH NCRECCVERY
D. BACKUP LOG D31 TO Device1 WITH TRUNCATE ONLY
Answer: B
Explanation:
References:
http://msdn.microsoft.com/en-us/library/ms186865.aspx
http://msdn.microsoft.com/en-us/library/ms179478.aspx
http://msdn.microsoft.com/en-us/library/ms190925.aspx

247.You use SQL Azure to store data used by an e-commerce application.


You develop a stored procedure named sp1.
Sp1 is used to read and change the price of all the products sold on the e-commerce site.
You need to ensure that other transactions are blocked from updating product data while sp1 is executing.
Which transaction isolation level should you use in sp1?
A. read committed
B. repeatable read
C. snapshot
D. serializable
Answer: D

239 / 383
The safer , easier way to help you pass any IT exams. 

248.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?

240 / 383
The safer , easier way to help you pass any IT exams. 

A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Answer: D
Explanation:
Structure should be:

249.Your company has a SQL Azure subscription.


You implement a database named Database1. Database1 has two tables named Table1 and Table2.
You create a stored procedure named sp1. Sp1 reads data from Table1 and inserts data into Table2.
A user named User1 informs you that he is unable to run sp1.
You verify that User1 has the SELECT permission on Table1 and Table2.
You need to ensure that User1 can run sp1.
The solution must minimize the number of permissions assigned to User1.
What should you do?
A. Grant User1 the INSERT permission on Table2.
B. Add User1 to the db_datawriter role.
C. Change sp1 to run as the sa user.
D. Grant User1 the EXECUTE permission on sp1.
Answer: D
Explanation:
References: http://msdn.microsoft.com/en-us/library/ms191291.aspx

250.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?
A. Statistics
B. A dynamic management view
C. A trigger
D. User-defined views
Answer: B
Explanation:
Dynamic management views and functions return server state information that can be used to monitor the

241 / 383
The safer , easier way to help you pass any IT exams. 

health of a server instance, diagnose problems, and tune performance.


Transactions can be monitored.

251.Your network contains an Active Directory domain that has two groups named Group1 and Group2.
The domain contains two SQL Server instances named SQLDev and SQLProd. Each SQL Server
instance has access to various storage media.
The SQL Server instances have a database that contains a table named Table1. Table1 contains a
column named Column1.
The value for Column1 can be either Value1 or Value2.
You need to recommend a solution to ensure that users in Group1 can retrieve only rows from Column1
that contain the value of Value1.
What should you recommend?
A. A dynamic management view
B. Filegroups
C. Snapshot isolation
D. User-defined views
Answer: D
Explanation:
A view is a virtual table whose contents are defined by a query. Like a table, a view consists of a set of
named columns and rows of data.
Unless indexed, a view does not exist as a stored set of data values in a database.
The rows and columns of data come from tables referenced in the query defining the view and are
produced dynamically when the view is referenced. A view acts as a filter on the underlying tables
referenced in the view.

252.You are the new database administrator for a SQL Server 2014 instance.
You conduct an assessment on the instance and determine that the auto create statistics setting on the
database named DB1 has been turned off.
You see no evidence that any maintenance has been occurring. You want to set up monitoring to see if
query performance is being affected. You need to set up a monitoring process that will capture any cases
where statistics could have been useful if they existed.
What should you do?
A. Create a SQL Server Agent job to execute DBCC SHOWSTATISTICS on each of the primary key
columns in the database.
B. Use the missing_column_statistics extended event.
C. Query the sys.statistics system view to see all cases where the statistics were last needed.
D. Write a query using the sys.dm_db_missing_index_group_stats DMV Joining to sys.indexes, filtering
on is_hypothetical.
Answer: B
Explanation:
The Missing Column Statistics event class indicates that column statistics that could have been useful for
the optimizer are not available. By monitoring the Missing Column Statistics event class, you can
determine if there are statistics missing for a column used by a query.
This can cause the optimizer to choose a less efficient query plan than expected.

242 / 383
The safer , easier way to help you pass any IT exams. 

253.You have two databases named DB1 and DB2 that are located on the same server.
You plan to create a stored procedure named SProc1 in DB1. SProc1 will query a table named Table2 in
DB2. You need to recommend a solution to ensure that SProc1 can access Table2 without granting users
direct access to Table2.
What should you include in the recommendation? More than one answer choice may achieve the goal.
Select the BEST answer.
A. Contained databases
B. Application roles
C. Cross-database ownership chaining
D. Digital certificates
Answer: B
Explanation:
An application role is a database principal that enables an application to run with its own, userlike
permissions. You can use application roles to enable access to specific data to only those users who
connect through a particular application. Unlike database roles, application roles contain no members and
are inactive by default.

254.You have a server named Server1 that has 16 processors.


You plan to deploy multiple instances of SQL Server 2014 to Server1.
You need to recommend a method to allocate processors to each instance.
What should you include in the recommendation? More than one answer choice may achieve the goal.
Select the BEST answer.
A. Processor affinity
B. Windows System Resource Manager (WSRM)
C. Max Degree of Parallelism
D. Resource Governor
Answer: A
Explanation:
CPU affinity management through Windows System Resource Manager is not recommended for SQL
Server multi-instance management. Instead, use the processor affinity settings in SQL Server.

255.You have a query that is used by a reporting dashboard. Users report that the query sometimes takes
a long time to run. You need to recommend a solution to identify what is causing the issue.
What should you recommend? More than one answer choice may achieve the goal. Select the BEST
answer.
A. Set the blocked process threshold, and then run SQL Server Profiler.
B. Set the blocked process threshold, and then create an alert.
C. Enable trace flag 1204, and then create an alert.
D. Create a job that queries the sys.dm_os_waiting_tasks dynamic management view.
Answer: B
Explanation:
Step 1: Turn on the blocked process report. This will look for any blocking taking 20 seconds or longer.
- Make sure you don't have any pending changes

243 / 383
The safer , easier way to help you pass any IT exams. 

Step 2: Set up a trace to capture the blocked process report. Run it as a server side trace.

256.You are troubleshooting an application that runs a query.


The application frequently causes deadlocks. You need to identify the isolation level used by the query
when a deadlock occurs.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
A. Query the sys.dm_exec_requests dynamic management view.
B. Create a trace in SQL Server Profiler that contains the Deadlock graph event.
C. Query the sys.dm_exec_sessions dynamic management view.
D. Enable trace flag 1222, and then view the SQL Server error log.
Answer: C
Explanation:
- sys.dm_exec_sessions
Returns one row per authenticated session on SQL Server. sys.dm_exec_sessions is a serverscope view
that shows information about all active user connections and internal tasks.
Include the column:
transaction_isolation_level smallint
Transaction isolation level of the session.
0 = Unspecified
1 = ReadUncomitted
2 = ReadCommitted
3 = Repeatable
4 = Serializable
5 = Snapshot Is not nullable.

257.You administer a SQL Server 2014 instance.


Users report that the SQL Server has seemed slow today.
A large database was being restored for much of the day, which could be causing issues.
You want to write a query of the system views that will report the following:
Number of users that have a connection to the server
Whether a user's connection is active
Whether any connections are blocked
What queries are being executed
Whether the database restore is still executing and, if it is, what percentage of the restore is complete.

244 / 383
The safer , easier way to help you pass any IT exams. 

Which system objects should you use in your query to best achieve this task?
A. sys.dm_exec_requests, sys.dm_exec_sessions, sys.objects
B. sys.dm_exec_sessions, sys.dm_exec_query_stats, sys.dm_exec_query_text,sys.objects
C. sys.sysprocesses, sys.dm_exec_query_text, sys.objects
D. sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_exec_query_text
Answer: D
Explanation:
- sys.dm_exec_requests
Returns information about each request that is executing within SQL Server.
- sys.dm_exec_sessions
Returns one row per authenticated session on SQL Server. sys.dm_exec_sessions is a serverscope view
that shows information about all active user connections and internal tasks. This information includes
client version, client program name, client login time, login user, current session setting, and more.
- sys.dm_exec_query_text
Returns the text of the SQL batch that is identified by the specified sql_handle.

258.You have a database hosted on SQL Server 2012 R2.


The database contains 5 million rows.
You need to recommend a repeatable method to migrate the database to SQL Azure.
Which method should you recommend? More than one answer choice may achieve the goal. Select the
BEST answer.
A. Create a SQL Server Integration Services (SSIS) package, and then run the package.
B. Back up the database, and then restore the database.
C. Extract a data-tier application, and then import the application.
D. Generate scripts to create all of the all database objects and all of the data, and then execute the
scripts by using SQL Azure.
Answer: A
Explanation:
SQL Server Integration Services
Most flexibility
Data Transfer Efficiency:
Good
- SSIS can be used to perform a broad range of data migration tasks. SSIS provides support for complex
workflow and data transformation between the source and destination. It is a good choice to transfer of
data for databases that require many changes to work on Microsoft Azure SQL Database.
You can use SSIS data transfer packages with another mechanism for transferring the database schema,
such as a Data-tier Application package.

259.You have a server named Server1 that has 2 processors. You plan to deploy multiple instances of
SQL Server 2014 to Server1. Each instance will have multiple databases.
You need to recommend a method to allocate processor time to each database.
What should you include in the recommendation? More than one answer choice may achieve the goal.
Select the BEST answer.
A. Resource Governor

245 / 383
The safer , easier way to help you pass any IT exams. 

B. Max Degree of Parallelism


C. Windows System Resource Manager (WSRM)
D. Processor affinity
Answer: A
Explanation:
SQL Server Resource Governor is a feature than you can use to manage SQL Server workload and
system resource consumption. Resource Governor enables you to specify limits on the amount of CPU,
physical IO, and memory that incoming application requests can use.

260.You have a SQL Server 2014 environment That includes four servers.
The servers are configured as shown in the following table.

You plan to configure Policy-Based Management to enforce the following rules:


On Server1, enable SQL Server password policies and enable the default trace.
On Server3, ensure that the names of user-defined stored procedures begin with the prefix "usp_" and
ensure that all databases use a casesensitive collation.
You need to recommend which server you must configure as a Central Management Server.
Which server should you recommend? (Each correct answer presents a complete solution. Choose all
that apply.)
A. Server1
B. Server2
C. Server3
D. Seiver4
Answer: A,C
Explanation:
Need Standard or Enterprise edition of SQL Server.

261.You are the administrator for a SQL Server 2014 instance that stores the data for an online
transaction processing sales system.
The company takes full backups every week; differential backups on the days with no full backups; and
hourly transaction backups.
These backups are stored on a backup server in the company's data center. Every week, the company
places the full backup on a tape and sends it to a third-party backup storage system. The company is
worried that a disaster might occur that could destroy their computer center and cause them to lose
orders.
You need to determine the best method for providing the smallest amount of data loss and downtime

246 / 383
The safer , easier way to help you pass any IT exams. 

without leasing or purchasing additional physical locations.


What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
A. Set up SQL Server Always On with a SQL Azure database as a replica.
B. Set up SQL Server Always On by using a SQL Server on a Windows Azure Virtual Machine.
C. Put the differential backup on tape and send it to the third-party backup storage system.
D. Use the Microsoft SQL Server Backup to Microsoft Windows Azure Tool to direct all backups to a
different geographical location.
Answer: D
Explanation:
SQL Server 2012 was the first version to provide the ability to back up databases to the Cloud, and SQL
Server 2014 improves on the process.
Microsoft SQL Server Backup to Windows Azure Tool enables backup to Windows Azure Blob Storage
and encrypts and compresses SQL Server backups stored locally or in the cloud.

262.DRAG DROP
You need to recommend a backup process for data warehouse database. The solution must meet the
following requirements:
Ensure that if a hardware failure occurs, you can bring the database online without losing more than 24
hours of transactions.
Minimize the amount of administrative effort required to restore any lost data.
Minimize the space used by transaction logs.
What should you include in the recommendation? To answer, move the appropriate actions from the list of
actions to the answer area and arrange them in the correct order.

Answer:

247 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Note:
- Simple recovery model No log backups.
- Full recovery model Requires log backups

263.HOTSPOT
You use SQL Server 2014. You create a table within a database by using the following DDL:

The following table illustrates a representative sample of data:

248 / 383
The safer , easier way to help you pass any IT exams. 

The system is expected to handle 50 million orders a month over the next five years.
You have been instructed by your Team Lead to follow best practices for storage and performance in the
utilization of SPARSE columns.
Which columns should you designate as SPARSE? To answer, mark each column as SPARSE or NOT
SPARSE in the answer area.

Answer:

Explanation:
Sparse columns are ordinary columns that have an optimized storage for null values. Sparse columns
reduce the space requirements for null values at the cost of more overhead to retrieve nonnull values.
Consider using sparse columns when the space saved is at least 20 percent to 40 percent.

249 / 383
The safer , easier way to help you pass any IT exams. 

264.DRAG DROP
You use SQL Server 2014.
You need to create a single object that inserts a provided value into Table1, and then returns a count of
the records in Table1.
Develop the solution by selecting and arranging the required code blocks in the correct order. You may
not need all of the code blocks.

Answer:

250 / 383
The safer , easier way to help you pass any IT exams. 

265.DRAG DROP
You plan to install two SQL Server 2014 environments named Environment1 and Environment2. Your
company identifies the following availability requirements for each environment:
Environment1 must have mirroring with automatic failover implemented.
Environment2 must have Always On with automatic failover implemented.
You need to identify the minimum number of SQL Server 2014 servers that must be deployed to each
environment to ensure that all data remains available if a physical server fails.
How many servers should you identify? To answer, drag the appropriate number to the correct
environment in the answer area.

251 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

266.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are the database administrator for a company that hosts Microsoft SQL Server. You manage both
on-premises and Microsoft Azure SQL Database environments. A service account has the required
permissions to backup all databases.
You have a user database named HRDB that contains sensitive human resources data. The HRDB
backup files must be encrypted.
You need to grant the service account that backs up the HRDB database the permission necessary to
access the encryption key. Your solution must use the principle of least privilege.
Which permission should you grant?
A. DDLAdmin
B. db_datawriter
C. dbcreator
D. dbo
E. View Database State
F. View ServerState
G. View Definition
H. sysadmin
Answer: G
Explanation:
The user account performing the restore must have VIEW DEFINITION permissions on the certificate or
key.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-encryption

267.DRAG DROP
You plan to install two SQL Server 2012 environments named Environment1 and Environment2. Your
company identifies the following availability requirements for each environment:
Environment1 must have mirroring with manual failover implemented.

252 / 383
The safer , easier way to help you pass any IT exams. 

Environment2 must have AlwaysOn with automatic failover implemented.


You need to identify the minimum number of SQL Server 2012 servers that must be deployed to each
environment to ensure that all data remains available if a physical server fails.
How many servers should you identify? To answer, drag the appropriate number to the correct
environment in the answer area

Answer:

Explanation:
References:
http://msdn.microsoft.com/en-us/library/ms189852.aspx
http://msdn.microsoft.com/en-us/library/hh510230.aspx

268.DRAG DROP
Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that

253 / 383
The safer , easier way to help you pass any IT exams. 

the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

254 / 383
The safer , easier way to help you pass any IT exams. 

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memory optimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such as name, description, and price from the Product table. When customers place orders,
stored procedures called by the website update product quantity on-hand values. This means the product
table is constantly updated at random times.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.

255 / 383
The safer , easier way to help you pass any IT exams. 

Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


• Revoked all existing read and write access to the database, leaving the schema ownership in place.
• Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
• SQL Server 2014 has been configured on the satellite server and is ready for use.
• On each database server, the fast storage has been assigned to drive letter F:, and the slow storage
has been assigned to drive letter D:.

You need to distribute functionality across the three servers.


Which function should you assign to each server? To answer, drag the appropriate functions to the correct
servers. Each function 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.

256 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

269.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and

257 / 383
The safer , easier way to help you pass any IT exams. 

the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

258 / 383
The safer , easier way to help you pass any IT exams. 

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also

259 / 383
The safer , easier way to help you pass any IT exams. 

should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

260 / 383
The safer , easier way to help you pass any IT exams. 

You are designing your maintenance plan.


Which command should you use only during the monthly maintenance window?
A. DBCC INDEXDEFRAG (ProdDB, SalesOrderDetail, SODIndex)
B. ALTER INDEX SODIndex ON SalesOrderDetail REORGANIZE
C. ALTER INDEX SODIndex ON SalesOrderDetail REBUILD
D. ALTER INDEX SODIndex ON SalesOrderDetail REBUILD WITH (ONLINE * ON)
Answer: D
Explanation:
- Scenario: Database Issues The current database does not perform well. Additionally, a recent disk
problem caused the system to go down, resulting in lost sales revenue. In reviewing the current system,
you found that there are no automated maintenance procedures. The database is severely fragmented,
and everyone has read and write access.
- After the degree of fragmentation is known, use the following table to determine the best method to
correct the fragmentation.

270.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

261 / 383
The safer , easier way to help you pass any IT exams. 

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

262 / 383
The safer , easier way to help you pass any IT exams. 

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the

263 / 383
The safer , easier way to help you pass any IT exams. 

SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to write code that will allow the sales force to retrieve data for their reports with the least amount
of effort.
Which code should you use?

264 / 383
The safer , easier way to help you pass any IT exams. 

A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation:
- Scenario:
- During your investigation, you discover that the sales force reports are causing significant contention.

265 / 383
The safer , easier way to help you pass any IT exams. 

- Sales force data access Sales people at both the headquarters office and the satellite office must
generate reports that read from the Product and SalesOrderDetail tables. No updates or inserts are ever
made by sales people. These reports are run at random times and there can be no reporting downtime to
refresh the data set except during the monthly maintenance window. The reports that run from the satellite
office are process intensive queries with large data sets. Regardless of which office runs a sales force
report, the SalesOrderDetail table should only return valid, committed order data; any orders not yet
committed should be ignored.

271.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

266 / 383
The safer , easier way to help you pass any IT exams. 

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no

267 / 383
The safer , easier way to help you pass any IT exams. 

automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

268 / 383
The safer , easier way to help you pass any IT exams. 

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to configure security on the Product table for customer support representatives.
Which two actions should you perform? Each correct answer presents part of the solution. (Choose two.)
A. Create a view called CustProduct that includes columns ProductID. ProductName, Product Description,
QuantityOnHand, ProductPrice, ProductCost, and ProductSupplierID.
B. GRANT ALL on CustProduct TO OurDomain\CustomerSupport
C. Create a user-defined data type called CustProduct that includes columns ProductID, ProductName,
Product Description, and ProductPrice.
D. Create a view called CustProduct that includes columns ProductID, ProductName, Product Description,
QuantityOnHand, and ProductPrice.
E. GRANT SELECT on CustProduct TO OurDomain\CustomerSupport.
F. GRANT SELECT on CustProduct TO public.
Answer: A,E
Explanation:
Give access to CustomerSupport through a view. The view must include all these columns (refer to
scenario). GRANT Object Permissions (Transact-SQL)

272.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The

269 / 383
The safer , easier way to help you pass any IT exams. 

current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

270 / 383
The safer , easier way to help you pass any IT exams. 

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.

271 / 383
The safer , easier way to help you pass any IT exams. 

Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to implement a backup strategy to support the requirements.


Which two actions should you perform? Each correct answer presents part of the solution. (Choose two.)
A. Create a credential called MyCredential on SQL Server by using a Windows domain account and
password.
B. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO DISK...
C. Create a share on your Windows Azure site by using your Windows Azure storage account information,
and grant permission to the SQL Server service login.
D. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO URL ... WTTH
CREDENTIAL=N'MyCredential'
E. Create a share on the hot standby site and grant permission to the SQL Server service login.

272 / 383
The safer , easier way to help you pass any IT exams. 

F. Create a credential called MyCredential on SQL Server, using MyStorageAccount for the storage
account name and StorageAccountKey for the access key.
G. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO SHARE ... WITH
CREDENTIAL=N' MyCredential'
Answer: C,D
Explanation:
- Scenario: The current nightly backups have been failing due to insufficient space on the available drives
and manual drive cleanup often needing to happen to get past the errors. Additional space will not be
made available for backups on the HQ or satellite servers.
- Need to store files in the cloud.
- Manage your backups to Windows Azure: Using the same methods used to backup to DISK and TAPE,
you can now back up to Windows Azure storage by Specifying URL as the backup destination.
You can use this feature to manually backup or configure your own backup strategy like you would for a
local storage or other off-site options.
This feature is also referred to as SQL Server Backup to URL. SQL Server Managed Backup to Windows
Azure

273.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

273 / 383
The safer , easier way to help you pass any IT exams. 

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

274 / 383
The safer , easier way to help you pass any IT exams. 

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

275 / 383
The safer , easier way to help you pass any IT exams. 

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to implement changes to the system to reduce contention and improve performance of the
SalesOrderDetail table.
Which three actions should you perform? Each correct answer presents part of the solution. (Choose
three.)
A. Use (SNAPSHOT] hints in the report queries
B. ALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT ON
C. ALTER DATABASE [ProdDB] SET READ_COMMITTED_SNAPSHOT OFF
D. SET TRANSACTION ISOLATION LEVEL SNAPSHOT
E. Use (TABLOCK) hints in the report queries
F. SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
G. ALTER DATABASE [ProdDB] SET ALLOW.SNAPSHOT ISOLATION ON H. Use (SNAPSHOT] hints in
the update statements
Answer: A,B,F
Explanation:
- Scenario: The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned
by the SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
- Regardless of which office runs a sales force report, the SalesOrderDetail table should only return valid,
committed order data; any orders not yet committed should be ignored.
- READ_COMMITTED_SNAPSHOT { ON | OFF } ON Enables Read-Committed Snapshot option at the
database level. When it is enabled, DML statements start generating row versions even when no
transaction uses Snapshot Isolation. Once this option is enabled, the transactions specifying the read
committed isolation level use row versioning instead of locking.

276 / 383
The safer , easier way to help you pass any IT exams. 

When a transaction runs at the read committed isolation level, all statements see a snapshot of data as it
exists at the start of the statement. OFF Turns off Read-Committed Snapshot option at the database level.
Transactions specifying the READ COMMITTED isolation level use locking. ALTER DATABASE SET
Options (Transact-SQL) SET Statements (Transact-SQL)

274.You manage database servers in a high security environment. Your company has the following
auditing requirements:
SQL Server auditing must be enabled on all server instances.
Auditing results must be logged in the Windows Security even log.
A routine review shows that a SQL Server is writing auditing entries to Windows Application event log. You
change the SQL Server audit target to Windows Security event long. SQL Server auditing stops working
on the server.
You need to ensure that the server meets the auditing requirements.
Which two actions should you perform? Each correct answer presents part of the solution.
A. Grant the manage auditing and security log permission to the SQL Server service account.
B. Grant the generate security audits permission on the SQL Server service account.
C. Update Windows security policy to audit object access.
D. Restart the SQL Server Agent service.
Answer: B,C
Explanation:
There are two key requirements for writing SQL Server server audits to the Windows Security log:
The audit object access setting must be configured to capture the events.
The account that the SQL Server service is running under must have the generate security audits
permission to write to the Windows Security log.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/write-sql-server-audit-events-t
o-the-security-log

275.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The

277 / 383
The safer , easier way to help you pass any IT exams. 

current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

278 / 383
The safer , easier way to help you pass any IT exams. 

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.

279 / 383
The safer , easier way to help you pass any IT exams. 

Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to change the ProdDB database.


Which two database options should you change to meet the requirements? Each correct answer presents
part of the solution. (Choose two.)
A. CONTAINS FILESTREAM
B. Change recovery model to FULL
C. CONTAINMENT = PARTIAL
D. Change recovery model to BULK_LOGGED
E. COLLATE IN.MEMORY
F. CONTAINS MEMORY OPTIMIZED DATA
Answer: E,F

280 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Scenario: To help with performance, the database needs to be modified so that it can support in-memory
data, specifically for the Product table, which the CIO has indicated should be a memory-optimized table.
Collations and Code Pages FileGroupDefinition.ContainsMemoryOptimizedData Property
(Microsoft.SqlServer. TransactSql.ScriptDom)

276.DRAG DROP
Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows

281 / 383
The safer , easier way to help you pass any IT exams. 

Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and

282 / 383
The safer , easier way to help you pass any IT exams. 

write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance

283 / 383
The safer , easier way to help you pass any IT exams. 

The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to create a job to automate some database maintenance tasks.


Which code fragment should you use in each location in the command to complete one of the commands
you will need to include in the job? To answer, drag the appropriate lines of code to the correct locations in
the command. Each line of code 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.

Answer:

284 / 383
The safer , easier way to help you pass any IT exams. 

277.DRAG DROP
Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration

285 / 383
The safer , easier way to help you pass any IT exams. 

Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

286 / 383
The safer , easier way to help you pass any IT exams. 

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the

287 / 383
The safer , easier way to help you pass any IT exams. 

SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to create the CustomerAccess table to support the reporting and performance requirements.
Develop the solution by selecting and arranging the required code blocks in the correct order. You may
not need all of the code blocks.

288 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

289 / 383
The safer , easier way to help you pass any IT exams. 

278.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters

290 / 383
The safer , easier way to help you pass any IT exams. 

office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

291 / 383
The safer , easier way to help you pass any IT exams. 

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access

292 / 383
The safer , easier way to help you pass any IT exams. 

Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

You need to recommend a solution to back up DB1.


What should you include in the recommendation?
A. Azure Table Storage

293 / 383
The safer , easier way to help you pass any IT exams. 

B. Azure Queue storage


C. Azure Blob storage
D. Azure Document DB
Answer: C
Explanation:
For SQL Server the Azure Blob Storage service offers a better alternative to the often used tape option to
archive backups. Tape storage might require physical transportation to an off-site facility and measures to
protect the media. Storing your backups in Azure Blob Storage provides an instant, highly available, and a
durable archiving option.
References:
https://azure.microsoft.com/en-us/documentation/articles/storage-use-storage-sql-server-backup/restore

279.Background
Corporate Information
Fabrikam, Inc. is a retailer that sells electronics products on the Internet. The company has a
headquarters site and one satellite sales office. You have been hired as the database administrator, and
the company wants you to change the architecture of the Fabrikam ecommerce site to optimize
performance and reduce downtime while keeping capital expenditures to a minimum. To help with the
solution, Fabrikam has decided to use cloud resources as well as on-premise servers.

Physical Locations
All of the corporate executives, product managers, and support staff are stationed at the headquarters
office. Half of the sales force works at this location. There is also a satellite sales office. The other half of
the sales force works at the satellite office in order to have sales people closer to clients in that area. Only
sales people work at the satellite location.

Problem Statement
To be successful, Fabrikam needs a website that is fast and has a high degree of system uptime. The
current system operates on a single server and the company is not happy with the single point of failure
this presents. The current nightly backups have been failing due to insufficient space on the available
drives and manual drive cleanup often needing to happen to get past the errors. Additional space will not
be made available for backups on the HQ or satellite servers. During your investigation, you discover that
the sales force reports are causing significant contention.

Configuration
Windows Logins
The network administrators have set up Windows groups to make it easier to manage security. Users may
belong to more than one group depending on their role.
The groups have been set up as shown in the following table:

294 / 383
The safer , easier way to help you pass any IT exams. 

Server Configuration The IT department has configured two physical servers with Microsoft Windows
Server 2012 R2 and SQL Server 2014 Enterprise Edition and one Windows Azure Server. There are two
tiers of storage available for use by database files only a fast tier and a slower tier. Currently the data and
log files are stored on the fast tier of storage only. If a possible use case exists, management would like to
utilize the slower tier storage for data files.
The servers are configured as shown in the following table:

Database
Currently all information is stored in a single database called ProdDB, created with the following script:

The Product table is in the Production schema owned by the ProductionStaff Windows group. It is the
main table in the system so access to information in the Product table should be as fast as possible.
The columns in the Product table are defined as shown in the following table:

The SalesOrderDetail table holds the details about each sale. It is in the Sales schema owned by the
SalesStaff Windows group. This table is constantly being updated, inserted into, and read.
The columns in the SalesOrderDetail table are defined as shown in the following table:

295 / 383
The safer , easier way to help you pass any IT exams. 

Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go
down, resulting in lost sales revenue. In reviewing the current system, you found that there are no
automated maintenance procedures. The database is severely fragmented, and everyone has read and
write access.

Requirements
Database
The database should be configured to maximize uptime and to ensure that very little data is lost in the
event of a server failure. To help with performance, the database needs to be modified so that it can
support in-memory data, specifically for the Product table, which the CIO has indicated should be a
memoryoptimized table. The auto-update statistics option is set off on this database. Only product
managers are allowed to add products or to make changes to the name, description, price, cost, and
supplier. The changes are made in an internal database and pushed to the Product table in ProdDB
during system maintenance time. Product managers and others working at the headquarters location also
should be able to generate reports that include supplier and cost information.

Customer data access


Customers access the company's website to order products, so they must be able to read product
information such asname, description, and price from the Product table. When customers place orders,
stored procedures calledby the website update product quantityon-hand values. This means the product
table is constantly updated at randomtimes.

Customer support data access


Customer support representatives need to be able to view and not update or change product information.
Management does not want the customer support representatives to be able to see the product cost or
any supplier information.

Sales force data access


Sales people at both the headquarters office and the satellite office must generate reports that read from
the Product and SalesOrderDetail tables. No updates or inserts are ever made by sales people. These
reports are run at random times and there can be no reporting downtime to refresh the data set except
during the monthly maintenance window. The reports that run from the satellite office are process
intensive queries with large data sets. Regardless of which office runs a sales force report, the
SalesOrderDetail table should only return valid, committed order data; any orders not yet committed
should be ignored.

296 / 383
The safer , easier way to help you pass any IT exams. 

Historical Data
The system should keep historical information about customers who access the site so that sales people
can see how frequently customers log in and how long they stay on the site.
The information should be stored in a table called Customer Access. Supporting this requirement should
have minimal impact on production website performance.

Backups
The recovery strategy for Fabrikam needs to include the ability to do point in time restores and minimize
the risk of data loss by performing transaction log backups every 15 minutes.

Database Maintenance
The company has defined a maintenance window every month when the server can be unavailable. Any
maintenance functions that require exclusive access should be accomplished during that window.

Project milestones completed


Revoked all existing read and write access to the database, leaving the schema ownership in place.
Configured an Azure storage container secured with the storage account name MyStorageAccount with
the primary access key StorageAccountKey on the cloud file server.
SQL Server 2014 has been configured on the satellite server and is ready for use.
On each database server, the fast storage has been assigned to drive letter F:, and the slow storage has
been assigned to drive letter D:.

What should you create in Azure to support the creation of the backups for DB1?
A. an Azure Content Delivery Network (CDN) endpoint
B. a Service Bus namespace
C. a storage account
D. a cloud service
Answer: C

280.Which feature should you enable and configure so session requests addressed to a specific instance
can be allocated to different processor resources based on session request properties?
A. Resource Governor
B. Windows System Resource Manager
C. Processor affinity
D. I/O affinity
Answer: C

281.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.

297 / 383
The safer , easier way to help you pass any IT exams. 

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.)

Answer:

Explanation:
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

282.You are using dynamic management views to monitor an SQL Server server named SQL1. A
database administrator named Dba1 must monitor the health of SQL1.
You need to ensure that Dba1 can access dynamic management views for SQL1.
The solution must use the principle of least privilege.
Which permissions should you assign to Dba1?
A. VIEW ANY DEFINITION
B. VIEW SERVER STATE
C. VIEW DEFINITION
D. CONTROL SERVER
Answer: B
Explanation:
To query a dynamic management view or function requires SELECT permission on object and VIEW
SERVER STATE or VIEW DATABASE STATE permission.
References: https://msdn.microsoft.com/en-us/library/ms188754.aspx

283.You have a customer who has several SQL Server 2012 database servers. You are designing a data
warehouse for the customer. The data warehouse will use columnstore indexes.
Data manipulation language (DML) statements
Nonclustered columnstore indexes
Clustered columnstore indexes - Partitioning
The customer identifies that the following must be supported for the column store indexes.

298 / 383
The safer , easier way to help you pass any IT exams. 

You need to identify which technology requires the customer to implement an SQL Server 2014 database.
What should you identify?
A. clustered columnstore indexes
B. nonclustered columnstore indexes
C. data manipulation language (DML) statements
D. partitioning
Answer: A
Explanation:
SQL Server 2014 has the features of SQL Server 2012 plus updateable clustered columnstore indexes.
This feature is required here as DML statements must be supported in the warehouse.
References: https://msdn.microsoft.com/en-us/library/gg492088(v=sql.120).aspx

284.DRAG DROP
You need to assign security to dev_role1.
How should you complete the code? To answer, drag the appropriate elements to the correct locations.
Each element 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.

Answer:

299 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Scenario: Application developers must be denied direct access to the database tables. Applications must
be denied direct access to the tables.

285.DRAG DROP
You have an SQL Server 2014 server. You plan to create four stored procedures that will use transactions.
The stored procedures will be configured as shown in the following table.

You need to recommend an isolation level for each stored procedure. The solution must support the
concurrency strategy of each stored procedure and must minimize locks.
What should you recommend? To answer, drag the appropriate isolation levels to the correct stored
procedures. Each isolation level 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.

Answer:

Explanation:
References: SET TRANSACTION ISOLATION LEVEL (Transact-SQL)

300 / 383
The safer , easier way to help you pass any IT exams. 

https://msdn.microsoft.com/en-us/library/ms173763.aspx

286.DRAG DROP
You have a database named DB1.
DB1 contains a table named Sales.SalesPerson that has an index named AK_SalesPerson_rowguid.
Queries that do not use the index take approximately 10 times longer to complete than queries that use
the index. You discover that AK_SalesPerson_rowguid has severe fragmentation. You need to
recommend a solution to defragment the index.
The solution must ensure that the index can be used by queries during the defragmentation.
What statement should you use? To answer, drag the appropriate elements to the correct locations. Each
element 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

Answer:

Explanation:
Rebuilding an index can be executed online or offline. Reorganizing an index is always executed online.
To achieve availability similar to the reorganize option, you should rebuild indexes online.
Use: ALTER INDEX REBUILD WITH (ONLINE = ON)
References: Reorganize and Rebuild Indexes https://msdn.microsoft.com/en-us/library/ms189858.aspx

301 / 383
The safer , easier way to help you pass any IT exams. 

287.DRAG DROP
You define a table by using the following statement.

The Teachers table contains one million records.


A sample record of the XML data output is as follows:

You plan to create queries against the table based on grade.


You need to recommend which indexes should be applied to the XML fields. The solution must meet the
following requirements:
Reduce the amount of time required to query the table based on grade.
Minimize the size of the index.
What should you recommend? To answer, drag the appropriate index types to the correct fields. Each
index type 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

Answer:

302 / 383
The safer , easier way to help you pass any IT exams. 

288.You are designing a Windows Azure SQL Database for an order fulfillment system.
You create a table named Sales.Orders with the following script.

Each order is tracked by using one of the following statuses:


• Fulfilled
• Shipped
• Ordered
• Received
You need to design the database to ensure that that you can retrieve the following information:
• The current status of an order
• The previous status of an order.
• The date when the status changed.
The solution must minimize storage.
More than one answer choice may achieve the goal. Select the BEST answer.
A. To the Sales.Orders table, add three columns named Status, PreviousStatus and ChangeDate. Update
rows as the order status changes.
B. Create a new table named Sales.OrderStatus that contains three columns named OrderID, StatusDate,
and Status. Insert new rows into the table as the order status changes.
C. Implement change data capture on the Sales.Orders table.
D. To the Sales.Orders table, add three columns named FulfilledDate, ShippedDate, and ReceivedDate.
Update the value of each column from null to the appropriate date as the order status changes.
Answer: B

289.You have an SQL Server 2014 server named SQL1. You are designing a performance monitoring
solution.
You need to monitor the following events on SQL1:
- A deadlock graph
- Missing column statistics
- CPU performance statistics
- A batch of completed Transact-SQL statements
Which two tools should you use? Each correct answer presents a complete solution.
A. dynamic management views
B. Database Engine Tuning Advisor
C. SQL Server Profiler
D. Activity Monitor
E. Data Profile Viewer
Answer: B,C
Explanation:
B: Database Engine Tuning Advisor examines how queries are processed in the databases you specify.

303 / 383
The safer , easier way to help you pass any IT exams. 

When you run a Profiler Trace and feed it to the Database Engine Tuning Advisor, it also looks for missing
column statistics, and it can automatically create them for you. C: Use SQL Server Profiler to identify the
cause of a deadlock. A deadlock occurs when there is a cyclic dependency between two or more threads,
or processes, for some set of resources within SQL Server. Using SQL Server Profiler, you can create a
trace that records, replays, and displays deadlock events for analysis.
References: https://msdn.microsoft.com/en-us/library/ms188246.aspx

290.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a data warehouse that stored sales data. One fact table has 100 million rows.
You must reduce storage needs for the data warehouse.
You need to implement a solution that uses column-based storage and provides real-time analytics for the
operational workload.
Solution: You remove all clustered indexes, sort the transactions in the table, and create a clustered index
on the table, so that the table is not a heap.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
Columnstore indexes are the standard for storing and querying large data warehousing fact tables. It uses
column-based data storage and query processing to achieve up to 10x query performance gains in your
data warehouse over traditional row-oriented storage, and up to 10x data compression over the
uncompressed data size.
In SQL Server, rowstore refers to table where the underlying data storage format is a heap, a clustered
index, or a memory-optimized table.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-overview

291.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a data warehouse that stored sales data. One fact table has 100 million rows.
You must reduce storage needs for the data warehouse.
You need to implement a solution that uses column-based storage and provides real-time analytics for the
operational workload.
Solution: You load the data in a heap table.
Does the solution meet the goal?
A. Yes

304 / 383
The safer , easier way to help you pass any IT exams. 

B. No
Answer: B
Explanation:
It is better to use a clustered index.
Columnstore indexes are the standard for storing and querying large data warehousing fact tables. It uses
column-based data storage and query processing to achieve up to 10x query performance gains in your
data warehouse over traditional row-oriented storage, and up to 10x data compression over the
uncompressed data size.
In SQL Server, rowstore refers to table where the underlying data storage format is a heap, a clustered
index, or a memory-optimized table.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-overview

292.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a data warehouse that stored sales data. One fact table has 100 million rows.
You must reduce storage needs for the data warehouse.
You need to implement a solution that uses column-based storage and provides real-time analytics for the
operational workload.
Solution: You generate a new certificate on new instance.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
Certificates are of no use in this scenario.

293.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You attempt to restore a database on a new SQL Server instance and receive the following error
message:
“Msg 33111, Level 16, State 3, Line 2
Cannot find server certificate with thumbprint ‘0x7315277C70764B1F252DC7A5101F6F66EFB1069D.”
You need to ensure that you can restore the database successfully.
Solution: You add the backup set password to the restore command.
Does this meet the goal?
A. Yes
B. No

305 / 383
The safer , easier way to help you pass any IT exams. 

Answer: B
Explanation:
The error is related to the certificate.
References:
https://dba.stackexchange.com/questions/3388/restore-encrypted-database-to-another-server?rq=1

294.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You attempt to restore a database on a new SQL Server instance and receive the following error
message:
“Msg 33111, Level 16, State 3, Line 2
Cannot find server certificate with thumbprint ‘0x7315277C70764B1F252DC7A5101F6F66EFB1069D.”
You need to ensure that you can restore the database successfully.
Solution: You restore the certificate on the new instance.
Does this meet the goal?
A. Yes
B. No
Answer: A
Explanation:
The error is related to the certificate.
References:
https://dba.stackexchange.com/questions/3388/restore-encrypted-database-to-another-server?rq=1

295.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes a table named Candidate.
You need to update the statistics for a column named Skills in the table and turn off automatic statistics
updates for the column.
Solution: You run the following query:

Does this meet the goal?


A. Yes
B. No
Answer: A

306 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
FULLSCAN: Compute statistics by scanning all rows in the table or indexed view. FULLSCAN and
SAMPLE 100 PERCENT have the same results.
References: https://technet.microsoft.com/en-us/library/ms187348(v=sql.110).aspx

296.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes a table named Candidate.
You need to update the statistics for a column named Skills in the table and turn off automatic statistics
updates for the column.
Solution: You run the following query:

Does this meet the goal?


A. Yes
B. No
Answer: A
Explanation:
The following example updates the Products statistics in the Product table, forces a full scan of all rows in
the Product table, and turns off automatic statistics for the Products statistics.
USE AdventureWorks2012;
GO
UPDATE STATISTICS Production.Product(Products)
WITH FULLSCAN, NORECOMPUTE;
Note: NORECOMPUTE
Disable the automatic statistics update option, AUTO_UPDATE_STATISTICS, for the specified statistics.
If this option is specified, the query optimizer completes this statistics update and disables future updates.
To re-enable the AUTO_UPDATE_STATISTICS option behavior, run UPDATE STATISTICS again without
the NORECOMPUTE option or run sp_autostats.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/update-statistics-transact-sql

297.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes a table named Candidate.
You need to update the statistics for a column named Skills in the table and turn off automatic statistics

307 / 383
The safer , easier way to help you pass any IT exams. 

updates for the column.


Solution: You run the following query:

Does this meet the goal?


A. Yes
B. No
Answer: B
Explanation:
RESAMPLE: Update each statistic using its most recent sample rate.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/update-statistics-transact-sql

298.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a server named Server1 that has Microsoft SQL Server installed.
Server1 has SQL Server Audit configured to send audit even records to a file.
You need to ensure that a database user named User1 can review the audit data.
Solution: You grant the VIEW SERVER STATE permission to User1.
Does this meet the goal?
A. Yes
B. No
Answer: A
Explanation:
Each feature and command for SQL Server Audit has individual permission requirements.
Unless otherwise specified, viewing catalog views requires a principal to have one of the following:
The VIEW SERVER STATE permission.
The VIEW AUDIT STATE permission (gives only the principal access to the sys.server_audits catalog
view).
Membership in the sysadmin fixed server role.
The CONTROL SERVER permission.
The ALTER ANY AUDIT permission.
A principal must have the VIEW SERVER STATE or ALTER ANY AUDIT permission to use the Dynamic
Management Views.
References: https://technet.microsoft.com/en-us/library/cc280665(v=sql.105).aspx

299.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.

308 / 383
The safer , easier way to help you pass any IT exams. 

After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a server named Server1 that has Microsoft SQL Server installed.
Server1 has SQL Server Adult configured to send audit even records to a file.
You need to ensure that a database user named User1 can review the audit data.
Solution: You assign the db_datareader role to User1.
Does this meet the goal?
A. Yes
B. No
Answer: B
Explanation:
Each feature and command for SQL Server Audit has individual permission requirements.
Unless otherwise specified, viewing catalog views requires a principal to have one of the following:
The VIEW SERVER STATE permission.
The VIEW AUDIT STATE permission (gives only the principal access to the sys.server_audits catalog
view).
Membership in the sysadmin fixed server role.
The CONTROL SERVER permission.
The ALTER ANY AUDIT permission.
A principal must have the VIEW SERVER STATE or ALTER ANY AUDIT permission to use the Dynamic
Management Views.
References: https://technet.microsoft.com/en-us/library/cc280665(v=sql.105).aspx

300.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a server named Server1 that has Microsoft SQL Server installed.
Server1 has SQL Server Adult configured to send audit even records to a file.
You need to ensure that a database user named User1 can review the audit data.
Solution: You grant the VIEW ANY DEFINITION permission to User1.
Does this meet the goal?
A. Yes
B. No
Answer: B
Explanation:
Each feature and command for SQL Server Audit has individual permission requirements.
Unless otherwise specified, viewing catalog views requires a principal to have one of the following:
The VIEW SERVER STATE permission.
The VIEW AUDIT STATE permission (gives only the principal access to the sys.server_audits catalog
view).
Membership in the sysadmin fixed server role.
The CONTROL SERVER permission.

309 / 383
The safer , easier way to help you pass any IT exams. 

The ALTER ANY AUDIT permission.


A principal must have the VIEW SERVER STATE or ALTER ANY AUDIT permission to use the Dynamic
Management Views.
References: https://technet.microsoft.com/en-us/library/cc280665(v=sql.105).aspx

301.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a Microsoft Azure SQL database that has Blob Auditing configured.
You need to review the audit logs.
Solution: You download the log files by using Microsoft Azure Storage Explorer, and then you open the
files by using Microsoft SQL Server Management Studio (SSMS).
Does this meet the goal?
A. Yes
B. No
Answer: A
Explanation:
There are several methods you can use to view blob auditing logs:
After downloading several files or a subfolder that contains log files, you can merge them locally by using
Merge Audit Files in SQL Server Management Studio.
Use the Azure portal.
Use the system function sys.fn_get_audit_file (T-SQL) to return the audit log data in tabular format.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auditing

302.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a Microsoft Azure SQL database that has Blob Auditing configured.
You need to review the audit logs.
Solution: From Microsoft SQL Server Management Studio, you connect to the database, and then you
execute the following statement.

Does this meet the goal?


A. Yes
B. No
Answer: B
Explanation:
The fn_get_audit_file, not dm_db_audit_file, the returns information from an audit file created by a server

310 / 383
The safer , easier way to help you pass any IT exams. 

audit in SQL Server.


This example reads from a file that is named
ShiraServer/MayaDB/SqlDbAuditing_Audit/2017-07-14/10_45_22_173_1.xel:
SELECT * FROM sys.fn_get_audit_file
('https://mystorage.blob.core.windows.net/sqldbauditlogs/ShiraServer/MayaDB/SqlDbAuditing_Audit/201
7-07-14/10_45_22_173_1.xel',default,default);
Note: Blob auditing logs are saved as a collection of blob files within a container named sqldbauditlogs.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-get-audit-file-transact-
sql

303.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a Microsoft Azure SQL database that has Blob Auditing configured.
You need to review the audit logs.
Solution: From Microsoft SQL Server Management Studio, you connect to the database, and then you
execute the following statement.

Does this meet the goal?


A. Yes
B. No
Answer: B
Explanation:
The fn_get_audit_file, not dm_db_audit_file, the returns information from an audit file created by a server
audit in SQL Server.
This example reads from a file that is named
ShiraServer/MayaDB/SqlDbAuditing_Audit/2017-07-14/10_45_22_173_1.xel:
SELECT * FROM sys.fn_get_audit_file
('https://mystorage.blob.core.windows.net/sqldbauditlogs/ShiraServer/MayaDB/SqlDbAuditing_Audit/201
7-07-14/10_45_22_173_1.xel',default,default);
Note: Blob auditing logs are saved as a collection of blob files within a container named sqldbauditlogs.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/sys-fn-get-audit-file-transact-
sql

304.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but

311 / 383
The safer , easier way to help you pass any IT exams. 

the text of the scenario is exactly the same in each question in this series.
You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales.
The following table shows the configuration of each database.

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id
• event type that identifies the error type
• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:

312 / 383
The safer , easier way to help you pass any IT exams. 

• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).
• Capture queries based on resource consumption.
• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in
SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
You need to monitor query statistics and execution plans for SalesDb2.
Which options should you set for the Query Store configuration? To answer, select the appropriate options
in the answer area.

Answer:

313 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Operation Mode: Read-Write
It is strongly recommended to activate size-based cleanup to makes sure that Query Store always runs in
read-write mode and collects the latest data.
Query Store Capture Mode: Auto
Auto – Infrequent queries and queries with insignificant compile and execution duration are ignored.
Thresholds for execution count, compile and runtime duration are internally determined.
Size Based Cleanup Mode: AUTO
It is strongly recommended to activate size-based cleanup to makes sure that Query Store always runs in
read-write mode and collects the latest data.
OFF – size based cleanup won’t be automatically activated.
AUTO - size based cleanup will be automatically activated when size on disk reaches 90% of
max_storage_size_mb. This is the default configuration value.
Size based cleanup removes the least expensive and oldest queries first. It stops at approximately 80% of
max_storage_size_mb.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-database-query-stor
e-options-transact-sql
https://docs.microsoft.com/en-us/sql/relational-databases/performance/best-practice-with-the-query-store
#set-the-optimal-query-capture-mode

305.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.

314 / 383
The safer , easier way to help you pass any IT exams. 

You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales. The following table shows the
configuration of each database.

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id
• event type that identifies the error type
• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:
• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).

315 / 383
The safer , easier way to help you pass any IT exams. 

• Capture queries based on resource consumption.


• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in
SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
Users reports that they encounter the following error when they query SalesDb1: “SQL Server detected a
logical consistency-based I/O error: incorrect checksum (expected: 0x5d672d9b; actual: 0xdd672d98). It
occurred during a read of page (1.232) in database ID 12 at offset 0x000000001d0000 in file F:\
Databases\MSSQLServer
Databases\MSSQL13.MSSQL2016\MSSQL\DATA\SalesDb1.mdt.”
You must restore the impacted page from SalesDb1Full_1.bak. A single backup set named
SalesDb1Log.bak was created since the latest full backup operation.
You need to restore the impacted page.
Which four Transact-SQL segments should you use to develop the solution? To answer, move the
appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and
arrange them in the correct order.

Answer:

316 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1:
Restore page
Start a page restore with a full database, file, or filegroup backup that contains the page. In the RESTORE
DATABASE statement, use the PAGE clause to list the page IDs of all of the pages to be restored.
Step 2:
Restore log file with norecovery. Use the first file (FILE = 1).
Step 3:
Backup the tail-end of the log.
Create a new log backup of the database that includes the final LSN of the restored pages, that is, the
point at which the last restored page is taken offline.
Step 4:
Restore database with recovery. Use second file (FILE = 2).
Restore the new log backup. After this new log backup is applied, the page restore is completed and the
pages are now usable.
Example:
The following example restores four damaged pages of file B with NORECOVERY. Next, two log backups
are applied with NORECOVERY, followed with the tail-log backup, which is restored with RECOVERY.
This example performs an online restore. In the example, the file ID of file B is 1, and the page IDs of the
damaged pages are 57, 202, 916, and 1016.
RESTORE DATABASE <database> PAGE='1:57, 1:202, 1:916, 1:1016'
FROM <file_backup_of_file_B>

317 / 383
The safer , easier way to help you pass any IT exams. 

WITH NORECOVERY;
RESTORE LOG <database> FROM <log_backup>
WITH NORECOVERY;
RESTORE LOG <database> FROM <log_backup>
WITH NORECOVERY;
BACKUP LOG <database> TO <new_log_backup>;
RESTORE LOG <database> FROM <new_log_backup> WITH RECOVERY;
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-pages-sql-server

306.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales. The following table shows the
configuration of each database.

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

318 / 383
The safer , easier way to help you pass any IT exams. 

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id
• event type that identifies the error type
• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:
• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).
• Capture queries based on resource consumption.
• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in
SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
Both SalesDb1 and SalesDb2 experience blocking and deadlock issues. You create an Extended Events
session to monitor the databases. (Click the Exhibit button.)
You need to create and configure the Extended Events session.
Use the drop-down menus to select the answer choice that completes each statement based on the
information presented in the graphic.

319 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Lock escalation is the process of converting many fine-grain locks into fewer coarse-grain locks, reducing
system overhead while increasing the probability of concurrency contention.
References:
https://technet.microsoft.com/en-us/library/ms184286(v=sql.105).aspx
https://blobeater.blog/2017/02/06/using-extended-events-in-azure/

307.DRAG DROP
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales.
The following table shows the configuration of each database.

320 / 383
The safer , easier way to help you pass any IT exams. 

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id
• event type that identifies the error type
• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:
• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).
• Capture queries based on resource consumption.
• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in

321 / 383
The safer , easier way to help you pass any IT exams. 

SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
You need to write the query the maintenance plan will use to update the statistics.
Which four Transact-SQL segments should you use to develop the solution? To answer, move the
appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and
arrange them in the correct order.

322 / 383
The safer , easier way to help you pass any IT exams. 

323 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

324 / 383
The safer , easier way to help you pass any IT exams. 

325 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1: Use SalesDB2…
We specify the specific database SalesDB2, not the master.
Step 2:
Step 3:
From scenario: The plan should only update statistics that were automatically created and have not been
updated for 30 days.
Step 4:
Declare the curser using WITH FULLSCAN.
References:
https://solutioncenter.apexsql.com/how-to-automate-and-schedule-sql-server-index-defragmentation/

308.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales.
The following table shows the configuration of each database.

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

326 / 383
The safer , easier way to help you pass any IT exams. 

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id
• event type that identifies the error type
• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:
• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).
• Capture queries based on resource consumption.
• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in
SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
You need to view the information about the corrupted pages on SalesDb3.
How should you complete the Transact-SQL statement? Select two.
A. SELECT * FROM msdb.. corrupted_pages
B. SELECT * FROM msdb..suspect_pages
C. SELECT * FROM system..corrupted_pages
D. SELECT * FROM system..suspect_pages
E. WHERE event_type = 1
F. WHERE event_type = 2
G. WHERE event_type = 3
Answer: B,F
Explanation:
suspect_pages contains one row per page that failed with a minor 823 error or an 824 error. Pages are
listed in this table because they are suspected of being bad, but they might actually be fine. When a
suspect page is repaired, its status is updated in the event_type column.
The suspect_pages table resides in the msdb database.
SalesDb3 has pages with checksum errors. Checksum errors have the event_type value 2.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/manage-the-suspect-pages-tab

327 / 383
The safer , easier way to help you pass any IT exams. 

le-sql-server

309.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
You maintain a Microsoft SQL Server instance that contains the following databases SalesDb1, SalesDb2,
and SalesDb3. Each database has tabled named Products and Sales.
The following table shows the configuration of each database.

The backup strategies for each database are described in the following table.

Each full or differential backup operation writes into a new file and uses a different sequence number. You
observe the following database corruption issues.

SalesDb3 reports a number of database corruption issues related to error 823 and 824 when reading data
pages.
You must display the following information about the corrupted pages:
• database name
• impacted file id
• impacted file physical name
• impacted page id

328 / 383
The safer , easier way to help you pass any IT exams. 

• event type that identifies the error type


• error count
Users report performance issues when they run queries against SalesDb2. You plan to monitor query
statistics and execution plans for SalesDb2 by using Query Store.
The monitoring strategy must meet the following requirements:
• Perform automatic data cleanup when query store disk usage reaches 500 megabyte (MB).
• Capture queries based on resource consumption.
• Use a stale query threshold value of 60 days.
The query optimizer generates suboptimal execution plans for a number of queries on the Sales table in
SalesDb2. You will create a maintenance plan that updates statistics for the table. The plan should only
update statistics that were automatically created and have not been updated for 30 days. The update
should be based on all data in the table.
You need to recover SalesDb2 and SalesDb3 while minimizing the data loss.
In the table below, identify the recovery strategy you should use for each database.
NOTE: Make only one selection in each column. Each correct selection is worth one point.

Answer:

329 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
SalesDB2:
Row data are torn (error 824)
How to Fix Torn Pages
Run DBCC checkdb see for inconsistencies
Check your error logs first and then restore your last backups and transaction logs.
All backups are lost.
SalesDB3:
Checksum issues for data pages.
FEPAIR_REBUILD
Performs repairs that have no possibility of data loss. This can include quick repairs, such as repairing
missing rows in non-clustered indexes, and more time-consuming repairs, such as rebuilding an index.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/manage-the-suspect-pages-tab
le-sql-server

310.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has offices in Vancouver, Tokyo, and Paris. The company uses Microsoft SQL Server 2016
Standard edition. You must design a reporting solution that uses data from a point of sale (POS)
application’s transactional database.
After data is entered into the POS system, users must be able to run reports within 24 hours. Latency
must be minimized.
You need to implemented a solution that minimizes licensing costs.
What should you implement?
A. a Microsoft Azure Stretch Database
B. log shipping
C. an Always On Availability Group with all replicas in synchronous-commit mode
D. a file share witness
E. a Microsoft SQL Server failover cluster instance (FCI)
F. a Windows cluster with a shared-nothing architecture
G. an Always On Availability Group with secondary replicas in asynchronous-commit mode
Answer: A
Explanation:
Stretch Database targets transactional databases with large amounts of cold data, typically stored in a
small number of tables. These tables may contain more than a billion rows.
Stretch Database provides the following benefits:
Provides cost-effective availability for cold data
Doesn’t require changes to queries or applications
Streamlines on-premises data maintenance
Keeps your data secure even during migration
References: https://docs.microsoft.com/en-us/sql/sql-server/stretch-database/stretch-database

330 / 383
The safer , easier way to help you pass any IT exams. 

311.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You need to deploy a new Microsoft SQL Server environment that meets the following requirements:
The SQL Server instance must be highly available.
There must be minimal downtime incurred during hardware failure or operating system maintenance.
All instance-level security settings and SQL Server Agent jobs must be available without additional
synchronization tasks.
What should you implement?
A. a Microsoft Azure Stretch Database
B. log shipping
C. an Always On Availability Group with all replicas in synchronous-commit mode
D. a file share witness
E. a Microsoft SQL Server failover cluster instance (FCI)
F. a Windows cluster with a shared-nothing architecture
G. an Always On Availability Group with secondary replicas in asynchronous-commit mode
Answer: E
Explanation:
As part of the SQL Server Always On offering, Always On Failover Cluster Instances leverages Windows
Server Failover Clustering (WSFC) functionality to provide local high availability through redundancy at
the server-instance level—a failover cluster instance (FCI). An FCI is a single instance of SQL Server that
is installed across Windows Server Failover Clustering (WSFC) nodes and, possibly, across multiple
subnets.
When there is hardware or software failure of a server, the applications or clients connecting to the server
will experience downtime. When a SQL Server instance is configured to be an FCI (instead of a
standalone instance), the high availability of that SQL Server instance is protected by the presence of
redundant nodes in the FCI.
References:
https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/always-on-failover-cluster-insta
nces-sql-server

312.HOTSPOT
You have a Microsoft SQL Server instance that hosts a database named DB1 that contains 800 gigabyte
(GB) of data. The database is used 24 hours each day. You implement indexes and set the value of the
Auto Update Statistics option set to True.
Users report that queries take a long time to complete.
You need to identify tables that meet the following requirements:
More than 1,000 rows have changed.
The statistics have not been updated in over a week.
How should you complete the Transact-SQL statement?

331 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:

332 / 383
The safer , easier way to help you pass any IT exams. 

Example:
SELECT obj.name, obj.object_id, stat.name, stat.stats_id, last_updated, modification_counter
FROM sys.objects AS obj
JOIN sys.stats stat ON stat.object_id = obj.object_id
CROSS APPLY sys.dm_db_stats_properties(stat.object_id, stat.stats_id) AS sp
WHERE modification_counter > 1000
order by modification_counter desc;
sys.sysindexes contains one row for each index and table in the current database.
rowmodctr counts the total number of inserted, deleted, or updated rows since the last time statistics were
updated for the table.
Example 2:
SELECT
id AS [Table ID]
, OBJECT_NAME(id) AS [Table Name]
, name AS [Index Name]
, STATS_DATE(id, indid) AS [LastUpdated]
, rowmodctr AS [Rows Modified]
FROM sys.sysindexes
WHERE STATS_DATE(id, indid)<=DATEADD(DAY,-1,GETDATE())
AND rowmodctr>10 AND (OBJECTPROPERTY(id,'IsUserTable'))=1
References:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/493b90e3-cdb8-4a16-8249-849ba0f82fcb/ho
w-to-find-outdated-statistics-in-sql-server?forum=transactsql

313.You have a database named DB1.


Users report that a database application that updates the data in DB1 is unresponsive.
You need to identify which process prevents the application from responding.
What should you do?
A. Run DBCC INPUTBUFFER.
B. Query sys.dm_exec_session_wait_stats.
C. Run sp_autostats.
D. Run sp_who.
Answer: B
Explanation:
Sys.dm_exec_session_wait_stats returns information about all the waits encountered by threads that
executed for each session. You can use this view to diagnose performance issues with the SQL Server
session and also with specific queries and batches.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-e
xec-session-wait-stats-transact-sql

314.You have 10 Microsoft SQL Server 2016 servers.


You deploy a management data warehouse named DW1. You configure DW1 to gather all the
performance data from the servers.

333 / 383
The safer , easier way to help you pass any IT exams. 

You configure a Data Collector on a SQL server named SV1.


You query the data warehouse on DW1 and discover that data from SV1 is unavailable.
You need to ensure that you can review the performance data from SV1 when you query DW1.
What should you do?
A. Start the SQL Server Agent service on DW1.
B. Execute the msdb.sp_syscollector_set_warehouse_connection_user stored procedure on SV1.
C. Execute the msdb.sp_syscollector_enable_collector stored procedure on DW1.
D. Start the SQL Server Agent service on SV1.
Answer: C
Explanation:
sp_syscollector_enable_collector enables the data collector.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-syscollector-ena
ble-collector-transact-sql

315.You manage a Microsoft SQL Server environment. You plan to configure Database Mail.
You need to ensure that all users can access a private Database Mail profile.
What should you do?
A. On the tempdb database, add the DatabaseMailUserRole to userid 0.
B. On the msdb database, add the DatabaseMailUserRole to the public user.
C. On the master database, add the DatabaseMailUserRole to the public user.
D. On the profile, grant access to the public user.
Answer: B
Explanation:
For each private profile, Database Mail maintains a list of users that are permitted to send e-mail using
that profile. Public profiles are available to users or roles in the msdb database who are also members of
the DatabaseMailUserRole.
By default, a profile is private, and no users are granted access to the profile. To make the profile public,
grant access to the user 'public' or the user id 0.
Note: Profiles are either public or private. A private profile is accessible only to specific users or roles. A
public profile allows any user or role with access to the mail host database (msdb) to send e-mail using
that profile.
References: https://technet.microsoft.com/en-us/library/ms189879(v=sql.105).aspx

316.A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL
Database instances. The environment hosts several customer databases.
A customer that uses an on-premises instance reports that queries take a long time to complete.
You need to reconfigure table statistics so that the query optimizer can use the optimal query execution
plans available.
Which Transact-SQL segment should you use?
A. sp_autostats
B. AUTO_UPDATE_STATISTICS_ASYNC
C. SET AUTO_UPDATE_STATISTICS ON
D. CREATE STATISTICS

334 / 383
The safer , easier way to help you pass any IT exams. 

Answer: C
Explanation:
You can turn on automatic statistics update by running this SQL statement:
SET AUTO_UPDATE_STATISTICS ON

317.DRAG DROP
You administer a SQL Server instance. A database named DB1 is corrupted.
Backups of DB1 are available on a disk backup device located at Z:\Backups\Backup.bak. The backup
device has the following backups sets:
a full database backup that is the first backup set on the device (FILE = 1)
a differential database backup that is the second backup set on the device (FILE = 2)
a transaction log backup that is the third backup set on the device (FILE = 3)
You restore the full database backup and the differential database backup without rolling back the
uncommitted transactions.
You need to restore the transaction log backup and ensure the database is ready for use after restoring
the transaction log.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL
segments to the correct locations. Each Transact-SQL segment 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.

Answer:

Explanation:
The RESTORE restores backups taken using the BACKUP command. You can do restore a transaction
log onto a database (a transaction log restore).
NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next
statement in the sequence. In this case, the restore sequence can restore other backups and roll them
forward.
RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for
the current backup.

335 / 383
The safer , easier way to help you pass any IT exams. 

Recovering the database requires that the entire set of data being restored (the roll forward set) is
consistent with the database. If the roll forward set has not been rolled forward far enough to be
consistent with the database and RECOVERY is specified, the Database Engine issues an error.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql

318.HOTSPOT
You manage a database that uses the FULL recovery model and has a 60-minute recovery point objective
(RPO). Full database backups are performed at 23:00 Monday through Friday.
Each full database backup takes 6 hours to complete. Approximately 5% of the data changes each
weekday.
Backups must be performed as often as possible to reduce the number of files needed either a full
recovery to any given time. You must minimize the duration of the backup tasks that are performed
between 04:00 and 23:00.
You need to reconfigure backups.
Which time slot or schedule should you use for each backup type?

Answer:

336 / 383
The safer , easier way to help you pass any IT exams. 

319.DRAG DROP
You manage a Microsoft SQL Server that has a database named salesOrders. Users connect to the
database by using a client application.
Users report that the application cannot connect to the database. You observe that the database storage
has experienced a failure.
You need to repair the database and ensure that applications can connect to the database.
Which three action 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.

Answer:

337 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
The specified database must be in single-user mode to use one of the following repair options.
REPAIR_REBUILD
Performs repairs that have no possibility of data loss. This can include quick repairs, such as repairing
missing rows in non-clustered indexes, and more time-consuming repairs, such as rebuilding an index.

320.HOTSPOT
You view the Restore Transaction Log settings for a database named DB1 as shown in the following
exhibit.

Use the drop down menus to select the answer choice that completes each statement based on the

338 / 383
The safer , easier way to help you pass any IT exams. 

information presented in the graphic.


NOTE: Each correct selection is worth one point.

Answer:

Explanation:
Log shipping secondary database can be kept in two restore modes:
Restoring - This mode is also known as NORECOVERY mode.
Standby - This mode is also known as Read-Only mode.
When you use the NORECOVERY mode, the database will be in a restoring state and inaccessible to
users, so uncommitted database transactions are not an issue.
When you use the STANDBY mode, database will be in Read-Only state and users can access this
database for read operations. Transactions in process on primary server or any uncommitted transaction
cannot be read in secondary database.
References:
https://www.mssqltips.com/sqlservertip/3600/change-the-restore-mode-of-a-secondary-sql-server-databa
se-in-log-shipping-with-ssms/

321.HOTSPOT
You deploy a three node Windows Server Failover Clustering (WSFC) cluster. You configure a Microsoft

339 / 383
The safer , easier way to help you pass any IT exams. 

SQL Server instance in failover cluster instance (FCI) mode.


You need to identify the actions that will take place if the motherboard on one server fails and automatic
failover occurs.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:
References:
https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/always-on-failover-cluster-insta
nces-sql-server

322.HOTSPOT
You are configuring log shipping for a Microsoft SQL Server database named salesOrders.
You run the following Transact-SQL script:

340 / 383
The safer , easier way to help you pass any IT exams. 

You need to determine the changes that the script has on the environment.
How does the script affect the environment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

341 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
Box 1: is
Note: sp_change_log_shipping_primary_database,
Parameter: [ @backup_share = ] 'backup_share'
Is the network path to the backup directory on the primary server. backup_share is nvarchar(500), with no
default, and cannot be NULL.
Box 2: 72 hours
4320 minutes is 72 hours.
Note: sp_change_log_shipping_primary_database, Backup_retention_period parameter
@backup_retention_period = ] 'backup_retention_period'
Is the length of time, in minutes, to retain the log backup file in the backup directory on the primary server.
backup_retention_period is int, with no default, and cannot be NULL.
Box 2:

342 / 383
The safer , easier way to help you pass any IT exams. 

SP_Add_Retcode
Box 3: 24 hours
sp_add_schedule
@freq_type (here 4, which is daily)
A value indicating when a job is to be executed. freq_typeis int, with a default of 0, and can be one of
these values.
ValueDescription
1Once
4Daily
8Weekly
16Monthly
32Monthly, relative to freq_interval
64Run when SQLServerAgent service starts
128Run when the computer is idle
@freq_interval = ] freq_interval
The days that a job is executed. freq_interval is int, with a default of 1, and depends on the value of
freq_type.
Value of freq_typeEffect on freq_interval
1 (once)freq_interval is unused.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-schedule-tra
nsact-sql

323.HOTSPOT
A company has the following Microsoft SQL Server instances Instance1 and Instance2. You plan to
enable Always Encrypted for both instances.
You need to configure the instances to meet the following requirements:
Instance1 must use an initialization vector that is different each time the instance is initiated.
Instance2 must use an initialization vector that is derived from an algorithm.
In the table below, identify the encryption type that must be used for each instance.
NOTE: Make only one selection in each column. Each correct selection is worth one point.

Answer:

343 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Always Encrypted supports two types of encryption: randomized encryption and deterministic encryption.
Randomized encryption uses a method that encrypts data in a less predictable manner. Randomized
encryption is more secure, but prevents searching, grouping, indexing, and joining on encrypted columns.
Deterministic encryption always generates the same encrypted value for any given plain text value. Using
deterministic encryption allows point lookups, equality joins, grouping and indexing on encrypted
columns.
However, but may also allow unauthorized users to guess information about encrypted values by
examining patterns in the encrypted column, especially if there is a small set of possible encrypted values,
such as True/False, or North/South/East/West region.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database
-engine

324.You are a database administrator at Contoso, Ltd. You are preparing to move a global sales
application from a development environment to a production environment.
You have a database named Contoso that has a schema named Sales. All objects in the database have
the same owner. The schema has a large number of views and stored procedures. None of the stored
procedures perform IDENTITY_INSERT operations or dynamic SQL commands. You create all views by
using the WITH SCHEMABINDING option.
All employees in the sales division are members of an Active Directory Domain Services (AD DS) security
group named Contoso\Sales.
The following database objects are the only objects queried when a user from Contoso\Sales is using the
application.

Views
• SalesReport
• SalesInvoice
Stored procedures
• InvoiceExecute – performs read/write operations
• InvoiceSearch – performs read-only operations

When granting permissions to the database, you should use the principle of least privilege.
You create a new user-defined database role named SalesRole and add Contoso\Sales as a member of

344 / 383
The safer , easier way to help you pass any IT exams. 

SalesRole.
You need to grant all employees in the Sales division permission to use the views and stored procedures.
Which two solutions will meet the requirements? Each correct answer presents a complete solution.
A. Grant the SELECT permission on the Sales schema to SalesRole.Grant the EXECUTE permission on
the Sales.InvoiceExecute and Sales.InvoiceSearch to SalesRole.
B. Grant the SELECT permission on Sales.SalesReport and Sales.SalesInvoice to Contoro\Sales.Grant
the EXECUTE permission on Sales.InvoiceExecute and Sales.InvoiceSearch to Contoso\Sales.
C. Grant the SELECT permission on Sales.SalesReport and Sales.SalesInvoice to SalesRole.Grant the
EXECUTE permission on Sales.InvoiceExecute and Sales.InvoiceSearch to SalesRole.
D. Grant the SELECT permission on Sales.SalesReport and Sales.SalesInvoice to SalesRole.Grant the
EXECUTE permission on Sales.InvoiceExecute and Sales.InvoiceSearch to SalesRole.Grant the
SELECT permission on all tables referenced by Sales.SalesReport, Sales.SalesInvoice, and
Sales.InvoiceSearch to SalesRole.Grant the SELECT, INSERT, UPDATE, and DELETE permissions on
all tables referenced by Sales.InvoiceExecute to SalesRole.
Answer: B,C

325.Your company stored customer data, including credit card numbers, in a Microsoft SQL Server
database. The CreditCardNum column is configured as a varchar(16). When viewing the CreditCardNum
column, only the last four digits of the card number should be displayed.
You have the following Transact-SQL statement. (Line numbers are included for reference only.)

You need to implement dynamic data masking for the CreditCardNum column.
Which Transact-SQL segment should you insert at line 05?

345 / 383
The safer , easier way to help you pass any IT exams. 

A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation:
Using "partial" function
ALTER TABLE Ari_Users_Tbl ALTER COLUMN [CreditCard]
ADD MASKED WITH (FUNCTION = 'partial(0,"XXXX-XXXX-XXXX-",4)')
References:
https://social.technet.microsoft.com/wiki/contents/articles/35003.sql-server-exposing-masked-data.aspx#
Goal_2_Find_the_CreditCard_number_for_UserID_1

326.DRAG DROP
You have a database named DB1.
You need to encrypt two columns in DB1 by using column-level encryption.
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.

Answer:

Explanation:
Step 1: You must have a database master key. If your database does not already have a database master
key, create one.

346 / 383
The safer , easier way to help you pass any IT exams. 

Step 2: Create a certificate.


Step 3: Create a symmetric key.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/encrypt-a-column-of-data

327.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You support an application that stores data in a Microsoft SQL Server database. You have a query that
returns data for a report that users run frequently.
The query optimizer sometimes generates a poorly-performing plan for the query when certain
parameters are used. You observe that this is due to the distribution of data within a specific table that the
query uses.
You need to ensure that the query optimizer always uses the query plan that you prefer.
Solution: You force the desired plan.
Does the solution meet the goal?
A. Yes
B. No
Answer: B
Explanation:
KEEPFIXED PLAN should be used as it forces the query optimizer not to recompile a query due to
changes in statistics.
When FORCEPLAN is set to ON, the SQL Server query optimizer processes a join in the same order as
the tables appear in the FROM clause of a query. In addition, setting FORCEPLAN to ON forces the use
of a nested loop join unless other types of joins are required to construct a plan for the query, or they are
requested with join hints or query hints.
References:
https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query?view=sql-server-2017

328.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You support an application that stores data in a Microsoft SQL Server database. You have a query that
returns data for a report that users run frequently.
The query optimizer sometimes generates a poorly-performing plan for the query when certain
parameters are used. You observe that this is due to the distribution of data within a specific table that the
query uses.
You need to ensure that the query optimizer always uses the query plan that you prefer.
Solution: You create a copy of the plan guide for the query plan.
Does the solution meet the goal?

347 / 383
The safer , easier way to help you pass any IT exams. 

A. Yes
B. No
Answer: B
Explanation:
KEEPFIXED PLAN should be used as it forces the query optimizer not to recompile a query due to
changes in statistics.
References:
https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query?view=sql-server-2017

329.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You support an application that stores data in a Microsoft SQL Server database. You have a query that
returns data for a report that users run frequently.
The query optimizer sometimes generates a poorly-performing plan for the query when certain
parameters are used. You observe that this is due to the distribution of data within a specific table that the
query uses.
You need to ensure that the query optimizer always uses the query plan that you prefer.
Solution: You add the KEEPFIXED PLAN query hint to the query.
Does the solution meet the goal?
A. Yes
B. No
Answer: A
Explanation:
KEEPFIXED PLAN forces the query optimizer not to recompile a query due to changes in statistics.
Specifying KEEPFIXED PLAN makes sure that a query will be recompiled only if the schema of the
underlying tables is changed or if sp_recompile is executed against those tables.
References:
https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query?view=sql-server-2017

330.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a data warehouse that stores sales data. One fact table has 100 million rows.
You must reduce storage needs for the data warehouse.
You need to implement a solution that uses column-based storage and provides real-time analytics for the
operational workload.
Solution: You remove any clustered indexes and load the table for processing.
Does the solution meet the goal?
A. Yes

348 / 383
The safer , easier way to help you pass any IT exams. 

B. No
Answer: B
Explanation:
Clustered columnstore tables offer both the highest level of data compression as well as the best overall
query performance. Clustered columnstore tables will generally outperform clustered index or heap tables
and are usually the best choice for large tables. For these reasons, clustered columnstore is the best
place to start when you are unsure of how to index your table.
Note: Dimensional tables can be used to reduce the size of fact tables.
Dimension tables contain attribute data that might change but usually changes infrequently. For example,
a customer's name and address are stored in a dimension table and updated only when the customer's
profile changes. To minimize the size of a large fact table, the customer's name and address do not need
to be in every row of a fact table. Instead, the fact table and the dimension table can share a customer ID.
A query can join the two tables to associate a customer's profile and transactions.
References:
https://docs.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-tables-overview

331.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
Your company is developing a new business intelligence application that will access data in a Microsoft
Azure SQL Database instance. All objects in the instance have the same owner.
A new security principal named BI_User requires permission to run stored procedures in the database.
The stored procedures read from and write to tables in the database. None of the stored procedures
perform IDENTIFY_INSERT operations or dynamic SQL commands.
The scope of permissions and authentication of BI_User should be limited to the database. When
granting permissions, you should use the principle of least privilege.
You need to create the required security principals and grant the appropriate permissions.
Solution: You run the following Transact-SQL statement in the master database:
CREATE LOGIN BI_User WITH PASSWORD = ‘Pa$$w ørd’
You run the following Transact-SQL statement in the business intelligence database:

Does the solution meet the goal?


A. Yes
B. No
Answer: B
Explanation:
One method of creating multiple lines of defense around your database is to implement all data access
using stored procedures or user-defined functions. You revoke or deny all permissions to underlying
objects, such as tables, and grant EXECUTE permissions on stored procedures. This effectively creates a

349 / 383
The safer , easier way to help you pass any IT exams. 

security perimeter around your data and database objects.


Best Practices
Simply writing stored procedures isn't enough to adequately secure your application. You should also
consider the following potential security holes.
Grant EXECUTE permissions on the stored procedures for database roles you want to be able to access
the data.
Revoke or deny all permissions to the underlying tables for all roles and users in the database, including
the public role. All users inherit permissions from public. Therefore denying permissions to public means
that only owners and sysadmin members have access; all other users will be unable to inherit
permissions from membership in other roles.
Do not add users or roles to the sysadmin or db_owner roles. System administrators and database
owners can access all database objects.
References:
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/managing-permissions-with-stored-pr
ocedures-in-sql-server

332.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
Your company is developing a new business intelligence application that will access data in a Microsoft
Azure SQL Database instance. All objects in the instance have the same owner.
A new security principal named BI_User requires permission to run stored procedures in the database.
The stored procedures read from and write to tables in the database. None of the stored procedures
perform IDENTIFY_INSERT operations or dynamic SQL commands.
The scope of permissions and authentication of BI_User should be limited to the database. When
granting permissions, you should use the principle of least privilege.
You need to create the required security principals and grant the appropriate permissions.
Solution: You run the following Transact-SQL statement in the database:

Does the solution meet the goal?


A. Yes
B. No
Answer: B
Explanation:
One method of creating multiple lines of defense around your database is to implement all data access
using stored procedures or user-defined functions. You revoke or deny all permissions to underlying
objects, such as tables, and grant EXECUTE permissions on stored procedures. This effectively creates a
security perimeter around your data and database objects.
Best Practices
Simply writing stored procedures isn't enough to adequately secure your application. You should also

350 / 383
The safer , easier way to help you pass any IT exams. 

consider the following potential security holes.


Grant EXECUTE permissions on the stored procedures for database roles you want to be able to access
the data.
Revoke or deny all permissions to the underlying tables for all roles and users in the database, including
the public role. All users inherit permissions from public. Therefore denying permissions to public means
that only owners and sysadmin members have access; all other users will be unable to inherit
permissions from membership in other roles.
Do not add users or roles to the sysadmin or db_owner roles. System administrators and database
owners can access all database objects.
References:
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/managing-permissions-with-stored-pr
ocedures-in-sql-server

333.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
Your company is developing a new business intelligence application that will access data in a Microsoft
Azure SQL Database instance. All objects in the instance have the same owner.
A new security principal named BI_User requires permission to run stored procedures in the database.
The stored procedures read from and write to tables in the database. None of the stored procedures
perform IDENTIFY_INSERT operations or dynamic SQL commands.
The scope of permissions and authentication of BI_User should be limited to the database. When
granting permissions, you should use the principle of least privilege.
You need to create the required security principals and grant the appropriate permissions.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?


A. Yes
B. No
Answer: A
Explanation:
One method of creating multiple lines of defense around your database is to implement all data access
using stored procedures or user-defined functions. You revoke or deny all permissions to underlying
objects, such as tables, and grant EXECUTE permissions on stored procedures. This effectively creates a
security perimeter around your data and database objects.
Best Practices
Simply writing stored procedures isn't enough to adequately secure your application. You should also
consider the following potential security holes.
Grant EXECUTE permissions on the stored procedures for database roles you want to be able to access
the data.
Revoke or deny all permissions to the underlying tables for all roles and users in the database, including

351 / 383
The safer , easier way to help you pass any IT exams. 

the public role. All users inherit permissions from public. Therefore denying permissions to public means
that only owners and sysadmin members have access; all other users will be unable to inherit
permissions from membership in other roles.
Do not add users or roles to the sysadmin or db_owner roles. System administrators and database
owners can access all database objects.
References:
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/managing-permissions-with-stored-pr
ocedures-in-sql-server

334.Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You attempt to restore a database on a new SQL Server instance and receive the following error
message:
“Msg 33111, Level 16, State 3, Line 2
Cannot find server certificate with thumbprint ‘0x7315277C70764B1F252DC7A5101F6F66EFB1069D’.”
You need to ensure that you can restore the database successfully.
Solution: You disable BitLocker Drive Encryption (BitLocker) on the drive that contains the database
backup.
Does this meet the goal?
A. Yes
B. No
Answer: B
Explanation:
This is a certificate problem. The problem is not related to Bitlocker.
References: https://www.sqlservercentral.com/Forums/Topic1609923-3411-1.aspx

335.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
Start of repeated scenario.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance.
The topology for the environment is shown in the following diagram.

352 / 383
The safer , easier way to help you pass any IT exams. 

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The details for AG1 are shown in the following table.

353 / 383
The safer , easier way to help you pass any IT exams. 

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

End of repeated scenario.


You need to create a backup plan for Instance4.
Which backup plan should you create?
A. Weekly full backups, nightly differential backups, transaction log backups every 30 minutes.
B. Weekly full backups, nightly differential. No transaction log backups are necessary.
C. Weekly full backups, nightly differential backups, transaction log backups every 12 hours.
D. Full backups every 60 minutes, transaction log backups every 30 minutes.
Answer: A
Explanation:
Scenario: Instance4 is engaged in heavy read-write I/O. The Recovery Point Objective of Instance4 is 60
minutes.

336.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
Start of repeated scenario.
You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server
instance. The topology for the environment is shown in the following diagram.

354 / 383
The safer , easier way to help you pass any IT exams. 

You have an Always On Availability group named AG1.


The details for AG1 are shown in the following table.

Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain
that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the
filegroups is read_only and is half of the total database size.
Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.
Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an
empty table that has a rowstore clustered index and two nonclustered rowstore indexes.
You must minimize the growth of the StagedExternal database log file during the BULK INSERT
operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must
not interrupt the log backup chain.
You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1
and Site2. You must minimize latency between the nodes in AG1.
All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A
separate process copies backups to an offsite location. You should minimize both the time required to
restore the databases and the space required to store backups.
The recovery point objective (RPO) for each instance is shown in the following table.

355 / 383
The safer , easier way to help you pass any IT exams. 

Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the
keyword COMPRESSION.
You plan to deploy the following solutions to the environment. The solutions will access a database
named DB1 that is part of AG1.
Reporting system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader role. The user has EXECUTE permissions on the database. Queries
make no changes to the data. The queries must be load balanced over variable read-only replicas.
Operations system: This solution accesses data inDB1with a login that is mapped to a database user that
is a member of the db_datareader and db_datawriter roles. The user has EXECUTE permissions on the
database. Queries from the operations system will perform both DDL and DML operations.
The wait statistics monitoring requirements for the instances are described in the following table.

End of repeated scenario.


You need to reduce the amount of time it takes to back up OperationsMain.
What should you do?
A. Modify the backup script to use the keyword NO_COMPRESSION in the WITH statement.
B. Modify the backup script to use the keywords INIT and SKIP in the WITH statement.
C. Run the following Transact-SQL statement for each file in OperationsMain: BACKUP DATABASE
OperationsMain FILE […]
D. Run the following Transact-SQL statement: BACKUP DATABASE OperationsMain
READ_WRITE_FILEGROUPS
Answer: D
Explanation:
READ_WRITE_FILEGROUPS specifies that all read/write filegroups be backed up in the partial backup.
If the database is read-only, READ_WRITE_FILEGROUPS includes only the primary filegroup.
Scenario: Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups
use the keyword COMPRESSION.

337.HOTSPOT
A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database
instances. The environments host several customer databases.
You configure an Always On Availability Group for a customer. You must create log reports for the
customer that detail when the log is flushed to disk on the primary and secondary replica.
You need to develop a report containing the requested information.

356 / 383
The safer , easier way to help you pass any IT exams. 

In the table below, identify the log type that you should use for each replica.
NOTE: Make only one selection in each column. Each correct selection is worth one point.

Answer:

Explanation:
Flush on primary: Log flush
Log flush. Log data is generated and flushed to disk on the primary replica in preparation for replication to
the secondary replica. It then enters the send queue.
Flush on secondary: Log hardened
The log is flushed on the secondary replica, and then a notification is sent to the primary replica to
acknowledge completion of the transaction.

338.DRAG DROP
You are designing a high availability (HA) environment for a company that has three office locations.
Details of the services deployed at each office are shown in the table below:

You need to maximize availability, minimize data loss, and minimize downtime in the event of a failure.
Which solution should you implement for each location? To answer, drag the appropriate solutions to the
correct locations. Each solution 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.

357 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
The Always On availability groups feature is a high-availability and disaster-recovery solution that
provides an enterprise-level alternative to database mirroring.
References:
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-availability-
groups-sql-server?view=sql-server-2017

339.DRAG DROP
You have a database named DB1.
You must ensure that DB1 is highly available. You implement a Windows cluster. You need to create a
Cluster Shared Volume (CSV) for the database and log files.
Which three Windows Power Shell commands should you execute in sequence? To answer, move the
appropriate Windows PowerShell commands from the list of Windows PowerShell commands to the

358 / 383
The safer , easier way to help you pass any IT exams. 

answer area and arrange them in the correct order.

Answer:

Explanation:
Box 1: $cluster = Get-Cluster
The Get-Cluster cmdlet gets information about one or more failover clusters in a given domain.
This cmdlet can obtain a variety of configuration and state information about a failover cluster, including

359 / 383
The safer , easier way to help you pass any IT exams. 

the following items, such as the EnabledSharedVolumes property.


Box 2: $cluster.EnabledSharedVolumes ="Enabled"
Box 3: Add-ClusterSharedVolume "Disk1"
The Add-ClusterSharedVolume cmdlet makes a volume available in the Cluster Shared Volumes in a
failover cluster. The Cluster Shared Volume must be chosen from the disks in Available Storage (that is,
disks that have been added to the cluster but not assigned to a specific use in the cluster).
References:
https://docs.microsoft.com/en-us/powershell/module/failoverclusters/get-cluster
https://docs.microsoft.com/en-us/powershell/module/failoverclusters/add-clustersharedvolume?view=win
server2012-ps

340.HOTSPOT
You are planning the deployment of two new Always On Failover Cluster Instances (FCIs) of Microsoft
SQL Server to a single Windows Server Cluster with three nodes.
The planned configuration for the cluster is shown in the Server Layout exhibit. (Click the Exhibit button.)

The SAN team has configured storage for the cluster and sent the configuration to you in the email shown
in the SAN Team Email exhibit. (Click the Exhibit button.)

Each node of the cluster has identical local storage available as shown in the Local Storage exhibit. (Click
the Exhibit button.)

360 / 383
The safer , easier way to help you pass any IT exams. 

All local storage is on SSD.


You need to plan specific configurations for the new cluster.
For each of the following statement, select Yes if the statement is true. Otherwise, select No.

Answer:

Explanation:
Box 1: Yes
tempdb on local storage. FCIs now support placement of tempdb on local non-shared storage, such as a
local solid-state-drive, potentially offloading a significant amount of I/O from a shared SAN.
Prior to SQL Server 2012, FCIs required tempdb to be located on a symmetrical shared storage volume
that failed over with other system databases.
Box 2: No
The VNN is set on the group level, not on the instance level.
Database client applications can connect directly to a SQL Server instance network name, or they may
connect to a virtual network name (VNN) that is bound to an availability group listener. The VNN abstracts
the WSFC cluster and availability group topology, logically redirecting connection requests to the

361 / 383
The safer , easier way to help you pass any IT exams. 

appropriate SQL Server instance and database replica.


The logical topology of a representative AlwaysOn solution is illustrated in this diagram:

References:
http://download.microsoft.com/download/d/2/0/d20e1c5f-72ea-4505-9f26-fef9550efd44/microsoft%20sql
%20server%20alwayson%20solutions%20guide%20for%20high%20availability%20and%20disaster%20
recovery.docx

341.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are migrating a set of databases from an existing Microsoft SQL Server instance to a new instance.
You need to complete the migration while minimizing administrative effort and downtime.
Which should you implement?
A. log shipping
B. an Always On Availability Group with all replicas in synchronous-commit mode
C. a file share witness
D. a SQL Server failover cluster instance (FCI)
E. a Windows Cluster with a shared-nothing architecture
F. an Always On Availability Group with secondary replicas in asynchronous-commit mode
Answer: A
Explanation:
SQL Server Log shipping allows you to automatically send transaction log backups from a primary
database on a primary server instance to one or more secondary databases on separate secondary

362 / 383
The safer , easier way to help you pass any IT exams. 

server instances. The transaction log backups are applied to each of the secondary databases
individually.
References:
https://docs.microsoft.com/en-us/sql/database-engine/log-shipping/about-log-shipping-sql-server?view=s
ql-server-2017

342.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
You are deploying a Microsoft SQL Server architecture to support a new mission-critical application. The
application includes a dedicated reporting component that performs read-only operations against the
application’s databases.
You need to implement a solution that meets the following requirements:
Modifications to the application to support the new architecture are not permitted.
What should you implement?
A. a Microsoft Azure Stretch Database
B. log shipping
C. an Always On Availability Group with all replicas in synchronous-commit mode
D. a file share witness
E. a SQL Server failover cluster instance (FCI)
F. a Windows Cluster with a shared-nothing architecture
G. an Always On Availability group with secondary replicas in asynchronous-commit mode
Answer: C
Explanation:
Synchronous-commit mode emphasizes high availability over performance, at the cost of increased
transaction latency.
References:
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-alw
ays-on-availability-groups?view=sql-server-2017

343.Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
Start of repeated scenario.
You are a database administrator for a company that has on-premises Microsoft SQL Server environment.
There are two domains in separate forests. There are no trust relationships between the domains. The
environment hosts several customer databases, and each customer uses a dedicated instance running
SQL Server 2016 Standard edition. The customer environments are shown in the following table.

363 / 383
The safer , easier way to help you pass any IT exams. 

End of repeated scenario.


You need to monitor WingDB and gather information for troubleshooting issues.
Which two tools should you use? Each correct answer presents a complete solution.
A. sys.dm_tran_locks
B. sp_lock
C. sys.dm_tran_active_snapshot_database_transactions
D. Activity Monitor
E. sp_monitor
Answer: B,D
Explanation:
The performance issues is related to locking.
B: sp_lock reports snapshot information about locks, including the object ID, index ID, type of lock, and
type or resource to which the lock applies.
D: The Activity Monitor in SQL Server Management Studio is useful for ad hoc views of current activity
and graphically displays information about:

344.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the

364 / 383
The safer , easier way to help you pass any IT exams. 

scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
Start of repeated scenario.
You are a database administrator for a company that has on-premises Microsoft SQL Server environment.
There are two domains in separate forests. There are no trust relationships between the domains. The
environment hosts several customer databases, and each customer uses a dedicated instance running
SQL Server 2016 Standard edition.
The customer environments are shown in the following table.

End of repeated scenario.


You need to configure auditing for the AdventureWorks environment.
How should you complete the Transact-SQL statement? To answer, select the appropriate options in the
answer area.
NOTE: Each correct selection is worth one point.

365 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

366 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Scenario:

You must implement auditing for all objects in the ADVSchema schema.

367 / 383
The safer , easier way to help you pass any IT exams. 

Box 1: CREATE SERVER AUDIT


Create the server audit.
Box 2: ALTER SERVER AUDIT
Enable the server audit.
Box 3: CREATE DATABASE AUDIT
Create the database audit specification.
Box 4: FOR SERVER AUDIT
Example: The following example creates a server audit called Payrole_Security_Audit and then a
database audit specification called Payrole_Security_Audit that audits SELECT and INSERT statements
by the dbo user, for the HumanResources.EmployeePayHistory table in the AdventureWorks2012
database.
USE master ;
GO
-- Create the server audit.
CREATE SERVER AUDIT Payrole_Security_Audit
TO FILE ( FILEPATH =
'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA' ) ;
GO
-- Enable the server audit.
ALTER SERVER AUDIT Payrole_Security_Audit
WITH (STATE = ON) ;
GO
-- Move to the target database.
USE AdventureWorks2012 ;
GO
-- Create the database audit specification.
CREATE DATABASE AUDIT SPECIFICATION Audit_Pay_Tables
FOR SERVER AUDIT Payrole_Security_Audit
ADD (SELECT , INSERT
ON HumanResources.EmployeePayHistory BY dbo )
WITH (STATE = ON) ;
GO
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-audit-specification-transact-sql?vie
w=sql-server-2017

345.HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but
the text of the scenario is exactly the same in each question in this series.
Start of repeated scenario.
You are a database administrator for a company that has on-premises Microsoft SQL Server environment.
There are two domains in separate forests. There are no trust relationships between the domains. The
environment hosts several customer databases, and each customer uses a dedicated instance running

368 / 383
The safer , easier way to help you pass any IT exams. 

SQL Server 2016 Standard edition.


The customer environments are shown in the following table.

End of repeated scenario.


You need to configure auditing for WDWDB.
In the table below, identify the event type that you must audit for each activity.
NOTE: Make only one selection in each column.

Answer:

369 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
You must log any deletion of views and all database record update operations.

346.You have a database named DB1 that contains two tables.


You need to encrypt one column in each table by using the Always Encrypted feature.
The solution must support groupings on encrypted columns.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A. Encrypt both columns by using deterministic encryption.
B. Provision a symmetric key by using Transact-SQL.
C. Encrypt both columns by using randomized encryption.
D. Provision column master keys and column encryption keys by using Microsoft SQL Server
Management Studio (SSMS).
Answer: A,D
Explanation:
A: Use deterministic encryption for columns that will be used as search or grouping parameters, for
example a government ID number.
Deterministic encryption always generates the same encrypted value for any given plain text value. Using
deterministic encryption allows point lookups, equality joins, grouping and indexing on encrypted
columns.
D: Always Encrypted uses two types of keys: column encryption keys and column master keys. A column
encryption key is used to encrypt data in an encrypted column. A column master key is a key-protecting
key that encrypts one or more column encryption keys.

347.HOTSPOT
You manage a Microsoft SQL Server environment with a database named salesOrders. You plan to
encrypt data during database backups.
You need to ensure that you can recover the database encryption keys.
How should you complete the Transact-SQL statement? To answer, select the appropriate Transact-SQL
segments in the answer area.

370 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

Explanation:
-- Creates a backup of the "AdventureWorks2012" master key. Because this master key is not encrypted
by the service master key, a password must be specified when it is opened.

371 / 383
The safer , easier way to help you pass any IT exams. 

USE AdventureWorks2012;
GO
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'sfj5300osdVdgwdfkli7';
BACKUP MASTER KEY TO FILE = 'c:\temp\exportedmasterkey'
ENCRYPTION BY PASSWORD = 'sd092735kjn$&adsg';
GO
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/back-up-a-database-master
-key?view=sql-server-2017

348.You manage a Microsoft SQL Server environment. You plan to encrypt data when you create
backups.
You need to configure the encryption options for backups.
What should you configure?
A. a certificate
B. an MD5 hash
C. an SHA-256 hash
D. an AES 256-bit key
Answer: D
Explanation:
To encrypt a backup we need to configure an encryption algorithm (supported encryption algorithms are:
AES 128, AES 192, AES 256, and Triple DES) and an encryptor (a certificate or asymmetric key).
Example: in order to create an encrypted backup we must create a Database Master Key.
USE SampleDB
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MSSQLTips.com';
GO
We must create a certificate to act as an encryptor.
Use SampleDB
GO
CREATE CERTIFICATE SampleDB_Backup_Certificate
WITH SUBJECT = 'SQL Server 2014';
GO
Now we are ready to create encrypted backups.
References: https://www.mssqltips.com/sqlservertip/3145/sql-server-2014-backup-encryption/

349.You have a database that stores information for a shipping company.


You create a table named Customers by running the following Transact-SQL statement. (Line numbers
are included for reference only.)

372 / 383
The safer , easier way to help you pass any IT exams. 

The salesPerson column stores the username of the salesperson. You must create a security policy that
ensures that salespeople can view data only for the customers that are assigned to them.
You need to create the function that will be used as the filter predicate for the security policy.
You write the following Transact-SQL:

Which Transact-SQL segment should you insert at line 02?

A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Explanation:
The inline table-valued function required for a Stretch Database filter predicate looks like the following
example.
The parameters for the function have to be identifiers for columns from the table.
Schema binding is required to prevent columns that are used by the filter function from being dropped or
altered.
Example:
CREATE FUNCTION dbo.fn_stretchpredicate(@column1 datatype1, @column2 datatype2 [, ...n])
RETURNS TABLE
WITH SCHEMABINDING
AS

373 / 383
The safer , easier way to help you pass any IT exams. 

RETURN SELECT 1 AS is_eligible


WHERE <predicate>
References:
https://docs.microsoft.com/en-us/sql/sql-server/stretch-database/select-rows-to-migrate-by-using-a-filter-f
unction-stretch-database?view=sql-server-2017

350.DRAG DROP
You are deploying a Microsoft Azure SQL Database environment:
You need to configure the environment to meet the following requirements:
Access to databases must be logged.
Email alerts must be sent to the database administrator if anomalous activity is detected.
What should you do? To answer, drag the appropriate solutions to the correct requirements. Each solution
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.

Answer:

Explanation:

374 / 383
The safer , easier way to help you pass any IT exams. 

Box 1: Enable database auditing


Box 2: Enable threat detection
SQL Database Threat Detection runs multiple sets of algorithms which detect potential vulnerabilities and
SQL injection attacks, as well as anomalous database access patterns (such as access from an unusual
location or by an unfamiliar principal). Security officers or other designated administrators get email
notification once a threat is detected on the database. Each notification provides details of the suspicious
activity and recommends how to further investigate and mitigate the threat.
References:

351.DRAG DROP
You have a database named DB1 that contains the primary file group and two other file groups named
CurrectData and HistoricalData. CurrentData contains 320 GB of active data that is updated frequently.
HistoricalData is read-only and contains 1.7 TB of data.
You have a backup schedule configured as show in the following table.

DB1 fails at 08:42 on Monday. You deploy a new server.


You need to recover CurrentData as quickly as possible on the new server. The solution must minimize
the amount of data loss.
Which four statements should you execute in sequence? To answer, move the appropriate statements
from the list of statements to the answer area and arrange them in the correct order.

375 / 383
The safer , easier way to help you pass any IT exams. 

Answer:

376 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
Step 1: ..FILEGROUP = N'PRIMARY.
Restore the primary filegroua
Step 2: ..CurrentData
Restore the CurrentDATA filegroup (not the HistoricalDATA).
Step 3: RESTORE ../diff/DB1_diff..
Restore the differential backup
Step 4: RESTORE LOG
Finally restore the log files.

352.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has an on-premises Microsoft SQL Server environment.

377 / 383
The safer , easier way to help you pass any IT exams. 

SQL Server backups should be stored as Microsoft Azure blob pages. The connection process from the
SQL Server instances to Azure should be encrypted.
You need to store backups as Azure blob pages.
Which option should you use?
A. backup compression
B. backup encryption
C. file snapshot backup
D. mirrored backup media sets
E. SQL Server backup to URL
F. SQL Server Managed Backup to Azure
G. tail-log backup
H. back up and truncate the transaction log
Answer: F
Explanation:
SQL Server Managed Backup to Microsoft Azure manages and automates SQL Server backups to
Microsoft Azure Blob storage. You can choose to allow SQL Server to determine the backup schedule
based on the transaction workload of your database. Or you can use advanced options to define a
schedule. The retention settings determine how long the backups are stored in Azure Blob storage.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-managed-backup-to-
microsoft-azure?view=sql-server-2017

353.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has several Microsoft SQL Server database in Microsoft Azure.
One database experiences a storage failure, and pages that store critical database metadata are
corrupted.
You need to perform an offline restore of the database’s pages.
Which option should you use first?
A. backup compression
B. backup encryption
C. file snapshot backup
D. mirrored backup media sets
E. SQL Server backup to URL
F. SQL Server Managed Backup to Azure
G. tail-log backup
H. back up and truncate the transaction log
Answer: G
Explanation:
An unbroken chain of log backups must be available, up to the current log file, and they must all be
applied to bring the page up to date with the current log file.
A tail-log backup captures any log records that have not yet been backed up (the tail of the log) to prevent

378 / 383
The safer , easier way to help you pass any IT exams. 

work loss and to keep the log chain intact. Before you can recover a SQL Server database to its latest
point in time, you must back up the tail of its transaction log. The tail-log backup will be the last backup of
interest in the recovery plan for the database.
Note: The goal of a page restore is to restore one or more damaged pages without restoring the whole
database. Typically, pages that are candidates for restore have been marked as "suspect" because of an
error that is encountered when accessing the page.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/tail-log-backups-sql-server?vie
w=sql-server-2017#TailLogScenarios
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-pages-sql-server?view
=sql-server-2017#Restrictions

354.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has a Microsoft SQL Server environment that has multiple databases. A database named DB1
has multiple online file groups. It is configured to use the full recovery model. A full backup is preformed
nightly and transaction logs are performed on the hour. A large number of records are accidentally deleted
at 17:20.
You need to perform a point-in-time recovery.
Which option should you use first?
A. backup compression
B. backup encryption
C. file snapshot backup
D. mirrored backup media sets
E. SQL Server backup to URL
F. SQL Server Managed Backup to Azure
G. tail-log backup
H. back up and truncate the transaction log
Answer: G
Explanation:
To back up the tail of the log (that is, the active log), check Back up the tail of the log, and leave database
in the restoring state.
A tail-log backup is taken after a failure to back up the tail of the log in order to prevent work loss. Back up
the active log (a tail-log backup) both after a failure, before beginning to restore the database, or when
failing over to a secondary database. Selecting this option is equivalent to specifying the NORECOVERY
option in the BACKUP LOG statement of Transact-SQL.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-s
erver?view=sql-server-2017

355.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of

379 / 383
The safer , easier way to help you pass any IT exams. 

the other questions in this series. Information and details provided in a question apply only to that
question.
A company has a Microsoft SQL Server environment in Microsoft Azure. The databases are stored
directly in Azure blob storage.
You need to ensure that you can restore a database to a specific point in time between backups while
minimizing the number of Azure storage containers required.
Which option should you use?
A. backup compression
B. backup encryption
C. file snapshot backup
D. mirrored backup media sets
E. SQL Server backup to URL
F. SQL Server Managed Backup to Azure
G. tail-log backup
H. back up and truncate the transaction log
Answer: F
Explanation:
SQL Server Managed Backup to Microsoft Azure supports point in time restore for the retention time
period specified.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-managed-backup-to-
microsoft-azure?view=sql-server-2017

356.Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent of
the other questions in this series. Information and details provided in a question apply only to that
question.
A company has a Microsoft SQL Server environment in Microsoft Azure. The databases are stored
directly in Azure blob storage. The company uses a complex backup process.
You need to simplify the backup process. Future restores should not require differential or multiple
incremental logs to perform a restore.
You need to design a backup solution for the SQL Server instances.
Which option should you use?
A. backup compression
B. backup encryption
C. file snapshot backup
D. mirrored backup media sets
E. SQL Server backup to URL
F. SQL Server Managed Backup to Azure
G. tail-log backup
H. back up and truncate the transaction log
Answer: C
Explanation:
SQL Server File-snapshot backup uses Azure snapshots to provide nearly instantaneous backups and

380 / 383
The safer , easier way to help you pass any IT exams. 

quicker restores for database files stored using the Azure Blob storage service. This capability enables
you to simplify your backup and restore policies.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/file-snapshot-backups-for-data
base-files-in-azure?view=sql-server-2017

357.You have an application that queries a database. Users report that the application is slower than
expected.
You discover that several server process identifiers (SPIDs) have PAGELATCH_UP and
PAGELATCH_EX waits. The resource descriptions of the SPIDs contains 2:1:1.
You need to resolve the issue.
What should you do?
A. Allocate additional processor cores to the server.
B. Add files to the file group of the application database.
C. Reduce the fill factor of all clustered indexes.
D. Add data files to tempdb.
Answer: D
Explanation:
PAGELATCH contention in tempdb is typically on allocation bitmaps and occurs with workloads with many
concurrent connections creating and dropping small temporary tables (which are stored in tempdb).
Assuming that the temporary tables are needed for performance, the trick is to have multiple data files for
tempdb so that the allocations are done round-robin among the files, the contention is split over multiple
PFS pages, and so the overall contention goes down.
References: https://sqlperformance.com/2015/10/sql-performance/knee-jerk-wait-statistics-pagelatch

358.A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL
Database instances. The environment hosts several customer databases.
A customer that uses an on-premises instance reports that queries take a long time to complete.
You need to reconfigure table statistics so that the query optimizer can use the optimal query execution
plans available.
Which Transact-SQL segment should you use?
A. sys.index_columns
B. UPDATE STATISTICS
C. CREATE STATISTICS
D. SET AUTO_CREATE_STATISTICS ON
Answer: D
Explanation:
AUTO_UPDATE_STATISTICS { ON | OFF }
ON specifies that the query optimizer updates statistics when they are used by a query and when they
might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations
change the data distribution in the table or indexed view. The query optimizer determines when statistics
might be out-of-date by counting the number of data modifications since the last statistics update and
comparing the number of modifications to a threshold. The threshold is based on the number of rows in
the table or indexed view.

381 / 383
The safer , easier way to help you pass any IT exams. 

References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options?view=sql-s
erver-2017#auto_update_statistics

359.HOTSPOT
Your company hosts Microsoft SQL Server instances for customers. One customer requires that the SQL
Server instance send an email when an alert is generated in the Sales database.
You need to create the alert.
How should you complete the Transact-SQL statement? To answer, select the appropriate options in the
answer area.

Answer:

382 / 383
The safer , easier way to help you pass any IT exams. 

Explanation:
The following example adds an e-mail notification for the specified alert (Test Alert).
NOTE: This example assumes that Test Alert already exists and that François Ajenstat is a valid operator
name.
USE msdb ;
GO
EXEC dbo.sp_add_notification
@alert_name = N'Test Alert',
@operator_name = N'François Ajenstat',
@notification_method = 1 ;
GO
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-notification-t
ransact-sql?view=sql-server-2017

383 / 383

You might also like