70-765 ExamCollection PDF
70-765 ExamCollection PDF
70-765 ExamCollection PDF
100q
Number: 70-765
Passing Score: 800
Time Limit: 120 min
https://www.gratisexam.com/
70-765
Sections
1. Implementing SQL in Azure
2. Manage databases and instances
3. Deploy and migrate applications
https://www.gratisexam.com/
Exam A
QUESTION 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. Determine
whether the solution meets stated goals.
You need to ensure that queries use statistical data and do not initialize values for local variables.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
PARAMETER_SNIFFING = { ON | OFF | PRIMARY} enables or disables parameter sniffing. This is equivalent to Trace Flag 4136.
SQL server uses a process called parameter sniffing when executing queries or stored procedures that use parameters. During compilation, the value passed into
the parameter is evaluated and used to create an execution plan. That value is also stored with the execution plan in the plan cache. Future executions of the plan
will re-use the plan that was compiled with that reference value.
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
QUESTION 2
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
https://www.gratisexam.com/
You need to configure the key store provider.
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Always Encrypted supports multiple key stores for storing Always Encrypted column master keys. A column master key can be a certificate stored in Windows
Certificate Store.
References: https://msdn.microsoft.com/en-us/library/mt723359.aspx
QUESTION 3
You plan to deploy 20 Microsoft Azure SQL Database instances to an elastic pool in Azure to support a batch processing application.
Two of the databases in the pool reach their peak workload threshold at the same time every day. This leads to inconsistent performance for batch completion.
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
In SQL Database, the relative measure of a database's ability to handle resource demands is expressed in Database Transaction Units (DTUs) for single databases
and elastic DTUs (eDTUs) for databases in an elastic pool.
https://www.gratisexam.com/
A pool is given a set number of eDTUs, for a set price. Within the pool, individual databases are given the flexibility to auto-scale within set parameters. Under
heavy load, a database can consume more eDTUs to meet demand.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
QUESTION 4
Note: This questions 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 on-premises and Microsoft Azure SQL Database instances for a company. Your environment must support the Microsoft SQL Server 2012 ODBS
driver.
A. transport-level encryption
B. cell-level encryption
C. Transparent Data Encryption
D. Always Encrypted
E. Encrypting File System
F. BitLocker
G. dynamic data masking
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
To encrypt columns you can configure Always Encrypted.
SQL Server Management Studio (SSMS) provides a wizard that helps you easily configure Always Encrypted by setting up the column master key, column
encryption key, and encrypted columns for you.
Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the encryption keys to SQL Server or Azure SQL Database. An
Always Encrypted enabled driver, such as the ODBC Driver 13.1 for SQL Server, achieves this by transparently encrypting and decrypting sensitive data in the client
https://www.gratisexam.com/
application.
Note: The ODBC driver automatically determines which query parameters correspond to sensitive database columns (protected using Always Encrypted), and
encrypts the values of those parameters before passing the data to SQL Server or Azure SQL Database. Similarly, the driver transparently decrypts data retrieved
from encrypted database columns in query results.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-always-encrypted-azure-key-vault#encrypt-columns-configure-always-encrypted
https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx
QUESTION 5
Note: This questions 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.
Data encryption should be allowed to be implemented by the client applications that access the data. Encryption keys should not be made available to the database
engine.
A. transport-level encryption
B. cell-level encryption
C. Transparent Data Encryption
D. Always Encrypted
E. Encrypting File System
F. BitLocker
G. dynamic data masking
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
Using encryption during transit with Azure File Shares
Azure File Storage supports HTTPS when using the REST API, but is more commonly used as an SMB file share attached to a VM.
https://www.gratisexam.com/
Incorrect Answers:
C: TDE encrypts the storage of an entire database by using a symmetric key called the database encryption key. In SQL Database the database encryption key is
protected by a built-in server certificate.
References: https://docs.microsoft.com/en-us/azure/storage/storage-security-guide#encryption-in-transit
QUESTION 6
You are deploying a Microsoft SQL Server database that will support a mixed OLTP and OLAP workload. The target virtual machine has four CPUs.
You need to ensure that reports do not use all available system resources.
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number
of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option to limit the number of
processors to use in parallel plan execution.
Incorrect Answers:
A: The Auto Close property exposes server behavior for databases not accessed by a user. This feature 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.
References: https://msdn.microsoft.com/en-us/library/ms189094.aspx
QUESTION 7
A company has an on-premises Microsoft SQL Server 2014 environment. The company has a main office in Seattle, and remote offices in Amsterdam and Tokyo.
You plan to deploy a Microsoft Azure SQL Database instance to support a new application. You expect to have 100 users from each office.
In the past, users at remote sites reported issues when they used applications hosted at the Seattle office.
https://www.gratisexam.com/
You need to optimize performance for users running reports while minimizing costs.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-transact-sql#add-secondary-database
QUESTION 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. Determine
whether the solution meets stated goals.
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You create a snapshot of the database. You configure all report queries to use the database snapshot.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
https://www.gratisexam.com/
Use a Resource Governor instead.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
QUESTION 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. Determine
whether the solution meets stated goals.
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to limit the amount of memory, CPU, and IOPS used for the pool of all queries that the Reporting_user login can run
concurrently.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
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.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
QUESTION 10
https://www.gratisexam.com/
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine
whether the solution meets stated goals.
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to set the MAXDOP parameter to 0 for all queries against the database.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
SQL Server will consider parallel execution plans for queries, index data definition language (DDL) operations, and static and keyset-driven cursor population.
You can override the max degree of parallelism value in queries by specifying the MAXDOP query hint in the query statement.
References: https://technet.microsoft.com/en-us/library/ms181007(v=sql.105).aspx
QUESTION 11
HOTSPOT
Background
You manage the Microsoft SQL Server environment for a company that manufactures and sells automobile parts.
The environment includes the following servers: SRV1 and SRV2. SRV1 has 16 logical cores and hosts a SQL Server instance that supports a mission-critical
application. The application has approximately 30,000 concurrent users and relies heavily on the use of temporary tables.
The environment also includes the following databases: DB1, DB2, and Reporting. The Reporting database is protected with Transparent Data Encryption (TDE).
You plan to migrate this database to a new server. You detach the database and copy it to the new server.
https://www.gratisexam.com/
You are performing tuning on a SQL Server database instance. The application which uses the database was written using an object relationship mapping (ORM)
tool which maps tables as objects within the application code. There are 30 stored procedures that are regularly used by the application.
Exhibit
https://www.gratisexam.com/
https://www.gratisexam.com/
You need to optimize SRV1.
What configuration changes should you implement? To answer, select the appropriate option from each list in the answer area.
Hot Area:
Correct Answer:
https://www.gratisexam.com/
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
From the scenario: SRV1 has 16 logical cores and hosts a SQL Server instance that supports a mission-critical application. The application has approximately
30,000 concurrent users and relies heavily on the use of temporary tables.
Incorrect Answers:
Not MAXDOP:
The MAXDOP setting is fine. From the exhibit we see that MAXDOP is set to 0. This is the default setting, which enables the server to determine the maximum
degree of parallelism.
https://www.gratisexam.com/
Note: When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the
number of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option to limit the number of
processors to use in parallel plan execution.
References: https://technet.microsoft.com/en-us/library/ms175527(v=sql.105).aspx
QUESTION 12
DRAG DROP
Background
You manage a Microsoft SQL Server environment that includes the following databases: DB1, DB2, Reporting.
The environment also includes SQL Reporting Services (SSRS) and SQL Server Analysis Services (SSAS). All SSRS and SSAS servers use named instances.
You configure a firewall rule for SSAS.
Databases
Database Name:
DB1
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are inserted into DB1 or updated each second. Inserts are made by
many different external applications that your company's developers do not control. You observe that transaction log write latency is a bottleneck in performance.
Because of the transient nature of all the data in this database, the business can tolerate some data loss in the event of a server shutdown.
Database Name:
DB2
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are updated or inserted per second. You observe that the
WRITELOG wait type is the highest aggregated wait type. Most writes must have no tolerance for data loss in the event of a server shutdown. The business has
identified certain write queries where data loss is tolerable in the event of a server shutdown.
Database Name:
Reporting
Notes:
You create a SQL Server-authenticated login named BIAppUser on the SQL Server instance to support users of the Reporting database. The BIAppUser login is
not a member of the sysadmin role.
You plan to configure performance-monitoring alerts for this instance by using SQL Agent Alerts.
https://www.gratisexam.com/
You create a login named BIAppUser. The login must be able to access the Reporting database.
How should you complete the Transact-SQL statements? 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.
Correct Answer:
https://www.gratisexam.com/
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Box 1: Reporting
The user is to be created in the Reporting database.
Users are created per database and are associated with logins. You must be connected to the database in where you want to create the user. Here is some sample
Transact-SQL that creates a user:
https://www.gratisexam.com/
References: https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/
QUESTION 13
You administer a Microsoft SQL Server 2012 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.
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.
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Incorrect Answers:
E: DBCC TRACEON 1222 is used to detect deadlocks, not to detect long running queries.
References:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/ http://msdn.microsoft.com/en-us/library/ms188396.aspx
QUESTION 14
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
https://www.gratisexam.com/
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.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
You can use the ALTER DATABASE (Transact-SQL) statement to manage the growth of a transaction log file
To control the maximum the size of a log file in KB, MB, GB, and TB units or to set growth to UNLIMITED, use the MAXSIZE option. However, there is no SET
LOGFILE subcommand.
References: https://technet.microsoft.com/en-us/library/ms365418(v=sql.110).aspx#ControlGrowth
QUESTION 15
You administer a Microsoft SQL Server 2012 server. The MSSQLSERVER service uses a domain account named CONTOSO\SQLService.
You need to ensure that Data File Autogrow operations use Instant File Initialization.
Correct Answer: CD
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
How To Enable Instant File Initialization
1. Open Local Security Policy and go to Local Policies --> User Rights Assignment.
2. Double click Perform Volume Maintenance Tasks and add your SQL Server database engine service account.
https://www.gratisexam.com/
3. 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
QUESTION 16
You administer a Microsoft SQL Server 2012 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.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To add a node to an existing SQL Server failover cluster, you must run SQL Server Setup on the node that is to be added to the SQL Server failover cluster
instance. Do not run Setup on the active node.
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.
References: http://technet.microsoft.com/en-us/library/ms191545.aspx
QUESTION 17
You administer a Microsoft SQL Server 2012 database.
The database contains a Product table created by using the following definition:
https://www.gratisexam.com/
You need to ensure that the minimum amount of disk space is used to store the data in the Product table.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Incorrect Answers:
A: Only a single index is used.
B: Unicode compression supports the fixed-length nchar(n) and nvarchar(n) data types.
C: Row-level compression does not affect VARCHAR och CHAR columns.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/page-compression-implementation
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/row-compression-implementation
QUESTION 18
You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN).
https://www.gratisexam.com/
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 need to ensure that your backup will continue if any invalid checksum is encountered.
A. STANDBY
B. Differential
C. FULL
D. CHECKSUM
E. BULK_LOGGED
F. CONTINUE_AFTER_ERROR
G. SIMPLE
H. DBO_ONLY
I. COPY_ONLY
J. SKIP
K. RESTART
L. Transaction log
M. NO_CHECKSUM
N. NORECOVERY
Correct Answer: F
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
The CONTINUE_AFTER_ERROR option, of the Transact-SQL BACKUP command, instructs BACKUP to continue despite encountering errors such as invalid
checksums or torn pages.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
QUESTION 19
You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN).
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.
On Wednesday at 10:00 hours, the development team requests you to refresh the database on a development server by using the most recent version.
You need to perform a full database backup that will be restored on the development server.
A. NORECOVERY
B. FULL
C. NO_CHECKSUM
D. CHECKSUM
E. Differential
F. BULK_LOGGED
G. STANDBY
H. RESTART
I. SKIP
https://www.gratisexam.com/
J. Transaction log
K. DBO ONLY
L. COPY_ONLY
M. SIMPLE
N. CONTINUE AFTER ERROR
Correct Answer: L
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
COPY_ONLY specifies that the backup is a copy-only backup, which does not affect the normal sequence of backups. A copy-only backup is created independently
of your regularly scheduled, conventional backups. A copy-only backup does not affect your overall backup and restore procedures for the database.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
QUESTION 20
You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN).
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.
https://www.gratisexam.com/
https://www.gratisexam.com/
A. NORECOVERY
B. FULL
C. NO_CHECKSUM
D. CHECKSUM
E. Differential
F. BULK_LOGGED
G. STANDBY
H. RESTART
I. SKIP
J. Transaction log
K. DBO ONLY
L. COPY_ONLY
M. SIMPLE
N. CONTINUE AFTER ERROR
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The full recovery model requires log backups. No work is lost due to a lost or damaged data file. Can recover to a specific point in time, assuming that your backups
are complete up to that point in time.
Incorrect Answers:
F: The bulk logged recovery model can recover to the end of any backup. Point-in-time recovery is not supported.
M: The simple recovery model can recover only to the end of a backup.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server
QUESTION 21
https://www.gratisexam.com/
You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN).
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.
A. NORECOVERY
B. FULL
C. NO_CHECKSUM
D. CHECKSUM
E. Differential
F. BULK_LOGGED
G. STANDBY
H. RESTART
I. SKIP
J. Transaction log
K. DBO ONLY
L. COPY_ONLY
M. SIMPLE
N. CONTINUE AFTER ERROR
Correct Answer: J
Section: Deploy and migrate applications
https://www.gratisexam.com/
Explanation
Explanation/Reference:
Explanation:
Minimally, you must have created at least one full backup before you can create any log backups. After that, the transaction log can be backed up at any time
unless the log is already being backed up.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/transaction-log-backups-sql-server
QUESTION 22
You administer a Microsoft SQL Server 2012 instance named SQL2012 that hosts an OLTP database of 1 terabyte in size.
The database is modified by users only from Monday through Friday from 09:00 hours to 17:00 hours. Users modify more than 30 percent of the data in the
database during the week.
The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch process will take a maximum of 8 hours to complete.
The batch process will update three tables that are 10 GB in size. The batch process will update these tables multiple times.
When the batch process completes, the Finance department runs a report to find out whether the batch process has completed correctly.
You need to ensure that if the Finance department disapproves the batch process, the batch operation can be rolled back in the minimum amount of time.
https://www.gratisexam.com/
E. Create a marked transaction in the transaction log at 08:59 hours. Perform a transaction log backup at 17:01 hours.
F. Create a marked transaction in the transaction log at 08:59 hours. Perform a transaction log backup at 08:59 hours.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-snapshots-sql-server
QUESTION 23
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
Explanation:
The full recovery model uses log backups to prevent data loss in the broadest range of failure scenarios, and backing and restoring the transaction log (log
backups) is required. The advantage of using log backups is that they let you restore a database to any point of time that is contained within a log backup (point-in-
time recovery). You can use a series of log backups to roll a database forward to any point in time that is contained in one of the log backups. Be aware that to
minimize your restore time, you can supplement each full backup with a series of differential backups of the same data.
References: https://technet.microsoft.com/en-us/library/ms190217(v=sql.105).aspx
https://www.gratisexam.com/
QUESTION 24
You administer a Microsoft SQL Server 2012 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.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
REORGANIZE specifies to reorganize the index leaf level. The REORGANIZE operation is always performed online. This means long-term blocking table locks are
not held and queries or updates to the underlying table can continue during the ALTER INDEX REORGANIZE transaction.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql
QUESTION 25
You administer a Microsoft SQL Server database named Sales. The database is 3 terabytes in size.
https://www.gratisexam.com/
You discover that all files except Sales_2.ndf are corrupt.
You need to recover the corrupted data in the minimum amount of time.
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
In a file restore, the goal is to restore one or more damaged files without restoring the whole database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/file-restores-simple-recovery-model
QUESTION 26
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
What should you do?
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
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.
Incorrect Answers:
A: sys.dm_db_index_usage_stats returns counts of different types of index operations and the time each type of operation was last performed in SQL Server.
B: sys.dm_db_missing_index_details returns detailed information about missing indexes, excluding spatial indexes.
D: sys.dm_db_missing_index_columns returns information about database table columns that are missing an index, excluding spatial indexes.
References: https://docs.microsoft.com/en-us/sql/relational-databases/performance/database-engine-tuning-advisor
QUESTION 27
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
Correct Answer: G
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The SQL Server Audit feature enables you to audit server-level and database-level groups of events and individual events.
References: http://technet.microsoft.com/en-us/library/cc280663(v=sql.105).aspx
QUESTION 28
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
SQL Server has alerts that get more important based on the severity of the alert. Anything of severity 16 or below tends to refer to the database and deals with
issues that are tied to syntax errors, violations of foreign keys, etc. While those errors are typically important, they don't refer to anything with regards to overall
health of the SQL Server. Alerts 17 through 25 do. Those are the ones your health checks are probably firing on.
https://www.gratisexam.com/
References: https://www.mssqltips.com/sqlservertip/3384/configuring-critical-sql-server-alerts/
QUESTION 29
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
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.
https://www.gratisexam.com/
F. An Extended Event session
G. A Server Audit Specification
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
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: http://msdn.microsoft.com/en-us/library/ms188246.aspx
QUESTION 30
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Writing to the Windows Security log requires the SQL Server service account to be added to the Generate security audits policy. By default, the Local System, Local
Service, and Network Service are part of this policy. This setting can be configured by using the security policy snap-in (secpol.msc). Additionally, the Audit object
access security policy must be enabled for both Success and Failure.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-engine
https://www.gratisexam.com/
QUESTION 31
You administer a Microsoft SQL Server 2012.
A process that normally runs in less than 10 seconds has been running for more than an hour.
You examine the application log and discover that the process is using session ID 60.
A. EXEC sp_who 60
B. SELECT * FROM sys.dm_exec_sessions WHERE sessionid = 60
C. EXEC sp_helpdb 60
D. DBCC INPUTBUFFER (60)
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
sp_who provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine. The information can be
filtered to return only those processes that are not idle, that belong to a specific user, or that belong to a specific session.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-who-transact-sql
QUESTION 32
You administer all the deployments of Microsoft SQL Server 2012 in your company. You have two servers in the same data center that hosts your production
database.
You need to ensure that the database remains available if a catastrophic server failure or a disk failure occurs.
You also need to maintain transactional consistency of the data across both servers.
https://www.gratisexam.com/
Which configuration should you use?
https://www.gratisexam.com/
A. Two servers configured in a Windows Failover Cluster in the same data center SQL Server configured as a clustered instance
B. SQL Server that includes an application database configured to perform transactional replication
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 Synchronous-Commit Availability Mode One server configured as an Active Secondary
E. 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
F. Two servers configured in different data centers
SQL Server Availability Group configured in Asynchronous-Commit Availability Mode
G. SQL Server that includes an application database configured to perform snapshot replication
H. Two servers configured on the same subnet
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
Correct Answer: H
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Always On availability groups supports two availability modes—asynchronous-commit mode and synchronous-commit mode
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-always-on-availability-
groups#SyncCommitAvMode
QUESTION 33
You create an availability group that has replicas named HA/Server01 and HA/Server02.
Currently, HA/Server01 is the primary replica.
https://www.gratisexam.com/
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.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To set up a readable secondary replica, you first create an availability group. Then you add replicas.
You can choose either Yes or Read-intent only options.
https://www.gratisexam.com/
References: http://msdn.microsoft.com/en-us/library/jj542414.aspx
QUESTION 34
You administer two Microsoft SQL Server 2012 servers. Each server resides in a different, untrusted domain.
https://www.gratisexam.com/
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To enable certificate authentication for database mirroring on a given server instance, the system administrator must configure each server instance to use
certificates on both outbound and inbound connections.
References: https://docs.microsoft.com/en-us/sql/database-engine/database-mirroring/use-certificates-for-a-database-mirroring-endpoint-transact-sql
QUESTION 35
You administer a Microsoft SQL Server 2012 instance that has several SQL Server Agent jobs configured.
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the required detail.
"The job failed. The Job was invoked by User CONTOSO\ServiceAccount. The last step to run was step 1 (Subplan_1)."
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are retained.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
References: http://msdn.microsoft.com/en-us/library/ms175488.aspx
QUESTION 36
You administer a Microsoft SQL Server 2012 instance.
https://www.gratisexam.com/
What should you do? Choose all that apply.
Explanation/Reference:
Explanation:
B: FileTables extend the capabilities of the FILESTREAM feature of SQL Server. Therefore you have to enable FILESTREAM for file I/O access at the Windows
level and on the instance of SQL Server before you can create and use FileTables.
D: Before you can create FileTables in a database, the database must have a FILESTREAM filegroup.
References: https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-the-prerequisites-for-filetable
QUESTION 37
You administer two instances of Microsoft SQL Server 2012. You deploy an application that uses a database on the named instance.
You need to ensure that the application can connect to the named instance.
https://www.gratisexam.com/
D. Start the SQL Server Browser Service.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The SQL Server Browser 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
Connecting to dedicated administrator connection (DAC) endpoints
References: https://technet.microsoft.com/en-us/library/ms181087(v=sql.105).aspx
QUESTION 38
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.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
If the service must interact with network services, access domain resources like file shares or if it uses linked server connections to other computers running SQL
Server, you might use a minimally-privileged domain account. Many server-to-server activities can be performed only with a domain user account.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions
QUESTION 39
https://www.gratisexam.com/
You administer a Microsoft SQL Server 2012 database.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following statements:
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the encryption files to their original location. However, you are unable to
access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The CREATE CERTIFICATE command adds a certificate to a database in SQL Server.
Creating a certificate from a file
https://www.gratisexam.com/
The following example creates a certificate in the database, loading the key pair from files.
Code
Copy
USE AdventureWorks2012;
CREATE CERTIFICATE Shipping11
FROM FILE = 'c:\Shipping\Certs\Shipping11.cer'
WITH PRIVATE KEY (FILE = 'c:\Shipping\Certs\Shipping11.pvk',
DECRYPTION BY PASSWORD = 'sldkflk34et6gs%53#v00');
GO
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql
QUESTION 40
You administer a SQL Server 2012 server that contains a database named SalesDB. SalesDb contains a schema named Customers that has a table named
Regions. A user named UserA is a member of a role named Sales.
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select permission on the Customers schema.
You need to ensure that the Sales role, including UserA, is disallowed to select from any of the tables in the Customers schema.
Correct Answer: F
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
Use SQL Data Warehouse or Parallel Data WarehouseGRANT and DENY statements to grant or deny a permission (such as UPDATE) on a securable (such as a
database, table, view, etc.) to a security principal (a login, a database user, or a database role).
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-azure-sql-data-warehouse-parallel-data-warehouse
QUESTION 41
You administer a SQL Server 2012 server that contains a database named SalesDB. SalesDb contains a schema named Customers that has a table named
Regions. A user named UserA is a member of a role named Sales.
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select permission on the Customers schema.
You need to ensure that UserA is disallowed to select from any of the tables in the Customers schema.
Correct Answer: G
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Use SQL Data Warehouse or Parallel Data WarehouseGRANT and DENY statements to grant or deny a permission (such as UPDATE) on a securable (such as a
database, table, view, etc.) to a security principal (a login, a database user, or a database role).
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-azure-sql-data-warehouse-parallel-data-warehouse
QUESTION 42
You administer a SQL 2012 server that contains a database named SalesDB. SalesDb contains a schema named Customers that has a table named Regions. A
https://www.gratisexam.com/
user named UserA is a member of a role named Sales.
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select permission on the Customers schema.
You need to remove the Select permission for UserA on the Regions table. You also need to ensure that UserA can still access all the tables in the Customers
schema, including the Regions table, through the Sales role permissions.
Correct Answer: E
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Use REVOKE to remove the grant or deny of a permission.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-azure-sql-data-warehouse-parallel-data-warehouse
QUESTION 43
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
AccountTransaction.AccountCode REORGANIZE
B. ALTER INDEX ALL ON AccountTransaction REBUILD
C. ALTER INDEX IDX_AccountTransaction_AccountCode ON
AccountTransaction.AccountCode REBUILD
D. CREATE INDEX IDXAccountTransactionAccountCode ON
AccountTransaction.AccountCode WITH DROP EXISTING
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the index, and as it goes it fixes physical ordering of pages and also
compacts pages to apply any previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to just stop where it is (it doesn’t have
a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-reorganize/
QUESTION 44
You administer a Windows 2008 server hosting an instance of Microsoft SQL Server 2012 Standard Edition. The server hosts a database named Orders.
Users report that a query that filters on OrderDate is taking an exceptionally long time. You discover that an index named IX_OrderDate on the CustomerOrder
table is heavily fragmenteD.
You need to improve the performance of the IX_OrderDate index. The index should remain online during the operation.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the index, and as it goes it fixes physical ordering of pages and also
https://www.gratisexam.com/
compacts pages to apply any previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to just stop where it is (it doesn’t have
a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-reorganize/
QUESTION 45
You administer a Windows Azure SQL Database database named Orders.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
BACKUP DATABASE …AS COPY OF [source_server_name.]source_database_name
Is used for copying a database to the same or a different SQL Database server.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-azure-sql-database
QUESTION 46
You administer a Microsoft SQL Server 2012 failover cluster.
You need to ensure that a failover occurs when the server diagnostics returns query_processing error.
A. SqlOumperDumpFlags
B. FailureConditionLevel
C. HealthCheckTimeout
D. SqlDumperDumpPath
Correct Answer: B
https://www.gratisexam.com/
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Use the FailureConditionLevel property to set the conditions for the Always On Failover Cluster Instance (FCI) to fail over or restart.
The failure conditions are set on an increasing scale. For levels 1-5, each level includes all the conditions from the previous levels in addition to its own conditions.
Note: The system stored procedure sp_server_diagnostics periodically collects component diagnostics on the SQL instance. The diagnostic information that is
collected is surfaced as a row for each of the following components and passed to the calling thread.
system
resource
query process
io_subsystem
events
The system, resource, and query process components are used for failure detection. The io_subsytem and events components are used for diagnostic purposes
only.
References: https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/configure-failureconditionlevel-property-settings
QUESTION 47
You are the administrator of a Microsoft SQL Server 2012 server.
Some applications consume significant resources. You need to manage the server workload by restricting resource-intensive applications.
A. Configure Resource Pools, Workload Groups, and Classifier Function, and then enable the Resource Governor
B. Set up Service Broker to ensure that application are not allowed to consume more than the specified amount of resource
C. Create a new rule for each application that sets the resource limit allowed
D. Create a new plan Guide with a Scope Type of sql and define the resource limits for each application
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
In the SQL Server Resource Governor, a resource pool represents a subset of the physical resources of an instance of the Database Engine. Resource Governor
https://www.gratisexam.com/
enables you to specify limits on the amount of CPU, physical IO, and memory that incoming application requests can use within the resource pool. Each resource
pool can contain one or more workload groups. When a session is started, the Resource Governor classifier assigns the session to a specific workload group, and
the session must run using the resources assigned to the workload group.
References: https://docs.microsoft.com/en-us/sql/relational-databases/resource-governor/resource-governor-resource-pool
QUESTION 48
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.
https://www.gratisexam.com/
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_AddInventory to all users. Add all users to the db_datareader role.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Members of the db_datareader fixed database role can run a SELECT statement against any table or view in the database.
References: https://technet.microsoft.com/en-us/library/ms188629(v=sql.90).aspx
QUESTION 49
You administer a SQL Server 2012 database instance.
You need to configure the SQL Server Database Engine service on a failover cluster.
https://www.gratisexam.com/
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
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/install/create-a-new-sql-server-failover-cluster-setup
QUESTION 50
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:
CORP\Employees - All company employees
CORP\HRAdmins - HR administrators only
HR Administrators are also company employees.
https://www.gratisexam.com/
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.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Members of the db_datareader fixed database role can run a SELECT statement against any table or view in the database.
References: https://technet.microsoft.com/en-us/library/ms188629(v=sql.90).aspx
QUESTION 51
You administer a Microsoft SQL Server 2012 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.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
https://www.gratisexam.com/
Explanation:
You would need to use either the SQL Server Management Studio or Transact-SQL.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
QUESTION 52
You administer a Microsoft SQL Server 2012 database named Orders.
A NULL value represents a domestic order. Ninety percent of the values in CountryCode are NULL.
Customers require a procedure that will return orders for all customers from a specified country.
You create a new procedure:
You need to alter the schema to optimize this query. Objects created must use a minimum amount of resources.
A. CREATE NONCLUSTERED INDEX IX_CountryCode ON Ordership (CountryCode) WHERE CountryCode IS NOT NULL
B. CREATE STATISTICS ST_CountryCode ON OrderShip (CountryCode) WHERE CountryCode IS NOT NULL
C. CREATE CLUSTERED INDEX IX_CountryCode ON OrderShip (CountryCode)
D. CREATE INDEX IX_CountryCode ON OrderShip (CustomerID) WHERE CountryCode IS NOT NULL
https://www.gratisexam.com/
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Here creating statistics is relevant. The CREATE STATISTICS command creates query optimization statistics on one or more columns of a table, an indexed view,
or an external table. For most queries, the query optimizer already generates the necessary statistics for a high-quality query plan; in a few cases, you need to
create additional statistics with CREATE STATISTICS or modify the query design to improve query performance.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-statistics-transact-sql
QUESTION 53
You administer a Microsoft SQL Server 2012 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.
A. NO_TRUNCATE
B. NORECOVERY
C. STANDBY
D. FORMAT
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
It is recommended that you take a tail-log backup in the following scenarios:
* If the database is online and you plan to perform a restore operation on the database, begin by backing up the tail of the log. To avoid an error for an online
database, you must use the … WITH NORECOVERY option of the BACKUP Transact-SQL statement.
Note: A tail-log backup captures any log records that have not yet been backed up (the tail of the log) to prevent 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.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/tail-log-backups-sql-server
https://www.gratisexam.com/
QUESTION 54
You administer a Microsoft SQL Server 2012 database. You want to make a full backup of the database to a file on disk.
A. STATS
B. COMPRESSION
C. CHECKSUM
D. IN IT
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
STATS is a monitoring option of the BACKUP command.
STATS [ =percentage ]
Displays a message each time another percentage completes, and is used to gauge progress. If percentage is omitted, SQL Server displays a message after each
10 percent is completed.
The STATS option reports the percentage complete as of the threshold for reporting the next interval. This is at approximately the specified percentage; for
example, with STATS=10, if the amount completed is 40 percent, the option might display 43 percent. For large backup sets, this is not a problem, because the
percentage complete moves very slowly between completed I/O calls.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
QUESTION 55
You are a database administrator for a Microsoft SQL Server 2012 database named AdventureWorks2012.
You create an Availability Group defined by the following schema. (Line numbers are included for reference only.)
https://www.gratisexam.com/
You need to implement an AlwaysOnAvailablity Group that will meet the following conditions:
Production transactions should be minimally affected. The secondary server should allow reporting queries to be performed. If the primary server goes offline, the
secondary server should not automatically take over.
A. AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433') PRIMARY_ROLE (
ALLOW_CONNECTIONS = READ_WRITE,
READ_ONLY_ROUTING_LIST = NONE)
B. AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
C. AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
D. AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
https://www.gratisexam.com/
ALLOW_CONNECTIONS = YES,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
As production transaction should be MINIMALLY affected we should use asynchronous-commit mode.
Incorrect Answers:
A, B: 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-always-on-availability-groups
QUESTION 56
You administer two Microsoft SQL Server 2012 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.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
https://www.gratisexam.com/
Explanation/Reference:
Explanation:
Confirm that distribution agent has read privileges, full control access is not required, to the folder in question.
References: http://stackoverflow.com/questions/14555262/cannot-bulk-load-operating-system-error-code-5-access-is-denied
QUESTION 57
You are a database administrator for a Microsoft SQL Server 2012 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.
A. Database Mirroring
B. Peer-to-Peer Replication
C. Log Shipping
D. Availability Groups
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Peer-to-peer replication provides a scale-out and high-availability solution by maintaining copies of data across multiple server instances, also referred to as nodes.
Built on the foundation of transactional replication, peer-to-peer replication propagates transactionally consistent changes in near real-time. This enables
applications that require scale-out of read operations to distribute the reads from clients across multiple nodes. Because data is maintained across the nodes in
near real-time, peer-to-peer replication provides data redundancy, which increases the availability of data.
References: https://docs.microsoft.com/en-us/sql/relational-databases/replication/transactional/peer-to-peer-transactional-replication
QUESTION 58
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
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
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The use of local disks for TempDB allows us to have more flexibility when configuring for optimal performance. It is a common performance recommendation to
create the TempDB database on the fastest storage available. With the capability to utilize local disk for TempDB placement we can easily utilize disks that are
larger, have a higher rotational speed or use SSD disks.
References: https://www.mssqltips.com/sqlservertip/2817/sql-server-2012-cluster-with-tempdb-on-local-disk/
QUESTION 59
You administer a Microsoft SQL Server 2012 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.
A. Partitioned tables
B. Online index rebuild
C. Change data capture
D. Change tracking
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Partitioning large tables or indexes can have manageability and performance benefits including:
https://www.gratisexam.com/
You can perform maintenance operations on one or more partitions more quickly. The operations are more efficient because they target only these data subsets,
instead of the whole table.
References: https://docs.microsoft.com/en-us/sql/relational-databases/partitions/partitioned-tables-and-indexes
QUESTION 60
You administer a Microsoft SQL Server 2012 environment. One of the SQL Server 2012 instances contains a database named Sales.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
Correct Answer: BD
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
A contained database is a database that is isolated from other databases and from the instance of SQL Server that hosts the database.
B: In the contained database user model, the login in the master database is not present. Instead, the authentication process occurs at the user database, and the
database user in the user database does not have an associated login in the master database.
SQL Database and SQL Data Warehouse support Azure Active Directory identities as contained database users.
D: The contained database feature is currently available only in a partially contained state. A partially contained database is a contained database that allows the
use of uncontained features.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/contained-databases
QUESTION 61
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
https://www.gratisexam.com/
You need to track all SELECT statements issued in the Contoso database only by users in a role named Sales.
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
Correct Answer: F
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To audit users in a role use a Database Audit Specification.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-audit-specification-transact-sql
QUESTION 62
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
A. An Alert
B. A Resource Pool
C. An Extended Event session
https://www.gratisexam.com/
D. A Server Audit Specification
E. A SQL Profiler Trace
F. A Database Audit Specification
G. A Policy
H. A Data Collector Set
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
SQL Server Extended Events has a highly scalable and highly configurable architecture that allows users to collect as much or as little information as is necessary
to troubleshoot or identify a performance problem.
Extended Events is a light weight performance monitoring system that uses very few performance resources.
A SQL Server Extended Events session is created in the SQL Server process hosting the Extended Events engine.
References: https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-events
QUESTION 63
You plan to install Microsoft SQL Server 2012 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.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Incorrect Answers:
A, D: Express edition has severe limitations.
https://www.gratisexam.com/
C: SQL Server 2012 Web edition is a low total-cost-of-ownership option for Web hosters and Web VAPs to provide scalability, affordability, and manageability
capabilities for small to large scale Web properties.
References: https://msdn.microsoft.com/en-us/library/ms144275(v=sql.110).aspx
QUESTION 64
You plan to install a Microsoft SQL Server 2012 instance.
The instance will support a database that has the following requirements:
Store Excel workbooks on the file system.
Access the workbooks through Transact-SQL.
Include the workbooks in database backups.
During installation, you need to ensure that the requirements will be met.
A. Excel Services
B. FILESTREAM
C. SQL Server Integration Services (SSIS)
D. OpenXML
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
FILESTREAM enables SQL Server-based applications to store unstructured data, such as documents and images, on the file system. Applications can leverage the
rich streaming APIs and performance of the file system and at the same time maintain transactional consistency between the unstructured data and corresponding
structured data.
References: https://docs.microsoft.com/en-us/sql/relational-databases/blob/filestream-sql-server
QUESTION 65
You administer a Microsoft SQL Server 2012 instance named SQL2012. You are in the process of migrating a database from a SQL Server 2008 instance named
SQL2008 to the SQL2012 instance.
You have upgraded a database from the SQL2008 instance by using the side-by-side migration technique.
https://www.gratisexam.com/
You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance.
A. Back up the master database on the SQL2008 instance. Restore the master database on the SQL2012 instance
B. Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package
C. Use sp_grantlogin
D. Use xp_logininfo.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
sp_grantlogin creates a SQL Server login.
Incorrect Answers:
D: xp_logininfo returns information about Windows users and Windows groups.
References: https://technet.microsoft.com/en-us/library/ms173449(v=sql.110).aspx
QUESTION 66
You administer a Microsoft SQL Server 2012 database instance. You create a new user named UserA.
You need to ensure that UserA is able to create SQL Server Agent jobs and execute SQL Server agent jobs owned by UserA
A. DatabaseMailUserRole
B. ServerGroupAdministratorGroup
C. SQLAgentUserRole
D. Securityadmin
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles. It has permissions on only operators, local jobs, and job schedules.
Members of SQLAgentUserRole have permissions on only local jobs and job schedules that they own. Members can create local jobs.
References: https://docs.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles
QUESTION 67
You administer a Microsoft SQL Server 2012 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.
A. a schedule
B. an alert
C. an operator
D. a proxy
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
A SQL Server Agent proxy defines the security context for a job step. A proxy provides SQL Server Agent with access to the security credentials for a Microsoft
Windows user. Each proxy can be associated with one or more subsystems. A job step that uses the proxy can access the specified subsystems by using the
security context of the Windows user. Before SQL Server Agent runs a job step that uses a proxy, SQL Server Agent impersonates the credentials defined in the
proxy, and then runs the job step by using that security context.
References: https://technet.microsoft.com/en-us/library/ms189064(v=sql.105).aspx
QUESTION 68
You have been hired as a Database Consultant by ABC.com to design a SQL Server 2012 database solution.
You are tasked with designing a scale-out and high-availability SQL Server 2012 Online Transaction Processing (OLTP) database solution that will maintain copies
of data across two server instances.
Your solution must provide scale-out of read operations by distributing the reads from clients across two SQL Server 2012 nodes. The data in both SQL Server
nodes needs to be indexed.
What should you include in your solution?
https://www.gratisexam.com/
A. You should include a primary database with scheduled log shipping to the secondary database configured.
B. You should include two servers configured in an Active-Passive SQL Server 2012 Cluster.
C. You should include a primary SQL Server 2012 database that uses transactional replication to replicate data to the secondary database.
D. You should include two servers in an Asynchronous-Commit Availability Mode Availability Group.
E. You should include two servers in a Synchronous-Commit Availability Mode Availability Group.
Correct Answer: C
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Peer-to-peer replication provides a scale-out and high-availability solution by maintaining copies of data across multiple server instances, also referred to as nodes.
Built on the foundation of transactional replication, peer-to-peer replication propagates transactionally consistent changes in near real-time. This enables
applications that require scale-out of read operations to distribute the reads from clients across multiple nodes. Because data is maintained across the nodes in
near real-time, peer-to-peer replication provides data redundancy, which increases the availability of data.
References: https://msdn.microsoft.com/en-us/library/ms151196(v=sql.110)
QUESTION 69
You use Microsoft SQL Server 2012 to develop a database application. You need to implement a computed column that references a lookup table by using an
INNER JOIN against another table.
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
A common way to define a computed column is by using a user-defined function (UDF) to encapsulate the calculation logic.
References: https://blogs.msdn.microsoft.com/sqlcat/2011/11/28/a-computed-column-defined-with-a-user-defined-function-might-impact-query-performance/
https://www.gratisexam.com/
QUESTION 70
You use a Microsoft SQL Server 2012 database that contains two tables named SalesOrderHeader and SalesOrderDetail. The indexes on the tables are as shown
in the exhibit.
(Click the Exhibit button.)
https://www.gratisexam.com/
You write the following Transact-SQL query:
You discover that the performance of the query is slow. Analysis of the query plan shows table scans where the estimated rows do not match the actual rows for
SalesOrderHeader by using an unexpected index on SalesOrderDetail.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
New statistics would be useful.
The UPDATE STATISTICS command updates query optimization statistics on a table or indexed view. By default, the query optimizer already updates statistics as
necessary to improve the query plan; in some cases you can improve query performance by using UPDATE STATISTICS or the stored procedure sp_updatestats
to update statistics more frequently than the default updates.
References: http://msdn.microsoft.com/en-us/library/ms187348.aspx
QUESTION 71
You are a database developer for an application hosted on a Microsoft SQL Server 2012 server. The database contains two tables that have the following
definitions:
https://www.gratisexam.com/
Global customers place orders from several countries. You need to view the country from which each customer has placed the most orders.
https://www.gratisexam.com/
CustomerID, ShippingCountry,COUNT(OrderAmount) DESC)
AS OrderAmount FROM Orders GROUP BY CustomerID, ShippingCountry)
AS o ON c.CustomerID = o.CustomerID ORDER BY OrderAmount DESC
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Use descending (DESC) ordering.
To order by the number of orders we use ORDER BY COUNT(OrderAmount).
Finally a WHERE close is needed: WHERE o.Rnk = 1
Incorrect Answers:
B: The ascending (ASC) sorting would produce the country from which each customer has placed the least orders.
C: We are interested in the number of the orders, not the amount of the orders. We should use ORDER BY COUNT(OrderAmount), not ORDER BY OrderAmount.
D: We are only interested in one single post, only the country from which each customer has placed the most orders. Need to use a WHERE statement (here
Where o.Rnk =1 ).
QUESTION 72
You use Microsoft SQL Server 2012 to develop a database application. You need to create an object that meets the following requirements:
Takes an input variable
Returns a table of values
Cannot be referenced within a view
A. Scalar-valued function
B. Inline function
C. User-defined data type
D. Stored procedure
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Stored procedures accept input parameters and return multiple values in the form of output parameters to the calling program. They cannot be used in views.
https://www.gratisexam.com/
References: https://docs.microsoft.com/en-us/sql/relational-databases/stored-procedures/stored-procedures-database-engine
QUESTION 73
You administer a SQL Server 2012 server that contains a database named SalesDb. SalesDb contains a schema named Customers that has a table named
Regions. A user named UserA is a member of a role named Sales. UserA is granted the Select permission on the Regions table. The Sales role is granted the
Select permission on the Customers schema.
Correct Answer: J
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Use REVOKE to remove the grant or deny of a permission.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-azure-sql-data-warehouse-parallel-data-warehouse
QUESTION 74
You develop a Microsoft SQL Server 2012 database that contains a heap named OrdersHistorical.
https://www.gratisexam.com/
INSERT INTO OrdersHistorical
SELECT * FROM CompletedOrders
You need to optimize transaction logging and locking for the statement.
A. HOLDLOCK
B. ROWLOCK
C. XLOCK
D. UPDLOCK
E. TABLOCK
Correct Answer: E
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
When importing data into a heap by using the INSERT INTO SELECT <columns> FROM statement, you can enable optimized logging and locking for the
statement by specifying the TABLOCK hint for the target table.
References: https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table
QUESTION 75
Your database contains a table named Purchases. The table includes a DATETIME column named PurchaseTime that stores the date and time each purchase is
made. There is a non- clustered index on the PurchaseTime column. The business team wants a report that displays the total number of purchases made on the
current day. You need to write a query that will return the correct results in the most efficient manner.
A. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = CONVERT(DATE, GETDATE())
B. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = GETDATE()
C. SELECT COUNT(*)
FROM Purchases
WHERE CONVERT(VARCHAR, PurchaseTime, 112) =
https://www.gratisexam.com/
CONVERT(VARCHAR, GETDATE(), 112)
D. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime >= CONVERT(DATE, GETDATE())
AND PurchaseTime <DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To compare a time with date we must use >= and > operators, and not the = operator.
Incorrect Answers:
A: The in WHERE clause there is an incorrect comparison between time and a date, as equality (=) is used.
References:
http://technet.microsoft.com/en-us/library/ms181034.aspx
QUESTION 76
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
You suspect that the current SQL Server indexes cause queries to execute slowly.
You need to identify which indexes must be created to reduce the query execution time.
Which three dynamic management views should you use? Each correct answer presents part of the solution.
A. sys.dm_db_index_physical_stats
B. sys.dm_db_missing_index_group_stats
C. sys.indexes
D. sys.dm_db_index_usage_stats
E. sys.dm_db_missing_index_groups
F. sys.dm_db_index_operational_stats
G. sys.dm_db_missing_index_details
H. sys.sysindexkeys
https://www.gratisexam.com/
Correct Answer: BEG
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Expalantion:
The missing indexes feature consists of the following components:
A set of dynamic management objects that can be queried to return information about missing indexes.
The MissingIndexes element in XML Showplans, which correlate indexes that the query optimizer considers missing with the queries for which they are missing.
References: https://technet.microsoft.com/en-us/library/ms345524(v=sql.105).aspx
QUESTION 77
HOTSPOT
You plan to migrate the database to Microsoft SQL Server on a Microsoft Azure virtual machine.
You need to attach the database files to the SQL Server instance on the virtual machine. The solution must ensure that you can run file snapshot backups.
How should you complete the statement? To answer, select the appropriate options in the answer area.
https://www.gratisexam.com/
Hot Area:
Correct Answer:
https://www.gratisexam.com/
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-sql-server-transact-sql
QUESTION 78
You have a database named DB1 that uses simple recovery mode.
Full backups of DB1 are taken daily and DB1 is checked for corruption before each backup.
You run the sys.columns catalog view and discover corrupt pages.
You need to recover the database. The solution must minimize data loss.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Expalantion:
A page restore is intended for repairing isolated damaged pages. Restoring and recovering a few individual pages might be faster than a file restore, reducing the
amount of data that is offline during a restore operation.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
QUESTION 79
https://www.gratisexam.com/
You have a database named DB1.
You run DBCC CHECKDB and receive an error message within a few seconds. No pages are listed in the error message.
You need to repair the database corruption as quickly as possible. The solution must minimize data loss.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
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.
Incorrect Answers:
A: The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best option for bringing a database to a physically consistent
state. If successful, the REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data lost than if a user were to restore the
database from the last known good backup.
B: REPAIR_FAST
Maintains syntax for backward compatibility only. No repair actions are performed.
References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql
QUESTION 80
You manage an on-premises Microsoft SQL server that has a database named DB1.
https://www.gratisexam.com/
An application named App1 retrieves customer information for DB1.
Users report that App1 takes an unacceptably long time to retrieve customer records.
You need to find queries that take longer than 400 ms to run.
https://www.gratisexam.com/
A.
B.
https://www.gratisexam.com/
C.
D.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Total_worker_time: Total amount of CPU time, reported in microseconds (but only accurate to milliseconds), that was consumed by executions of this plan since it
was compiled.
Incorrect Answers:
A: Qs.max_worker_time: Maximum CPU time, reported in microseconds (but only accurate to milliseconds), that this plan has ever consumed during a single
execution.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-query-stats-transact-sql
QUESTION 81
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
https://www.gratisexam.com/
You need to reduce the WRITE_LOG wait time.
A. Yes
B. No
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a performance bottleneck and can cause the transaction log
file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-waits/
QUESTION 82
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
A. Yes
B. No
https://www.gratisexam.com/
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a performance bottleneck and can cause the transaction log
file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-waits/
QUESTION 83
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a performance bottleneck and can cause the transaction log
file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk for getting better performance.
https://www.gratisexam.com/
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-waits/
QUESTION 84
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 are tuning the performance of a virtual machines that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1, 2:3:1, and 2:4:1 within the tempdb database.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you consistently see high waiting for PAGELATCH_IO, you can
benefit from a faster I/O subsystem for SQL Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages', which are accessed frequently and which you might identify as
the causes of your latch contention. For example, if you have a currency table with a data page containing 100 rows, of which 1 is updated per transaction and you
have a transaction rate of 200/sec, you could see page latch queues of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full
half-second delay for each update. In this case, splitting out the currency rows into different tables might prove more performant (if less normalized and logically
structured).
https://www.gratisexam.com/
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
QUESTION 85
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 are tuning the performance of a virtual machines that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1, 2:3:1, and 2:4:1 within the tempdb database.
A. Yes
B. No
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you consistently see high waiting for PAGELATCH_IO, you can
benefit from a faster I/O subsystem for SQL Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages', which are accessed frequently and which you might identify as
the causes of your latch contention. For example, if you have a currency table with a data page containing 100 rows, of which 1 is updated per transaction and you
have a transaction rate of 200/sec, you could see page latch queues of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full
half-second delay for each update. In this case, splitting out the currency rows into different tables might prove more performant (if less normalized and logically
https://www.gratisexam.com/
structured).
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
QUESTION 86
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 are migrating an on-premises Microsoft SQL Server instance to SQL Server on a Microsoft Azure virtual machine. The instance has 30 databased that
consume a total of 2 TB of disk space. The instance sustains more than 30,000 transactions per second.
You need to provision storage for the virtual machine. The storage must be able to support the same load as the on-premises deployment.
Solution: You create one storage account that has 30 containers. You create a VHD in each container.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Expalantion:
Each Storage Account handles up to 20.000 IOPS, and 500TB of data.
References: https://www.tech-coffee.net/understand-microsoft-azure-storage-for-virtual-machines/
QUESTION 87
You are the database administrator for your company. Your company has one main office and two branch offices. You plan to create three databases named DB1,
DB2, and DB3 that will be hosted on one Azure SQL Database server. You have the following requirements:
You need to configure transparent data encryption (TDE) for DB1. Which two actions should you perform? Each correct answer presents part of the solution.
https://www.gratisexam.com/
A. Run CREATE CERTIFICATE certl WITH Subject = TDE Cert1 on DB1.
B. Connect to DB1.
C. Run ALTER DATABASE DB1 SET ENCRYPTION ON;.
D. Connect to the master database.
E. Run CREATE MASTER KEY on the master database.
Correct Answer: BC
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
You should connect to DB1. To encrypt DB1, you connect directly to DB1. When you connect to DB1.
You use your dbmanager or administrative credentials.
You should run ALTER DATABASE DB1 SET ENCRYPTION ON.
You use the ALTER DATABASE DB1 SET ENCRYPTION ON statement to encrypt the database. This is the statement that turns on TDE for Azure SQL Database.
Incorrect Answers:
A: You should not run CREATE CERTIFICATE certl WITH Subject = TDE Cert' on DB1. You do not need to create a certificate to encrypt an Azure SQL database.
This would be a part of the solution when you encrypt an on-premises database. You should not connect to the master database. To encrypt DB1, you need to
connect directly to DB1. not to the master database.
E: You should not run CREATE MASTER KEY on the master database.
You would execute CREATE MASTER KEY when you have to encrypt an on-premises database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption
QUESTION 88
You manage an on-premises, multi-tier application that has the following configuration:
Two SQL Server 2012 databases named SQL1 and SQL2
Two application servers named AppServerl and AppServer2 that run IIS
You need to ensure that during an Azure update cycle or a hardware failure, the application remains available.
Which two deployment configurations should you implement? Each correct answer presents part of the solution.
https://www.gratisexam.com/
B. Deploy all servers in a single availability set.
C. Deploy SQL1 and AppServerl in a single availability set.
D. Deploy SQL2 and AppServer2 in a single availability set.
E. Deploy SQL1 and SQL2 in a single availability set.
Correct Answer: AE
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
You should deploy AppServerl and AppServer2 in a single availability set.
Note: Using availability sets allows you to build in redundancy for your Azure services. By grouping related virtual machines and services (tiers) into an availability
set (in this case, deploying both of your databases into an availability set), you ensure that if there is a planned or unplanned outage, your services will remain
available. At the most basic level, virtual machines in an availability set are put into a different fault domain and update domain. An update domain allows virtual
machines to have updates installed and then the virtual machines are rebooted together.
If you have two virtual machines in an availability set, each in its own update domain, a rebooting of one server does not bring down all of the servers in a given tier.
A fault domain operates in the same manner, so if there is a physical problem with a server, rack, network, or other service, both machines are separated, and
services will continue.
Incorrect Answers:
B: You should not deploy all servers in a single availability set. This will not provide the fault tolerance needed, as all machines would be rebooted (or suffer a
hardware failure) together.
C: SQL1 and AppServerl provide different services, so they should not be grouped together.
D: You should not deploy SQL2 and AppServer2 in a single availability set. SQL2 and AppServer2 provide different services, so they should not be grouped
together.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
QUESTION 89
You are the database administrator in your company. You plan to create 10 identical environments that use SQL Server 2016 as a database engine. Each
environment has the following custom requirements:
Three user databases must be preinstalled.
The tempdb database must contain eight data files that are 1024 MB each.
Trace flag 2371 must be turned at the instance level.
https://www.gratisexam.com/
The solution must meet the following requirements:
A. Provision 10 Azure virtual machines that each contain SQL Server 2016, installed by using the default settings.
B. Create an installation configuration file and perform unattended installations of SQL Server 2016.
C. Create a virtual machine template by using a prepared instance of SQL Server 2016.
D. Create a virtual machine template by using a complete instance of SQL Server 2016.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
You should create a virtual machine template by using a complete instance of SQL Server 2016. You use the sysprep tool to prepare a complete instance of SQL
Server 2016. By using a complete instance, SQL Server, the network, and the users are all created, and the system cannot be reconfigured during the installation
process.
Incorrect Answers:
A: You should not provision 10 Azure virtual machines that each contain SQL Server 2016, installed by using the default settings. A virtual machine created by using
the Azure library provides you with a standard installation, and the requirements call for a custom installation. The instance will need some specific parameters for
your custom installation. Therefore, you would have to customize each Azure virtual machine.
B: You should not create an installation configuration file and perform unattended installations of SQL Server 2016. This could be a valid option, but you would need
to prepare 10 installations, and this would require a lot of effort. There are also some other administrative actions that must be performed that could also increase
the amount of effort required, such as user database configuration.
C: You should not create a virtual machine template by using a prepared instance of SQL Server 2016. A virtual machine template that contains a prepared
instance of SQL Server could be modified during the installation process. For example, some features could be added or removed during the installation process.
The prepared instance contains a preconfigured version of SQL Server without network and user configurations.
References: https://support.neverfail.com/hc/en-us/articles/115015350287-Deploy-Microsoft-SQL-Server-2016-Virtual-Machine-Template
QUESTION 90
You have a server named Serverl that is hosted in an Azure virtual machine. Server1 contains the following:
https://www.gratisexam.com/
One instance of SQL Server 2016 Enterprise
10 databases
500 stored procedures
Database1 contains 100 queries that are executed dynamically from web applications.
Changes to Database1 must not affect other databases that are hosted on Server1
Changes to Database1 must not affect the performance of queries that are stored in other databases.
The solution must minimize administrative effort.
You need to remove the data from the procedure cache as quickly as possible.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
You should run ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE CACHE in the context of Database! This statement lets you change the
settings of a database without affecting other databases that are installed on the instance of SQL Server 2016.
Incorrect Answers:
A: You should not run DBCC FREEPROCCACHE. DBCC FREEPROCCACHE would clean the entire plan cache and would affect all databases. It is possible to
remove a single plan from the cache by using the plan_handle argument to DBCC FREEPROCCACHE, but you would have to identify all plans that are related to
Databasel, which requires a lot more administrative effort.
C: You should not run DBCC DROPCLEANBUFFERS. DBCC DROPCLEANBUFFERS will remove the clean pages from the buffer cache. Columnstore pages are
https://www.gratisexam.com/
removed from the columnstore cache.
D: You should not write a script that will iterate through each stored procedure definition and add WITH RECOMPILE to the definition. Each time the procedure is
called, it will be recompiled, and this might degrade the server's performance.
This approach would require additional administrative effort to produce the script. In addition, some calls are made from the web application and the script would not
have any control over these calls. In earlier versions of SQL Server, prior to the availability of the ALTER DATABASE statement, this option would have been the
way to avoid affecting other databases.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql
QUESTION 91
You are designing a Windows Azure SQL Database for an order fulfillment system. You create a table named Sales.Orders with the following script.
Fulfilled
Shipped
Ordered
Received
You need to design the database to ensure that that you can retrieve the following information:
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.
https://www.gratisexam.com/
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.
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Expalantion:
This stores only the minimal information required.
Incorrect Answers:
B: We do not need to keep the complete history.
QUESTION 92
You are using dynamic management views to monitor an SQL Server server named SQL1.
You need to ensure that Dba1 can access dynamic management views for SQL1.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
To query a dynamic management view or function requires SELECT permission on object and VIEW SERVER STATE or VIEW DATABASE STATE permission.
https://www.gratisexam.com/
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/system-dynamic-management-views
QUESTION 93
You are the administrator for a SQL Server 2016 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 without leasing or purchasing additional physical locations.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
Correct Answer: D
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Expalantion:
Microsoft SQL Server Backup to Microsoft Azure Tool enables backup to Azure Blob Storage and encrypts and compresses SQL Server backups stored locally or
in the cloud.
References: https://www.microsoft.com/en-us/download/details.aspx?id=40740
QUESTION 94
You have a SQL Server 2016 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.
https://www.gratisexam.com/
A. The bulk-logged recovery model
B. The full recovery model
C. A new partitioned table
D. A new log file
E. A new file group
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
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.
References: https://technet.microsoft.com/en-us/library/ms190692(v=sql.105).aspx
QUESTION 95
You have an on-premises server that runs Windows Server 2012 R2. The server has a Microsoft SQL Server 2016 instance that has one user database. The
database is 2 TB.
Your company has a Win32 application installed on 1,000 computers. The application connects to the database by using a network name of server1.contoso.local.
You need to migrate the database to SQL Server 2016 on a Microsoft Azure virtual machine that runs Windows Server 2016. The solution must minimize outages
to the application.
Correct Answer: B
Section: Deploy and migrate applications
Explanation
https://www.gratisexam.com/
Explanation/Reference:
Explanation:
SQL Server high availability and disaster recovery (HADR) technologies that are supported in Azure include:
Always On Availability Groups
Always On Failover Cluster Instances
Log Shipping
SQL Server Backup and Restore with Azure Blob Storage Service
Incorrect Answers:
A: We need a high availability solution.
C, D: Database Mirroring is deprecated in SQL Server 2016.
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-high-availability-dr
QUESTION 96
DRAG DROP
You plan to migrate on-premises Microsoft SQL Server to SQL Server on a Microsoft Azure virtual machine.
You need to ensure that the Azure virtual machine can handle the workload.
https://www.gratisexam.com/
Which tool should you use for each environment? To answer, drag the appropriate tools to the correct options. Each tool may be used once. More than once, or not
at all.
https://www.gratisexam.com/
Correct Answer:
Explanation/Reference:
QUESTION 97
You plan to migrate a Microsoft SQL server instance between physical servers.
https://www.gratisexam.com/
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
The Service Master Key is the root of the SQL Server encryption hierarchy. It does not handle alerts and jobs.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
QUESTION 98
You plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
A. Yes
B. No
Correct Answer: A
Section: Deploy and migrate applications
Explanation
https://www.gratisexam.com/
Explanation/Reference:
Explanation:
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
QUESTION 99
You deploy a new Microsoft Azure SQL database instance to support a variety of mobile application and public websites. You configure geo-replication with regions
in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
A. Yes
B. No
Correct Answer: B
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
SQL Database dynamic data masking does not encrypt the data.
Transparent Data Encryption (TDE) would provide a solution.
Note: SQL Database dynamic data masking limits sensitive data exposure by masking it to non-privileged users.
Dynamic data masking helps prevent unauthorized access to sensitive data by enabling customers to designate how much of the sensitive data to reveal with
minimal impact on the application layer.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azure-key-vault/
QUESTION 100
You deploy a new Microsoft Azure SQL database instance to support a variety of mobile application and public websites. You configure geo-replication with regions
in Brazil and Japan.
https://www.gratisexam.com/
You need to implement real-time encryption of the database and all backups.
Solution: You enable Transparent Data Encryption (TDE) on the primary instance.
A. Yes
B. No
Correct Answer: A
Section: Deploy and migrate applications
Explanation
Explanation/Reference:
Explanation:
Azure SQL Database and Data Warehouse offer encryption-at-rest by providing Transparent Data Encryption (TDE) for all data written to disk, including databases,
log files and backups. This protects data in case of unauthorized access to hardware. TDE provides a TDE Protector that is used to encrypt the Database
Encryption Key (DEK), which in turn is used to encrypt the data. With the TDE and Bring Your Own Key (BYOK) offering currently in preview, customers can take
control of the TDE Protector in Azure Key Vault.
Taking advantage of TDE with BYOK for databases that are geo-replicated to maintain high availability requires to configure and test the scenario carefully.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azure-key-vault/
https://www.gratisexam.com/
https://www.gratisexam.com/
70-765.exam.90q
Number: 70-765
Passing Score: 800
Time Limit: 120 min
https://www.gratisexam.com/
70-765
Sections
1. Implementing SQL in Azure
2. Manage databases and instances
3. Manage Storage
https://www.gratisexam.com/
Exam A
QUESTION 1
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 deployed several GS-series virtual machines (VMs) in Microsoft Azure. You plan to deploy Microsoft SQL Server in a development environment.
https://www.gratisexam.com/
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
QUESTION 2
You plan to migrate a database to Microsoft Azure SQL Database. The database requires 500 gigabytes (GB) of storage.
https://www.gratisexam.com/
The database must support 50 concurrent logins. You must minimize the cost associated with hosting the database.
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
For a database size of 500 GB the Premium tier is required.
Both P1 and P2 are adequate. P1 is preferred as it is cheaper.
Note:
Incorrect Answers:
A, C: Maximum database size is 250 GB for the Standard pricing tier.
https://www.gratisexam.com/
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-service-tiers
QUESTION 3
You plan to deploy 20 Microsoft Azure SQL Database instances to an elastic pool in Azure to support a batch processing application.
Two of the databases in the pool reach their peak workload threshold at the same time every day. This leads to inconsistent performance for batch completion.
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
In SQL Database, the relative measure of a database's ability to handle resource demands is expressed in Database Transaction Units (DTUs) for single databases
and elastic DTUs (eDTUs) for databases in an elastic pool.
A pool is given a set number of eDTUs, for a set price. Within the pool, individual databases are given the flexibility to auto-scale within set parameters. Under
heavy load, a database can consume more eDTUs to meet demand.
QUESTION 4
A company has an on-premises Microsoft SQL Server 2014 environment. The company has a main office in Seattle, and remote offices in Amsterdam and Tokyo.
You plan to deploy a Microsoft Azure SQL Database instance to support a new application. You expect to have 100 users from each office.
In the past, users at remote sites reported issues when they used applications hosted at the Seattle office.
You need to optimize performance for users running reports while minimizing costs.
https://www.gratisexam.com/
A. Implement an elastic pool.
B. Implement a standard database with readable secondaries in Asia and Europe, and then migrate the application.
C. Implement replication from an on-premises SQL Server database to the Azure SQL Database instance.
D. Deploy a database from the Premium service tier.
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-transact-sql#add-secondary-database
QUESTION 5
You create an availability group that has replicas named HA/Server01 and HA/Server02.
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.
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
To set up a readable secondary replica, you first create an availability group. Then you add replicas.
You can choose either Yes or Read-intent only options.
https://www.gratisexam.com/
References: http://msdn.microsoft.com/en-us/library/jj542414.aspx
QUESTION 6
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
D. Backup the database from the local server and restore it to Windows Azure SQL Database
Correct Answer: C
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
You would need to use either the SQL Server Management Studio or Transact-SQL.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
QUESTION 7
You administer a Microsoft SQL Server 2012 environment. One of the SQL Server 2012 instances contains a database named Sales.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
Correct Answer: BD
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
A contained database is a database that is isolated from other databases and from the instance of SQL Server that hosts the database.
B: In the contained database user model, the login in the master database is not present. Instead, the authentication process occurs at the user database, and the
database user in the user database does not have an associated login in the master database.
SQL Database and SQL Data Warehouse support Azure Active Directory identities as contained database users.
https://www.gratisexam.com/
D: The contained database feature is currently available only in a partially contained state. A partially contained database is a contained database that allows the
use of uncontained features.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/contained-databases
QUESTION 8
You plan to install Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Incorrect Answers:
A, D: Express edition has severe limitations.
C: SQL Server 2012 Web edition is a low total-cost-of-ownership option for Web hosters and Web VAPs to provide scalability, affordability, and manageability
capabilities for small to large scale Web properties.
References: https://msdn.microsoft.com/en-us/library/ms144275(v=sql.110).aspx
QUESTION 9
https://www.gratisexam.com/
You use Microsoft Azure Resource Manager to deploy two new Microsoft SQL Server instances in an Azure virtual machine (VM). VM has 28 gigabytes (GB) of
memory. The instances are named Instance1 and Instance2, respectively.
You need to configure each SQL Server instance to correctly allocate memory.
https://www.gratisexam.com/
B. A. On Instance1, run the following Transact-SQL code:
https://www.gratisexam.com/
D. On Instance1, run the following Transact-SQL code:
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Incorrect Answers:
A, C: The awefeature will be removed in newer version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that
currently use this feature as soon as possible.
B: Automatic soft-NUMA is disabled by default, and this setting is not relevant here.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/server-configuration-options-sql-server
QUESTION 10
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
https://www.gratisexam.com/
A. Use the Randomized encryption type
B. Modify the connection string for applications.
C. Auto-generate a column master key.
D. Use the Azure Key Vault.
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
There are two high-level categories of key stores to consider - Local Key Stores, and Centralized Key Stores.
Centralized Key Stores - serve applications on multiple computers. An example of a centralized key store is Azure Key Vault.
Local Key Stores
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-and-store-column-master-keys-always-encrypted
QUESTION 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 have deployed several GS-series virtual machines (VMs) in Microsoft Azure. You plan to deploy Microsoft SQL Server in an Always On Availability Group. You
expect to have less than 1 million IO transaction per month.
You need to recommend a storage solution for the SQL Servers. The solution must minimize costs.
Correct Answer: A
https://www.gratisexam.com/
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
P10 has 500 IOPS per disk, which provides for more than 1 million IOPS per month.
References: https://azure.microsoft.com/en-us/pricing/details/managed-disks/
QUESTION 12
You create a new Microsoft Azure subscription.
You need to create a group of Azure SQL databases that share resources.
A. New-AzureRmAvailabilitySet
B. New-AzureRmLoadBalancer
C. New-AzureRmSqlDatabaseSecondary
D. New-AzureRmSqlElasticPool
E. New-AzureRmVM
F. New-AzureRmSqlServer
G. New-AzureRmSqlDatabaseCopy
H. New-AzureRmSqlServerCommunicationLink
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
SQL Database elastic pools are a simple, cost-effective solution for managing and scaling multiple databases that have varying and unpredictable usage demands.
The databases in an elastic pool are on a single Azure SQL Database server and share a set number of resources (elastic Database Transaction Units (eDTUs)) at
a set price. Elastic pools in Azure SQL Database enable SaaS developers to optimize the price performance for a group of databases within a prescribed budget
while delivering performance elasticity for each database.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
https://www.gratisexam.com/
QUESTION 13
You have a Microsoft Azure SQL database in the US West region.
A. New-AzureRmAvailabilitySet
B. New-AzureRmLoadBalancer
C. New-AzureRmSqlDatabaseSecondary
D. New-AzureRmSqlElasticPool
E. New-AzureRmVM
F. New-AzureRmSqlServer
G. New-AzureRmSqlDatabaseCopy
H. New-AzureRmSqlServerCommunicationLink
Correct Answer: G
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
The New-AzureRmSqlDatabaseCopy command creates a copy of a SQL Database that uses the snapshot at the current time.
References: https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/new-azurermsqldatabasecopy?view=azurermps-5.1.1
QUESTION 14
You plan to deploy Microsoft SQL Server on a Microsoft Azure Virtual machine. The virtual machine will have a 30-TB database and will have 10 1-TB VHDs for the
database.
https://www.gratisexam.com/
D. a striped volume
E. a RAID-5 volume
Correct Answer: D
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
Data that is written to a striped volume is interleaved to all disks at the same time instead of sequentially. Therefore, disk performance is the fastest on a RAID 0
volume as compared to any other type of disk configuration.
Reference: https://support.microsoft.com/en-us/help/323433/how-to-establish-a-striped-volume-raid-0-in-windows-server-2003
QUESTION 15
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 are migrating an on-premises Microsoft SQL Server instance to SQL Server on a Microsoft Azure virtual machine. The instance has 30 databased that
consume a total of 2 TB of disk space. The instance sustains more than 30,000 transactions per second.
You need to provision storage for the virtual machine. The storage must be able to support the same load as the on-premises deployment.
Solution: You create one storage account that has 30 containers. You create a VHD in each container.
A. Yes
B. No
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
Each Storage Account handles up to 20.000 IOPS, and 500TB of data.
References: https://www.tech-coffee.net/understand-microsoft-azure-storage-for-virtual-machines/
https://www.gratisexam.com/
QUESTION 16
You plan to deploy an on-premises SQL Server 2014 database to Azure SQL Database. You have the following requirements:
You need to choose the correct service tier and performance level.
A. Standard S3
B. Premium P4
C. Standard SO
D. Basic
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
You should choose Premium P4. The Premium tier is the highest Azure SQL Database tier offered. This tier is used for databases and application that require the
highest level of performance and recovery. The P4 level supports a maximum of 500 DTUs, a maximum database size of 500 GB, and a point-in-time-restore to
any point in the last 35 days.
Incorrect Answers:
A: You should not choose Standard S3. The Standard tier with a performance level of S3 only supports a maximum database size of 250 GB. a maximum of 100
DTUs, and a point-in-timerestore of 35 days.
C: You should not choose Standard SO. The Standard tier with a performance level of SO only supports a maximum database size of 250 GB. a maximum of 10
DTUs, and a point-in-timerestore of 35 days.
D: You should not choose Basic. The Basic service tier only supports a maximum database size of 2 GB, a maximum of 5 DTUs, and a point-in-time-restore of 7
days.
References: https://azure.microsoft.com/en-us/pricing/details/sql-database/
QUESTION 17
You manage an on-premises, multi-tier application that has the following configuration:
https://www.gratisexam.com/
Two SQL Server 2012 databases named SQL1 and SQL2
Two application servers named AppServerl and AppServer2 that run IIS
You need to ensure that during an Azure update cycle or a hardware failure, the application remains available.
Which two deployment configurations should you implement? Each correct answer presents part of the solution.
Correct Answer: AE
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
You should deploy AppServerl and AppServer2 in a single availability set.
Note: Using availability sets allows you to build in redundancy for your Azure services. By grouping related virtual machines and services (tiers) into an availability
set (in this case, deploying both of your databases into an availability set), you ensure that if there is a planned or unplanned outage, your services will remain
available. At the most basic level, virtual machines in an availability set are put into a different fault domain and update domain. An update domain allows virtual
machines to have updates installed and then the virtual machines are rebooted together.
If you have two virtual machines in an availability set, each in its own update domain, a rebooting of one server does not bring down all of the servers in a given tier.
A fault domain operates in the same manner, so if there is a physical problem with a server, rack, network, or other service, both machines are separated, and
services will continue.
Incorrect Answers:
B: You should not deploy all servers in a single availability set. This will not provide the fault tolerance needed, as all machines would be rebooted (or suffer a
hardware failure) together.
C: SQL1 and AppServerl provide different services, so they should not be grouped together.
D: You should not deploy SQL2 and AppServer2 in a single availability set. SQL2 and AppServer2 provide different services, so they should not be grouped
https://www.gratisexam.com/
together.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
QUESTION 18
You have an on-premises server that runs Windows Server 2012 R2. The server has a Microsoft SQL Server 2016 instance that has one user database. The
database is 2 TB.
Your company has a Win32 application installed on 1,000 computers. The application connects to the database by using a network name of server1.contoso.local.
You need to migrate the database to SQL Server 2016 on a Microsoft Azure virtual machine that runs Windows Server 2016. The solution must minimize outages
to the application.
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
SQL Server high availability and disaster recovery (HADR) technologies that are supported in Azure include:
Always On Availability Groups
Always On Failover Cluster Instances
Log Shipping
SQL Server Backup and Restore with Azure Blob Storage Service
Incorrect Answers:
A: We need a high availability solution.
C, D: Database Mirroring is deprecated in SQL Server 2016.
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-high-availability-dr
QUESTION 19
You plan to deploy an AlwaysOn failover cluster in Microsoft Azure. The cluster has a Service Level Agreement (SLA) that requires an uptime of at least 99.95
percent.
https://www.gratisexam.com/
You need to ensure that the cluster meets the SLA.
Which cmdlet should you run before you deploy the virtual machine?
https://www.gratisexam.com/
A. New-AzureRmAvailabilitySet
B. New-AzureRmLoadBalancer
C. New-AzureRmSqlDatabaseSecondary
D. New-AzureRmSqlElasticPool
E. New-AzureRmVM
F. New-AzureRmSqlServer
G. New-AzureRmSqlDatabaseCopy
H. New-AzureRmSqlServerCommunicationLink
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
On Azure virtual machines, a SQL Server Availability Group requires a load balancer. The load balancer holds the IP address for the Availability Group listener. The
New-AzureRmLoadBalancer cmdlet creates an Azure load balancer.
Incorrect Answers:
E: The New-AzureRmVM cmdlet creates a virtual machine in Azure.
Reference: https://docs.microsoft.com/en-us/powershell/module/azurerm.network/new-azurermloadbalancer?view=azurermps-6.2.0
QUESTION 20
You have an on-premises Microsoft SQL server that has a database named DB1. DB1 contains several tables that are stretched to Microsoft Azure.
https://www.gratisexam.com/
You need to verify whether data migration still runs successfully.
A. Sys_sp_testlinkedserver
B. Sys_sp_rda_test_connection
C. Sys_sp_rda_reauthorized_db
D. Sp_set_firewall_rule
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
The Sys_sp_rda_test_connection cmdlet tests the connection from SQL Server to the remote Azure server and reports problems that may prevent data migration.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-rda-test-connection-transact-sql?view=sql-server-2017
QUESTION 21
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine
whether the solution meets stated goals.
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure IaaS VM.
Solution: You use a D-Series VM and store the tempdb database on drive D.
https://www.gratisexam.com/
Does this meet the goal?
A. Yes
B. No
Correct Answer: A
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
For D-series, Dv2-series, and G-series VMs, the temporary drive on these VMs is SSD-based. If your workload makes heavy use of TempDB (such as temporary
objects or complex joins), storing TempDB on the D drive could result in higher TempDB throughput and lower TempDB latency.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance
QUESTION 22
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine
whether the solution meets stated goals.
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure IaaS VM.
Solution: You use an A8 compute-intensive instance and store the tempdb database in Standard storage.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
For D-series, Dv2-series, and G-series VMs, the temporary drive on these VMs is SSD-based. If your workload makes heavy use of TempDB (such as temporary
objects or complex joins), storing TempDB on the D drive could result in higher TempDB throughput and lower TempDB latency.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance
QUESTION 23
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine
whether the solution meets stated goals.
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure IaaS VM.
Solution: You use a GS-Series VM and store the tempdb database on attached Premium storage.
A. Yes
https://www.gratisexam.com/
B. No
Correct Answer: B
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
For VMs that support Premium Storage (DS-series, DSv2-series, and GS-series), we recommend storing TempDB on a disk that supports Premium Storage with
read caching enabled. There is one exception to this recommendation; if your TempDB usage is write-intensive, you can achieve higher performance by storing
TempDB on the local D drive, which is also SSD-based on these machine sizes.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance
QUESTION 24
You plan to deploy Microsoft SQL Server on a Microsoft Azure virtual machine. The virtual machine will have two databases. Each database will reside on a
separate VHD and will be between 600 and 800 GB.
Each database will have the I/O requirements shown in the following table.
You are evaluating whether to use the P30 storage disk type.
What is the minimum number of disks required for each database when using P30 storage disk type? (Select two.)
A. DB1: 0
B. DB1: 1
C. DB1: 2
D. DB1: 3
E. DB1: 4
F. DB2: 0
G. DB2: 1
H. DB2: 2
https://www.gratisexam.com/
I. DB2: 3
J. DB2: 4
Correct Answer: CG
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
P30 stats: Disk size is 1024 GB (1 TB), IOPS per disk is 5000.
Recommendation: Use a minimum of 2 P30 disks (1 for log files and 1 for data files and TempDB; or stripe two or more disks and store all files in a single volume).
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#scalability-and-performance-targets
QUESTION 25
You plan to migrate on-premises Microsoft SQL Server databases to SQL Server on a Microsoft Azure virtual machine.
A full back up of the databases is 3 TB. The corporate network has a 1.5 MB/sec Internet connection.
You need to move the backups to Azure to ensure that you can restore the databases to the Azure virtual machine as quickly as possible.
Correct Answer: E
Section: Implementing SQL in Azure
Explanation
Explanation/Reference:
Explanation:
Azure Import/Export service is used to securely import large amounts of data to Azure Blob storage and Azure Files by shipping disk drives to an Azure datacenter.
This service can also be used to transfer data from Azure Blob storage to disk drives and ship to your on-premises sites. Data from one or more disk drives can be
imported either to Azure Blob storage or Azure Files.
https://www.gratisexam.com/
References: https://docs.microsoft.com/en-us/azure/storage/common/storage-import-export-service
QUESTION 26
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Always Encrypted supports multiple key stores for storing Always Encrypted column master keys. A column master key can be a certificate stored in Windows
Certificate Store.
References: https://msdn.microsoft.com/en-us/library/mt723359.aspx
QUESTION 27
Note: This question is a 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 on-premises and Microsoft Azure SQL Database instances for a company. Your environment must support the Microsoft SQL Server 2012 ODBS
driver.
A. transport-level encryption
https://www.gratisexam.com/
B. cell-level encryption
C. Transparent Data Encryption
D. Always Encrypted
E. Encrypting File System
F. BitLocker
G. dynamic data masking
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
To encrypt columns you can configure Always Encrypted.
SQL Server Management Studio (SSMS) provides a wizard that helps you easily configure Always Encrypted by setting up the column master key, column
encryption key, and encrypted columns for you.
Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the encryption keys to SQL Server or Azure SQL Database. An
Always Encrypted enabled driver, such as the ODBC Driver 13.1 for SQL Server, achieves this by transparently encrypting and decrypting sensitive data in the client
application.
Note: The ODBC driver automatically determines which query parameters correspond to sensitive database columns (protected using Always Encrypted), and
encrypts the values of those parameters before passing the data to SQL Server or Azure SQL Database. Similarly, the driver transparently decrypts data retrieved
from encrypted database columns in query results.
References:
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-always-encrypted-azure-key-vault#encrypt-columns-configure-always-encrypted
https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx
QUESTION 28
Note: This question is a 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.
Data encryption should be allowed to be implemented by the client applications that access the data. Encryption keys should not be made available to the database
engine.
https://www.gratisexam.com/
What should you implement?
A. transport-level encryption
B. cell-level encryption
C. Transparent Data Encryption
D. Always Encrypted
E. Encrypting File System
F. BitLocker
G. dynamic data masking
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Using encryption during transit with Azure File Shares
Azure File Storage supports HTTPS when using the REST API, but is more commonly used as an SMB file share attached to a VM.
HTTPS is a transport-level security protocol.
Incorrect Answers:
C: TDE encrypts the storage of an entire database by using a symmetric key called the database encryption key. In SQL Database the database encryption key is
protected by a built-in server certificate.
References: https://docs.microsoft.com/en-us/azure/storage/storage-security-guide#encryption-in-transit
QUESTION 29
Note: This questions 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 deploy Microsoft SQL Server to a virtual machine in Azure. You distribute the database files and filegroups across multiple Azure storage disks.
You must be able to manage the databases as individual entities by using SQL Server Management Studio. All data in the databases must be stored encrypted.
Backups must be encrypted by using the same key as the live copy of the database.
https://www.gratisexam.com/
A. transport-level encryption
B. cell-level encryption
C. Transparent Data Encryption
D. Always Encrypted
E. Encrypting File System
F. BitLocker
G. dynamic data masking
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Transparent data encryption (TDE) encrypts your databases, associated backups, and transaction log files at rest without requiring changes to your applications.
TDE encrypts the storage of an entire database by using a symmetric key called the database encryption key. In SQL Database the database encryption key is
protected by a built-in server certificate. The built-in server certificate is unique for each SQL Database server.
References: https://msdn.microsoft.com/en-us/library/dn948096.aspx
QUESTION 30
You are deploying a Microsoft SQL Server database that will support a mixed OLTP and OLAP workload. The target virtual machine has four CPUs.
You need to ensure that reports do not use all available system resources.
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number
https://www.gratisexam.com/
of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism (MAXDOP) option to limit the
number of processors to use in parallel plan execution.
Incorrect Answers:
A: The Auto Close property exposes server behavior for databases not accessed by a user. This feature 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.
References: https://msdn.microsoft.com/en-us/library/ms189094.aspx
QUESTION 31
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 stated goals. Some questions 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 mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You create a snapshot of the database. You configure all report queries to use the database snapshot.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Use a Resource Governor instead.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
QUESTION 32
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
https://www.gratisexam.com/
meet stated goals. Some questions 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 mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to limit the amount of memory, CPU, and IOPS used for the pool of all queries that the Reporting_user login can
run concurrently.
A. Yes
B. No
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
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.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
QUESTION 33
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 stated goals. Some questions 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 mission-critical application that stores data in a Microsoft SQL Server instance. The application runs several financial reports. The reports use a SQL
Server-authenticated login named Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to complete. The queries consume the majority of CPU and memory
https://www.gratisexam.com/
resources on the database server. As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to set the MAXDOP parameter to 0 for all queries against the database.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
SQL Server will consider parallel execution plans for queries, index data definition language (DDL) operations, and static and keyset-driven cursor population.
You can override the max degree of parallelism value in queries by specifying the MAXDOP query hint in the query statement.
References: https://technet.microsoft.com/en-us/library/ms181007(v=sql.105).aspx
QUESTION 34
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
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.
https://www.gratisexam.com/
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.
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
Incorrect Answers:
E: DBCC TRACEON 1222 is used to detect deadlocks, not to detect long running queries.
References:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/ http://msdn.microsoft.com/en-us/library/ms188396.aspx
QUESTION 35
You administer a Microsoft SQL Server database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
You can use the ALTER DATABASE (Transact-SQL) statement to manage the growth of a transaction log file
To control the maximum the size of a log file in KB, MB, GB, and TB units or to set growth to UNLIMITED, use the MAXSIZE option. However, there is no SET
LOGFILE subcommand.
References: https://technet.microsoft.com/en-us/library/ms365418(v=sql.110).aspx#ControlGrowth
QUESTION 36
https://www.gratisexam.com/
You administer a Microsoft SQL Server 2012 Enterprise Edition server that uses 64 cores.
You discover performance issues when large amounts of data are written to tables under heavy system load.
A. Processor affinity
B. Lightweight pooling
C. Max worker threads
D. I/O affinity
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The affinity Input-Output (I/O) mask Server Configuration Option.
To carry out multitasking, Microsoft Windows 2000 and Windows Server 2003 sometimes move process threads among different processors. Although efficient
from an operating system point of view, this activity can reduce Microsoft SQL Server performance under heavy system loads, as each processor cache is
repeatedly reloaded with data. Assigning processors to specific threads can improve performance under these conditions by eliminating processor reloads; such an
association between a thread and a processor is called processor affinity.
References:
http://msdn.microsoft.com/en-us/library/ms189629.aspx
QUESTION 37
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
https://www.gratisexam.com/
F. An Extended Event session
G. A Server Audit Specification
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
SQL Server has alerts that get more important based on the severity of the alert. Anything of severity 16 or below tends to refer to the database and deals with
issues that are tied to syntax errors, violations of foreign keys, etc. While those errors are typically important, they don't refer to anything with regards to overall
health of the SQL Server. Alerts 17 through 25 do. Those are the ones your health checks are probably firing on.
https://www.gratisexam.com/
References: https://www.mssqltips.com/sqlservertip/3384/configuring-critical-sql-server-alerts/
QUESTION 38
You administer a Microsoft SQL Server 2012 database.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following statements:
https://www.gratisexam.com/
WITH PRIVATE KEY (FILE = 'D:\TDE_Certificate.key',
ENCRYPTION BY PASSWORD = 'MyPassword1!');
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_256
ENCRYPTION BY SERVER CERTIFICATE TDE_Certificate;
ALTER DATABASE Orders SET ENCRYPTION ON;
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the encryption files to their original location. However, you are unable to
access the database.
Which Transact-SQL statement should you use before attempting the restore?
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The CREATE CERTIFICATE command adds a certificate to a database in SQL Server.
Creating a certificate from a file
The following example creates a certificate in the database, loading the key pair from files.
Code
https://www.gratisexam.com/
Copy
USE AdventureWorks2012;
CREATE CERTIFICATE Shipping11
FROM FILE = 'c:\Shipping\Certs\Shipping11.cer'
WITH PRIVATE KEY (FILE = 'c:\Shipping\Certs\Shipping11.pvk',
DECRYPTION BY PASSWORD = 'sldkflk34et6gs%53#v00');
GO
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql
QUESTION 39
You administer a Microsoft SQL Server 2012 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.
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The use of local disks for TempDB allows us to have more flexibility when configuring for optimal performance. It is a common performance recommendation to
create the TempDB database on the fastest storage available. With the capability to utilize local disk for TempDB placement we can easily utilize disks that are
larger, have a higher rotational speed or use SSD disks.
References: https://www.mssqltips.com/sqlservertip/2817/sql-server-2012-cluster-with-tempdb-on-local-disk/
QUESTION 40
You are the database administrator for your company. Your company has one main office and two branch offices. You plan to create three databases named DB1,
DB2, and DB3 that will be hosted on one Azure SQL Database server. You have the following requirements:
https://www.gratisexam.com/
The branch offices must not be able to access DB1.
Which two actions should you perform? Each correct answer presents part of the solution.
Correct Answer: BC
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
You should connect to DB1. To encrypt DB1, you connect directly to DB1. When you connect to DB1.
You use your dbmanager or administrative credentials.
You should run ALTER DATABASE DB1 SET ENCRYPTION ON.
You use the ALTER DATABASE DB1 SET ENCRYPTION ON statement to encrypt the database. This is the statement that turns on TDE for Azure SQL Database.
Incorrect Answers:
A: You should not run CREATE CERTIFICATE certl WITH Subject = TDE Cert' on DB1. You do not need to create a certificate to encrypt an Azure SQL database.
This would be a part of the solution when you encrypt an on-premises database. You should not connect to the master database. To encrypt DB1, you need to
connect directly to DB1. not to the master database.
E: You should not run CREATE MASTER KEY on the master database.
You would execute CREATE MASTER KEY when you have to encrypt an on-premises database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption
QUESTION 41
You have a server named Serverl that is hosted in an Azure virtual machine. Server1 contains the following:
https://www.gratisexam.com/
Database1 contains 100 queries that are executed dynamically from web applications.
Changes to Database1 must not affect other databases that are hosted on Server1
Changes to Database1 must not affect the performance of queries that are stored in other databases.
The solution must minimize administrative effort.
You need to remove the data from the procedure cache as quickly as possible.
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
You should run ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE CACHE in the context of Database! This statement lets you change the
settings of a database without affecting other databases that are installed on the instance of SQL Server 2016.
Incorrect Answers:
A: You should not run DBCC FREEPROCCACHE. DBCC FREEPROCCACHE would clean the entire plan cache and would affect all databases. It is possible to
remove a single plan from the cache by using the plan_handle argument to DBCC FREEPROCCACHE, but you would have to identify all plans that are related to
Databasel, which requires a lot more administrative effort.
C: You should not run DBCC DROPCLEANBUFFERS. DBCC DROPCLEANBUFFERS will remove the clean pages from the buffer cache. Columnstore pages are
removed from the columnstore cache.
D: You should not write a script that will iterate through each stored procedure definition and add WITH RECOMPILE to the definition. Each time the procedure is
called, it will be recompiled, and this might degrade the server's performance.
This approach would require additional administrative effort to produce the script. In addition, some calls are made from the web application and the script would not
have any control over these calls. In earlier versions of SQL Server, prior to the availability of the ALTER DATABASE statement, this option would have been the
https://www.gratisexam.com/
way to avoid affecting other databases.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql
QUESTION 42
You have a server named server1-contoso.database.windows.net that has a Microsoft Azure SQL database.
You need to create a group of Azure SQL databases that share the resources on
server1-contoso.database.windows.net.
Which cmdlet should you run before you create the database?
A. New-AzureRmAvailabilitySet
B. New-AzureRmLoadBalancer
C. New-AzureRmSqlDatabaseSecondary
D. New-AzureRmSqlElasticPool
E. New-AzureRmVM
F. New-AzureRmSqlServer
G. New-AzureRmSqlDatabaseCopy
H. New-AzureRmSqlServerCommunicationLink
Correct Answer: D
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The New-AzureRmSqlElasticPool cmdlet creates an elastic database pool for an Azure SQL Database.
SQL Database elastic pools are a simple, cost-effective solution for managing and scaling multiple databases that have varying and unpredictable usage demands.
The databases in an elastic pool are on a single Azure SQL Database server and share a set number of resources at a set price. Elastic pools in Azure SQL
Database enable SaaS developers to optimize the price performance for a group of databases within a prescribed budget while delivering performance elasticity for
each database.
Reference: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
QUESTION 43
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 stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
https://www.gratisexam.com/
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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The Service Master Key is the root of the SQL Server encryption hierarchy. It does not handle alerts and jobs.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
QUESTION 44
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 stated goals. Some questions 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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
https://www.gratisexam.com/
Does the solution meet the goal?
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The master database does not handle alerts and jobs. It records all the system-level information for a SQL Server system. This includes instance-wide metadata
such as logon accounts, endpoints, linked servers, and system configuration settings.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
QUESTION 45
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 stated goals. Some questions 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 plan to migrate a Microsoft SQL Server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
https://www.gratisexam.com/
Explanation
Explanation/Reference:
Explanation:
The model database does not handle alerts and jobs. It is used as the template for all databases created on an instance of SQL Server.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
QUESTION 46
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 stated goals. Some questions 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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
A. Yes
B. No
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker
and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-database?view=sql-server-2017
https://www.gratisexam.com/
QUESTION 47
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 stated goals. Some questions 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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application and public websites. You configure geo-replication with regions
in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
SQL Database dynamic data masking does not encrypt the data.
Transparent Data Encryption (TDE) would provide a solution.
Note: SQL Database dynamic data masking limits sensitive data exposure by masking it to non-privileged users.
Dynamic data masking helps prevent unauthorized access to sensitive data by enabling customers to designate how much of the sensitive data to reveal with
minimal impact on the application layer.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azure-key-vault/
QUESTION 48
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 stated goals. Some questions 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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application and public websites. You configure geo-replication with regions
https://www.gratisexam.com/
in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
Solution: You enable Transparent Data Encryption (TDE) on the primary instance.
A. Yes
B. No
Correct Answer: A
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Azure SQL Database and Data Warehouse offer encryption-at-rest by providing Transparent Data Encryption (TDE) for all data written to disk, including databases,
log files and backups. This protects data in case of unauthorized access to hardware. TDE provides a TDE Protector that is used to encrypt the Database
Encryption Key (DEK), which in turn is used to encrypt the data. With the TDE and Bring Your Own Key (BYOK) offering currently in preview, customers can take
control of the TDE Protector in Azure Key Vault.
Taking advantage of TDE with BYOK for databases that are geo-replicated to maintain high availability requires to configure and test the scenario carefully.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azure-key-vault/
QUESTION 49
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 stated goals. Some questions 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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application and public websites. You configure geo-replication with regions
in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
Solution: You use the always Encrypted wizard to encrypt all possible for the tables in the primary instance.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Always Encrypted does not support geo replication.
Transparent Data Encryption (TDE) would provide a solution.
Note: Use the Always Encrypted Wizard to help protect sensitive data stored in a SQL Server database. Always Encrypted allows clients to encrypt sensitive data
inside client applications and never reveal the encryption keys to SQL Server.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azure-key-vault/
http://blog.pragmaticworks.com/sql-server-2016-data-masking-and-always-encrypted
QUESTION 50
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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for more than five minutes.
Solution: You run the Get-Counter cmdlet and specify the –counter '\physicaldisk:disk Transfers/sec' parameter.
A. Yes
B. No
Correct Answer: A
Section: Manage databases and instances
Explanation
https://www.gratisexam.com/
Explanation/Reference:
QUESTION 51
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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for more than five minutes.
Solution: You run the Get-Counter cmdlet and specify the –counter '\physicaldisk:disk write/sec' parameter.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
QUESTION 52
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 stated goals. Some questions 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.
https://www.gratisexam.com/
You have Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for more than five minutes.
Solution: You run the Add-AzureRmMetricAlertRule cmdlet and specify the –MetricName ‘Network Out’ parameter.
A. Yes
B. No
Correct Answer: B
Section: Manage databases and instances
Explanation
Explanation/Reference:
QUESTION 53
HOTSPOT
You have a Microsoft SQL server that manages all of your databases.
You must create a database named MarketingData. The database will initially consume 400 megabytes (MB) of storage and will grow by one percent per year.
The database file must be stored on the Marketing share of the Lon-SVR1 server. The file must not automatically increase in size. Log files must be stored on the L
drive of the SQL Server machine in a folder named Logs.
How should you complete the Transact-SQL statement? To answer, select the appropriate Transact-SQL segments in the answer area.
Hot Area:
https://www.gratisexam.com/
Correct Answer:
https://www.gratisexam.com/
Explanation
Explanation/Reference:
Explanation:
Box 1: \\LON-SRV1\Marketing\Marketingdata.mdf
The database file must be stored on the Marketing share of the Lon-SVR1 server.
Box 2: 500 MB
Initial size is 400 MB, with an annual 1% increase in size.
Box 3: Filegrowth=0
The file must not automatically increase in size.
Box 4: L:\Logs\Marketing\Marketingdata.ldf
Log files must be stored on the L drive of the SQL Server machine in a folder named Logs.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=sql-server-2017
QUESTION 54
You are configuring a table to use the Always Encrypted feature. The table will have the columns configured as shown in the following table.
All the columns will be encrypted by using the AEAD_AES_256_CBC_HMAC_SHA_256 algorithm. Values will be stored in the most secure way possible.
Which two columns should use randomized encryption? Each correct answer presents a complete solution.
https://www.gratisexam.com/
A. Address
B. Gender
C. LastName
D. Tax Id
Correct Answer: AB
Section: Manage databases and instances
Explanation
Explanation/Reference:
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.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-2017
QUESTION 55
A company plans to use a Microsoft Azure SQL Database instance to manage sensitive data.
The solution must allow data to be decrypted while in use but encrypted while at rest.
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
Transparent data encryption (TDE) encrypts your databases, associated backups, and transaction log files at rest without requiring changes to your applications.
References: https://msdn.microsoft.com/en-us/library/dn948096.aspx
https://www.gratisexam.com/
QUESTION 56
A Microsoft SQL Server instance has a database named Employees. The database contains information about employees including their salary.
You must create a custom system message as an alert when an error is raised.
A. @with_log
B. @lang
C. @severity
D. @replace
Correct Answer: C
Section: Manage databases and instances
Explanation
Explanation/Reference:
Explanation:
The following example adds a custom message to sys.messages.
USE master;
GO
EXEC sp_addmessage 50001, 16,
N'Percentage expects a value between 20 and 100.
Please reexecute with a more appropriate value.';
GO
Syntax:
sp_addmessage [ @msgnum= ] msg_id , [ @severity= ] severity , [ @msgtext= ] 'msg'
[ , [ @lang= ] 'language' ]
[ , [ @with_log= ] { 'TRUE' | 'FALSE' } ]
[ , [ @replace= ] 'replace' ]
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addmessage-transact-sql?view=sql-server-2017
QUESTION 57
A company runs Microsoft SQL Server 2017 in an on-premises environment. The databases are memory-optimized.
https://www.gratisexam.com/
An integrity check of a database has failed.
You need to ensure that the data is healthy and passes an integrity check.
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
To verify the integrity of the on-disk checkpoint files, perform a backup of the MEMORY_OPTIMIZED_DATA filegroup.
Incorrect Answers:
A: DBCC CHECKTABLE will fail for memory-optimized tables.
D: DBCC CLEANTABLE reclaims space after a variable-length column is dropped.
References: https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/transact-sql-constructs-not-supported-by-in-memory-oltp?view=sql-server-
2017
QUESTION 58
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 stated goals. Some questions 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 ensure that queries use statistical data and do not initialize values for local variables.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
QUERY_OPTIMIZER_HOTFIXES = { ON | OFF | PRIMARY } enables or disables query optimization hotfixes regardless of the compatibility level of the database.
This is equivalent to Trace Flag 4199.
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
QUESTION 59
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 stated goals. Some questions 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 ensure that queries use statistical data and do not initialize values for local variables.
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
LEGACY_CARDINALITY_ESTIMATION = { ON | OFF | PRIMARY }
Enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 and earlier version independent of the compatibility level of the
database. This is equivalent to Trace Flag 9481.
https://www.gratisexam.com/
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
QUESTION 60
DRAG DROP
Background
You manage a Microsoft SQL Server environment that includes the following databases: DB1, DB2, Reporting.
The environment also includes SQL Reporting Services (SSRS) and SQL Server Analysis Services (SSAS). All SSRS and SSAS servers use named instances.
You configure a firewall rule for SSAS.
Databases
Database Name:
DB1
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are inserted into DB1 or updated each second. Inserts are made by
many different external applications that your company's developers do not control. You observe that transaction log write latency is a bottleneck in performance.
Because of the transient nature of all the data in this database, the business can tolerate some data loss in the event of a server shutdown.
Database Name:
DB2
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are updated or inserted per second. You observe that the
WRITELOG wait type is the highest aggregated wait type. Most writes must have no tolerance for data loss in the event of a server shutdown. The business has
identified certain write queries where data loss is tolerable in the event of a server shutdown.
Database Name:
Reporting
Notes:
You create a SQL Server-authenticated login named BIAppUser on the SQL Server instance to support users of the Reporting database. The BIAppUser login is
not a member of the sysadmin role.
You plan to configure performance-monitoring alerts for this instance by using SQL Agent Alerts.
You create a login named BIAppUser. The login must be able to access the Reporting database.
https://www.gratisexam.com/
How should you complete the Transact-SQL statements? 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.
Correct Answer:
https://www.gratisexam.com/
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
Box 1: Reporting
The user is to be created in the Reporting database.
Users are created per database and are associated with logins. You must be connected to the database in where you want to create the user. Here is some sample
Transact-SQL that creates a user:
https://www.gratisexam.com/
CREATE USER readonlyuser FROM LOGIN readonlylogin;
References: https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/
QUESTION 61
You administer a Microsoft SQL Server 2012 instance named SQL2012 that hosts an OLTP database of 1 terabyte in size.
The database is modified by users only from Monday through Friday from 09:00 hours to 17:00 hours. Users modify more than 30 percent of the data in the
database during the week.
The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch process will take a maximum of 8 hours to complete.
The batch process will update three tables that are 10 GB in size. The batch process will update these tables multiple times.
When the batch process completes, the Finance department runs a report to find out whether the batch process has completed correctly.
You need to ensure that if the Finance department disapproves the batch process, the batch operation can be rolled back in the minimum amount of time.
https://www.gratisexam.com/
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-snapshots-sql-server
QUESTION 62
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
Explanation:
The full recovery model uses log backups to prevent data loss in the broadest range of failure scenarios, and backing and restoring the transaction log (log
backups) is required. The advantage of using log backups is that they let you restore a database to any point of time that is contained within a log backup (point-in-
time recovery). You can use a series of log backups to roll a database forward to any point in time that is contained in one of the log backups. Be aware that to
minimize your restore time, you can supplement each full backup with a series of differential backups of the same data.
References: https://technet.microsoft.com/en-us/library/ms190217(v=sql.105).aspx
QUESTION 63
https://www.gratisexam.com/
You administer a Microsoft SQL Server 2012 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.
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
REORGANIZE specifies to reorganize the index leaf level. The REORGANIZE operation is always performed online. This means long-term blocking table locks are
not held and queries or updates to the underlying table can continue during the ALTER INDEX REORGANIZE transaction.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql
QUESTION 64
You administer a Microsoft SQL Server database named Sales. The database is 3 terabytes in size.
https://www.gratisexam.com/
You discover that all files except Sales_2.ndf are corrupt.
You need to recover the corrupted data in the minimum amount of time.
Correct Answer: A
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
In a file restore, the goal is to restore one or more damaged files without restoring the whole database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/file-restores-simple-recovery-model
https://www.gratisexam.com/
QUESTION 65
You administer a Microsoft SQL Server 2012 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.
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
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.
Incorrect Answers:
A: sys.dm_db_index_usage_stats returns counts of different types of index operations and the time each type of operation was last performed in SQL Server.
B: sys.dm_db_missing_index_details returns detailed information about missing indexes, excluding spatial indexes.
D: sys.dm_db_missing_index_columns returns information about database table columns that are missing an index, excluding spatial indexes.
References: https://docs.microsoft.com/en-us/sql/relational-databases/performance/database-engine-tuning-advisor
QUESTION 66
You administer a Microsoft SQL Server 2012 instance that has several SQL Server Agent jobs configured.
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the required detail.
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are retained.
https://www.gratisexam.com/
A. Configure output files.
B. Expand agent logging to include information from all events.
C. Disable the Limit size of job history log feature.
D. Configure event forwarding.
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
References: http://msdn.microsoft.com/en-us/library/ms175488.aspx
QUESTION 67
You administer a Microsoft SQL Server 2012 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.
Correct Answer: A
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the index, and as it goes it fixes physical ordering of pages and also
compacts pages to apply any previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to just stop where it is (it doesn’t have
a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-reorganize/
QUESTION 68
https://www.gratisexam.com/
You administer a Windows 2008 server hosting an instance of Microsoft SQL Server 2012 Standard Edition. The server hosts a database named Orders.
Users report that a query that filters on OrderDate is taking an exceptionally long time. You discover that an index named IX_OrderDate on the CustomerOrder
table is heavily fragmented.
You need to improve the performance of the IX_OrderDate index. The index should remain online during the operation.
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the index, and as it goes it fixes physical ordering of pages and also
compacts pages to apply any previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to just stop where it is (it doesn’t have
a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-reorganize/
QUESTION 69
You administer a Windows Azure SQL Database database named Orders.
Correct Answer: C
Section: Manage Storage
https://www.gratisexam.com/
Explanation
Explanation/Reference:
Explanation:
BACKUP DATABASE …AS COPY OF [source_server_name.]source_database_name
Is used for copying a database to the same or a different SQL Database server.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-azure-sql-database
QUESTION 70
You administer a Microsoft SQL Server 2012 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.
https://www.gratisexam.com/
A. NO_TRUNCATE
B. NORECOVERY
C. STANDBY
D. FORMAT
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
It is recommended that you take a tail-log backup in the following scenarios:
If the database is online and you plan to perform a restore operation on the database, begin by backing up the tail of the log. To avoid an error for an online
database, you must use the … WITH NORECOVERY option of the BACKUP Transact-SQL statement.
Note: A tail-log backup captures any log records that have not yet been backed up (the tail of the log) to prevent work loss and to keep the log chain intact. Before
https://www.gratisexam.com/
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.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/tail-log-backups-sql-server
QUESTION 71
You administer a Microsoft SQL Server 2012 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.
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
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
SQL Server Extended Events has a highly scalable and highly configurable architecture that allows users to collect as much or as little information as is necessary
to troubleshoot or identify a performance problem.
Extended Events is a light weight performance monitoring system that uses very few performance resources.
A SQL Server Extended Events session is created in the SQL Server process hosting the Extended Events engine.
References: https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-events
QUESTION 72
You use a Microsoft SQL Server 2012 database that contains two tables named SalesOrderHeader and SalesOrderDetail. The indexes on the tables are as shown
in the exhibit.
(Click the Exhibit button.)
https://www.gratisexam.com/
You write the following Transact-SQL query:
https://www.gratisexam.com/
You discover that the performance of the query is slow. Analysis of the query plan shows table scans where the estimated rows do not match the actual rows for
SalesOrderHeader by using an unexpected index on SalesOrderDetail.
Correct Answer: D
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
New statistics would be useful.
The UPDATE STATISTICS command updates query optimization statistics on a table or indexed view. By default, the query optimizer already updates statistics as
necessary to improve the query plan; in some cases you can improve query performance by using UPDATE STATISTICS or the stored procedure sp_updatestats
to update statistics more frequently than the default updates.
References: http://msdn.microsoft.com/en-us/library/ms187348.aspx
QUESTION 73
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
https://www.gratisexam.com/
You suspect that the current SQL Server indexes cause queries to execute slowly.
You need to identify which indexes must be created to reduce the query execution time.
Which three dynamic management views should you use? Each correct answer presents part of the solution.
A. sys.dm_db_index_physical_stats
B. sys.dm_db_missing_index_group_stats
C. sys.indexes
D. sys.dm_db_index_usage_stats
E. sys.dm_db_missing_index_groups
F. sys.dm_db_index_operational_stats
G. sys.dm_db_missing_index_details
H. sys.sysindexkeys
Explanation/Reference:
Explanation:
The missing indexes feature consists of the following components:
A set of dynamic management objects that can be queried to return information about missing indexes.
The MissingIndexes element in XML Showplans, which correlate indexes that the query optimizer considers missing with the queries for which they are missing.
https://www.gratisexam.com/
References: https://technet.microsoft.com/en-us/library/ms345524(v=sql.105).aspx
QUESTION 74
You manage a Microsoft SQL Server instance named SQL1 that has 32 gigabytes (GB) of total memory. The instance supports an app named App1 that only uses
a single thread. App1 frequently queries the database using the same index. The operating system and App1 combined require 8 GB of memory to function.
You need to ensure that the SQL Server does not limit the performance of App1.
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
The index creates memory option controls the maximum amount of memory initially allocated for sort operations when creating indexes. The default value for this
option is 0 (self-configuring). If more memory is later needed for index creation and the memory is available, the server will use it; thereby, exceeding the setting of
this option. If additional memory is not available, the index creation will continue using the memory already allocated.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-index-create-memory-server-configuration-option
QUESTION 75
You have a database named DB1 that uses simple recovery mode.
Full backups of DB1 are taken daily and DB1 is checked for corruption before each backup.
You run the sys.columns catalog view and discover corrupt pages.
You need to recover the database. The solution must minimize data loss.
https://www.gratisexam.com/
A. Run RESTORE DATABASE WITH RECOVERY.
B. Run RESTORE DATABASE WITH PAGE.
C. Run DBCC CHECKDB and specify the REPAIR_ALLOW_DATA_LOSS parameter.
D. Run DBCC CHECKDB and specify the REPAIT_REBUILD parameter.
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
A page restore is intended for repairing isolated damaged pages. Restoring and recovering a few individual pages might be faster than a file restore, reducing the
amount of data that is offline during a restore operation.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
QUESTION 76
You have a database named DB1.
You run DBCC CHECKDB and receive an error message within a few seconds. No pages are listed in the error message.
You need to repair the database corruption as quickly as possible. The solution must minimize data loss.
Correct Answer: D
Section: Manage Storage
Explanation
https://www.gratisexam.com/
Explanation/Reference:
Explanation:
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.
Incorrect Answers:
A: The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best option for bringing a database to a physically consistent
state. If successful, the REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data lost than if a user were to restore the
database from the last known good backup.
B: REPAIR_FAST
Maintains syntax for backward compatibility only. No repair actions are performed.
References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql
QUESTION 77
User report that a query takes a long time to execute. The query has the following wait statistics.
A. processor
B. disk
C. blocking
D. network
https://www.gratisexam.com/
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
PAGEIOLATCH Wait time and WaitCount are both high.
One of the most common wait type seen on SQL Server and definitely one that causes a lot of troubles to less experienced database administrators is the
PAGEIOLATCH_SH wait type. This is one of those wait types that clearly indicates one thing, but which background and potential causes are much subtler and may
lead to erroneous conclusions and worse, incorrect solutions
References: https://www.sqlshack.com/handling-excessive-sql-server-pageiolatch_sh-wait-types/
QUESTION 78
You have an on-premises Microsoft SQL server that has a database named DB1. DB1 contains several tables that are stretched to Microsoft Azure.
From SQL Server Management Studio (SSMS), a junior database administrator accidentally deletes several rows from the Azure SQL database and breaks the
connection to Azure.
Which two stored procedures should you use? Each correct answer presents part of the solution.
A. sys.sp_rda_reconcile_batch
B. sys.sp_rda_reconcile_indexes
C. sys.sp_rda_reauthorize_db
D. sys.sp_rda_reconcile_columns
E. sys.sp_rda_set_rpo_duration
Correct Answer: CD
Section: Manage Storage
Explanation
Explanation/Reference:
sys.sp_rda_reauthorize_db restores the authenticated connection between a local database enabled for Stretch and the remote database.
https://www.gratisexam.com/
If you have accidentally deleted columns from the remote table, run sp_rda_reconcile_columns to add columns to the remote table that exist in the Stretch-enabled
SQL Server table but not in the remote table.
Incorrect Answers:
A: sys.sp_rda_reconcile_batch reconciles the batch ID stored in the Stretch-enabled SQL Server table with the batch ID stored in the remote Azure table.
Typically you only have to run sp_rda_reconcile_batch if you have manually deleted the most recently migrated data from the remote table. When you manually
delete remote data that includes the most recent batch, the batch IDs are out of sync and migration stops.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-rda-reconcile-batch-transact-sql
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-rda-reauthorize-db-transact-sql
QUESTION 79
You have a database named DB1 that contains a table named Table1. Table1 has 1 billion rows.
After the import, users report that queries take longer than usual to execute.
You need to identify whether an out-of-date execution plan is causing the performance issue.
A. sys.dm_xtp_transaction_stats
B. sys.dm_exec_input_buffer
C. sys.dm_db_index_operational_stats
D. sys.dm_db_stats_properties
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
sys.dm_db_index_operational_stats dynamic management function provides us the current low-level I/O, locking, latching, and access method for each partition of
the table. This information is really useful to troubleshoot SQL Server performance issues.
Reference: https://basitaalishan.com/2013/03/19/using-sys-dm_db_index_operational_stats-to-analyse-how-indexes-are-utilised/
QUESTION 80
https://www.gratisexam.com/
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a performance bottleneck and can cause the transaction log
file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-waits/
QUESTION 81
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
https://www.gratisexam.com/
Solution: Add additional log files to tempdb.
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a performance bottleneck and can cause the transaction log
file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-waits/
QUESTION 82
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 are tuning the performance of a virtual machine that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1, 2:3:1, and 2:4:1 within the tempdb database.
https://www.gratisexam.com/
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you consistently see high waiting for PAGELATCH_IO, you can
benefit from a faster I/O subsystem for SQL Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages', which are accessed frequently and which you might identify as
the causes of your latch contention. For example, if you have a currency table with a data page containing 100 rows, of which 1 is updated per transaction and you
have a transaction rate of 200/sec, you could see page latch queues of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full
half-second delay for each update. In this case, splitting out the currency rows into different tables might prove more performant (if less normalized and logically
structured).
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
QUESTION 83
You are the administrator for a SQL Server 2016 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 without leasing or purchasing additional physical locations.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
https://www.gratisexam.com/
Correct Answer: D
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
Microsoft SQL Server Backup to Microsoft Azure Tool enables backup to Azure Blob Storage and encrypts and compresses SQL Server backups stored locally or
in the cloud.
References: https://www.microsoft.com/en-us/download/details.aspx?id=40740
QUESTION 84
You have Microsoft SQL Server on a DS-series Microsoft Azure virtual machine. The virtual machine has 28 GB of memory.
Correct Answer: D
Section: Manage Storage
Explanation
Explanation/Reference:
Reference: https://www.brentozar.com/archive/2014/05/tell-need-tempdb-files/
QUESTION 85
You have Microsoft SQL server on a Microsoft Azure virtual machine. The virtual machine has 200 GB of data.
You need to identify whether the storage subsystem causes the performance issue.
https://www.gratisexam.com/
Which performance monitor counter should you view?
A. Data sec/Write
B. Avg.disk Read Queue Length
C. % Disk Read Time
D. Disk sec/Read
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
QUESTION 86
You have Microsoft SQL Server on a Microsoft Azure Virtual machine that has a 4-TB database.
You plan to configure daily backups for the database. A single full backup will be approximately 1.5 TB of compressed data.
A. Local storage
B. Page blob storage
C. Virtual disks
D. Block blob storage.
Correct Answer: D
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
When backing up to Microsoft Azure blob storage, SQL Server 2016 supports backing up to multiple blobs to enable backing up large databases, up to a maximum
of 12.8 TB. This is done through Block Blobs.
Incorrect Answers:
A: Local storage is not guaranteed to be retained.
https://www.gratisexam.com/
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-backup-recovery
QUESTION 87
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
You have two Windows accounts named ServiceAccount1 and ServiceAccount2. The SQL Server Agent runs as ServiceAccount1.
You need to run SQL Server Agent job steps by using ServiceAccount2.
A. Set-ADServiceAccount
B. Set-SqlCredential
C. New-ADServiceAccount
D. New-SqlCredential
Correct Answer: C
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
The New-ADServiceAccount command creates a new Active Directory managed service account or group managed service account object.
Incorrect Answers:
A: The Set-ADServiceAccount cmdlet modifies the properties of an Active Directory managed service account (MSA). You can modify commonly used property
values by using the cmdlet parameters.
B: The Set-SqlCredential cmdlet sets the Identity and password properties for a SQL Credential object using this cmdlet.
D: The New-SqlCredential cmdlet creates a new SQL Server credential object. A SQL Server credential object is used to store authentication information. The SQL
Server credential is required when backing up to or restoring from the Windows Azure storage service, and is used to store the Windows Azure storage account
name and access key information.
References: https://docs.microsoft.com/en-us/powershell/module/addsadministration/new-adserviceaccount?view=win10-ps
QUESTION 88
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 stated goals. Some questions 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.
https://www.gratisexam.com/
You need to ensure that queries use statistical data and do not initialize values for local variables.
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number
of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism (MAXDOP) option to limit the
number of processors to use in parallel plan execution.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-max-degree-of-parallelism-server-configuration-option?
view=sql-server-2017
QUESTION 89
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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
A. Yes
B. No
https://www.gratisexam.com/
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
This problem is related to the disk response time, not to the number of log files.
References: https://www.mssqltips.com/sqlservertip/4131/troubleshooting-sql-server-transaction-log-related-wait-types/
QUESTION 90
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 stated goals. Some questions 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 use a Microsoft Azure SQL database as a data warehouse. The database is in the Standard service tier and has 400 elastic database throughput units
(eDTUs).
You need to reduce the amount of time it takes to load the data.
Solution: You move the database to a Premium database pool that has 125 eDTUs.
A. Yes
B. No
Correct Answer: B
Section: Manage Storage
Explanation
Explanation/Reference:
Explanation:
We need at least 400 eDTUs.
https://www.gratisexam.com/
https://www.gratisexam.com/
https://www.gratisexam.com/
Reference Solution for
70-765 microsoft
70-765
Score: 800/1000
Version:
Time Limit: 120 Minutes
1
Licensed to Mauricio Cifuentes instructormauriciof2016@outlook.com
Exam A (70 questions)
Question 1
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
Question 2
You administer a Microsoft SQL Server 2012 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.
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.
Use sp_configure to set a value for blocked process threshold. Create an extended
event session.
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.
Run the sp_who command from a query window.
Run the DBCC TRACEON 1222 command from a query window and review the SQL
Server event log.
Explanation:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
http://msdn.microsoft.com/en-us/library/ms188396.aspx
Question 3
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
Question 4
You administer a Microsoft SQL Server 2012 server. The MSSQLSERVER service uses a domain
account named CONTOSO\SQLService.
You need to ensure that Data File Autogrow operations use Instant File Initialization.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms175935.aspx
http://www.mssqltips.com/sqlservertip/2752/effect-of-instant-file-initialization-within-sql-server/
2. Double click Perform Volume Maintenance Tasks and add your SQL Server database engine service
account.
3. Restart the SQL Server service using SQL Server Configuration Manager and this setting should
now be enabled.
Question 5
You administer a Microsoft SQL Server 2012 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.
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.
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.
http://msdn.microsoft.com/en-us/library/cc280449.aspx http://msdn.microsoft.com/en-
us/library/cc280464.aspx http://msdn.microsoft.com/en-us/library/cc280576.aspx
http://msdn.microsoft.com/en-us/library/ee240835.aspx
Question 7
You administer a Microsoft SQL Server 2012 instance. After a routine shutdown, the drive that
contains tempdb fails.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186400.aspx http://msdn.microsoft.com/en-
us/library/ms345408.aspx
You need to ensure that the application login is unable to access other production databases.
Use the SQL Server default instance and configure an affinity mask.
Install a new named SQL Server instance on the server.
Use the SQL Server default instance and enable Contained Databases.
Install a new default SQL Server instance on the server.
Question 9
You administer a Microsoft SQL Server 2012 Enterprise Edition server that uses 64 cores.
You discover performance issues when large amounts of data are written to tables under heavy
system load.
Processor affinity
Lightweight pooling
Max worker threads
I/O affinity
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms189629.aspx
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 need to ensure that your backup will continue if any invalid checksum is encountered.
STANDBY
Differential
FULL
CHECKSUM
BULK_LOGGED
CONTINUE_AFTER_ERROR
SIMPLE
DBO_ONLY
COPY_ONLY
SKIP
RESTART
Transaction log
NO_CHECKSUM
NORECOVERY
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186865.aspx http://msdn.microsoft.com/en-
us/library/microsoft.sqlserver.management.smo.backuprestorebase.continueaftererror.aspx
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.
On Wednesday at 10:00 hours, the development team requests you to refresh the database on a
development server by using the most recent version.
You need to perform a full database backup that will be restored on the development server.
NORECOVERY
FULL
NO_CHECKSUM
CHECKSUM
Differential
8ULK_LOGGED
STANDBY
RESTART
SKIP
Transaction log
DBO ONLY
COPY_ONLY
SIMPLE
CONTINUE AFTER ERROR
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.
FULL
DBO_ONLY
CONTINUE_AFTER_ERROR
CHECKSUM
NO_CHECKSUM
SIMPLE
Transaction log
SKIP
RESTART
COPY_ONLY
NORECOVERY
BULK_LOGGED
Differential
STANDBY
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.
BULK_LOGGED
NO_CHECKSUM
FULL
RESTART
CHECKSUM
STANDBY
DBO.ONLY
NORECOVERY
SIMPLE
SKIP
Transaction log
COPY_ONLY
Differential
CONTINUE_AFTER_ERROR
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186865.aspx http://msdn.microsoft.com/en-
us/library/ms191429.aspx http://msdn.microsoft.com/en-us/library/ms179478.aspx
Question 14
You administer a Microsoft SQL Server 2012 instance named SQL2012 that hosts an OLTP database of
1 terabyte in size.
The database is modified by users only from Monday through Friday from 09:00 hours to 17:00
hours. Users modify more than 30 percent of the data in the database during the week.
The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch
process will take a maximum of 8 hours to complete.
The batch process will update three tables that are 10 GB in size. The batch process will update these
tables multiple times.
When the batch process completes, the Finance department runs a report to find out whether the
batch process has completed correctly.
You need to ensure that if the Finance department disapproves the batch process, the batch
operation can be rolled back in the minimum amount of time.
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.
Question 16
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188388.aspx
You need to recover the corrupted data in the minimum amount of time.
Explanation/Reference:
Under the simple recovery model, the file must belong to a read-only filegroup. Under the full or
bulk-logged recovery model, before you can restore files, you must back up the active transaction log
(known as the tail of the log). For more information, see Back Up a Transaction Log (SQL Server).
To restore a database that is encrypted, you must have access to the certificate or asymmetric key
that was used to encrypt the database. Without the certificate or asymmetric key, the database
cannot be restored. As a result, the certificate that is used to encrypt the database encryption key
must be retained as long as the backup is needed. For more information, see SQL Server Certificates
and Asymmetric Keys.
You need to evaluate existing and potential clustered and non-clustered indexes that will improve
performance.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms174202.aspx
Question 19
You administer a Microsoft SQL Server 2012 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.
http://technet.microsoft.com/en-us/library/cc280663(v=sql.105).aspx
An Alert
A Server Audit Specification
An Extended Event session
A Resource Pool
A Policy
A SQL Profiler Trace
A Database Audit Specification
Explanation:
http://www.sqlskills.com/blogs/glenn/creating-sql-server-agent-alerts-for-critical-errors/
Question 21
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
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.
http://msdn.microsoft.com/en-us/library/ms188246.aspx
An Alert
A Resource Pool
An Extended Event session
A Policy
A Database Audit Specification
A SQL Profiler Trace
A Server Audit Specification
Question 23
You administer a Microsoft SQL Server 2012.
A process that normally runs in less than 10 seconds has been running for more than an hour.
You examine the application log and discover that the process is using session ID 60.
EXEC sp_who 60
SELECT * FROM sys.dm_exec_sessions WHERE sessionid = 60
EXEC sp_helpdb 60
DBCC INPUTBUFFER (60)
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms174313.aspx http://msdn.microsoft.com/en-
us/library/ms176013.aspx http://msdn.microsoft.com/en-us/library/ms178568.aspx
http://msdn.microsoft.com/en-us/library/ms187730.aspx
You need to ensure that the database remains available if a catastrophic server failure or a disk
failure occurs.
You also need to maintain transactional consistency of the data across both servers.
Two servers configured in a Windows Failover Cluster in the same data center SQL
Server configured as a clustered instance
SQL Server that includes an application database configured to perform transactional
replication
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
Two servers configured in different data centers
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
One server configured as an Active Secondary
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
Two servers configured in different data centers
SQL Server Availability Group configured in Asynchronous-Commit Availability Mode
SQL Server that includes an application database configured to perform snapshot
replication
Two servers configured on the same subnet
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
Explanation:
http://msdn.microsoft.com/en-us/library/ff877931.aspx
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.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/jj542414.aspx
Question 26
You administer two Microsoft SQL Server 2012 servers. Each server resides in a different, untrusted
domain.
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the
required detail.
"The job failed. The Job was invoked by User CONTOSO\ServiceAccount. The last step to run was step
1 (Subplan_1)."
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are
retained.
http://msdn.microsoft.com/en-us/library/ms175488.aspx
Question 28
You administer a Microsoft SQL Server 2012 instance.
http://msdn.microsoft.com/en-us/library/gg509097.aspx
You need to ensure that the application can connect to the named instance.
Question 30
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.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following
statements:
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the
original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the
encryption files to their original location. However, you are unable to access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that the Sales role, including UserA, is disallowed to select from any of the tables
in the Customers schema.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
http://msdn.microsoft.com/en-us/library/ms187728.aspx
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that UserA is disallowed to select from any of the tables in the Customers
schema.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to remove the Select permission for UserA on the Regions table. You also need to ensure
that UserA can still access all the tables in the Customers schema, including the Regions table,
through the Sales role permissions.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
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.
Question 36
You administer a Windows 2008 server hosting an instance of Microsoft SQL Server 2012 Standard
Edition. The server hosts a database named Orders.
Users report that a query that filters on OrderDate is taking an exceptionally long time. You discover
that an index named IX_OrderDate on the CustomerOrder table is heavily fragmenteD.
You need to improve the performance of the IX_OrderDate index. The index should remain online
during the operation.
Question 38
You administer a Microsoft SQL Server 2012 failover cluster.
You need to ensure that a failover occurs when the server diagnostics returns query_processing
error.
SqlOumperDumpFlags
FailureConditionLevel
HealthCheckTimeout
SqlDumperDumpPath
Question 39
You are the administrator of a Microsoft SQL Server 2012 server.
Some applications consume significant resources. You need to manage the server workload by
restricting resource-intensive applications
Configure Resource Pools, Workload Groups, and Classifier Function, and then enable
the Resource Governor
Set up Service Broker to ensure that application are not allowed to consume more
than the specified amount of resource
Create a new rule for each application that sets the resource limit allowed
Create a new plan Guide with a Scope Type of sql and define the resource limits for
each application
Users need to be able to SELECT from all tables in the database and execute the stored procedure.
Question 41
You administer a SQL Server 2012 database instance.
You need to configure the SQL Server Database Engine service on a failover cluster.
A domain user
The BUILTIN\SYSTEM account
A local user with Run as Service permissions
TheSQLBrowser account
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.
A NULL value represents a domestic order. Ninety percent of the values in CountryCode are NULL.
Customers require a procedure that will return orders for all customers from a specified country.
You create a new procedure:
You need to alter the schema to optimize this query. Objects created must use a minimum amount of
resources.
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.
NO_TRUNCATE
NORECOVERY
STANDBY
FORMAT
Question 46
You administer a Microsoft SQL Server 2012 database. You want to make a full backup of the
database to a file on disk.
STATS
COMPRESSION
CHECKSUM
IN IT
You create an Availability Group defined by the following schema. (Line numbers are included for
reference only.)
You need to implement an AlwaysOnAvailablity Group that will meet the following conditions:
Production transactions should be minimally affected. The secondary server should allow reporting
queries to be performed. If the primary server goes offline, the secondary server should not
automatically take over.
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433') PRIMARY_ROLE (
ALLOW_CONNECTIONS = READ_WRITE,
READ_ONLY_ROUTING_LIST = NONE)
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = YES,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
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.
Question 49
You are a database administrator for a Microsoft SQL Server 2012 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.
Database Mirroring
Peer-to-Peer Replication
Log Shipping
Availability Groups
You need to reduce the I/O workload on the SAN at a minimal cost.
Question 51
You administer a Microsoft SQL Server 2012 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.
Partitioned tables
Online index rebuild
Change data capture
Change tracking
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
Question 53
You administer a Microsoft SQL Server 2012 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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
A Data Collector Set
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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
Question 55
You plan to install Microsoft SQL Server 2012 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.
The instance will support a database that has the following requirements:
Store Excel workbooks on the file system.
Access the workbooks through Transact-SQL.
Include the workbooks in database backups.
During installation, you need to ensure that the requirements will be met.
Excel Services
FILESTREAM
SQL Server Integration Services (SSIS)
OpenXML
Question 57
You administer a Microsoft SQL Server 2012 instance named SQL2012. You are in the process of
migrating a database from a SQL Server 2008 instance named SQL2008 to the SQL2012 instance.
You have upgraded a database from the SQL2008 instance by using the side-by-side migration
technique.
You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance.
Back up the master database on the SQL2008 instance. Restore the master database
on the SQL2012 instance
Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package
Use sp_grantlogin
Use xp_logininfo.
You need to ensure that UserA is able to create SQL Server Agent jobs and execute SQL Server agent
jobs owned by UserA
DatabaseMailUserRole
ServerGroupAdministratorGroup
SQLAgentUserRole
Securityadmin
Question 59
You administer a Microsoft SQL Server 2012 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.
a schedule
an alert
an operator
a proxy
You are tasked with designing a scale-out and high-availability SQL Server 2012 Online Transaction
Processing (OLTP) database solution that will maintain copies of data across two server instances.
Your solution must provide scale-out of read operations by distributing the reads from clients across
two SQL Server 2012 nodes. The data in both SQL Server nodes needs to be indexed.
What should you include in your solution?
You should include a primary database with scheduled log shipping to the secondary
database configured.
You should include two servers configured in an Active-Passive SQL Server 2012
Cluster.
You should include a primary SQL Server 2012 database that uses transactional
replication to replicate data to the secondary database.
You should include two servers in an Asynchronous-Commit Availability Mode
Availability Group.
You should include two servers in a Synchronous-Commit Availability Mode
Availability Group.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact-
SQL statement should you use?
You need to display rows from the Orders table for the Customers row having the CustomerId value
set to 1 in the following XML format.
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW, ELEMENTS
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML AUTO
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
You need to display rows from the Orders table for the Customers row having the CustomerId value
set to 1 in the following XML format.
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW, ELEMENTS
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML AUTO
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId � Customers.CustomerId WHERE Customers.CustomerId= 1
FOR XML AUTO, ELEMENTS
SELECT Name, Country, OrderId, OrderDate, Amount FROM Orders INNER JOIN
Customers
Question 64
You use Microsoft SQL Server 2012 to develop a database application. You need to implement a
computed column that references a lookup table by using an INNER JOIN against another table.
You discover that the performance of the query is slow. Analysis of the query plan shows table scans
where the estimated rows do not match the actual rows for SalesOrderHeader by using an
unexpected index on SalesOrderDetail.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms187348.aspx
Global customers place orders from several countries. You need to view the country from which each
customer has placed the most orders.
Question 67
You use Microsoft SQL Server 2012 to develop a database application. You need to create an object
that meets the following requirements:
Takes an input variable
Returns a table of values
Cannot be referenced within a view
Scalar-valued function
Inline function
User-defined data type
Stored procedure
Question 68
You administer a SQL Server 2012 server that contains a database named SalesDb. SalesDb contains a
schema named Customers that has a table named Regions. A user named UserA is a member of a
role named Sales. UserA is granted the Select permission on the Regions table. The Sales role is
granted the Select permission on the Customers schema.
Explanation/Reference:
Question 69
You develop a Microsoft SQL Server 2012 database that contains a heap named OrdersHistoncal.
You need to optimize transaction logging and locking for the statement.
HOLDLOCK
ROWLOCK
XLOCK
UPDLOCK
TABLOCK
Explanation:
Explanation/Reference:
http://technet.microsoft.com/en-us/library/ms189857.aspx http://msdn.microsoft.com/en-
us/library/ms187373.aspx
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = CONVERT(DATE, GETDATE())
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = GETDATE()
SELECT COUNT(*)
FROM Purchases
WHERE CONVERT(VARCHAR, PurchaseTime, 112) = CONVERT(VARCHAR, GETDATE(),
112)
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime >= CONVERT(DATE, GETDATE())
AND PurchaseTime <DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))
Explanation:
Explanation/Reference:
http://technet.microsoft.com/en-us/library/ms181034.aspx
70-765
Score: 800/1000
Version: 1.0
Time Limit: 120 Minutes
1
Licensed to Mauricio Cifuentes instructormauriciof2016@outlook.com
Exam A (70 questions)
Question 1
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
Question 2
You administer a Microsoft SQL Server 2012 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.
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.
Use sp_configure to set a value for blocked process threshold. Create an extended
event session.
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.
Run the sp_who command from a query window.
Run the DBCC TRACEON 1222 command from a query window and review the SQL
Server event log.
Explanation:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
http://msdn.microsoft.com/en-us/library/ms188396.aspx
Question 3
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
Question 4
You administer a Microsoft SQL Server 2012 server. The MSSQLSERVER service uses a domain
account named CONTOSO\SQLService.
You need to ensure that Data File Autogrow operations use Instant File Initialization.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms175935.aspx
http://www.mssqltips.com/sqlservertip/2752/effect-of-instant-file-initialization-within-sql-server/
2. Double click Perform Volume Maintenance Tasks and add your SQL Server database engine service
account.
3. Restart the SQL Server service using SQL Server Configuration Manager and this setting should
now be enabled.
Question 5
You administer a Microsoft SQL Server 2012 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.
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.
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.
http://msdn.microsoft.com/en-us/library/cc280449.aspx http://msdn.microsoft.com/en-
us/library/cc280464.aspx http://msdn.microsoft.com/en-us/library/cc280576.aspx
http://msdn.microsoft.com/en-us/library/ee240835.aspx
Question 7
You administer a Microsoft SQL Server 2012 instance. After a routine shutdown, the drive that
contains tempdb fails.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186400.aspx http://msdn.microsoft.com/en-
us/library/ms345408.aspx
You need to ensure that the application login is unable to access other production databases.
Use the SQL Server default instance and configure an affinity mask.
Install a new named SQL Server instance on the server.
Use the SQL Server default instance and enable Contained Databases.
Install a new default SQL Server instance on the server.
Question 9
You administer a Microsoft SQL Server 2012 Enterprise Edition server that uses 64 cores.
You discover performance issues when large amounts of data are written to tables under heavy
system load.
Processor affinity
Lightweight pooling
Max worker threads
I/O affinity
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms189629.aspx
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 need to ensure that your backup will continue if any invalid checksum is encountered.
STANDBY
Differential
FULL
CHECKSUM
BULK_LOGGED
CONTINUE_AFTER_ERROR
SIMPLE
DBO_ONLY
COPY_ONLY
SKIP
RESTART
Transaction log
NO_CHECKSUM
NORECOVERY
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186865.aspx http://msdn.microsoft.com/en-
us/library/microsoft.sqlserver.management.smo.backuprestorebase.continueaftererror.aspx
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.
On Wednesday at 10:00 hours, the development team requests you to refresh the database on a
development server by using the most recent version.
You need to perform a full database backup that will be restored on the development server.
NORECOVERY
FULL
NO_CHECKSUM
CHECKSUM
Differential
8ULK_LOGGED
STANDBY
RESTART
SKIP
Transaction log
DBO ONLY
COPY_ONLY
SIMPLE
CONTINUE AFTER ERROR
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.
FULL
DBO_ONLY
CONTINUE_AFTER_ERROR
CHECKSUM
NO_CHECKSUM
SIMPLE
Transaction log
SKIP
RESTART
COPY_ONLY
NORECOVERY
BULK_LOGGED
Differential
STANDBY
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.
BULK_LOGGED
NO_CHECKSUM
FULL
RESTART
CHECKSUM
STANDBY
DBO.ONLY
NORECOVERY
SIMPLE
SKIP
Transaction log
COPY_ONLY
Differential
CONTINUE_AFTER_ERROR
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms186865.aspx http://msdn.microsoft.com/en-
us/library/ms191429.aspx http://msdn.microsoft.com/en-us/library/ms179478.aspx
Question 14
You administer a Microsoft SQL Server 2012 instance named SQL2012 that hosts an OLTP database of
1 terabyte in size.
The database is modified by users only from Monday through Friday from 09:00 hours to 17:00
hours. Users modify more than 30 percent of the data in the database during the week.
The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch
process will take a maximum of 8 hours to complete.
The batch process will update three tables that are 10 GB in size. The batch process will update these
tables multiple times.
When the batch process completes, the Finance department runs a report to find out whether the
batch process has completed correctly.
You need to ensure that if the Finance department disapproves the batch process, the batch
operation can be rolled back in the minimum amount of time.
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.
Question 16
You administer a Microsoft SQL Server 2012 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.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188388.aspx
You need to recover the corrupted data in the minimum amount of time.
Explanation/Reference:
Under the simple recovery model, the file must belong to a read-only filegroup. Under the full or
bulk-logged recovery model, before you can restore files, you must back up the active transaction log
(known as the tail of the log). For more information, see Back Up a Transaction Log (SQL Server).
To restore a database that is encrypted, you must have access to the certificate or asymmetric key
that was used to encrypt the database. Without the certificate or asymmetric key, the database
cannot be restored. As a result, the certificate that is used to encrypt the database encryption key
must be retained as long as the backup is needed. For more information, see SQL Server Certificates
and Asymmetric Keys.
You need to evaluate existing and potential clustered and non-clustered indexes that will improve
performance.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms174202.aspx
Question 19
You administer a Microsoft SQL Server 2012 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.
http://technet.microsoft.com/en-us/library/cc280663(v=sql.105).aspx
An Alert
A Server Audit Specification
An Extended Event session
A Resource Pool
A Policy
A SQL Profiler Trace
A Database Audit Specification
Explanation:
http://www.sqlskills.com/blogs/glenn/creating-sql-server-agent-alerts-for-critical-errors/
Question 21
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
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.
http://msdn.microsoft.com/en-us/library/ms188246.aspx
An Alert
A Resource Pool
An Extended Event session
A Policy
A Database Audit Specification
A SQL Profiler Trace
A Server Audit Specification
Question 23
You administer a Microsoft SQL Server 2012.
A process that normally runs in less than 10 seconds has been running for more than an hour.
You examine the application log and discover that the process is using session ID 60.
EXEC sp_who 60
SELECT * FROM sys.dm_exec_sessions WHERE sessionid = 60
EXEC sp_helpdb 60
DBCC INPUTBUFFER (60)
Explanation:
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms174313.aspx http://msdn.microsoft.com/en-
us/library/ms176013.aspx http://msdn.microsoft.com/en-us/library/ms178568.aspx
http://msdn.microsoft.com/en-us/library/ms187730.aspx
You need to ensure that the database remains available if a catastrophic server failure or a disk
failure occurs.
You also need to maintain transactional consistency of the data across both servers.
Two servers configured in a Windows Failover Cluster in the same data center SQL
Server configured as a clustered instance
SQL Server that includes an application database configured to perform transactional
replication
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
Two servers configured in different data centers
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
One server configured as an Active Secondary
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
Two servers configured in different data centers
SQL Server Availability Group configured in Asynchronous-Commit Availability Mode
SQL Server that includes an application database configured to perform snapshot
replication
Two servers configured on the same subnet
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
Explanation:
http://msdn.microsoft.com/en-us/library/ff877931.aspx
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.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/jj542414.aspx
Question 26
You administer two Microsoft SQL Server 2012 servers. Each server resides in a different, untrusted
domain.
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the
required detail.
"The job failed. The Job was invoked by User CONTOSO\ServiceAccount. The last step to run was step
1 (Subplan_1)."
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are
retained.
http://msdn.microsoft.com/en-us/library/ms175488.aspx
Question 28
You administer a Microsoft SQL Server 2012 instance.
http://msdn.microsoft.com/en-us/library/gg509097.aspx
You need to ensure that the application can connect to the named instance.
Question 30
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.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following
statements:
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the
original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the
encryption files to their original location. However, you are unable to access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that the Sales role, including UserA, is disallowed to select from any of the tables
in the Customers schema.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
http://msdn.microsoft.com/en-us/library/ms187728.aspx
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that UserA is disallowed to select from any of the tables in the Customers
schema.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to remove the Select permission for UserA on the Regions table. You also need to ensure
that UserA can still access all the tables in the Customers schema, including the Regions table,
through the Sales role permissions.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms188369.aspx http://msdn.microsoft.com/en-
us/library/ms187750.aspx http://msdn.microsoft.com/en-us/library/ff848791.aspx
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.
Question 36
You administer a Windows 2008 server hosting an instance of Microsoft SQL Server 2012 Standard
Edition. The server hosts a database named Orders.
Users report that a query that filters on OrderDate is taking an exceptionally long time. You discover
that an index named IX_OrderDate on the CustomerOrder table is heavily fragmenteD.
You need to improve the performance of the IX_OrderDate index. The index should remain online
during the operation.
Question 38
You administer a Microsoft SQL Server 2012 failover cluster.
You need to ensure that a failover occurs when the server diagnostics returns query_processing
error.
SqlOumperDumpFlags
FailureConditionLevel
HealthCheckTimeout
SqlDumperDumpPath
Question 39
You are the administrator of a Microsoft SQL Server 2012 server.
Some applications consume significant resources. You need to manage the server workload by
restricting resource-intensive applications
Configure Resource Pools, Workload Groups, and Classifier Function, and then enable
the Resource Governor
Set up Service Broker to ensure that application are not allowed to consume more
than the specified amount of resource
Create a new rule for each application that sets the resource limit allowed
Create a new plan Guide with a Scope Type of sql and define the resource limits for
each application
Users need to be able to SELECT from all tables in the database and execute the stored procedure.
Question 41
You administer a SQL Server 2012 database instance.
You need to configure the SQL Server Database Engine service on a failover cluster.
A domain user
The BUILTIN\SYSTEM account
A local user with Run as Service permissions
TheSQLBrowser account
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.
A NULL value represents a domestic order. Ninety percent of the values in CountryCode are NULL.
Customers require a procedure that will return orders for all customers from a specified country.
You create a new procedure:
You need to alter the schema to optimize this query. Objects created must use a minimum amount of
resources.
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.
NO_TRUNCATE
NORECOVERY
STANDBY
FORMAT
Question 46
You administer a Microsoft SQL Server 2012 database. You want to make a full backup of the
database to a file on disk.
STATS
COMPRESSION
CHECKSUM
IN IT
You create an Availability Group defined by the following schema. (Line numbers are included for
reference only.)
You need to implement an AlwaysOnAvailablity Group that will meet the following conditions:
Production transactions should be minimally affected. The secondary server should allow reporting
queries to be performed. If the primary server goes offline, the secondary server should not
automatically take over.
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433') PRIMARY_ROLE (
ALLOW_CONNECTIONS = READ_WRITE,
READ_ONLY_ROUTING_LIST = NONE)
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = YES,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
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.
Question 49
You are a database administrator for a Microsoft SQL Server 2012 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.
Database Mirroring
Peer-to-Peer Replication
Log Shipping
Availability Groups
You need to reduce the I/O workload on the SAN at a minimal cost.
Question 51
You administer a Microsoft SQL Server 2012 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.
Partitioned tables
Online index rebuild
Change data capture
Change tracking
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
Question 53
You administer a Microsoft SQL Server 2012 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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
A Data Collector Set
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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
Question 55
You plan to install Microsoft SQL Server 2012 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.
The instance will support a database that has the following requirements:
Store Excel workbooks on the file system.
Access the workbooks through Transact-SQL.
Include the workbooks in database backups.
During installation, you need to ensure that the requirements will be met.
Excel Services
FILESTREAM
SQL Server Integration Services (SSIS)
OpenXML
Question 57
You administer a Microsoft SQL Server 2012 instance named SQL2012. You are in the process of
migrating a database from a SQL Server 2008 instance named SQL2008 to the SQL2012 instance.
You have upgraded a database from the SQL2008 instance by using the side-by-side migration
technique.
You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance.
Back up the master database on the SQL2008 instance. Restore the master database
on the SQL2012 instance
Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package
Use sp_grantlogin
Use xp_logininfo.
You need to ensure that UserA is able to create SQL Server Agent jobs and execute SQL Server agent
jobs owned by UserA
DatabaseMailUserRole
ServerGroupAdministratorGroup
SQLAgentUserRole
Securityadmin
Question 59
You administer a Microsoft SQL Server 2012 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.
a schedule
an alert
an operator
a proxy
You are tasked with designing a scale-out and high-availability SQL Server 2012 Online Transaction
Processing (OLTP) database solution that will maintain copies of data across two server instances.
Your solution must provide scale-out of read operations by distributing the reads from clients across
two SQL Server 2012 nodes. The data in both SQL Server nodes needs to be indexed.
What should you include in your solution?
You should include a primary database with scheduled log shipping to the secondary
database configured.
You should include two servers configured in an Active-Passive SQL Server 2012
Cluster.
You should include a primary SQL Server 2012 database that uses transactional
replication to replicate data to the secondary database.
You should include two servers in an Asynchronous-Commit Availability Mode
Availability Group.
You should include two servers in a Synchronous-Commit Availability Mode
Availability Group.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact-
SQL statement should you use?
You need to display rows from the Orders table for the Customers row having the CustomerId value
set to 1 in the following XML format.
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW, ELEMENTS
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML AUTO
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
You need to display rows from the Orders table for the Customers row having the CustomerId value
set to 1 in the following XML format.
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML RAW, ELEMENTS
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId = Customers.CustomerId WHERE Customers.CustomerId = 1
FOR XML AUTO
SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN
Customers
ON Orders.CustomerId � Customers.CustomerId WHERE Customers.CustomerId= 1
FOR XML AUTO, ELEMENTS
SELECT Name, Country, OrderId, OrderDate, Amount FROM Orders INNER JOIN
Customers
Question 64
You use Microsoft SQL Server 2012 to develop a database application. You need to implement a
computed column that references a lookup table by using an INNER JOIN against another table.
You discover that the performance of the query is slow. Analysis of the query plan shows table scans
where the estimated rows do not match the actual rows for SalesOrderHeader by using an
unexpected index on SalesOrderDetail.
Explanation/Reference:
http://msdn.microsoft.com/en-us/library/ms187348.aspx
Global customers place orders from several countries. You need to view the country from which each
customer has placed the most orders.
Question 67
You use Microsoft SQL Server 2012 to develop a database application. You need to create an object
that meets the following requirements:
Takes an input variable
Returns a table of values
Cannot be referenced within a view
Scalar-valued function
Inline function
User-defined data type
Stored procedure
Question 68
You administer a SQL Server 2012 server that contains a database named SalesDb. SalesDb contains a
schema named Customers that has a table named Regions. A user named UserA is a member of a
role named Sales. UserA is granted the Select permission on the Regions table. The Sales role is
granted the Select permission on the Customers schema.
Explanation/Reference:
Question 69
You develop a Microsoft SQL Server 2012 database that contains a heap named OrdersHistoncal.
You need to optimize transaction logging and locking for the statement.
HOLDLOCK
ROWLOCK
XLOCK
UPDLOCK
TABLOCK
Explanation:
Explanation/Reference:
http://technet.microsoft.com/en-us/library/ms189857.aspx http://msdn.microsoft.com/en-
us/library/ms187373.aspx
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = CONVERT(DATE, GETDATE())
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = GETDATE()
SELECT COUNT(*)
FROM Purchases
WHERE CONVERT(VARCHAR, PurchaseTime, 112) = CONVERT(VARCHAR, GETDATE(),
112)
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime >= CONVERT(DATE, GETDATE())
AND PurchaseTime <DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))
Explanation:
Explanation/Reference:
http://technet.microsoft.com/en-us/library/ms181034.aspx
70-765
Score: 800/1000
Version:
Time Limit: 120 Minutes
1
Licensed to Mauricio Cifuentes instructormauriciof2016@outlook.com
2 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Exam A (100 questions)
Question 1
You administer a SQL 2012 server that contains a database named SalesDB. SalesDb contains a
schema named Customers that has a table named Regions. A user named UserA is a member of a
role named Sales.
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to remove the Select permission for UserA on the Regions table. You also need to ensure
that UserA can still access all the tables in the Customers schema, including the Regions table,
through the Sales role permissions.
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-
azure-sql-data-warehouse-parallel-data-warehouse
You are tuning the performance of a virtual machines that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest
table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1,
2:3:1, and 2:4:1 within the tempdb database.
Yes
No
Explanation:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you
consistently see high waiting for PAGELATCH_IO, you can benefit from a faster I/O subsystem for SQL
Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages',
which are accessed frequently and which you might identify as the causes of your latch contention.
For example, if you have a currency table with a data page containing 100 rows, of which 1 is
updated per transaction and you have a transaction rate of 200/sec, you could see page latch queues
of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full half-
second delay for each update. In this case, splitting out the currency rows into different tables might
prove more performant (if less normalized and logically structured).
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
You manage the Microsoft SQL Server environment for a company that manufactures and sells
automobile parts.
The environment includes the following servers: SRV1 and SRV2. SRV1 has 16 logical cores and hosts
a SQL Server instance that supports a mission-critical application. The application has approximately
30,000 concurrent users and relies heavily on the use of temporary tables.
The environment also includes the following databases: DB1, DB2, and Reporting. The Reporting
database is protected with Transparent Data Encryption (TDE). You plan to migrate this database to a
new server. You detach the database and copy it to the new server.
You are performing tuning on a SQL Server database instance. The application which uses the
database was written using an object relationship mapping (ORM) tool which maps tables as objects
within the application code. There are 30 stored procedures that are regularly used by the
application.
Exhibit
What configuration changes should you implement? To answer, select the appropriate option from
each list in the answer area.
Explanation:
Explanation:
From the scenario: SRV1 has 16 logical cores and hosts a SQL Server instance that supports a mission-
critical application. The application has approximately 30,000 concurrent users and relies heavily on
the use of temporary tables.
The size and physical placement of the tempdb database can affect the performance of a system. For
example, if the size that is defined for tempdb is too small, part of the system-processing load may
be taken up with autogrowing tempdb to the size required to support the workload every time you
restart the instance of SQL Server. You can avoid this overhead by increasing the sizes of the tempdb
data and log file.
Create as many files as needed to maximize disk bandwidth. Using multiple files reduces tempdb
storage contention and yields significantly better scalability. However, do not create too many files
because this can reduce performance and increase management overhead. As a general guideline,
create one data file for each CPU on the server (accounting for any affinity mask settings) and then
adjust the number of files up or down as necessary.
Incorrect Answers:
Not MAXDOP:
The MAXDOP setting is fine. From the exhibit we see that MAXDOP is set to 0. This is the default
setting, which enables the server to determine the maximum degree of parallelism.
References: https://technet.microsoft.com/en-us/library/ms175527(v=sql.105).aspx
Question 4
You administer a Microsoft SQL Server 2012 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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
A Data Collector Set
Explanation:
Explanation:
SQL Server Extended Events has a highly scalable and highly configurable architecture that allows
users to collect as much or as little information as is necessary to troubleshoot or identify a
performance problem.
Extended Events is a light weight performance monitoring system that uses very few performance
resources.
A SQL Server Extended Events session is created in the SQL Server process hosting the Extended
Events engine.
References: https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-
events
Data encryption should be allowed to be implemented by the client applications that access the data.
Encryption keys should not be made available to the database engine.
transport-level encryption
cell-level encryption
Transparent Data Encryption
Always Encrypted
Encrypting File System
BitLocker
dynamic data masking
Explanation:
Azure File Storage supports HTTPS when using the REST API, but is more commonly used as an SMB
file share attached to a VM.
Incorrect Answers:
C: TDE encrypts the storage of an entire database by using a symmetric key called the database
encryption key. In SQL Database the database encryption key is protected by a built-in server
certificate.
References: https://docs.microsoft.com/en-us/azure/storage/storage-security-guide#encryption-in-
transit
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.
Explanation:
To add a node to an existing SQL Server failover cluster, you must run SQL Server Setup on the node
that is to be added to the SQL Server failover cluster instance. Do not run Setup on the active node.
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.
References: http://technet.microsoft.com/en-us/library/ms191545.aspx
You need to recover the corrupted data in the minimum amount of time.
Explanation:
In a file restore, the goal is to restore one or more damaged files without restoring the whole
database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/file-restores-
simple-recovery-model
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.
Partitioned tables
Online index rebuild
Change data capture
Change tracking
Explanation:
Explanation:
Partitioning large tables or indexes can have manageability and performance benefits including:
You can perform maintenance operations on one or more partitions more quickly. The operations
are more efficient because they target only these data subsets, instead of the whole table.
References: https://docs.microsoft.com/en-us/sql/relational-databases/partitions/partitioned-
tables-and-indexes
Database1 contains 100 queries that are executed dynamically from web applications.
Changes to Database1 must not affect other databases that are hosted on Server1
Changes to Database1 must not affect the performance of queries that are stored in other databases.
The solution must minimize administrative effort.
You need to remove the data from the procedure cache as quickly as possible.
Explanation:
You should run ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE CACHE in the context
of Database! This statement lets you change the settings of a database without affecting other
databases that are installed on the instance of SQL Server 2016.
Incorrect Answers:
A: You should not run DBCC FREEPROCCACHE. DBCC FREEPROCCACHE would clean the entire plan
cache and would affect all databases. It is possible to remove a single plan from the cache by using
the plan_handle argument to DBCC FREEPROCCACHE, but you would have to identify all plans that
are related to Databasel, which requires a lot more administrative effort.
D: You should not write a script that will iterate through each stored procedure definition and add
WITH RECOMPILE to the definition. Each time the procedure is called, it will be recompiled, and this
might degrade the server's performance.
This approach would require additional administrative effort to produce the script. In addition, some
calls are made from the web application and the script would not have any control over these calls.
In earlier versions of SQL Server, prior to the availability of the ALTER DATABASE statement, this
option would have been the way to avoid affecting other databases.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-
configuration-transact-sql
Question 10
You plan to install a Microsoft SQL Server 2012 instance.
The instance will support a database that has the following requirements:
Store Excel workbooks on the file system.
Access the workbooks through Transact-SQL.
Include the workbooks in database backups.
During installation, you need to ensure that the requirements will be met.
Excel Services
FILESTREAM
SQL Server Integration Services (SSIS)
OpenXML
Explanation:
Explanation:
FILESTREAM enables SQL Server-based applications to store unstructured data, such as documents
and images, on the file system. Applications can leverage the rich streaming APIs and performance of
the file system and at the same time maintain transactional consistency between the unstructured
data and corresponding structured data.
References: https://docs.microsoft.com/en-us/sql/relational-databases/blob/filestream-sql-server
You have Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
Yes
No
Explanation:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a
performance bottleneck and can cause the transaction log file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk
for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-
waits/
Users need to be able to SELECT from all tables in the database and execute the stored procedure.
Explanation:
Members of the db_datareader fixed database role can run a SELECT statement against any table or
view in the database.
References: https://technet.microsoft.com/en-us/library/ms188629(v=sql.90).aspx
Question 13
You use Microsoft SQL Server 2012 to develop a database application. You need to implement a
computed column that references a lookup table by using an INNER JOIN against another table.
Explanation:
Question 14
You administer a Microsoft SQL Server 2012 database instance. You create a new user named UserA.
You need to ensure that UserA is able to create SQL Server Agent jobs and execute SQL Server agent
jobs owned by UserA
DatabaseMailUserRole
ServerGroupAdministratorGroup
SQLAgentUserRole
Securityadmin
Explanation:
Explanation:
SQLAgentUserRole is the least privileged of the SQL Server Agent fixed database roles. It has
permissions on only operators, local jobs, and job schedules. Members of SQLAgentUserRole have
permissions on only local jobs and job schedules that they own. Members can create local jobs.
References: https://docs.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles
Question 15
You administer a Microsoft SQL Server 2012 environment. One of the SQL Server 2012 instances
contains a database named Sales.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
Explanation:
B: In the contained database user model, the login in the master database is not present. Instead, the
authentication process occurs at the user database, and the database user in the user database does
not have an associated login in the master database.
SQL Database and SQL Data Warehouse support Azure Active Directory identities as contained
database users.
D: The contained database feature is currently available only in a partially contained state. A partially
contained database is a contained database that allows the use of uncontained features.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/contained-
databases
Question 16
You have a database named DB1 that uses simple recovery mode.
Full backups of DB1 are taken daily and DB1 is checked for corruption before each backup.
You run the sys.columns catalog view and discover corrupt pages.
You need to recover the database. The solution must minimize data loss.
Expalantion:
A page restore is intended for repairing isolated damaged pages. Restoring and recovering a few
individual pages might be faster than a file restore, reducing the amount of data that is offline during
a restore operation.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
Question 17
Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution. Determine whether the solution meets stated goals.
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to set the MAXDOP parameter to 0 for all queries
against the database.
Yes
No
Explanation:
SQL Server will consider parallel execution plans for queries, index data definition language (DDL)
operations, and static and keyset-driven cursor population.
You can override the max degree of parallelism value in queries by specifying the MAXDOP query
hint in the query statement.
References: https://technet.microsoft.com/en-us/library/ms181007(v=sql.105).aspx
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-
azure-sql-data-warehouse-parallel-data-warehouse
Users report that App1 takes an unacceptably long time to retrieve customer records.
You need to find queries that take longer than 400 ms to run.
Explanation:
Explanation:
Total_worker_time: Total amount of CPU time, reported in microseconds (but only accurate to
milliseconds), that was consumed by executions of this plan since it was compiled.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-
management-views/sys-dm-exec-query-stats-transact-sql
Question 20
You administer a Microsoft SQL Server 2012 database.
You configure Transparent Data Encryption (TDE) on the Orders database by using the following
statements:
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the
original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the
encryption files to their original location. However, you are unable to access the database.
You need to be able to restore the database.
Which Transact-SQL statement should you use before attempting the restore?
The following example creates a certificate in the database, loading the key pair from files.
Code
Copy
USE AdventureWorks2012;
GO
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql
Question 21
Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution. Determine whether the solution meets stated goals.
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You create a snapshot of the database. You configure all report queries to use the database
snapshot.
Yes
No
Explanation:
23 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Use a Resource Governor instead.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
Question 22
You have been hired as a Database Consultant by ABC.com to design a SQL Server 2012 database
solution.
You are tasked with designing a scale-out and high-availability SQL Server 2012 Online Transaction
Processing (OLTP) database solution that will maintain copies of data across two server instances.
Your solution must provide scale-out of read operations by distributing the reads from clients across
two SQL Server 2012 nodes. The data in both SQL Server nodes needs to be indexed.
What should you include in your solution?
You should include a primary database with scheduled log shipping to the secondary
database configured.
You should include two servers configured in an Active-Passive SQL Server 2012
Cluster.
You should include a primary SQL Server 2012 database that uses transactional
replication to replicate data to the secondary database.
You should include two servers in an Asynchronous-Commit Availability Mode
Availability Group.
You should include two servers in a Synchronous-Commit Availability Mode
Availability Group.
Explanation:
Explanation:
References: https://msdn.microsoft.com/en-us/library/ms151196(v=sql.110)
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.
On Wednesday at 10:00 hours, the development team requests you to refresh the database on a
development server by using the most recent version.
You need to perform a full database backup that will be restored on the development server.
NORECOVERY
FULL
NO_CHECKSUM
CHECKSUM
Differential
BULK_LOGGED
STANDBY
RESTART
SKIP
Transaction log
DBO ONLY
COPY_ONLY
SIMPLE
CONTINUE AFTER ERROR
Explanation:
Explanation:
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
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.
NORECOVERY
FULL
NO_CHECKSUM
CHECKSUM
Differential
BULK_LOGGED
STANDBY
RESTART
SKIP
Transaction log
DBO ONLY
COPY_ONLY
SIMPLE
CONTINUE AFTER ERROR
Explanation:
Explanation:
The full recovery model requires log backups. No work is lost due to a lost or damaged data file. Can
recover to a specific point in time, assuming that your backups are complete up to that point in time.
F: The bulk logged recovery model can recover to the end of any backup. Point-in-time recovery is
not supported.
M: The simple recovery model can recover only to the end of a backup.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-
models-sql-server
Question 25
Your database contains a table named Purchases. The table includes a DATETIME column named
PurchaseTime that stores the date and time each purchase is made. There is a non- clustered index
on the PurchaseTime column. The business team wants a report that displays the total number of
purchases made on the current day. You need to write a query that will return the correct results in
the most efficient manner.
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = CONVERT(DATE, GETDATE())
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = GETDATE()
SELECT COUNT(*)
FROM Purchases
WHERE CONVERT(VARCHAR, PurchaseTime, 112) =
CONVERT(VARCHAR, GETDATE(), 112)
SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime >= CONVERT(DATE, GETDATE())
AND PurchaseTime <DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))
Explanation:
Explanation:
To compare a time with date we must use >= and > operators, and not the = operator.
Incorrect Answers:
A: The in WHERE clause there is an incorrect comparison between time and a date, as equality (=) is
used.
References:
28 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
http://technet.microsoft.com/en-us/library/ms181034.aspx
You manage a Microsoft SQL Server environment that includes the following databases: DB1, DB2,
Reporting.
The environment also includes SQL Reporting Services (SSRS) and SQL Server Analysis Services (SSAS).
All SSRS and SSAS servers use named instances. You configure a firewall rule for SSAS.
Databases
Database Name:
DB1
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are
inserted into DB1 or updated each second. Inserts are made by many different external applications
that your company's developers do not control. You observe that transaction log write latency is a
bottleneck in performance. Because of the transient nature of all the data in this database, the
business can tolerate some data loss in the event of a server shutdown.
Database Name:
DB2
Notes:
This database was migrated from SQL Server 2012 to SQL Server 2016. Thousands of records are
updated or inserted per second. You observe that the WRITELOG wait type is the highest aggregated
wait type. Most writes must have no tolerance for data loss in the event of a server shutdown. The
business has identified certain write queries where data loss is tolerable in the event of a server
shutdown.
Database Name:
Reporting
Notes:
You create a SQL Server-authenticated login named BIAppUser on the SQL Server instance to support
users of the Reporting database. The BIAppUser login is not a member of the sysadmin role.
You plan to configure performance-monitoring alerts for this instance by using SQL Agent Alerts.
You create a login named BIAppUser. The login must be able to access the Reporting database.
How should you complete the Transact-SQL statements? 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.
Explanation:
Explanation:
Box 1: Reporting
Users are created per database and are associated with logins. You must be connected to the
database in where you want to create the user. Here is some sample Transact-SQL that creates a
user:
Question 27
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 are tuning the performance of a virtual machines that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest
table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1,
2:3:1, and 2:4:1 within the tempdb database.
Yes
No
Explanation:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you
consistently see high waiting for PAGELATCH_IO, you can benefit from a faster I/O subsystem for SQL
Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages',
which are accessed frequently and which you might identify as the causes of your latch contention.
For example, if you have a currency table with a data page containing 100 rows, of which 1 is
updated per transaction and you have a transaction rate of 200/sec, you could see page latch queues
of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full half-
second delay for each update. In this case, splitting out the currency rows into different tables might
prove more performant (if less normalized and logically structured).
32 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
Question 28
You administer a Windows 2008 server hosting an instance of Microsoft SQL Server 2012 Standard
Edition. The server hosts a database named Orders.
Users report that a query that filters on OrderDate is taking an exceptionally long time. You discover
that an index named IX_OrderDate on the CustomerOrder table is heavily fragmenteD.
You need to improve the performance of the IX_OrderDate index. The index should remain online
during the operation.
Explanation:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the
index, and as it goes it fixes physical ordering of pages and also compacts pages to apply any
previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to
just stop where it is (it doesn’t have a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-
reorganize/
You run DBCC CHECKDB and receive an error message within a few seconds. No pages are listed in
the error message.
You need to repair the database corruption as quickly as possible. The solution must minimize data
loss.
Explanation:
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.
Incorrect Answers:
A: The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best
option for bringing a database to a physically consistent state. If successful, the
REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data
lost than if a user were to restore the database from the last known good backup.
B: REPAIR_FAST
Maintains syntax for backward compatibility only. No repair actions are performed.
References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-
transact-sql
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.
NO_TRUNCATE
NORECOVERY
STANDBY
FORMAT
Explanation:
Explanation:
* If the database is online and you plan to perform a restore operation on the database, begin by
backing up the tail of the log. To avoid an error for an online database, you must use the … WITH
NORECOVERY option of the BACKUP Transact-SQL statement.
Note: A tail-log backup captures any log records that have not yet been backed up (the tail of the log)
to prevent 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.
References: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/tail-log-
backups-sql-server
You have Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
Yes
No
Explanation:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a
performance bottleneck and can cause the transaction log file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk
for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-
waits/
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.
Explanation:
The full recovery model uses log backups to prevent data loss in the broadest range of failure
scenarios, and backing and restoring the transaction log (log backups) is required. The advantage of
using log backups is that they let you restore a database to any point of time that is contained within
a log backup (point-in-time recovery). You can use a series of log backups to roll a database forward
to any point in time that is contained in one of the log backups. Be aware that to minimize your
restore time, you can supplement each full backup with a series of differential backups of the same
data.
References: https://technet.microsoft.com/en-us/library/ms190217(v=sql.105).aspx
STATS
COMPRESSION
CHECKSUM
IN IT
Explanation:
Explanation:
STATS [ =percentage ]
Displays a message each time another percentage completes, and is used to gauge progress. If
percentage is omitted, SQL Server displays a message after each 10 percent is completed.
The STATS option reports the percentage complete as of the threshold for reporting the next
interval. This is at approximately the specified percentage; for example, with STATS=10, if the
amount completed is 40 percent, the option might display 43 percent. For large backup sets, this is
not a problem, because the percentage complete moves very slowly between completed I/O calls.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
Question 34
You administer a Microsoft SQL Server 2012 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.
The use of local disks for TempDB allows us to have more flexibility when configuring for optimal
performance. It is a common performance recommendation to create the TempDB database on the
fastest storage available. With the capability to utilize local disk for TempDB placement we can easily
utilize disks that are larger, have a higher rotational speed or use SSD disks.
References: https://www.mssqltips.com/sqlservertip/2817/sql-server-2012-cluster-with-tempdb-on-
local-disk/
Question 35
You administer a Microsoft SQL Server 2012 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.
Explanation:
You would need to use either the SQL Server Management Studio or Transact-SQL.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
Your company has a Win32 application installed on 1,000 computers. The application connects to the
database by using a network name of server1.contoso.local.
You need to migrate the database to SQL Server 2016 on a Microsoft Azure virtual machine that runs
Windows Server 2016. The solution must minimize outages to the application.
Explanation:
SQL Server high availability and disaster recovery (HADR) technologies that are supported in Azure
include:
Log Shipping
SQL Server Backup and Restore with Azure Blob Storage Service
Incorrect Answers:
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-
windows-sql-high-availability-dr
Scalar-valued function
Inline function
User-defined data type
Stored procedure
Explanation:
Explanation:
Stored procedures accept input parameters and return multiple values in the form of output
parameters to the calling program. They cannot be used in views.
References: https://docs.microsoft.com/en-us/sql/relational-databases/stored-procedures/stored-
procedures-database-engine
Question 38
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.
Explanation:
If the service must interact with network services, access domain resources like file shares or if it
uses linked server connections to other computers running SQL Server, you might use a minimally-
privileged domain account. Many server-to-server activities can be performed only with a domain
user account.
You create an Availability Group defined by the following schema. (Line numbers are included for
reference only.)
You need to implement an AlwaysOnAvailablity Group that will meet the following conditions:
Production transactions should be minimally affected. The secondary server should allow reporting
queries to be performed. If the primary server goes offline, the secondary server should not
automatically take over.
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433') PRIMARY_ROLE (
ALLOW_CONNECTIONS = READ_WRITE,
READ_ONLY_ROUTING_LIST = NONE)
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = READ_ONLY,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL
SECONDARY_ROLE (
ALLOW_CONNECTIONS = YES,
READ_ONLY_ROUTING_URL = 'TCP://SecondaryServer:1433')
Explanation:
Incorrect Answers:
References: https://docs.microsoft.com/en-us/sql/database-engine/availability-
groups/windows/availability-modes-always-on-availability-groups
Question 40
You administer a SQL Server 2012 server that contains a database named SalesDB. SalesDb contains a
schema named Customers that has a table named Regions. A user named UserA is a member of a
role named Sales.
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that UserA is disallowed to select from any of the tables in the Customers
schema.
Explanation:
44 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Use SQL Data Warehouse or Parallel Data WarehouseGRANT and DENY statements to grant or deny a
permission (such as UPDATE) on a securable (such as a database, table, view, etc.) to a security
principal (a login, a database user, or a database role).
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-
azure-sql-data-warehouse-parallel-data-warehouse
Question 41
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 are migrating an on-premises Microsoft SQL Server instance to SQL Server on a Microsoft Azure
virtual machine. The instance has 30 databased that consume a total of 2 TB of disk space. The
instance sustains more than 30,000 transactions per second.
You need to provision storage for the virtual machine. The storage must be able to support the same
load as the on-premises deployment.
Solution: You create one storage account that has 30 containers. You create a VHD in each container.
Yes
No
Explanation:
Expalantion:
References: https://www.tech-coffee.net/understand-microsoft-azure-storage-for-virtual-machines/
You need to implement real-time encryption of the database and all backups.
Solution: You enable Transparent Data Encryption (TDE) on the primary instance.
Yes
No
Explanation:
Explanation:
Azure SQL Database and Data Warehouse offer encryption-at-rest by providing Transparent Data
Encryption (TDE) for all data written to disk, including databases, log files and backups. This protects
data in case of unauthorized access to hardware. TDE provides a TDE Protector that is used to
encrypt the Database Encryption Key (DEK), which in turn is used to encrypt the data. With the TDE
and Bring Your Own Key (BYOK) offering currently in preview, customers can take control of the TDE
Protector in Azure Key Vault.
Taking advantage of TDE with BYOK for databases that are geo-replicated to maintain high
availability requires to configure and test the scenario carefully.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-
with-azure-key-vault/
You need to ensure that Data File Autogrow operations use Instant File Initialization.
Explanation:
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.
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
Explanation:
SQL Server has alerts that get more important based on the severity of the alert. Anything of severity
16 or below tends to refer to the database and deals with issues that are tied to syntax errors,
violations of foreign keys, etc. While those errors are typically important, they don't refer to anything
with regards to overall health of the SQL Server. Alerts 17 through 25 do. Those are the ones your
health checks are probably firing on.
References: https://www.mssqltips.com/sqlservertip/3384/configuring-critical-sql-server-alerts/
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.
Explanation:
To set up a readable secondary replica, you first create an availability group. Then you add replicas.
References: http://msdn.microsoft.com/en-us/library/jj542414.aspx
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.
Incorrect Answers:
C: SQL Server 2012 Web edition is a low total-cost-of-ownership option for Web hosters and Web
VAPs to provide scalability, affordability, and manageability capabilities for small to large scale Web
properties.
References: https://msdn.microsoft.com/en-us/library/ms144275(v=sql.110).aspx
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.
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.
Use sp_configure to set a value for blocked process threshold. Create an extended
event session.
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.
Run the sp_who command from a query window.
Run the DBCC TRACEON 1222 command from a query window and review the SQL
Server event log.
Explanation:
Incorrect Answers:
E: DBCC TRACEON 1222 is used to detect deadlocks, not to detect long running queries.
References:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
http://msdn.microsoft.com/en-us/library/ms188396.aspx
In the past, users at remote sites reported issues when they used applications hosted at the Seattle
office.
You need to optimize performance for users running reports while minimizing costs.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-
transact-sql#add-secondary-database
Question 49
You are a database administrator for a Microsoft SQL Server 2012 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.
Database Mirroring
Peer-to-Peer Replication
Log Shipping
Availability Groups
Explanation:
Explanation:
References: https://docs.microsoft.com/en-us/sql/relational-
databases/replication/transactional/peer-to-peer-transactional-replication
Question 50
You are using dynamic management views to monitor an SQL Server server named SQL1.
You need to ensure that Dba1 can access dynamic management views for SQL1.
Explanation:
To query a dynamic management view or function requires SELECT permission on object and VIEW
SERVER STATE or VIEW DATABASE STATE permission.
Server-scoped dynamic management views and functions. These require VIEW SERVER STATE
permission on the server.
Database-scoped dynamic management views and functions. These require VIEW DATABASE STATE
permission on the database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-
management-views/system-dynamic-management-views
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.
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the
index, and as it goes it fixes physical ordering of pages and also compacts pages to apply any
previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to
just stop where it is (it doesn’t have a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-
reorganize/
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the
required detail.
"The job failed. The Job was invoked by User CONTOSO\ServiceAccount. The last step to run was step
1 (Subplan_1)."
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are
retained.
References: http://msdn.microsoft.com/en-us/library/ms175488.aspx
Question 53
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
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.
Explanation:
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
References: http://msdn.microsoft.com/en-us/library/ms188246.aspx
Question 54
You are the database administrator in your company. You plan to create 10 identical environments
that use SQL Server 2016 as a database engine. Each environment has the following custom
requirements:
Three user databases must be preinstalled.
The tempdb database must contain eight data files that are 1024 MB each.
Trace flag 2371 must be turned at the instance level.
Provision 10 Azure virtual machines that each contain SQL Server 2016, installed by
using the default settings.
Create an installation configuration file and perform unattended installations of SQL
Server 2016.
Create a virtual machine template by using a prepared instance of SQL Server 2016.
Create a virtual machine template by using a complete instance of SQL Server 2016.
Explanation:
Explanation:
You should create a virtual machine template by using a complete instance of SQL Server 2016. You
use the sysprep tool to prepare a complete instance of SQL Server 2016. By using a complete
instance, SQL Server, the network, and the users are all created, and the system cannot be
reconfigured during the installation process.
Incorrect Answers:
A: You should not provision 10 Azure virtual machines that each contain SQL Server 2016, installed by
using the default settings. A virtual machine created by using the Azure library provides you with a
standard installation, and the requirements call for a custom installation. The instance will need
some specific parameters for your custom installation. Therefore, you would have to customize each
Azure virtual machine.
C: You should not create a virtual machine template by using a prepared instance of SQL Server 2016.
A virtual machine template that contains a prepared instance of SQL Server could be modified during
the installation process. For example, some features could be added or removed during the
installation process. The prepared instance contains a preconfigured version of SQL Server without
network and user configurations.
References: https://support.neverfail.com/hc/en-us/articles/115015350287-Deploy-Microsoft-SQL-
Server-2016-Virtual-Machine-Template
Question 55
You plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features
such as SQL Server Management Studio, Service Broker and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
UserA is granted the Select permission on the Regions table. The Sales role is granted the Select
permission on the Customers schema.
You need to ensure that the Sales role, including UserA, is disallowed to select from any of the tables
in the Customers schema.
Explanation:
Use SQL Data Warehouse or Parallel Data WarehouseGRANT and DENY statements to grant or deny a
permission (such as UPDATE) on a securable (such as a database, table, view, etc.) to a security
principal (a login, a database user, or a database role).
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/permissions-grant-deny-revoke-
azure-sql-data-warehouse-parallel-data-warehouse
You need to optimize transaction logging and locking for the statement.
HOLDLOCK
ROWLOCK
XLOCK
UPDLOCK
TABLOCK
Explanation:
Explanation:
When importing data into a heap by using the INSERT INTO SELECT <columns> FROM statement, you
can enable optimized logging and locking for the statement by specifying the TABLOCK hint for the
target table.
References: https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table
You have a mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to limit the amount of memory, CPU, and IOPS used
for the pool of all queries that the Reporting_user login can run concurrently.
Yes
No
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.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
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.
Incorrect Answers:
B: Unicode compression supports the fixed-length nchar(n) and nvarchar(n) data types.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/page-compression-
implementation
https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/row-compression-
implementation
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
The Service Master Key is the root of the SQL Server encryption hierarchy. It does not handle alerts
and jobs.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features
such as SQL Server Management Studio, Service Broker and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
Question 61
You administer a Microsoft SQL Server 2012 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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
A Data Collector Set
Explanation:
Explanation:
62 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
To audit users in a role use a Database Audit Specification.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-audit-
specification-transact-sql
Question 62
You administer a Microsoft SQL Server 2012.
A process that normally runs in less than 10 seconds has been running for more than an hour.
You examine the application log and discover that the process is using session ID 60.
EXEC sp_who 60
SELECT * FROM sys.dm_exec_sessions WHERE sessionid = 60
EXEC sp_helpdb 60
DBCC INPUTBUFFER (60)
Explanation:
Explanation:
sp_who provides information about current users, sessions, and processes in an instance of the
Microsoft SQL Server Database Engine. The information can be filtered to return only those
processes that are not idle, that belong to a specific user, or that belong to a specific session.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-
procedures/sp-who-transact-sql
Explanation:
Writing to the Windows Security log requires the SQL Server service account to be added to the
Generate security audits policy. By default, the Local System, Local Service, and Network Service are
part of this policy. This setting can be configured by using the security policy snap-in (secpol.msc).
Additionally, the Audit object access security policy must be enabled for both Success and Failure.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-
audit-database-engine
Explanation:
Members of the db_datareader fixed database role can run a SELECT statement against any table or
view in the database.
References: https://technet.microsoft.com/en-us/library/ms188629(v=sql.90).aspx
You manage on-premises and Microsoft Azure SQL Database instances for a company. Your
environment must support the Microsoft SQL Server 2012 ODBS driver.
transport-level encryption
cell-level encryption
Transparent Data Encryption
Always Encrypted
Encrypting File System
BitLocker
dynamic data masking
Explanation:
SQL Server Management Studio (SSMS) provides a wizard that helps you easily configure Always
Encrypted by setting up the column master key, column encryption key, and encrypted columns for
you.
Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the
encryption keys to SQL Server or Azure SQL Database. An Always Encrypted enabled driver, such as
the ODBC Driver 13.1 for SQL Server, achieves this by transparently encrypting and decrypting
sensitive data in the client application.
Note: The ODBC driver automatically determines which query parameters correspond to sensitive
database columns (protected using Always Encrypted), and encrypts the values of those parameters
before passing the data to SQL Server or Azure SQL Database. Similarly, the driver transparently
decrypts data retrieved from encrypted database columns in query results.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-always-encrypted-
azure-key-vault#encrypt-columns-configure-always-encrypted
https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx
You need to ensure that reports do not use all available system resources.
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU,
it detects the best degree of parallelism, that is, the number of processors employed to run a single
statement, for each parallel plan execution. You can use the max degree of parallelism option to limit
the number of processors to use in parallel plan execution.
Incorrect Answers:
A: The Auto Close property exposes server behavior for databases not accessed by a user. This
feature 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.
References: https://msdn.microsoft.com/en-us/library/ms189094.aspx
Question 67
You administer two instances of Microsoft SQL Server 2012. You deploy an application that uses a
database on the named instance.
You need to ensure that the application can connect to the named instance.
The SQL Server Browser 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:
References: https://technet.microsoft.com/en-us/library/ms181087(v=sql.105).aspx
Question 68
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
Always Encrypted supports multiple key stores for storing Always Encrypted column master keys. A
column master key can be a certificate stored in Windows Certificate Store.
References: https://msdn.microsoft.com/en-us/library/mt723359.aspx
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 without leasing or purchasing additional physical locations.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
Expalantion:
Microsoft SQL Server Backup to Microsoft Azure Tool enables backup to Azure Blob Storage and
encrypts and compresses SQL Server backups stored locally or in the cloud.
References: https://www.microsoft.com/en-us/download/details.aspx?id=40740
Explanation:
B: FileTables extend the capabilities of the FILESTREAM feature of SQL Server. Therefore you have to
enable FILESTREAM for file I/O access at the Windows level and on the instance of SQL Server before
you can create and use FileTables.
D: Before you can create FileTables in a database, the database must have a FILESTREAM filegroup.
When you enable non-transactional access to files at the database level, you can optionally provide a
directory name at the same time by using the DIRECTORY_NAME option. If you do not provide a
directory name when you enable non-transactional access, then you have to provide it later before
you can create FileTables in the database.
References: https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-the-
prerequisites-for-filetable
You need to evaluate existing and potential clustered and non-clustered indexes that will improve
performance.
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.
Incorrect Answers:
A: sys.dm_db_index_usage_stats returns counts of different types of index operations and the time
each type of operation was last performed in SQL Server.
References: https://docs.microsoft.com/en-us/sql/relational-databases/performance/database-
engine-tuning-advisor
Explanation:
To enable certificate authentication for database mirroring on a given server instance, the system
administrator must configure each server instance to use certificates on both outbound and inbound
connections.
References: https://docs.microsoft.com/en-us/sql/database-engine/database-mirroring/use-
certificates-for-a-database-mirroring-endpoint-transact-sql
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 need to ensure that your backup will continue if any invalid checksum is encountered.
STANDBY
Differential
FULL
CHECKSUM
BULK_LOGGED
CONTINUE_AFTER_ERROR
SIMPLE
DBO_ONLY
COPY_ONLY
SKIP
RESTART
Transaction log
NO_CHECKSUM
NORECOVERY
Explanation:
Explanation:
https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql
Question 74
You are the administrator of a Microsoft SQL Server 2012 server.
Some applications consume significant resources. You need to manage the server workload by
restricting resource-intensive applications.
Configure Resource Pools, Workload Groups, and Classifier Function, and then enable
the Resource Governor
Set up Service Broker to ensure that application are not allowed to consume more
than the specified amount of resource
Create a new rule for each application that sets the resource limit allowed
Create a new plan Guide with a Scope Type of sql and define the resource limits for
each application
Explanation:
Explanation:
In the SQL Server Resource Governor, a resource pool represents a subset of the physical resources
of an instance of the Database Engine. Resource Governor enables you to specify limits on the
amount of CPU, physical IO, and memory that incoming application requests can use within the
resource pool. Each resource pool can contain one or more workload groups. When a session is
started, the Resource Governor classifier assigns the session to a specific workload group, and the
session must run using the resources assigned to the workload group.
References: https://docs.microsoft.com/en-us/sql/relational-databases/resource-governor/resource-
governor-resource-pool
You need to configure the SQL Server Database Engine service on a failover cluster.
A domain user
The BUILTIN\SYSTEM account
A local user with Run as Service permissions
The SQLBrowser account
Explanation:
References: https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/install/create-a-new-
sql-server-failover-cluster-setup
Question 76
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
You suspect that the current SQL Server indexes cause queries to execute slowly.
You need to identify which indexes must be created to reduce the query execution time.
Which three dynamic management views should you use? Each correct answer presents part of the
solution.
sys.dm_db_index_physical_stats
sys.dm_db_missing_index_group_stats
sys.indexes
sys.dm_db_index_usage_stats
sys.dm_db_missing_index_groups
sys.dm_db_index_operational_stats
sys.dm_db_missing_index_details
sys.sysindexkeys
Explanation:
Expalantion:
A set of dynamic management objects that can be queried to return information about missing
indexes.
The MissingIndexes element in XML Showplans, which correlate indexes that the query optimizer
considers missing with the queries for which they are missing.
After running a typical workload on SQL Server, you can retrieve information about missing indexes
by querying the dynamic management objects listed in the following table. These dynamic
management objects are stored in the master database.
sys.dm_db_missing_index_group_stats
Returns summary information about missing index groups, for example, the performance
improvements that could be gained by implementing a specific group of missing indexes.
sys.dm_db_missing_index_groups
Returns information about a specific group of missing indexes, such as the group identifier and the
identifiers of all missing indexes that are contained in that group.
sys.dm_db_missing_index_details
Returns detailed information about a missing index; for example, it returns the name and identifier
of the table where the index is missing, and the columns and column types that should make up the
missing index.
sys.dm_db_missing_index_columns
Returns information about the database table columns that are missing an index.
References: https://technet.microsoft.com/en-us/library/ms345524(v=sql.105).aspx
Question 77
Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution. Determine whether the solution meets stated goals.
You need to ensure that queries use statistical data and do not initialize values for local variables.
Yes
No
Explanation:
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
Question 78
You administer a Microsoft SQL Server 2012 database named Orders.
A NULL value represents a domestic order. Ninety percent of the values in CountryCode are NULL.
Customers require a procedure that will return orders for all customers from a specified country.
You create a new procedure:
You need to alter the schema to optimize this query. Objects created must use a minimum amount of
resources.
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-statistics-transact-sql
Question 79
You administer a Microsoft SQL Server 2012 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.
Explanation:
REORGANIZE specifies to reorganize the index leaf level. The REORGANIZE operation is always
performed online. This means long-term blocking table locks are not held and queries or updates to
the underlying table can continue during the ALTER INDEX REORGANIZE transaction.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql
You need to configure transparent data encryption (TDE) for DB1. Which two actions should you
perform? Each correct answer presents part of the solution.
Explanation:
You should connect to DB1. To encrypt DB1, you connect directly to DB1. When you connect to DB1.
You use the ALTER DATABASE DB1 SET ENCRYPTION ON statement to encrypt the database. This is
the statement that turns on TDE for Azure SQL Database.
Incorrect Answers:
A: You should not run CREATE CERTIFICATE certl WITH Subject = TDE Cert' on DB1. You do not need
to create a certificate to encrypt an Azure SQL database. This would be a part of the solution when
you encrypt an on-premises database. You should not connect to the master database. To encrypt
DB1, you need to connect directly to DB1. not to the master database.
E: You should not run CREATE MASTER KEY on the master database.
You would execute CREATE MASTER KEY when you have to encrypt an on-premises database.
References: https://docs.microsoft.com/en-us/sql/relational-
databases/security/encryption/transparent-data-encryption
You need to write messages to the Application Log when users are added to or removed from a fixed
server role in Server01.
Explanation:
The SQL Server Audit feature enables you to audit server-level and database-level groups of events
and individual events.
Server-level. These actions include server operations, such as management changes, such as in this
question, and logon and logoff operations.
Database-level. These actions encompass data manipulation languages (DML) and data definition
language (DDL) operations.
References: http://technet.microsoft.com/en-us/library/cc280663(v=sql.105).aspx
You have Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
Yes
No
Explanation:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a
performance bottleneck and can cause the transaction log file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk
for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-
waits/
You plan to migrate the database to Microsoft SQL Server on a Microsoft Azure virtual machine.
You need to attach the database files to the SQL Server instance on the virtual machine. The solution
must ensure that you can run file snapshot backups.
How should you complete the statement? To answer, select the appropriate options in the answer
area.
Solution:
Explanation:
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-sql-server-
transact-sql
82 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Question 84
You administer a Windows Azure SQL Database database named Orders.
Explanation:
Is used for copying a database to the same or a different SQL Database server.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-azure-sql-
database
Question 85
You plan to deploy 20 Microsoft Azure SQL Database instances to an elastic pool in Azure to support
a batch processing application.
Two of the databases in the pool reach their peak workload threshold at the same time every day.
This leads to inconsistent performance for batch completion.
In SQL Database, the relative measure of a database's ability to handle resource demands is
expressed in Database Transaction Units (DTUs) for single databases and elastic DTUs (eDTUs) for
databases in an elastic pool.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
Question 86
You administer a Microsoft SQL Server 2012 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.
a schedule
an alert
an operator
a proxy
Explanation:
Explanation:
A SQL Server Agent proxy defines the security context for a job step. A proxy provides SQL Server
Agent with access to the security credentials for a Microsoft Windows user. Each proxy can be
associated with one or more subsystems. A job step that uses the proxy can access the specified
subsystems by using the security context of the Windows user. Before SQL Server Agent runs a job
step that uses a proxy, SQL Server Agent impersonates the credentials defined in the proxy, and then
runs the job step by using that security context.
References: https://technet.microsoft.com/en-us/library/ms189064(v=sql.105).aspx
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.
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.
References: https://technet.microsoft.com/en-us/library/ms190692(v=sql.105).aspx
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.
Explanation:
Confirm that distribution agent has read privileges, full control access is not required, to the folder in
question.
References: http://stackoverflow.com/questions/14555262/cannot-bulk-load-operating-system-
error-code-5-access-is-denied
You have upgraded a database from the SQL2008 instance by using the side-by-side migration
technique.
You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance.
Back up the master database on the SQL2008 instance. Restore the master database
on the SQL2012 instance
Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package
Use sp_grantlogin
Use xp_logininfo.
Explanation:
Explanation:
Incorrect Answers:
References: https://technet.microsoft.com/en-us/library/ms173449(v=sql.110).aspx
You plan to migrate on-premises Microsoft SQL Server to SQL Server on a Microsoft Azure virtual
machine.
You need to ensure that the Azure virtual machine can handle the workload.
Which tool should you use for each environment? To answer, drag the appropriate tools to the
correct options. Each tool may be used once. More than once, or not at all.
Solution:
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.
NORECOVERY
FULL
NO_CHECKSUM
CHECKSUM
Differential
BULK_LOGGED
STANDBY
RESTART
SKIP
Transaction log
DBO ONLY
COPY_ONLY
SIMPLE
CONTINUE AFTER ERROR
Explanation:
Explanation:
Minimally, you must have created at least one full backup before you can create any log backups.
After that, the transaction log can be backed up at any time unless the log is already being backed
up.
Question 92
You administer all the deployments of Microsoft SQL Server 2012 in your company. You have two
servers in the same data center that hosts your production database.
You need to ensure that the database remains available if a catastrophic server failure or a disk
failure occurs.
You also need to maintain transactional consistency of the data across both servers.
Two servers configured in a Windows Failover Cluster in the same data center SQL
Server configured as a clustered instance
SQL Server that includes an application database configured to perform transactional
replication
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
Two servers configured in different data centers
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
One server configured as an Active Secondary
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
Two servers configured in different data centers
SQL Server Availability Group configured in Asynchronous-Commit Availability Mode
SQL Server that includes an application database configured to perform snapshot
replication
Two servers configured on the same subnet
SQL Server Availability Group configured in Synchronous-Commit Availability Mode
Explanation:
Explanation:
Synchronous-commit mode emphasizes high availability over performance, at the cost of increased
transaction latency.
Question 93
You are designing a Windows Azure SQL Database for an order fulfillment system. You create a table
named Sales.Orders with the following script.
Fulfilled
Shipped
Ordered
Received
You need to design the database to ensure that that you can retrieve the following information:
More than one answer choice may achieve the goal. Select the BEST answer.
To the Sales.Orders table, add three columns named Status, PreviousStatus and
ChangeDate. Update rows as the order status changes.
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.
Implement change data capture on the Sales.Orders table.
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.
Explanation:
Expalantion:
Incorrect Answers:
You need to ensure that during an Azure update cycle or a hardware failure, the application remains
available.
Which two deployment configurations should you implement? Each correct answer presents part of
the solution.
Explanation:
Note: Using availability sets allows you to build in redundancy for your Azure services. By grouping
related virtual machines and services (tiers) into an availability set (in this case, deploying both of
your databases into an availability set), you ensure that if there is a planned or unplanned outage,
your services will remain available. At the most basic level, virtual machines in an availability set are
put into a different fault domain and update domain. An update domain allows virtual machines to
have updates installed and then the virtual machines are rebooted together.
If you have two virtual machines in an availability set, each in its own update domain, a rebooting of
one server does not bring down all of the servers in a given tier. A fault domain operates in the same
manner, so if there is a physical problem with a server, rack, network, or other service, both
machines are separated, and services will continue.
Incorrect Answers:
B: You should not deploy all servers in a single availability set. This will not provide the fault tolerance
needed, as all machines would be rebooted (or suffer a hardware failure) together.
D: You should not deploy SQL2 and AppServer2 in a single availability set. SQL2 and AppServer2
provide different services, so they should not be grouped together.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
Question 95
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
Explanation:
You can use the ALTER DATABASE (Transact-SQL) statement to manage the growth of a transaction
log file
To control the maximum the size of a log file in KB, MB, GB, and TB units or to set growth to
UNLIMITED, use the MAXSIZE option. However, there is no SET LOGFILE subcommand.
References: https://technet.microsoft.com/en-us/library/ms365418(v=sql.110).aspx#ControlGrowth
You need to ensure that a failover occurs when the server diagnostics returns query_processing
error.
SqlOumperDumpFlags
FailureConditionLevel
HealthCheckTimeout
SqlDumperDumpPath
Explanation:
Explanation:
Use the FailureConditionLevel property to set the conditions for the Always On Failover Cluster
Instance (FCI) to fail over or restart.
The failure conditions are set on an increasing scale. For levels 1-5, each level includes all the
conditions from the previous levels in addition to its own conditions.
system
resource
query process
io_subsystem
events
The system, resource, and query process components are used for failure detection. The
io_subsytem and events components are used for diagnostic purposes only.
References: https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/configure-
failureconditionlevel-property-settings
You need to implement real-time encryption of the database and all backups.
Yes
No
Explanation:
Explanation:
SQL Database dynamic data masking does not encrypt the data.
Note: SQL Database dynamic data masking limits sensitive data exposure by masking it to non-
privileged users.
Dynamic data masking helps prevent unauthorized access to sensitive data by enabling customers to
designate how much of the sensitive data to reveal with minimal impact on the application layer.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-
with-azure-key-vault/
You discover that the performance of the query is slow. Analysis of the query plan shows table scans
where the estimated rows do not match the actual rows for SalesOrderHeader by using an
unexpected index on SalesOrderDetail.
Explanation:
The UPDATE STATISTICS command updates query optimization statistics on a table or indexed view.
By default, the query optimizer already updates statistics as necessary to improve the query plan; in
some cases you can improve query performance by using UPDATE STATISTICS or the stored
procedure sp_updatestats to update statistics more frequently than the default updates.
References: http://msdn.microsoft.com/en-us/library/ms187348.aspx
The database is modified by users only from Monday through Friday from 09:00 hours to 17:00
hours. Users modify more than 30 percent of the data in the database during the week.
The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch
process will take a maximum of 8 hours to complete.
The batch process will update three tables that are 10 GB in size. The batch process will update these
tables multiple times.
When the batch process completes, the Finance department runs a report to find out whether the
batch process has completed correctly.
You need to ensure that if the Finance department disapproves the batch process, the batch
operation can be rolled back in the minimum amount of time.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-
snapshots-sql-server
Global customers place orders from several countries. You need to view the country from which each
customer has placed the most orders.
Explanation:
99 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Use descending (DESC) ordering.
Incorrect Answers:
B: The ascending (ASC) sorting would produce the country from which each customer has placed the
least orders.
C: We are interested in the number of the orders, not the amount of the orders. We should use
ORDER BY COUNT(OrderAmount), not ORDER BY OrderAmount.
D: We are only interested in one single post, only the country from which each customer has placed
the most orders. Need to use a WHERE statement (here Where o.Rnk =1 ).
70-765
1
Licensed to Mauricio Cifuentes instructormauriciof2016@outlook.com
Score: 800/1000
Version:
Time Limit: 120 Minutes
You deploy Microsoft SQL Server to a virtual machine in Azure. You distribute the database files and
filegroups across multiple Azure storage disks.
You must be able to manage the databases as individual entities by using SQL Server Management
Studio. All data in the databases must be stored encrypted. Backups must be encrypted by using the
same key as the live copy of the database.
transport-level encryption
cell-level encryption
Transparent Data Encryption
Always Encrypted
Encrypting File System
BitLocker
dynamic data masking
Explanation:
Explanation:
Transparent data encryption (TDE) encrypts your databases, associated backups, and transaction log
files at rest without requiring changes to your applications.
TDE encrypts the storage of an entire database by using a symmetric key called the database
encryption key. In SQL Database the database encryption key is protected by a built-in server
certificate. The built-in server certificate is unique for each SQL Database server.
References: https://msdn.microsoft.com/en-us/library/dn948096.aspx
You need to identify the fragmentation percentage for the indexes of DB1.
sys.dm_db_index_operational_stats
sys.dm_db_index_physical_stats
sys.dm_db_xtp_hash_index_stats
sys.dm_db_index_usage_stats
Explanation:
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-
dm-db-index-physical-stats-transact-sql?view=sql-server-2017
Question 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. Determine whether the solution meets stated goals.
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure
IaaS VM.
Solution: You use an A8 compute-intensive instance and store the tempdb database in Standard
storage.
Yes
No
Explanation:
For D-series, Dv2-series, and G-series VMs, the temporary drive on these VMs is SSD-based. If your
workload makes heavy use of TempDB (such as temporary objects or complex joins), storing TempDB
on the D drive could result in higher TempDB throughput and lower TempDB latency.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-
machines-windows-sql-performance
Question 4
You have a database named DB1 that uses simple recovery mode.
Full backups of DB1 are taken daily and DB1 is checked for corruption before each backup.
You run the sys.columns catalog view and discover corrupt pages.
You need to recover the database. The solution must minimize data loss.
Explanation:
A page restore is intended for repairing isolated damaged pages. Restoring and recovering a few
individual pages might be faster than a file restore, reducing the amount of data that is offline during
a restore operation.
Restores individual pages. Page restore is available only under the full and bulk-logged recovery
models.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
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.
Explanation:
Explanation:
Step 1:
To provision an Azure AD-based contained database user (other than the server administrator that
owns the database), connect to the database (here the Reporting database) with an Azure AD
identity (not with a SQL Server account) that has access to the database.
To create an Azure AD-based contained database user (other than the server administrator that
owns the database), connect to the database with an Azure AD identity, as a user with at least the
ALTER ANY USER permission. Then use the following Transact-SQL syntax:
Step 3:
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication
Question 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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for
more than five minutes.
Solution: You run the Get-Counter cmdlet and specify the –counter '\physicaldisk:disk Transfers/sec'
parameter.
Yes
No
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 plan to migrate a Microsoft SQL Server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
The model database does not handle alerts and jobs. It is used as the template for all databases
created on an instance of SQL Server.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features
such as SQL Server Management Studio, Service Broker and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
You need to ensure that the size of the transaction log file does not exceed 2 GB.
Explanation:
You can use the ALTER DATABASE (Transact-SQL) statement to manage the growth of a transaction
log file
To control the maximum the size of a log file in KB, MB, GB, and TB units or to set growth to
UNLIMITED, use the MAXSIZE option. However, there is no SET LOGFILE subcommand.
References:
https://technet.microsoft.com/en-us/library/ms365418(v=sql.110).aspx#ControlGrowth
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 without leasing or purchasing additional physical locations.
What should you do? More than one answer choice may achieve the goal. Select the BEST answer.
Explanation:
Microsoft SQL Server Backup to Microsoft Azure Tool enables backup to Azure Blob Storage and
encrypts and compresses SQL Server backups stored locally or in the cloud.
References: https://www.microsoft.com/en-us/download/details.aspx?id=40740
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.
Explanation:
REORGANIZE specifies to reorganize the index leaf level. The REORGANIZE operation is always
performed online. This means long-term blocking table locks are not held and queries or updates to
the underlying table can continue during the ALTER INDEX REORGANIZE transaction.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql
Question 11
DRAG DROP
You need to ensure that the maintenance jobs on indexes continue to run after the move.
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.
Explanation:
Explanation:
General steps for a solution to automate the maintenance you Azure SQL DB statistics:
Schedule task
References: https://blogs.msdn.microsoft.com/azuresqldbsupport/2018/01/15/automating-azure-
sql-db-index-and-statistic-maintenance-using-azure-automation/
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 mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to limit the amount of memory, CPU, and IOPS used
for the pool of all queries that the Reporting_user login can run concurrently.
Yes
No
Explanation:
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.
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
Each database will have the I/O requirements shown in the following table.
You are evaluating whether to use the P30 storage disk type.
What is the minimum number of disks required for each database when using P30 storage disk type?
(Select two.)
DB1: 0
DB1: 1
DB1: 2
DB1: 3
DB1: 4
DB2: 0
DB2: 1
DB2: 2
DB2: 3
DB2: 4
Explanation:
Explanation:
P30 stats: Disk size is 1024 GB (1 TB), IOPS per disk is 5000.
Recommendation: Use a minimum of 2 P30 disks (1 for log files and 1 for data files and TempDB; or
stripe two or more disks and store all files in a single volume).
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-
storage#scalability-and-performance-targets
You need to deploy the customized templates to the Azure environment and to external endpoints.
properties
apiVersion
dependsOn
tags
Explanation:
References:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy-
rest
Question 15
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 stated goals. Some questions 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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application
and public websites. You configure geo-replication with regions in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
Yes
No
Explanation:
Explanation:
SQL Database dynamic data masking does not encrypt the data.
Dynamic data masking helps prevent unauthorized access to sensitive data by enabling customers to
designate how much of the sensitive data to reveal with minimal impact on the application layer.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-
with-azure-key-vault/
Question 16
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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for
more than five minutes.
Solution: You run the Add-AzureRmMetricAlertRule cmdlet and specify the –MetricName ‘Network
Out’ parameter.
Yes
No
You run DBCC CHECKDB and receive an error message within a few seconds. No pages are listed in
the error message.
You need to repair the database corruption as quickly as possible. The solution must minimize data
loss.
Explanation:
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.
Incorrect Answers:
A: The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best
option for bringing a database to a physically consistent state. If successful, the
REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data
lost than if a user were to restore the database from the last known good backup.
B: REPAIR_FAST
Maintains syntax for backward compatibility only. No repair actions are performed.
References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-
transact-sql
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.
Explanation:
You would need to use either the SQL Server Management Studio or Transact-SQL.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
Question 19
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 stated goals. Some questions 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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application
and public websites. You configure geo-replication with regions in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
Solution: You enable Transparent Data Encryption (TDE) on the primary instance.
Yes
No
Explanation:
Azure SQL Database and Data Warehouse offer encryption-at-rest by providing Transparent Data
Encryption (TDE) for all data written to disk, including databases, log files and backups. This protects
data in case of unauthorized access to hardware. TDE provides a TDE Protector that is used to
encrypt the Database Encryption Key (DEK), which in turn is used to encrypt the data. With the TDE
and Bring Your Own Key (BYOK) offering currently in preview, customers can take control of the TDE
Protector in Azure Key Vault.
Taking advantage of TDE with BYOK for databases that are geo-replicated to maintain high
availability requires to configure and test the scenario carefully.
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-
with-azure-key-vault/
Question 20
You plan to deploy an AlwaysOn failover cluster in Microsoft Azure. The cluster has a Service Level
Agreement (SLA) that requires an uptime of at least 99.95 percent.
Which cmdlet should you run before you deploy the virtual machine?
New-AzureRmAvailabilitySet
New-AzureRmLoadBalancer
New-AzureRmSqlDatabaseSecondary
New-AzureRmSqlElasticPool
New-AzureRmVM
New-AzureRmSqlServer
New-AzureRmSqlDatabaseCopy
New-AzureRmSqlServerCommunicationLink
Explanation:
Explanation:
On Azure virtual machines, a SQL Server Availability Group requires a load balancer. The load
balancer holds the IP address for the Availability Group listener. The New-AzureRmLoadBalancer
cmdlet creates an Azure load balancer.
Incorrect Answers:
Question 21
You have an on-premises Microsoft SQL server that has a database named DB1. DB1 contains several
tables that are stretched to Microsoft Azure.
Sys_sp_testlinkedserver
Sys_sp_rda_test_connection
Sys_sp_rda_reauthorized_db
Sp_set_firewall_rule
Explanation:
Explanation:
The Sys_sp_rda_test_connection cmdlet tests the connection from SQL Server to the remote Azure
server and reports problems that may prevent data migration.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-
procedures/sys-sp-rda-test-connection-transact-sql?view=sql-server-2017
Question 22
A company has an on-premises Microsoft SQL Server 2017 infrastructure. The storage area network
(SAN) that supports the SQL infrastructure has reached maximum capacity.
You need to recommend a solution to reduce on-premises storage use without changing the
application.
Explanation:
References: https://docs.microsoft.com/en-us/sql/sql-server/stretch-database/stretch-
database?view=sql-server-2017
Question 23
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 stated goals. Some questions 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 are tuning the performance of a virtual machine that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest
table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1. You
discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1, 2:3:1,
and 2:4:1 within the tempdb database.
Solution: You rewrite the queries to use aggregates instead of PIVOT statements.
Yes
No
Explanation:
Explanation:
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
You must create a custom system message as an alert when an error is raised.
@with_log
@lang
@severity
@replace
Explanation:
Explanation:
USE master;
GO
GO
Syntax:
[ , [ @lang= ] 'language' ]
[ , [ @replace= ] 'replace' ]
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-
procedures/sp-addmessage-transact-sql?view=sql-server-2017
You need to reduce the I/O workload on the SAN at a minimal cost.
Explanation:
The use of local disks for TempDB allows us to have more flexibility when configuring for optimal
performance. It is a common performance recommendation to create the TempDB database on the
fastest storage available. With the capability to utilize local disk for TempDB placement we can easily
utilize disks that are larger, have a higher rotational speed or use SSD disks.
References: https://www.mssqltips.com/sqlservertip/2817/sql-server-2012-cluster-with-tempdb-on-
local-disk/
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 mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You configure the Resource Governor to set the MAXDOP parameter to 0 for all queries
against the database.
Yes
No
Explanation:
Explanation:
SQL Server will consider parallel execution plans for queries, index data definition language (DDL)
operations, and static and keyset-driven cursor population.
You can override the max degree of parallelism value in queries by specifying the MAXDOP query
hint in the query statement.
References: https://technet.microsoft.com/en-us/library/ms181007(v=sql.105).aspx
You are tuning the performance of a virtual machine that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest
table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1,
2:3:1, and 2:4:1 within the tempdb database.
Yes
No
Explanation:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you
consistently see high waiting for PAGELATCH_IO, you can benefit from a faster I/O subsystem for SQL
Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages',
which are accessed frequently and which you might identify as the causes of your latch contention.
For example, if you have a currency table with a data page containing 100 rows, of which 1 is
updated per transaction and you have a transaction rate of 200/sec, you could see page latch queues
of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full half-
second delay for each update. In this case, splitting out the currency rows into different tables might
prove more performant (if less normalized and logically structured).
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
You need to identify whether the storage subsystem causes the performance issue.
Data sec/Write
Avg.disk Read Queue Length
% Disk Read Time
Disk sec/Read
Question 29
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 are migrating an on-premises Microsoft SQL Server instance to SQL Server on a Microsoft Azure
virtual machine. The instance has 30 databased that consume a total of 2 TB of disk space. The
instance sustains more than 30,000 transactions per second.
You need to provision storage for the virtual machine. The storage must be able to support the same
load as the on-premises deployment.
Solution: You create one storage account that has one container. You create multiple VHDs in the
container.
Yes
No
Explanation:
Explanation:
References: https://www.tech-coffee.net/understand-microsoft-azure-storage-for-virtual-machines/
In the past, users at remote sites reported issues when they used applications hosted at the Seattle
office.
You need to optimize performance for users running reports while minimizing costs.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-
transact-sql#add-secondary-database
Question 31
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 stated goals. Some questions 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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
Question 32
HOTSPOT
A company has an on-premises Microsoft SQL Server 2016 environment. All futures databases must
meet the following requirements:
The recovery model must be set to simple.
The compatibility level must be set to SQL server 2014 (120).
Your need to configure the SQL server 2016 environment.
In the table below, identify the database you must modify for each requirement.
Solution:
Explanation:
Explanation:
Newly created user databases use the same recovery model as the model database.
The model database is used as the template for all databases created on an instance of SQL Server.
Because tempdb is created every time SQL Server is started, the model database must always exist
29 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
on a SQL Server system. The entire contents of the model database, including database options, are
copied to the new database.
For all installations of SQL Server, the default compatibility level is set to the version of the Database
Engine. Databases are set to this level unless the model database has a lower compatibility level.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/databases/model-database?view=sql-
server-2017
https://docs.microsoft.com/en-us/sql/relational-databases/databases/model-database?view=sql-
server-2017
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-
level?view=sql-server-2017
Question 33
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 stated goals. Some questions 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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for
more than five minutes.
Solution: You run the Add-AzureRmMetricAlertRule cmdlet and specify the –MetricName 'Disk Write
Operations/Sec' parameter.
Yes
No
You are tuning the performance of a virtual machine that hosts a Microsoft SQL Server instance.
The virtual machine originally had four CPU cores and now has 32 CPU cores.
The SQL Server instance uses the default settings and has an OLTP database named db1. The largest
table in db1 is a key value store table named table1.
Several reports use the PIVOT statement and access more than 100 million rows in table1.
You discover that when the reports run, there are PAGELATCH_IO waits on PFS pages 2:1:1, 2:2:1,
2:3:1, and 2:4:1 within the tempdb database.
Yes
No
Explanation:
Explanation:
From SQL Server’s perspective, you can measure the I/O latency from sys.dm_os_wait_stats. If you
consistently see high waiting for PAGELATCH_IO, you can benefit from a faster I/O subsystem for SQL
Server.
A cause can be poor design of your database - you may wish to split out data located on 'hot pages',
which are accessed frequently and which you might identify as the causes of your latch contention.
For example, if you have a currency table with a data page containing 100 rows, of which 1 is
updated per transaction and you have a transaction rate of 200/sec, you could see page latch queues
of 100 or more. If each page latch wait costs just 5ms before clearing, this represents a full half-
second delay for each update. In this case, splitting out the currency rows into different tables might
prove more performant (if less normalized and logically structured).
References: https://www.mssqltips.com/sqlservertip/3088/explanation-of-sql-server-io-and-latches/
Explanation:
Data that is written to a striped volume is interleaved to all disks at the same time instead of
sequentially. Therefore, disk performance is the fastest on a RAID 0 volume as compared to any
other type of disk configuration.
Reference: https://support.microsoft.com/en-us/help/323433/how-to-establish-a-striped-volume-
raid-0-in-windows-server-2003
Question 36
Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution. Determine whether the solution meets the stated goals.
You need to ensure that queries use statistical data and do not initialize values for local variables.
Yes
No
Explanation:
Explanation:
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
Question 37
You deploy a new Microsoft Azure SQL Database instance to support a variety of mobile applications
and public websites.
You must be able to replicate the database to Azure datacenters in other regions by using geo-
replication.
Clients must only connect to the Azure SQL Database by using contained database users.
You must be able to move the database to other servers in the future.
Only applications in the 23.96.52.0-23.96.52.255 IP range are permitted to access the database.
The firewall settings for the instance must not provide access to any other Azure services.
Which three actions should you perform? Each correct answer presents part of the solution.
In the Azure portal, enable Allow access to Azure services for the Azure SQL Database
server
Run the following Transact-SQL statement:
EXECUTE sp_set_database_firewall_rule N'Applications', '23.96.52.0', '23.96.52.255'
Run the following Transact-SQL statement:
EXECUTE sp_set_firewall_rule N'Allow Windows Azure', '0.0.0.0', '0.0.0.0'
Run the following Transact-SQL statement:
EXECUTE sp_set_firewall_rule N'Applications', '23.96.52.0', '23.96.52.255'
Run the following Transact-SQL statement:
EXECUTE sp_set_database_firewall_rule N'Allow Windows Azure', '0.0.0.0', '0.0.0.0'
In the Azure portal, disable Allow access to Azure services for the Azure SQL Database
server
Explanation:
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-
database-firewall-rule-azure-sql-database?view=azuresqldb-current
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-
firewall-rule-azure-sql-database?view=azuresqldb-current
Question 38
You have a SQL Server 2016 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.
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.
References: https://technet.microsoft.com/en-us/library/ms190692(v=sql.105).aspx
You create a SQL Server Agent job by using the following statement.
msdb.dbo.sp_update_alert
msdb.dbo.sp_add_jobstep
msdb.dbo.sp_add_notification
msdb.dbo.sp_help_alert
Explanation:
Explanation:
USE msdb ;
GO
EXEC dbo.sp_add_notification
GO
References: https://docs.microsoft.com/en-us/sql/ssms/agent/notify-an-operator-of-job-
status?view=sql-server-2017
Question 40
You administer a Microsoft SQL Server 2012 instance that has several SQL Server Agent jobs
configured.
When SQL Server Agent jobs fail, the error messages returned by the job steps do not provide the
required detail.
You need to ensure that all available details of the job step failures for SQL Server Agent jobs are
retained.
References: http://msdn.microsoft.com/en-us/library/ms175488.aspx
Two of the databases in the pool reach their peak workload threshold at the same time every day.
This leads to inconsistent performance for batch completion.
Explanation:
In SQL Database, the relative measure of a database's ability to handle resource demands is
expressed in Database Transaction Units (DTUs) for single databases and elastic DTUs (eDTUs) for
databases in an elastic pool.
A pool is given a set number of eDTUs, for a set price. Within the pool, individual databases are given
the flexibility to auto-scale within set parameters. Under heavy load, a database can consume more
eDTUs to meet demand.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
You need to ensure that queries use statistical data and do not initialize values for local variables.
Yes
No
Explanation:
Explanation:
Enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 and
earlier version independent of the compatibility level of the database. This is equivalent to Trace Flag
9481.
References: https://msdn.microsoft.com/en-us/library/mt629158.aspx
Question 43
A company hosts a default installation of Microsoft SQL Server 2017 on a Linux-based server.
You observe that the performance of the server has degraded. Process for allocating tables show
high latency.
References:
https://www.itprotoday.com/microsoft-sql-server/top-10-sql-server-performance-tuning-tips
From SQL Server Management Studio (SSMS), a junior database administrator accidentally deletes
several rows from the Azure SQL database and breaks the connection to Azure.
Which two stored procedures should you use? Each correct answer presents part of the solution.
sys.sp_rda_reconcile_batch
sys.sp_rda_reconcile_indexes
sys.sp_rda_reauthorize_db
sys.sp_rda_reconcile_columns
sys.sp_rda_set_rpo_duration
Explanation:
If you have accidentally deleted columns from the remote table, run sp_rda_reconcile_columns to
add columns to the remote table that exist in the Stretch-enabled SQL Server table but not in the
remote table.
Incorrect Answers:
A: sys.sp_rda_reconcile_batch reconciles the batch ID stored in the Stretch-enabled SQL Server table
with the batch ID stored in the remote Azure table.
Typically you only have to run sp_rda_reconcile_batch if you have manually deleted the most
recently migrated data from the remote table. When you manually delete remote data that includes
the most recent batch, the batch IDs are out of sync and migration stops.
References:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-rda-
reconcile-batch-transact-sql
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sys-sp-rda-
reauthorize-db-transact-sql
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 Microsoft SQL Server on a Microsoft azure virtual machine that has 12 databases.
All database files are in the same Azure Blob storage account.
You need to receive an email notification if I/O operations to the database files exceed 800 MB/s for
more than five minutes.
Solution: You run the Get-Counter cmdlet and specify the –counter '\physicaldisk:disk write/sec'
parameter.
Yes
No
Question 46
You plan to create an AlwaysOn availability group that will have two replicas in Microsoft Azure and
two on-premises replicas.
You need to configure the network to support the availability group listener.
New-AzureRmAvailabilitySet
New-AzureRmLoadBalancer
New-AzureRmSqlDatabaseSecondary
New-AzureRmSqlElasticPool
New-AzureRmVM
New-AzureRmSqlServer
New-AzureRmSqlDatabaseCopy
New-AzureRmSqlServerCommunicationLink
Explanation:
Explanation:
An availability group listener is a virtual network name that clients connect to for database access.
On Azure virtual machines, a load balancer holds the IP address for the listener. The load balancer
routes traffic to the instance of SQL Server that is listening on the probe port. Usually, an availability
group uses an internal load balancer.
40 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-
machines-windows-portal-sql-ps-alwayson-int-listener
Question 47
A company plans to run Microsoft SQL Server on Linux-based servers.
You need to ensure that performance tuning settings are automatically configured during
installation.
Kali Linux
RHEL
SUSE
Ubuntu Server
Explanation:
References:
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-performance-best-practices?view=sql-
server-2017#linux-os-configuration
You discover that the performance of the query is slow. Analysis of the query plan shows table scans
where the estimated rows do not match the actual rows for SalesOrderHeader by using an
unexpected index on SalesOrderDetail.
Explanation:
The UPDATE STATISTICS command updates query optimization statistics on a table or indexed view.
By default, the query optimizer already updates statistics as necessary to improve the query plan; in
some cases you can improve query performance by using UPDATE STATISTICS or the stored
procedure sp_updatestats to update statistics more frequently than the default updates.
References: http://msdn.microsoft.com/en-us/library/ms187348.aspx
Question 49
Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution. Determine whether the solution meets stated goals.
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure
IaaS VM.
Solution: You use a D-Series VM and store the tempdb database on drive D.
Yes
No
Explanation:
For D-series, Dv2-series, and G-series VMs, the temporary drive on these VMs is SSD-based. If your
workload makes heavy use of TempDB (such as temporary objects or complex joins), storing TempDB
on the D drive could result in higher TempDB throughput and lower TempDB latency.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-
machines-windows-sql-performance
Question 50
You have a single-server on-premises Microsoft SQL Server deployment.
You must migrate the environment to an Azure virtual machine (VM). You must minimize costs while
maintaining the same level of performance as the on-premises SQL environment.
You need to evaluate the number and types of read/write operations for the existing deployment.
References:
https://support.microsoft.com/en-za/help/231619/how-to-use-the-sqliosim-utility-to-simulate-sql-
server-activity-on-a-d
Users report that App1 takes an unacceptably long time to retrieve customer records.
You need to find queries that take longer than 400 ms to run.
45 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Explanation:
Explanation:
Total_worker_time: Total amount of CPU time, reported in microseconds (but only accurate to
milliseconds), that was consumed by executions of this plan since it was compiled.
Incorrect Answers:
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-
management-views/sys-dm-exec-query-stats-transact-sql
Question 52
You have an on-premises server that runs Windows Server 2012 R2. The server has a Microsoft SQL
Server 2016 instance that has one user database. The database is 2 TB.
Your company has a Win32 application installed on 1,000 computers. The application connects to the
database by using a network name of server1.contoso.local.
You need to migrate the database to SQL Server 2016 on a Microsoft Azure virtual machine that runs
Windows Server 2016. The solution must minimize outages to the application.
Explanation:
SQL Server high availability and disaster recovery (HADR) technologies that are supported in Azure
include:
Log Shipping
SQL Server Backup and Restore with Azure Blob Storage Service
Incorrect Answers:
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-
windows-sql-high-availability-dr
Question 53
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
Explanation:
There are two high-level categories of key stores to consider - Local Key Stores, and Centralized Key
Stores.
Centralized Key Stores - serve applications on multiple computers. An example of a centralized key
store is Azure Key Vault.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-
and-store-column-master-keys-always-encrypted
The solution must allow data to be decrypted while in use but encrypted while at rest.
Explanation:
Transparent data encryption (TDE) encrypts your databases, associated backups, and transaction log
files at rest without requiring changes to your applications.
References: https://msdn.microsoft.com/en-us/library/dn948096.aspx
Question 55
You create an availability group that has replicas named HA/Server01 and HA/Server02.
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.
Explanation:
To set up a readable secondary replica, you first create an availability group. Then you add replicas.
Question 56
You administer a Microsoft SQL Server 2012 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.
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.
Use sp_configure to set a value for blocked process threshold. Create an extended
event session.
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.
Run the sp_who command from a query window.
Run the DBCC TRACEON 1222 command from a query window and review the SQL
Server event log.
Explanation:
Incorrect Answers:
E: DBCC TRACEON 1222 is used to detect deadlocks, not to detect long running queries.
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
http://msdn.microsoft.com/en-us/library/ms188396.aspx
You deploy a new on-premises server and restore all databases to the new server.
Explanation:
Explanation:
When you enable Stretch for a table by specifying ON, you also have to specify MIGRATION_STATE =
OUTBOUND to begin migrating data immediately, or MIGRATION_STATE = PAUSED to postpone data
migration.
51 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Syntax:
<stretch_configuration> ::=
SET (
REMOTE_DATA_ARCHIVE
= ON ( <table_stretch_options> )
| ( <table_stretch_options> [, ...n] )
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-
sql?view=sql-server-2017
Question 58
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
Yes
No
Explanation:
Explanation:
It is being recommended to SQL server users that they must archive the log files on a separate disk
for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-
waits/
Question 59
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 stated goals. Some questions 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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
The Service Master Key is the root of the SQL Server encryption hierarchy. It does not handle alerts
and jobs.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features
such as SQL Server Management Studio, Service Broker and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
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 plan to migrate a Microsoft SQL server instance between physical servers.
You must migrate the metadata associated with the database instance.
You need to ensure that the new instance retains the existing jobs and alerts.
Yes
No
Explanation:
Explanation:
The master database does not handle alerts and jobs. It records all the system-level information for a
SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked
servers, and system configuration settings.
The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features
such as SQL Server Management Studio, Service Broker and Database Mail.
References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/msdb-
database?view=sql-server-2017
Explanation:
If REBUILD is performed online (ON) the data in this table is available for queries and data
modification during the index operation.
Incorrect Answers:
A: REPAIR_FAST maintains syntax for backward compatibility only. No repair actions are performed.
D: DATA_PURITY causes DBCC CHECKDB to check the database for column values that are not valid or
out-of-range.
References:
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql?view=sql-server-
2017
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-
sql?view=sql-server-2017
You have two Windows accounts named ServiceAccount1 and ServiceAccount2. The SQL Server
Agent runs as ServiceAccount1.
You need to run SQL Server Agent job steps by using ServiceAccount2.
Set-ADServiceAccount
Set-SqlCredential
New-ADServiceAccount
New-SqlCredential
Explanation:
Explanation:
The New-ADServiceAccount command creates a new Active Directory managed service account or
group managed service account object.
Incorrect Answers:
A: The Set-ADServiceAccount cmdlet modifies the properties of an Active Directory managed service
account (MSA). You can modify commonly used property values by using the cmdlet parameters.
B: The Set-SqlCredential cmdlet sets the Identity and password properties for a SQL Credential object
using this cmdlet.
D: The New-SqlCredential cmdlet creates a new SQL Server credential object. A SQL Server credential
object is used to store authentication information. The SQL Server credential is required when
backing up to or restoring from the Windows Azure storage service, and is used to store the
Windows Azure storage account name and access key information.
References: https://docs.microsoft.com/en-us/powershell/module/addsadministration/new-
adserviceaccount?view=win10-ps
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 deploy a new Microsoft Azure SQL database instance to support a variety of mobile application
and public websites. You configure geo-replication with regions in Brazil and Japan.
You need to implement real-time encryption of the database and all backups.
Solution: You password protect all azure SQL backups and enable azure active directory
authentication for all azure SQL server instances.
Yes
No
Explanation:
Explanation:
References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-
with-azure-key-vault/
You have deployed several GS-series virtual machines (VMs) in Microsoft Azure. You plan to deploy
Microsoft SQL Server in a development environment.
Question 65
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 stated goals. Some questions 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 use a Microsoft Azure SQL database as a data warehouse. The database is in the Standard service
tier and has 400 elastic database throughput units (eDTUs).
You need to reduce the amount of time it takes to load the data.
Solution: You move the database to a Standard elastic pool that has 800 eDTUs.
Yes
No
Explanation:
Explanation:
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dtu-resource-limits
Question 66
You have a database named DB1 that contains a table named Table1. Table1 has 1 billion rows.
After the import, users report that queries take longer than usual to execute.
You need to identify whether an out-of-date execution plan is causing the performance issue.
sys.dm_xtp_transaction_stats
sys.dm_exec_input_buffer
sys.dm_db_index_operational_stats
sys.dm_db_stats_properties
Explanation:
Explanation:
Reference: https://basitaalishan.com/2013/03/19/using-sys-dm_db_index_operational_stats-to-
analyse-how-indexes-are-utilised/
A company has Microsoft Azure virtual machines (VMs) that host SQL Server 2017 instances. The VM
require additional storage.
You need to recommend storage options for several scenarios that you are considering.
What should you recommend? To answer, drag the appropriate storage options to the correct
scenarios. Each storage option 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.
Solution:
Explanation:
Explanation:
You have a Microsoft SQL server that manages all of your databases.
You must create a database named MarketingData. The database will initially consume 400
megabytes (MB) of storage and will grow by one percent per year.
The database file must be stored on the Marketing share of the Lon-SVR1 server. The file must not
automatically increase in size. Log files must be stored on the L drive of the SQL Server machine in a
folder named Logs.
How should you complete the Transact-SQL statement? To answer, select the appropriate Transact-
SQL segments in the answer area.
Solution:
Explanation:
Explanation:
Box 1: \\LON-SRV1\Marketing\Marketingdata.mdf
The database file must be stored on the Marketing share of the Lon-SVR1 server.
Box 3: Filegrowth=0
Box 4: L:\Logs\Marketing\Marketingdata.ldf
Log files must be stored on the L drive of the SQL Server machine in a folder named Logs.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-
sql?view=sql-server-2017
Background
You are the database administrator for Contoso, Ltd. The company has 200 offices around the world.
The company has corporate executives that are located in offices in London, New York, Toronto,
Sydney, and Tokyo.
Contoso, Ltd. has a Microsoft Azure SQL Database environment. You plan to deploy a new Azure SQL
Database to support a variety of mobile applications and public websites.
The company is deploying a multi-tenant environment. The environment will host Azure SQL
Database instances. The company plans to make the instances available to internal departments and
partner companies. Contoso is in the final stages of setting up networking and communications for
the environment.
Existing Contoso and Customer instances need to be migrated to Azure virtual machines (VM)
according to the following requirements:
Contoso instances – should use the method requiring the least administrative effort to migrate
instances to Azure Vms.
Customer instances – should use a method that allows customers to bring their own licenses to
Azure VMs. Customers have approved down time for the migration.
The company plans to deploy a new order entry application and a new business intelligence and
analysis application. Each application will be supported by a new database. Contoso creates a new
Azure SQL database named Reporting. The database will be used to support the company's financial
reporting requirements. You associate the database with the Contoso Azure Active Directory domain.
Each location database for the data entry application may have an unpredictable amount of activity.
Data must be replicated to secondary databases in Azure datacenters in different regions.
To support the application, you need to create a database named contosodb1 in the existing
environment.
Objects
Database
The contosodb1 database must support the following requirements:
a size of at least 200 gigabytes (GB)
1,000 concurrent sessions
point-in-time restore to any point in the two weeks prior to a failure
minimize costs
63 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
Application
For the business intelligence application, corporate executives must be able to view all data in near
real-time with low network latency.
How should you complete the Azure PowerShell command? To answer, select the appropriate Azure
PowerShell segments in the answer area.
Explanation:
Explanation:
Box 1: New-AzureRmSqlDatabase
Incorrect Answers:
Box 2: Standard
The maximum database size for the Standard edition is 250 GB, while 200 GB is required
The maximum concurrents sessions for the Standard edition is 1200 for S2 and 2400 for S3, while
1000 concurrent sessions is required.
65 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
From the scenario: The contosodb1 database must support the following requirements:
minimize costs
Incorrect Answers:
Not Basic: The maximum database size for the Basic edition is only 2 GB, while 200 GB is required.
Not Premium: Standard Edition meets the requirements, and Premium would be a more expensive
solution.
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-service-tiers
Question 70
You have a database named DB1 that is 3 TB. DB1 contains a fact table that is 1.2 TB.
You load 200 GB of new data to the fact table from a line-of-business application.
Users of DB1 notice that reports render more slowly after you loaded the data.
What are two possible causes of the performance issue? Each correct answer presents a complete
solution.
References:
https://www.sqlshack.com/gathering-sql-server-indexes-statistics-and-usage-information/
You configure Transparent Data Encryption (TDE) on the Orders database by using the following
statements:
You attempt to restore the Orders database and the restore fails. You copy the encryption file to the
original location.
A hardware failure occurs and so a new server must be installed and configured.
After installing SQL Server to the new server, you restore the Orders database and copy the
encryption files to their original location. However, you are unable to access the database.
Which Transact-SQL statement should you use before attempting the restore?
Explanation:
Code
Copy
USE AdventureWorks2012;
GO
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql
Question 72
You manage a Microsoft SQL Server environment in a Microsoft Azure virtual machine.
Explanation:
Always Encrypted supports multiple key stores for storing Always Encrypted column master keys. A
column master key can be a certificate stored in Windows Certificate Store.
References: https://msdn.microsoft.com/en-us/library/mt723359.aspx
You need to ensure that the SQL Server does not limit the performance of App1.
Explanation:
The index creates memory option controls the maximum amount of memory initially allocated for
sort operations when creating indexes. The default value for this option is 0 (self-configuring). If
more memory is later needed for index creation and the memory is available, the server will use it;
thereby, exceeding the setting of this option. If additional memory is not available, the index creation
will continue using the memory already allocated.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-
the-index-create-memory-server-configuration-option
Which two actions should you perform? Each correct answer presents part of the solution.
Explanation:
You should connect to DB1. To encrypt DB1, you connect directly to DB1. When you connect to DB1.
You use the ALTER DATABASE DB1 SET ENCRYPTION ON statement to encrypt the database. This is
the statement that turns on TDE for Azure SQL Database.
Incorrect Answers:
A: You should not run CREATE CERTIFICATE certl WITH Subject = TDE Cert' on DB1. You do not need
to create a certificate to encrypt an Azure SQL database. This would be a part of the solution when
you encrypt an on-premises database. You should not connect to the master database. To encrypt
DB1, you need to connect directly to DB1. not to the master database.
E: You should not run CREATE MASTER KEY on the master database.
You would execute CREATE MASTER KEY when you have to encrypt an on-premises database.
References: https://docs.microsoft.com/en-us/sql/relational-
databases/security/encryption/transparent-data-encryption
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.
Explanation:
Reorganize: This option is more lightweight compared to rebuild. It runs through the leaf level of the
index, and as it goes it fixes physical ordering of pages and also compacts pages to apply any
previously set fillfactor settings. This operation is always online, and if you cancel it then it’s able to
just stop where it is (it doesn’t have a giant operation to rollback).
References: https://www.brentozar.com/archive/2013/09/index-maintenance-sql-server-rebuild-
reorganize/
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 ensure that queries use statistical data and do not initialize values for local variables.
Yes
No
Explanation:
Explanation:
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU,
it detects the best degree of parallelism, that is, the number of processors employed to run a single
statement, for each parallel plan execution. You can use the max degree of parallelism (MAXDOP)
option to limit the number of processors to use in parallel plan execution.
References: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-
the-max-degree-of-parallelism-server-configuration-option?view=sql-server-2017
Database1 contains 100 queries that are executed dynamically from web applications.
Changes to Database1 must not affect other databases that are hosted on Server1
Changes to Database1 must not affect the performance of queries that are stored in other databases.
The solution must minimize administrative effort.
You need to remove the data from the procedure cache as quickly as possible.
Explanation:
You should run ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE CACHE in the context
of Database! This statement lets you change the settings of a database without affecting other
databases that are installed on the instance of SQL Server 2016.
Incorrect Answers:
A: You should not run DBCC FREEPROCCACHE. DBCC FREEPROCCACHE would clean the entire plan
cache and would affect all databases. It is possible to remove a single plan from the cache by using
the plan_handle argument to DBCC FREEPROCCACHE, but you would have to identify all plans that
are related to Databasel, which requires a lot more administrative effort.
D: You should not write a script that will iterate through each stored procedure definition and add
WITH RECOMPILE to the definition. Each time the procedure is called, it will be recompiled, and this
might degrade the server's performance.
This approach would require additional administrative effort to produce the script. In addition, some
calls are made from the web application and the script would not have any control over these calls.
In earlier versions of SQL Server, prior to the availability of the ALTER DATABASE statement, this
option would have been the way to avoid affecting other databases.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-
configuration-transact-sql
Question 78
You are configuring a table to use the Always Encrypted feature. The table will have the columns
configured as shown in the following table.
Which two columns should use randomized encryption? Each correct answer presents a complete
solution.
Address
Gender
LastName
Tax Id
Explanation:
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.
References: https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-
encrypted-database-engine?view=sql-server-2017
Question 79
You administer a Microsoft SQL Server 2012 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.
Explanation:
The full recovery model uses log backups to prevent data loss in the broadest range of failure
scenarios, and backing and restoring the transaction log (log backups) is required. The advantage of
using log backups is that they let you restore a database to any point of time that is contained within
a log backup (point-in-time recovery). You can use a series of log backups to roll a database forward
to any point in time that is contained in one of the log backups. Be aware that to minimize your
restore time, you can supplement each full backup with a series of differential backups of the same
data.
References: https://technet.microsoft.com/en-us/library/ms190217(v=sql.105).aspx
A full back up of the databases is 3 TB. The corporate network has a 1.5 MB/sec Internet connection.
You need to move the backups to Azure to ensure that you can restore the databases to the Azure
virtual machine as quickly as possible.
Explanation:
Azure Import/Export service is used to securely import large amounts of data to Azure Blob storage
and Azure Files by shipping disk drives to an Azure datacenter. This service can also be used to
transfer data from Azure Blob storage to disk drives and ship to your on-premises sites. Data from
one or more disk drives can be imported either to Azure Blob storage or Azure Files.
References: https://docs.microsoft.com/en-us/azure/storage/common/storage-import-export-
service
Data encryption should be allowed to be implemented by the client applications that access the data.
Encryption keys should not be made available to the database engine.
transport-level encryption
cell-level encryption
Transparent Data Encryption
Always Encrypted
Encrypting File System
BitLocker
dynamic data masking
Explanation:
Explanation:
Azure File Storage supports HTTPS when using the REST API, but is more commonly used as an SMB
file share attached to a VM.
Incorrect Answers:
C: TDE encrypts the storage of an entire database by using a symmetric key called the database
encryption key. In SQL Database the database encryption key is protected by a built-in server
certificate.
References: https://docs.microsoft.com/en-us/azure/storage/storage-security-guide#encryption-in-
transit
You are migrating an on-premises Microsoft SQL Server instance to SQL Server on a Microsoft Azure
virtual machine. The instance has 30 databased that consume a total of 2 TB of disk space. The
instance sustains more than 30,000 transactions per second.
You need to provision storage for the virtual machine. The storage must be able to support the same
load as the on-premises deployment.
Solution: You create one storage account that has 30 containers. You create a VHD in each container.
Yes
No
Explanation:
Explanation:
References:
https://whttps://www.tech-coffee.net/understand-microsoft-azure-storage-for-virtual-machines/
You need to configure each SQL Server instance to correctly allocate memory.
On Instance2,
run the following Transact-SQL code:
A. On Instance1, run the following Transact-SQL code:
On Instance1, run the following Transact-SQL code:
On Instance2,
run the following Transact-SQL code:
On Instance1, run the following Transact-SQL code:
On
Instance2, run the following Transact-SQL code:
Explanation:
Incorrect Answers:
A, C: The awefeature will be removed in newer version of Microsoft SQL Server. Do not use this
feature in new development work, and modify applications that currently use this feature as soon as
possible.
B: Automatic soft-NUMA is disabled by default, and this setting is not relevant here.
Question 84
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 Microsoft SQL Server on a Microsoft Azure virtual machine that has a database named DB1.
You discover that DB1 experiences WRITE_LOG waits that are longer than 50 ms.
Yes
No
Explanation:
Explanation:
In SQL Server, if we have a transactional based system and find a high WRITELOG wait type this is a
performance bottleneck and can cause the transaction log file to grow rapidly and frequently.
It is being recommended to SQL server users that they must archive the log files on a separate disk
for getting better performance.
References: https://atdhebuja.wordpress.com/2016/06/20/resolving-sql-server-transaction-log-
waits/
The database must support 50 concurrent logins. You must minimize the cost associated with hosting
the database.
Explanation:
Note:
Incorrect Answers:
References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-service-tiers
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 mission-critical application that stores data in a Microsoft SQL Server instance. The
application runs several financial reports. The reports use a SQL Server-authenticated login named
Reporting_User. All queries that write data to the database use Windows authentication.
Users report that the queries used to provide data for the financial reports take a long time to
complete. The queries consume the majority of CPU and memory resources on the database server.
As a result, read-write queries for the application also take a long time to complete.
You need to improve performance of the application while still allowing the report queries to finish.
Solution: You create a snapshot of the database. You configure all report queries to use the database
snapshot.
Yes
No
Explanation:
Explanation:
References: https://msdn.microsoft.com/en-us/library/bb933866.aspx
Question 87
You need to create an Elastic Database job to rebuild indexes across 10 Microsoft Azure SQL
databases.
New-AzureSqlJob
New-AzureWebsiteJob
New-AzureBatchJob
New-ScheduledJobOption
New-JobTrigger
Explanation:
Explanation:
References: https://docs.microsoft.com/en-us/powershell/module/elasticdatabasejobs/new-
azuresqljob?view=azureelasticdbjobsps-0.8.33
Question 88
You have a Microsoft Azure SQL database in the US West region.
New-AzureRmAvailabilitySet
New-AzureRmLoadBalancer
New-AzureRmSqlDatabaseSecondary
New-AzureRmSqlElasticPool
New-AzureRmVM
New-AzureRmSqlServer
New-AzureRmSqlDatabaseCopy
New-AzureRmSqlServerCommunicationLink
Explanation:
Explanation:
The New-AzureRmSqlDatabaseCopy command creates a copy of a SQL Database that uses the
snapshot at the current time.
References: https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/new-
azurermsqldatabasecopy?view=azurermps-5.1.1
You discover performance issues when large amounts of data are written to tables under heavy
system load.
Processor affinity
Lightweight pooling
Max worker threads
I/O affinity
Explanation:
Explanation:
To carry out multitasking, Microsoft Windows 2000 and Windows Server 2003 sometimes move
process threads among different processors. Although efficient from an operating system point of
view, this activity can reduce Microsoft SQL Server performance under heavy system loads, as each
processor cache is repeatedly reloaded with data. Assigning processors to specific threads can
improve performance under these conditions by eliminating processor reloads; such an association
between a thread and a processor is called processor affinity.
References:
http://msdn.microsoft.com/en-us/library/ms189629.aspx
Question 90
You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01.
SQL Server has alerts that get more important based on the severity of the alert. Anything of severity
16 or below tends to refer to the database and deals with issues that are tied to syntax errors,
violations of foreign keys, etc. While those errors are typically important, they don't refer to anything
with regards to overall health of the SQL Server. Alerts 17 through 25 do. Those are the ones your
health checks are probably firing on.
References:
https://www.mssqltips.com/sqlservertip/3384/configuring-critical-sql-server-alerts/
Members of the sales team must be able to see all digits in the PhoneNo field. For all users, the area
code must be viewable. All other digits must be hidden.
Enable Dynamic Data Masking on the column and use the partial function
Enable always Encrypted on the column using the Randomized encryption type
Enable Dynamic Data Masking on the column and use the default function
Enable Transparent Data Encryption (TDE) on the Sales database
Explanation:
References:
https://docs.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-
masking?view=sql-server-2017
Question 92
You administer a Microsoft SQL Server 2012 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.
An Alert
A Resource Pool
An Extended Event session
A Server Audit Specification
A SQL Profiler Trace
A Database Audit Specification
A Policy
A Data Collector Set
Explanation:
Explanation:
SQL Server Extended Events has a highly scalable and highly configurable architecture that allows
users to collect as much or as little information as is necessary to troubleshoot or identify a
performance problem.
A SQL Server Extended Events session is created in the SQL Server process hosting the Extended
Events engine.
References: https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-
events
Question 93
You manage an on-premises, multi-tier application that has the following configuration:
Two SQL Server 2012 databases named SQL1 and SQL2
Two application servers named AppServerl and AppServer2 that run IIS
You need to ensure that during an Azure update cycle or a hardware failure, the application remains
available.
Which two deployment configurations should you implement? Each correct answer presents part of
the solution.
Explanation:
Note: Using availability sets allows you to build in redundancy for your Azure services. By grouping
related virtual machines and services (tiers) into an availability set (in this case, deploying both of
your databases into an availability set), you ensure that if there is a planned or unplanned outage,
your services will remain available. At the most basic level, virtual machines in an availability set are
put into a different fault domain and update domain. An update domain allows virtual machines to
have updates installed and then the virtual machines are rebooted together.
Incorrect Answers:
B: You should not deploy all servers in a single availability set. This will not provide the fault tolerance
needed, as all machines would be rebooted (or suffer a hardware failure) together.
C: SQL1 and AppServerl provide different services, so they should not be grouped together.
D: You should not deploy SQL2 and AppServer2 in a single availability set. SQL2 and AppServer2
provide different services, so they should not be grouped together.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
Question 94
You create a new Microsoft Azure subscription.
You need to create a group of Azure SQL databases that share resources.
New-AzureRmAvailabilitySet
New-AzureRmLoadBalancer
New-AzureRmSqlDatabaseSecondary
New-AzureRmSqlElasticPool
New-AzureRmVM
New-AzureRmSqlServer
New-AzureRmSqlDatabaseCopy
New-AzureRmSqlServerCommunicationLink
Explanation:
Explanation:
SQL Database elastic pools are a simple, cost-effective solution for managing and scaling multiple
databases that have varying and unpredictable usage demands. The databases in an elastic pool are
on a single Azure SQL Database server and share a set number of resources (elastic Database
Transaction Units (eDTUs)) at a set price. Elastic pools in Azure SQL Database enable SaaS developers
to optimize the price performance for a group of databases within a prescribed budget while
delivering performance elasticity for each database.
Question 95
You have Microsoft SQL Server on a Microsoft Azure virtual machine.
You suspect that the current SQL Server indexes cause queries to execute slowly.
You need to identify which indexes must be created to reduce the query execution time.
Which three dynamic management views should you use? Each correct answer presents part of the
solution.
sys.dm_db_index_physical_stats
sys.dm_db_missing_index_group_stats
sys.indexes
sys.dm_db_index_usage_stats
sys.dm_db_missing_index_groups
sys.dm_db_index_operational_stats
sys.dm_db_missing_index_details
sys.sysindexkeys
Explanation:
Explanation:
A set of dynamic management objects that can be queried to return information about missing
indexes.
The MissingIndexes element in XML Showplans, which correlate indexes that the query optimizer
considers missing with the queries for which they are missing.
After running a typical workload on SQL Server, you can retrieve information about missing indexes
by querying the dynamic management objects listed in the following table. These dynamic
management objects are stored in the master database.
sys.dm_db_missing_index_group_stats
Returns summary information about missing index groups, for example, the performance
improvements that could be gained by implementing a specific group of missing indexes.
sys.dm_db_missing_index_groups
Returns information about a specific group of missing indexes, such as the group identifier and the
identifiers of all missing indexes that are contained in that group.
90 Licensed to Mauricio Cifuentes
instructormauriciof2016@outlook.com
sys.dm_db_missing_index_details
Returns detailed information about a missing index; for example, it returns the name and identifier
of the table where the index is missing, and the columns and column types that should make up the
missing index.
sys.dm_db_missing_index_columns
Returns information about the database table columns that are missing an index.
References: https://technet.microsoft.com/en-us/library/ms345524(v=sql.105).aspx
Question 96
You administer all the deployments of Microsoft SQL Server 2012 in your company. You have two
servers in the same data center that hosts your production database.
You need to ensure that the database remains available if a catastrophic server failure or a disk
failure occurs.
You also need to maintain transactional consistency of the data across both servers.
Two servers configured in a Windows Failover Cluster in the same data center SQL
Server configured as a clustered instance
SQL Server that includes an application database configured to perform transactional
replication
Two servers configured in the same data centerA primary server configured to
perform log-shipping every 10 minutes A backup server configured as a warm standby
Two servers configured in different data centersSQL Server Availability Group
configured in Synchronous-Commit Availability Mode One server configured as an Active
Secondary
Two servers configured in the same data centerSQL Server Availability Group
configured in Asynchronous-Commit Availability Mode One server configured as an Active
Secondary
Two servers configured in different data centersSQL Server Availability Group
configured in Asynchronous-Commit Availability Mode
SQL Server that includes an application database configured to perform snapshot
replication
Two servers configured on the same subnetSQL Server Availability Group configured
in Synchronous-Commit Availability Mode
Explanation:
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-always-on-availability-groups#SyncCommitAvMode
Question 97
You deploy a Microsoft SQL Server instance to support a new application. The application uses the
tempdb database to maintain session state data.
Users report performance issues with the application. You observe performance problems
immediately and begin troubleshooting. You observe numerous instances of the page
PAGELATCH_UP and PAGELATCH_EX wait events in the logs for the server. The resource description
for the wait is 2:1:1.
Explanation:
Note: PAGELATCH_EX occurs when a task is waiting on a latch for a buffer that is not in an I/O
request. The latch request is in Exclusive mode.
PAGELATCH_UP occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The
latch request is in Update mode.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-
management-views/sys-dm-os-wait-stats-transact-sql?view=sql-server-2017
You plan to migrate an on-premises Microsoft SQL Server virtual machine (VM) to a Microsoft Azure
IaaS VM.
Solution: You use a GS-Series VM and store the tempdb database on attached Premium storage.
Yes
No
Explanation:
Explanation:
For VMs that support Premium Storage (DS-series, DSv2-series, and GS-series), we recommend
storing TempDB on a disk that supports Premium Storage with read caching enabled. There is one
exception to this recommendation; if your TempDB usage is write-intensive, you can achieve higher
performance by storing TempDB on the local D drive, which is also SSD-based on these machine
sizes.
References: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-
machines-windows-sql-performance
Provision 10 Azure virtual machines that each contain SQL Server 2016, installed by
using the default settings.
Create an installation configuration file and perform unattended installations of SQL
Server 2016.
Create a virtual machine template by using a prepared instance of SQL Server 2016.
Create a virtual machine template by using a complete instance of SQL Server 2016.
Explanation:
Explanation:
You should create a virtual machine template by using a complete instance of SQL Server 2016. You
use the sysprep tool to prepare a complete instance of SQL Server 2016. By using a complete
instance, SQL Server, the network, and the users are all created, and the system cannot be
reconfigured during the installation process.
Incorrect Answers:
A: You should not provision 10 Azure virtual machines that each contain SQL Server 2016, installed by
using the default settings. A virtual machine created by using the Azure library provides you with a
standard installation, and the requirements call for a custom installation. The instance will need
some specific parameters for your custom installation. Therefore, you would have to customize each
Azure virtual machine.
B: You should not create an installation configuration file and perform unattended installations of
SQL Server 2016. This could be a valid option, but you would need to prepare 10 installations, and
this would require a lot of effort. There are also some other administrative actions that must be
performed that could also increase the amount of effort required, such as user database
configuration.
References: https://support.neverfail.com/hc/en-us/articles/115015350287-Deploy-Microsoft-SQL-
Server-2016-Virtual-Machine-Template
Question 100
You are deploying a Microsoft SQL Server database that will support a mixed OLTP and OLAP
workload. The target virtual machine has four CPUs.
You need to ensure that reports do not use all available system resources.
Explanation:
When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU,
it detects the best degree of parallelism, that is, the number of processors employed to run a single
statement, for each parallel plan execution. You can use the max degree of parallelism (MAXDOP)
option to limit the number of processors to use in parallel plan execution.
Incorrect Answers:
A: The Auto Close property exposes server behavior for databases not accessed by a user. This
feature 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.
References: https://msdn.microsoft.com/en-us/library/ms189094.aspx
You plan to configure daily backups for the database. A single full backup will be approximately 1.5
TB of compressed data.
Local storage
Page blob storage
Virtual disks
Block blob storage.
Explanation:
Explanation:
When backing up to Microsoft Azure blob storage, SQL Server 2016 supports backing up to multiple
blobs to enable backing up large databases, up to a maximum of 12.8 TB. This is done through Block
Blobs.
Incorrect Answers:
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-
windows-sql-backup-recovery
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 use a Microsoft Azure SQL database as a data warehouse. The database is in the Standard service
tier and has 400 elastic database throughput units (eDTUs).
You need to reduce the amount of time it takes to load the data.
Solution: You move the database to a Premium database pool that has 125 eDTUs.
Yes
No
Explanation:
Explanation:
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 use a Microsoft Azure SQL database as a data warehouse. The database is in the Standard service
tier and has 400 elastic database throughput units (eDTUs).
You need to reduce the amount of time it takes to load the data.
Solution: You move the database to a Basic database pool that has 1,600 eDTUs.
Yes
No
Explanation:
Explanation: