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

HOTSPOT (Drag and Drop is not supported)

You have an on-premises Microsoft SQL Server instance named SQLSVR1 that hosts a database named DB1.

You have an Azure subscription that contains an Azure SQL database named SQLDB1.

You need to migrate the data stored in DB1 to SQLDB1 by using SQL Server replication. The solution must minimize the performance impact on DB1.

How should you configure the replication? 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: As a push subscriber and a distributor
Configure SQLDB 1

To migrate a SQL Server database to Azure SQL Database using replication, you'll need to set up transactional replication with the on-premises SQL Server as the publisher and distributor and the Azure SQL Database as the subscriber. This process involves configuring the replication topology, including the publication, subscription, and the distributor. You'll also need to ensure proper authentication and firewall rules are set up.

Replication Configuration:
Distribution:
Configure the on-premises SQL Server as the distributor. This can be the same instance as the publisher or a separate one.

Publication:
Create a publication on the on-premises SQL Server, specifying the database and tables to be replicated.

Subscription:
Configure the Azure SQL Database as a push subscriber to the publication.

Incorrect:
* To use a pull subscription only
Only push subscriptions to Azure SQL Database are supported.

Box 2: Transactional with updatable subscriptions
Type of replication

Snapshot and one-way transactional replication are supported. Peer-to-peer transactional replication and merge replication aren't supported.

Incorrect:
* Snapshot
Data Migration and Synchronization:

Initial Snapshot:
The initial data transfer to the subscriber is typically done via a snapshot, but here we want minimize the performance impact on DB1.

Transactional Replication:
After the initial snapshot, transactional replication ensures that subsequent changes (inserts, updates, deletes) on the source database are replicated to the Azure SQL Database in near real-time.


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/replication-to-sql-database



You have eight on-premises servers that have Microsoft SQL Server 2022 installed. Each server contains multiple databases.

You plan to migrate the on-premises databases to Azure.

You need to analyze the servers to identify which Azure SQL services can be used to host the databases.

Which two tools can you use? Each correct answer presents a complete solution.

Note: Each correct selection is worth one point.

  1. Data Migration Assistant (DMA)
  2. SQL Server Migration Assistant (SSMA)
  3. Azure Database Migration Service
  4. Azure Migrate
  5. Database Experimentation Assistant (DEA)

Answer(s): A,D

Explanation:

[A]
The Data Migration Assistant (DMA) can be used to identify which Azure SQL services are suitable for hosting your databases when migrating from SQL Server 2022 to Azure. DMA assesses your on-premises SQL Server databases and provides recommendations on whether they are compatible with Azure SQL Database or Azure SQL Managed Instance. It identifies potential migration blockers and compatibility issues, helping you choose the appropriate Azure SQL service.
[D]
Azure Migrate can be used to identify which Azure SQL services are suitable for hosting your migrated databases. It assesses on-premises SQL Server databases for migration readiness, providing recommendations on target Azure SQL service options like Azure SQL Database (single database or elastic pool), Azure SQL Managed Instance, and SQL Server on Azure VMs. Azure Migrate also helps with performance-based sizing and cost estimations for running the databases in Azure.


Reference:

https://learn.microsoft.com/en-us/sql/dma/dma-overview?view=sql-server-ver17 https://learn.microsoft.com/en-us/data-migration/sql-server/database/guide



DRAG DROP (Drag and Drop is not supported)

You have an on-premises server named Server1 that has Microsoft SQL Server 2022 installed.

You have an Azure subscription that contains an Azure SQL managed instance named Ml1. Ml1 contains a database named DB2.

You need to create a copy of DB2 on Server1.

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

Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:






Take a backup on SQL Managed Instance
First, create a credential to access the storage account from your instance, take a copy-only backup of your database, and then store it.

Step 1: Create a credential on MI1.
The managed identity is created for the Azure SQL managed instance, not for the on-premises server.

In the following example, note that Managed Identity is a hard-coded string, and you need to replace the generic storage account name with the name of the actual storage account:

CREATE CREDENTIAL [https://<mystorageaccountname>.blob.core.windows.net/<containername>] WITH IDENTITY = 'MANAGED IDENTITY';

Step 2: Backup up DB2 to a URL and use COPY_ONLY option.
Next, take a COPY_ONLY backup of your database by running the following sample T-SQL command:

BACKUP DATABASE [SampleDB]
TO URL = 'https://<mystorageaccountname>.blob.core.windows.net/<containername>/SampleDB.bak' WITH COPY_ONLY;

Step 3: Restore DB2 from the URL and use the WITH MOVE option. Restore the database to SQL Server by using the WITH MOVE option of the RESTORE DATABASE T-SQL command and providing explicit file paths for your files on the destination server.

To restore your database to SQL Server, run the following sample T-SQL command with file paths appropriate to your environment:

RESTORE DATABASE [SampleDB]
FROM URL = 'https://<mystorageaccountname>.blob.core.windows.net/<containername>/SampleDB.bak' WITH
MOVE 'data_0' TO 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA \SampleDB_data_0.mdf',
MOVE 'log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA \SampleDBlog.ldf',
MOVE 'XTP' TO 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA \SampleDB_xtp.xtp


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/restore-database-to-sql-server



You have an Azure subscription that contains an Azure SQL managed instance named SQLMl1.

You need to configure SQLMl1 to use the Business Critical service tier.

Which PowerShell cmdlet should you run?

  1. Update-SqlVM
  2. Set-AzSqlServerConfigurationOption
  3. Set-AzSqlDatabase
  4. Set-AzSqlInstance

Answer(s): D

Explanation:

To configure an Azure SQL Managed Instance to use the Business Critical service tier with PowerShell, you'll use the Set-AzSqlInstance cmdlet. This cmdlet allows you to modify various properties of an existing managed instance, including its service tier. You'll need to specify the resource group, instance name, and the desired service tier as "BusinessCritical".
Example:
$resourceGroupName = "YourResourceGroupName"
$managedInstanceName = "YourManagedInstanceName"
$serviceTier = "BusinessCritical"
Set-AzSqlInstance -ResourceGroupName $resourceGroupName -Name $managedInstanceName - ServiceTier $serviceTier


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/scripts/create-configure-managed- instance-powershell



DRAG DROP (Drag and Drop is not supported)

You have an Azure virtual machine named VM1 that runs Red Hat Enterprise Linux (RHEL).

You need to install and configure Microsoft SQL Server 2022 Standard on VM1.

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

Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:






To install and configure Microsoft SQL Server 2022 Standard on a Red Hat Enterprise Linux (RHEL) Azure virtual machine, you'll need to use the command line, as there is no graphical interface for SQL Server on Linux. The process involves downloading the necessary packages, configuring the repository, installing SQL Server, setting up the configuration, and verifying the service status.

Step 1: Download the /mssql-server_2022.x86_64.repo file
To configure SQL Server on RHEL 9, run the following commands in a terminal to install the mssql-server package:

1. Download the SQL Server 2025 (17.x) Preview Red Hat 9 repository configuration file:

sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/9/mssql-server- preview.repo

Step 2: Run sudo yum install -y mssql-server
2. Run the following command to install SQL Server:

sudo yum install -y mssql-server

Step 3: Run sudo /opt/mssql/bin/mssql-conf setup
3. After the package installation finishes, run mssql-conf setup using its full path, and follow the prompts to set the sa password and choose your edition. As a reminder, the following SQL Server editions are freely licensed:
Evaluation, Developer, and Express.

sudo /opt/mssql/bin/mssql-conf setup


Reference:

https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat



HOTSPOT (Drag and Drop is not supported)

You have the projects shown in the following table.



You need to recommend an Azure database solution for each project. The solution must meet the following requirements:

Project2 must minimize malware threats to the underlying operating system that hosts the migrated database.
Administrative effort must be minimized where possible.

What should you recommend using for each project? 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: Azure Cosmos DB
Project1
A rapidly iterating cloud-based solution that integrates multiple software as a service (SaaS) solutions.

For a rapidly iterating, cloud-based SaaS integration solution, Azure Cosmos DB is a strong recommendation. It offers a schemaless, multi-model database that supports flexible data modeling and querying, which is crucial for agile development and integrating diverse SaaS solutions. Its global distribution and automatic scaling capabilities also ensure high availability and performance as your application grows.

Box 2: Azure SQL Managed Instance
Project2
The migration of an existing on-premises Microsoft SQL Server 2019 database to Azure. Project2 must minimize malware threats to the underlying operating system that hosts the migrated database.

Azure SQL Managed Instance minimizes malware threats to the underlying operating system by leveraging a multi-layered security approach, including threat detection, encryption, and network isolation. It achieves this by handling the operating system and underlying infrastructure at the PaaS level, reducing the attack surface accessible to malicious actors.

Box 3: SQL Server on Azure on VM
Project3
An app that supports multiple 20-TB databases.

If you need to store more than 16 TB of data, you should consider moving to Azure SQL Database Hyperscale or SQL Server on Azure Virtual Machines.

Incorrect:

* Azure SQL Managed Instance
Azure SQL Managed Instance has a maximum storage capacity of 16 TB per instance, which applies to the total storage used by all databases, system databases, and log files within that instance.


Reference:

https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/service/cosmos-db https://learn.microsoft.com/en-us/azure/azure-sql/database/security-overview



You have an Azure subscription.

You need to deploy an Azure SQL database by using a BACPAC file.

Which command should you run?

  1. az sql db create
  2. az sql db op
  3. az sql db import
  4. az sql db copy

Answer(s): C

Explanation:

Import a BACPAC file into a database in SQL Database using the Azure CLI Example:
echo "Importing sample database from $container to $database..." az sql db import --admin-password $password --admin-user $login --storage-key $key --storage-key-type StorageAccessKey --storage-uri https://$storage.blob.core.windows.net/$container/$bacpac --name $database --resource-group $resourceGroup --server $server


Reference:

https://learn.microsoft.com/en-us/azure/azure-sql/database/scripts/import-from-bacpac-cli



HOTSPOT (Drag and Drop is not supported)

You have an Azure subscription.

You deploy resources by using the following Bicep template.



For each of the following statements, select Yes if the statement is true, otherwise select No.

Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:





Box 1: Yes
Yes - Server1 will support mixed authentication.

A. The azureADOnlyAuthentication (bool) property is not present.
If set to true then Azure Active Directory only Authentication enabled.
Mixed authentication will be supported.
Box 2: No
No - Database1 will scale dynamically based on the load.
We see sku tier is Standard.
Azure SQL databases with the Standard tier do not support autoscale. Autoscale is a feature available in the Serverless compute tier of Azure SQL Database, where resources scale automatically based on workload demands. The Standard tier, part of the provisioned compute model, requires manual scaling or the use of Elastic Pools for resource sharing and scaling.
Box 3: No
No - Server1 will be created as an Azure SQL managed instance.
The first line of the BICEP template would have to be like:
resource managedInstance 'Microsoft.Sql/managedInstances@2021-11-01-preview' = {


Reference:

https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/managedinstances?pivots=deployment- language-bicep https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/create-bicep-quickstart



Viewing page 16 of 54



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

DP-300 Exam Discussions & Posts