QUESTION 21Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.You have five servers that run Microsoft Windows 2012 R2. Each server hosts a Microsoft SQL Server instance. The topology for the environment is shown in the following diagram.You have an Always On Availability group named AG1. The details for AG1 are shown in the following table.Instance1 experiences heavy read-write traffic. The instance hosts a database named OperationsMain that is four terabytes (TB) in size. The database has multiple data files and filegroups. One of the filegroups is read_only and is half of the total database size.Instance4 and Instance5 are not part of AG1. Instance4 is engaged in heavy read-write I/O.Instance5 hosts a database named StagedExternal. A nightly BULK INSERT process loads data into an empty table that has a rowstore clustered index and two nonclustered rowstore indexes.You must minimize the growth of the StagedExternal database log file during the BULK INSERT operations and perform point-in-time recovery after the BULK INSERT transaction. Changes made must not interrupt the log backup chain.You plan to add a new instance named Instance6 to a datacenter that is geographically distant from Site1 and Site2. You must minimize latency between the nodes in AG1.All databases use the full recovery model. All backups are written to the network location \\SQLBackup\. A separate process copies backups to an offsite location. You should minimize both the time required to restore the databases and the space required to store backups. The recovery point objective (RPO) for each instance is shown in the following table.Full backups of OperationsMain take longer than six hours to complete. All SQL Server backups use the keyword COMPRESSION.You plan to deploy the following solutions to the environment. The solutions will access a database named DB1 that is part of AG1.The wait statistics monitoring requirements for the instances are described in the following table.You need to create a backup plan for Instance4.Which backup plan should you create?

QUESTION 22Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database instances. The environment hosts a customer database named DB1.Customers connect to hosted database instances by using line-of-business applications. Developers connect by using SQL Server Management Studio (SSMS). You need to grant the developers permission to alter views for DB1 while following the principle of least privilege.Which permission should you grant?

QUESTION 23Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.You observe that several indexes are fragmented.You need to rebuild the indexes.What should you use?

QUESTION 24Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.You are examining information about users, sessions, and processes in an on-premises Microsoft SQL Server 2016 Standard Edition server.You need to identify waits for resources and return only the following information:What should you use?

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

Answer: DExplanation:The data collector is a core component of the data collection platform for SQL Server 2017 and the tools that are provided by SQL Server. The data collector provides one central point for data collection across your database servers and applications. This collection point can obtain data from a variety of sources and is not limited to performance data

QUESTION 26Note: 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.A company has an on-premises Microsoft SQL Server environment and Microsoft Azure SQL Database instances. The environment hosts several customer databases.One customer reports that their database is not responding as quickly as the service level agreements dictate. You observe that the database is fragmented.You need to optimize query performance.Solution: You reorganize all indexes.Does the solution meet the goal?

QUESTION 27Note: 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.A company has a server that runs Microsoft SQL Server 2016 Web edition. The server has a default instance that hosts a database named DB1.You need to ensure that you can perform auditing at the database level for DB1.Solution: You migrate DB1 to the default instance on a server that runs Microsoft SQL Server 2016 Standard edition.Does the solution meet the goal?

QUESTION 28You have a database that stores information for a shipping company. You create a table named Customers by running the following Transact-SQL statement. (Line numbers are included for reference only.)You need to ensure that salespeople can view data only for the customers that are assigned to them.Which Transact-SQL segment should you insert at line 07?

Answer: DExplanation:The return value can either be a scalar (single) value or a table. SELECT 1 just selects a 1 for every row, of course. What it’s used for in this case is testing whether any rows exist that match the criteria: if a row exists that matches the WHERE clause, then it returns 1, otherwise it returns nothing. Specify the WITH SCHEMABINDING clause when you are creating the function. This ensures that the objects referenced in the function definition cannot be modified unless the function is also modified.References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql

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

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

Answer:

Explanation:Box 1: stats_dateSee example below.Box 2: rowmodctrSee examplebelow.Box 3: stats_dateYou need to identify statistics that have not been updated for a week.Box 4: rowmodctrYou need to identify that more than 1,000 rows changed. Rowmodctr counts the total number of inserted, deleted, or updated rows since the last time statistics were updated for the table.Example: We will query every statistics object which was not updated in the last day and has rows modified since the last update. We will use the rowmodctr field of sys.sysindexes because it shows how many rows were inserted, updated or deleted since the last update occurred. Please note that it is not always 100% accurate in SQL Server 2005 and later, but it can be used to check if any rows were modified.–Get the list of outdated statisticsSELECTOBJECT_NAME(id),name,STATS_DATE(id, indid),rowmodctr FROM sys.sysindexesWHERE STATS_DATE (id, indid)<=DATEADD(DAY,-1,GETDATE()) AND rowmodctr>0AND id IN (SELECT object_id FROM sys.tables)GOAfter collecting this information, we can decide which statistics require an update.