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

HOTSPOT (Drag and Drop is not supported)

You have an Azure subscription.

You plan to deploy an Azure SQL database by using an Azure Resource Manager template.

How should you complete the template? 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: "Microsoft.Sql/servers"
Example:
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2021-08-01-preview",
"name": "[parameters('serverName')]",
"location": "[parameters('location')]",
"properties": {
"administratorLogin": "[parameters('administratorLogin')]", "administratorLoginPassword": "[parameters('administratorLoginPassword')]" }
},
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2021-08-01-preview",
"name": "[format('{0}/{1}', parameters('serverName'), parameters('sqlDBName'))]", "location": "[parameters('location')]",
"sku": {
"name": "Standard",
"tier": "Standard"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('serverName'))]" ]
}

Box 2: "dependsOn": [


Reference:

https://docs.microsoft.com/en-us/azure/azure-sql/database/single-database-create-arm-template-quickstart



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

You have an Azure subscription that contains an Azure SQL managed instance named SQLMI1 and a virtual network named VNET1. SQLMI1 resides on VNET1. The on-premises network connects to VNET1 by using an ExpressRoute connection.

You plan to migrate DB1 to SQLMI1 by using Azure Database Migration Service.

You need to configure VNET1 to support the migration.

What should you do?

  1. Configure service endpoints.
  2. Configure virtual network peering.
  3. Deploy an Azure firewall.
  4. Configure network security groups (NSGs).

Answer(s): D



You have an on-premises Microsoft SQL server that uses the FileTables and Filestream features.

You plan to migrate to Azure SQL.

Which service should you use?

  1. Azure SQL Database
  2. SQL Server on an Azure VM
  3. Azure SQL Managed Instance
  4. Azure Database for MySQL

Answer(s): B

Explanation:

SQL Server VM alternative.
Your business might have requirements that make SQL Server on Azure Virtual Machines a more suitable target than Azure SQL Database.
If one of the following conditions applies to your business, consider moving to a SQL Server virtual machine (VM) instead:
* You have strict dependency on features that are still not supported, such as FileStream/FileTable, PolyBase, and cross-instance transactions.
* Etc.


Reference:

https://docs.microsoft.com/en-us/azure/azure-sql/migration-guides/database/sql-server-to-sql-database- overview



You need to migrate an on-premises Microsoft SQL Server database to an Azure SQL Database. The solution must minimize downtime.

What should you do?

  1. Configure Transaction Log Shipping.
  2. Implement Always On availability groups.
  3. Configure transactional replication.
  4. Import a BACPAC.

Answer(s): C

Explanation:

Use Transactional Replication.
When you can't afford to remove your SQL Server database from production while the migration is occurring, you can use SQL Server transactional replication as your migration solution.
Note: There are two primary methods for migrating a SQL Server 2005 or later database to Azure SQL Database. The first method (database copy or BACPAC importation) is simpler but requires some, possibly substantial, downtime during the migration. The second method (transactional replication) is more complex, but substantially eliminates downtime during the migration.
Incorrect:
Not D: The import BACPAC method includes downtime during migration.


Reference:

https://docs.microsoft.com/en-us/azure/azure-sql/database/migrate-to-database-from-sql-server#method-1- migration-with-downtime-during-the-migration



You have an Azure SQL database named DB1.

You have a table name Table1 that has 20 columns of type CHAR(400). Row compression for Table1 is enabled.

During a database audit, you discover that none of the fields contain more than 150 characters.

You need to ensure that you can apply page compression to Table1.

What should you do?

  1. Configure the columns as sparse.
  2. Change the column type to NVARCHAR(MAX).
  3. Change the column type to VARCHAR(MAX).
  4. Change the column type to VARCHAR(200).

Answer(s): D

Explanation:

We reduce the max length of the column from 400 to 200.
Incorrect:
Not A: Sparse column is useful when there are many null columns.
The SQL Server Database Engine uses the SPARSE keyword in a column definition to optimize the storage of values in that column. Therefore, when the column value is NULL for any row in the table, the values require no storage.
Not B, Not C: SQL Server 2005 got around the limitation of 8KB storage size and provided a workaround with varchar(max). It is a non-Unicode large variable-length character data type and can store a maximum of 2^31- 1 bytes (2 GB) of non-Unicode characters.


Reference:

https://www.sqlshack.com/sql-varchar-data-type-deep-dive/
https://36chambers.wordpress.com/2020/06/18/nvarchar-everywhere-a-thought-experiment/



You have an on-premises Microsoft SQL Server named SQL1 that hosts five databases.

You need to migrate the databases to an Azure SQL managed instance. The solution must minimize downtime and prevent data loss.

What should you use?

  1. Always On availability groups
  2. Backup and Restore
  3. log shipping
  4. Database Migration Assistant

Answer(s): B



You have an Azure subscription that contains an Azure SQL database. The database contains a table named table1 that uses partitioned columnstores.

You need to configure table1 to meet the following requirements:

Each partition must be compressed.

The compression ratio must be maximized.

You must be able to index the compressed data.

What should you use?

  1. page compression
  2. columnstore compression
  3. GZIP compression
  4. columnstore archival compression

Answer(s): D

Explanation:

SQL Server, Azure SQL Database, and Azure SQL Managed Instance support row and page compression for rowstore tables and indexes, and support columnstore and columnstore archival compression for columnstore tables and indexes.
For columnstore tables and indexes, all columnstore tables and indexes always use columnstore compression and this is not user configurable.
Compressing columnstore indexes with archival compression, causes the index to perform slower than columnstore indexes that do not have the archival compression. Use archival compression only when you can afford to use extra time and CPU resources to compress and retrieve the data.
The benefit of archival compression, is reduced storage, which is useful for data that is not accessed frequently. For example, if you have a partition for each month of data, and most of your activity is for the most recent months, you could archive older months to reduce the storage requirements.


Reference:

https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression



You have an Azure subscription linked to a Microsoft Entra tenant. The subscription contains 10 virtual machines that run Windows Server 2019 and host Microsoft SQL Server 2019 instances.

You need to ensure that you can manage the SQL Server instances by using a single user account.

What should you do first?

  1. Enable a user-assigned managed identity on each virtual machine.
  2. Deploy a Microsoft Entra Domain Services domain and join the virtual machines to the domain.
  3. Enable a system-assigned managed identity on each virtual machine.
  4. Join the virtual machines to the Microsoft Entra tenant.

Answer(s): B






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

DP-300 Exam Discussions & Posts