Free Microsoft DP-300 Exam Questions (page: 8)

SIMULATION

You plan to perform performance testing of db1.

You need prevent db1 from reverting to the last known good query plan.

To complete this task, sign in to the virtual machine. You may need to use SQL Server Management Studio and the Azure portal.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Automatic tuning options
The automatic tuning options available in Azure SQL Database and Azure SQL Managed Instance are:

* FORCE LAST GOOD PLAN (automatic plan correction)
Identifies Azure SQL queries using an execution plan that is slower than the previous good plan, and forces queries to use the last known good plan instead of the regressed plan.

* Etc.

You can either manually apply tuning recommendations using the Azure portal, or you can let automatic tuning autonomously apply tuning recommendations for you.

Azure defaults are set to FORCE_LAST_GOOD_PLAN enabled.

We need to disable it.

With transact-SQL:
ALTER DATABASE SET options (Transact-SQL)
Parameters include:
<automatic_tuning_option> ::=
{
AUTOMATIC_TUNING ( FORCE_LAST_GOOD_PLAN = { DEFAULT | ON | OFF } ) }

Solution with T-SQL

Stored procedure execution
You can use the SQL Server Management Studio (SSMS) user interface or Transact-SQL in an SSMS query window to execute a stored procedure. Always use the latest version of SSMS.

Use SQL Server Management Studio

Step 1: In Object Explorer, connect to an instance of SQL Server or Azure SQL Database, expand that instance, and then expand Databases.

Step 2: Expand the database that you want, expand Programmability, and then expand Stored Procedures.

Step 3: Right-click the stored procedure that you want to run [here: ALTER DATABASE SET] and select Execute Stored Procedure.

Step 4: Set the parameters: AUTOMATIC_TUNING ( FORCE_LAST_GOOD_PLAN = { OFF } )

Step 5: Select OK to execute the stored procedure. If the stored procedure doesn't have any parameters, just select OK.


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/automatic-tuning-overview https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options https://learn.microsoft.com/en-us/sql/relational-databases/stored-procedures/execute-a-stored-procedure



SIMULATION

You have a legacy application written for Microsoft SQL Server 2012. The application will be the only application that accesses db1.

You need to ensure that db1 is compatible with all the features and syntax of SQL Server 2012.

To complete this task, sign in to the virtual machine. You may need to use SQL Server Management Studio and the Azure portal.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

View or change the compatibility level of a database
You can view or change the compatibility level of a database in SQL Server, Azure SQL Database, or Azure

SQL Managed Instance by using SQL Server Management Studio or Transact-SQL.
Use SQL Server Management Studio
To view or change the compatibility level of a database using SQL Server Management Studio (SSMS)

Step 1: Connect to the appropriate server or instance hosting your database [Here db1].

Step 2: Select the server name in Object Explorer.

Step 3: Expand Databases, and, depending on the database, either select a user database or expand System Databases and select a system database.

Step 4: Right-click the database, and then select Properties.

The Database Properties dialog box opens.

Step 5: In the Select a page pane, select Options.

The current compatibility level is displayed in the Compatibility level list box.

Step 6: To change the compatibility level, select a different option from the list [Select SQL Server 2012]


Reference:

https://learn.microsoft.com/en-us/sql/relational-databases/databases/view-or-change-the-compatibility-level-of- a-database



SIMULATION

You need to add a Microsoft Entra user named user2-12345678@examusers.com to db1. User2-12345678 must be able to read data from all the tables in db1 without being able to modify the data.

To complete this task, sign in to the virtual machine. You may need to use SQL Server Management Studio and the Azure portal.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

Stage 1: Create the user

Create a user with SSMS (SQL Server Management Studio)

Step 1: In Object Explorer, expand the Databases folder.

Step 2: Expand the database in which to create the new database user. [Here db1]

Step 3: Right-click the Security folder, point to New, and select User....

Step 4: In the Database User - New dialog box, on the General page, select one of the following user types from the User type list:

SQL user with login
SQL user with password (when contained database is enabled) SQL user without login
User mapped to a certificate
User mapped to an asymmetric key
*-> Windows user

Step 4a: Select Windows User

Step 5: When you select an option, the remaining options in the dialog may change. Some options only apply to specific types of database users. Some options can be left blank and will use a default value.

User name
Enter a name for the new user. If you have chosen Windows user from the User type list, you can also select the ellipsis (...) to open the Select User or Group dialog box. [Specify User2-12345678]

Step 6: Select OK.

Stage 2: Assign permissions

Additional Options
The Database User - New dialog box also offers options on four other pages: Owned Schemas, Membership, Securables, and Extended Properties.

Step 7: Select Securables

The Securables page lists all possible securables and the permissions on those securables that can be granted to the login.

Step 8: Select tables

Step 9: Grant Read Permission


Reference:

https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database- user



SIMULATION

You need to ensure that db1 supports a minimum of one vCore, a maximum of four vCores, and a database of up to 45 GB.

To complete this task, sign in to the virtual machine. You may need to use SQL Server Management Studio and the Azure portal.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

vCore purchasing model - Azure SQL Database

Select hardware configuration
You can select hardware configuration for a database or elastic pool in SQL Database at the time of creation. You can also change hardware configuration of an existing database or elastic pool.

To select a hardware configuration when creating a SQL Database or pool

Step 1: Start Azure portal

Step 2: Go the Azure SQL page, select db1.

Step 3: On the Overview page, select the Pricing tier link:



Step 4: Select the Change configuration link:



Step 5: Select the desired hardware configuration:
Specify:
Max vCores: 4
Max storage: 45 GB


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tiers-sql-database-vcore



HOTSPOT (Drag and Drop is not supported)

You have an on-premises Microsoft SQL Server database named DB1.

You have an Azure subscription.

You need to migrate DB1 to an Azure SQL service that meets the following requirements:

Protects the confidentiality of sensitive data from malware and high-privileged unauthorized database administrators
Supports pattern matching for server-side database operations

Uses a hardware-based encryption technology

Which Azure SQL service and attestation service should you include in the solution? To answer, select the appropriate options in the answer area.

Note: Each correct selection is worth one point.

Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:





Box 1: The Azure SQL Database vCore purchasing model
Azure SQL Service vCore purchasing model - Azure SQL Database

Hardware configuration
Common hardware configurations in the vCore model include standard-series (Gen5), Fsv2-series, and *DC- series*. Hyperscale also provides an option for premium-series and premium-series memory optimized hardware. Hardware configuration defines compute and memory limits and other characteristics that affect workload performance.

Box 2: Microsoft Azure Attestation
Attestation service

Always Encrypted with secure enclaves enables the database engine to process encrypted data within a protected memory area called a secure enclave. Secure enclaves enhance the confidential computing capabilities of Always Encrypted by supporting pattern matching, various comparison operators, and in-place encryption.

Always Encrypted can use one of the two attestation services:

* Microsoft Azure Attestation - a cloud-based attestation solution.
* Host Guardian Service (HGS) that implements Windows Defender System Guard runtime attestation.

The below table captures the supported attestation protocols for the valid SQL product and enclave type combinations:



Note:
Supported enclave technologies
Always Encrypted supports the following enclave technologies (or enclave types):

* Virtualization-based Security (VBS) enclaves (also known as Virtual Secure Mode, or VSM enclaves) - a software-based technology that relies on Windows hypervisor and doesn't require any special hardware.

*-> Intel Software Guard Extensions (Intel SGX) enclaves - a *hardware-based* trusted execution environment technology.


Reference:

https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-enclaves https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tiers-sql-database-vcore



DRAG DROP (Drag and Drop is not supported)

You have two on-premises Microsoft SQL Server instances named SQL1 and SQL2.

You have an Azure subscription.

You need to sync a subset of tables between the databases hosted on SQL1 and SQL2 by using SQL Data Sync.

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

Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:






Step 1: Create a sync group
Set up SQL Data Sync between databases in Azure SQL Database and SQL Server Create sync group [Step 1]

Step 2: Deploy an Azure SQL database
Add sync members
After the new sync group is created and deployed, open the sync group and access the Databases page, where you will select sync members.

Add a database on a SQL Server instance as a member to a sync group [Step 2]

1. In the Member Database section, optionally add a database in a SQL Server instance to the sync group by selecting Add an On-Premises Database.

2. The Configure On-Premises page opens where you can do the following things:

3. Select Choose the Sync Agent Gateway. The Select Sync Agent page opens.



Step 3: Install and configure the Client Sync Agent app on SQL1 on SQL2

4. On the Choose the Sync Agent page, choose whether to use an existing agent or create an agent. [Step 3]
* Details omitted*

Step 4: Sync Metadata Database database configuration

5. On the server where sync client agent is installed, locate and run the Client Sync Agent app.



5a. In the sync agent app, select Submit Agent Key. The Sync Metadata Database Configuration dialog box opens.

5b. In the Sync Metadata Database Configuration dialog box, paste in the agent key copied from the Azure portal. Also provide the existing credentials for the server on which the Sync Metadata Database database is located. Select OK and wait for the configuration to finish. [Step 4]



5c. Select Register to register a SQL Server database with the agent. The SQL Server Configuration dialog box opens.

5d. etc.

6. Etc.

Step 5: Configure the sync group
Configure sync group
After the new sync group members are created and deployed, go to the Tables section in the Database Sync Group page.

* Details omitted*

Incorrect:
* Deploy an Azure SQL managed instance


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-data-sync-sql-server-configure



You have an on-premises Microsoft SQL Server 2022 instance that hosts a 60-TB production database named DB1.

You plan to migrate DB1 to Azure.

You need to recommend a hosting solution for DB1.

Which Azure SQL Database service tier should you use to host DB1?

  1. Hyperscale
  2. Business Critical
  3. General Purpose

Answer(s): A

Explanation:

Need Hyperscale for the 60-TB database.

Compare resource limits
The vCore-based service tiers are differentiated based on database availability, storage type, performance, and maximum storage size. These differences are described in the following table:


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tier-hyperscale



You have an Azure subscription.

You plan to provision a single Azure SQL database.

You need to ensure that the database supports the autoscaling of compute resources.

Which service tier should you choose?

  1. Premium
  2. General Purpose
  3. Business Critical
  4. Standard

Answer(s): B

Explanation:

The General Purpose service tier in Azure SQL Database is designed to provide balanced and scalable compute and storage options. It supports the vCore-based purchasing model, which allows for autoscaling of compute resources. This model enables you to dynamically adjust the number of vCores allocated to your database, thereby allowing for autoscaling based on workload demands.



Viewing page 8 of 54



Post your Comments and Discuss Microsoft DP-300 exam prep with other Community members:

DP-300 Exam Discussions & Posts