Microsoft Azure Database Administrator Associate (DP-300) Exam-style mock test
Microsoft DP-300 Azure Database Administrator Practice Exams|Practice test
Full explanations
Exam format
Pass line 70%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Deploy and Configure Azure SQL Resources
A B2B SaaS company deploys its customer-facing invoicing database to Azure SQL Database. The DevOps team requires the deployment to be fully repeatable, version-controlled in Git, and runnable in their existing Azure CLI pipeline with declarative definitions. Which deployment approach best meets these requirements?
・Export a BACPAC from the production database each release and import it into the new environment manually
Incorrect. BACPAC export/import moves schema and data but is not a declarative, version-controlled definition of the resource infrastructure and the manual steps are not repeatable.
✓Author a Bicep file and deploy it with az deployment group create
Correct. Bicep is a declarative infrastructure-as-code language that can live in Git and be deployed through the Azure CLI, giving repeatable, version-controlled deployments.
・Click through the Azure portal wizard and save a screenshot of each configuration page for reference
Incorrect. Portal screenshots are not executable, not version-controlled as code, and cannot be run in a CLI pipeline.
・Run individual az sql db create commands in a shell script that each engineer edits before deploying
Incorrect. Hand-edited imperative scripts drift between engineers and are not a single declarative source of truth.
Explanation
Bicep provides declarative, Git-friendly, CLI-deployable definitions, making it the correct repeatable infrastructure-as-code choice.
Example2 · Security, Authentication, and Encryption
A B2B SaaS company runs its tenant-management workload on Azure SQL Database. The security team mandates that database administrators sign in with their corporate identities so that account lifecycle, MFA, and conditional access are enforced centrally rather than per-database. Which action enables this requirement for the logical server?
・Create contained database users mapped to SQL authentication passwords
Incorrect. Contained users with SQL passwords still rely on SQL authentication and do not use corporate Azure AD identities or central MFA.
✓Set an Azure AD admin for the logical server and create users from external provider
Correct. Assigning an Azure AD admin and creating users FROM EXTERNAL PROVIDER lets administrators sign in with corporate identities so MFA and conditional access apply centrally.
・Enable the sa account and distribute its password to the DBA team
Incorrect. The sa account does not exist as a sign-in for Azure SQL Database and sharing a password defeats central identity control.
・Add server-level SQL logins for each administrator in the master database
Incorrect. Server-level SQL logins use SQL authentication, so lifecycle and MFA are managed per-database rather than through Azure AD.
Explanation
Azure AD (Microsoft Entra ID) authentication requires an Azure AD admin on the logical server, after which users are created FROM EXTERNAL PROVIDER, giving central identity, MFA, and conditional access control.
Example3 · High Availability, Disaster Recovery, and Backup and Restore
A B2B SaaS company hosts its tenant catalog on a single Azure SQL Database in the Business Critical tier. The team wants a readable secondary within the same region to offload reporting queries without provisioning a separate database. Which capability should they use?
・Enable active geo-replication to a secondary database created in a paired Azure region for reads
Incorrect. Active geo-replication creates a secondary in a different region, which adds latency and is aimed at DR, not same-region read offload.
✓Use the built-in read scale-out replica exposed by the Business Critical tier
Correct. Business Critical (and Premium) tiers include always-on read-only replicas, so setting ApplicationIntent=ReadOnly routes reporting to a built-in replica at no extra database cost.
・Configure an auto-failover group spanning two regions and route reporting to the secondary
Incorrect. Auto-failover groups are a cross-region DR construct; they do not provide a same-region read replica for this requirement.
・Deploy a separate Azure SQL Managed Instance and set up transactional replication
Incorrect. Standing up a Managed Instance with transactional replication is heavy and unnecessary when the tier already provides read scale-out.
Explanation
The Business Critical tier already maintains high-availability replicas that can serve read-only workloads via read scale-out, satisfying same-region read offload without new infrastructure.
Example4 · Performance Monitoring and Optimization
A healthcare services firm runs a patient-billing workload on Azure SQL Database. After a recent deployment, several reports that used to return in seconds now time out. The DBA needs to find which queries regressed and compare their current plan against the plan used before the deployment. Which Query Store capability should the DBA use first?
✓Open the Regressed Queries view to compare recent and historical plans
Correct. The Regressed Queries view surfaces queries whose performance degraded and lets the DBA compare the current execution plan with a prior one.
・Enable the Query Store read-write operation mode on the database
Incorrect. Setting read-write mode only ensures capture continues; it does not identify which specific queries regressed after the deployment.
・Reduce the Query Store Max Size so stale runtime statistics are purged automatically
Incorrect. Lowering Max Size purges older data, removing the very history needed to compare pre-deployment plans.
・Run a manual UPDATE STATISTICS on every table referenced by the slow reports
Incorrect. Blindly updating statistics may help some plans but does not identify which queries regressed or let you compare plans.
Explanation
Query Store's Regressed Queries view is the fastest path to pinpoint regressions and compare plans before and after a change.
Example5 · Automation, Maintenance, and T-SQL Administration
A healthcare services firm runs a reporting database on SQL Server 2022 on an Azure VM. The DBA needs nightly rebuilds of fragmented indexes to run automatically at 02:00 every day, with the team notified by email if the step fails. Which approach meets the requirement with native tooling?
✓Configure a SQL Server Agent job with a T-SQL step, a recurring schedule, and an operator
Correct. SQL Server Agent natively schedules T-SQL job steps and sends failure notifications to a configured operator, matching all requirements.
・Set up an Azure Automation runbook that opens an SSH session and runs the rebuild on a timer
Incorrect. An Automation runbook over SSH adds unnecessary external orchestration and is not the native SQL maintenance mechanism here.
・Create a Windows Task Scheduler entry that launches sqlcmd each night to run the script
Incorrect. Task Scheduler with sqlcmd can run scripts but lacks integrated operator notification and job-step error handling.
・Run the index rebuild script manually from SSMS whenever fragmentation happens to get reported
Incorrect. Manual execution does not satisfy the requirement for automatic, scheduled, unattended runs.
Explanation
SQL Server Agent jobs provide scheduling, T-SQL steps, and operator-based alerting natively, which is the intended automation tool for recurring maintenance.
Example6 · Deploy and Configure Azure SQL Resources
A healthcare services firm is migrating an on-premises SQL Server instance that uses SQL Server Agent jobs, cross-database queries, and CLR assemblies to Azure. The team wants to keep these instance-level features without refactoring the application. Which Azure SQL deployment option should the administrator recommend?
・Azure SQL Database with the serverless compute tier and auto-pause enabled
Incorrect. Serverless single databases do not provide SQL Server Agent or cross-database queries, so the instance features are lost.
・Azure SQL Database using a single database in the DTU-based Standard tier
Incorrect. A single Azure SQL Database lacks SQL Server Agent and native cross-database queries, which are required here.
✓Azure SQL Managed Instance in the General Purpose service tier
Correct. Azure SQL Managed Instance offers near-100% surface compatibility, including SQL Server Agent, cross-database queries, and CLR, with no refactoring.
・SQL Server on an Azure virtual machine using the Developer edition
Incorrect. SQL Server on a VM works but shifts full OS and patching management to the team and uses a non-production edition.
Explanation
Azure SQL Managed Instance is the PaaS option that preserves instance-scoped features like SQL Server Agent, cross-database queries, and CLR, making it ideal for lift-and-shift without application changes.
Example7 · Deploy and Configure Azure SQL Resources
LumenMart, a retail chain, is migrating an on-premises SQL Server database that uses SQL Server Agent jobs, cross-database queries, and CLR assemblies. The team wants a fully managed PaaS platform that preserves near full SQL Server surface-area compatibility with minimal code changes. Which Azure offering should you recommend?
・Azure SQL Database single database on the General Purpose service tier with elastic pool membership
Incorrect. A single database or elastic pool does not support instance-scoped features such as SQL Server Agent, cross-database queries, and CLR assemblies without rework.
✓Azure SQL Managed Instance deployed into a dedicated subnet of a virtual network
Correct. Azure SQL Managed Instance is a PaaS option giving near full SQL Server surface-area compatibility, including SQL Agent, cross-database queries, and CLR, with minimal changes.
・Azure SQL Database serverless configured with auto-pause and auto-scaling compute
Incorrect. Serverless is a compute billing model for Azure SQL Database and shares the single-database feature limits, so instance-level features are still unsupported.
・SQL Server on an Azure virtual machine sized from the memory-optimized VM series
Incorrect. SQL Server on an Azure VM is IaaS, not a fully managed PaaS platform, so you still manage OS patching and backups yourself.
Explanation
Managed Instance is the PaaS target that preserves instance-scoped SQL Server features like Agent, CLR, and cross-database queries with minimal migration effort.
Example8 · Deploy and Configure Azure SQL Resources
LumenMart hosts 40 small per-store Azure SQL databases whose activity peaks at different hours, so most databases sit idle while a few spike. The team wants to reduce total compute cost by sharing resources across the databases. Which approach best meets this goal?
✓Place all 40 databases into a single elastic pool and allocate a shared pool of eDTUs or vCores
Correct. An elastic pool lets many databases with uneven usage share a common pool of eDTUs or vCores, cutting cost versus provisioning each one separately.
・Scale each of the 40 individual databases up to a higher provisioned service tier
Incorrect. Scaling every individual database up raises cost and does not let idle databases lend capacity to the busy ones.
・Consolidate all 40 databases into one large database separated by schema per store
Incorrect. Merging all stores into one database changes the data model, breaks tenant isolation, and is not the intended resource-sharing mechanism.
・Move each database to the serverless compute tier with a high configured maximum vCore limit
Incorrect. Serverless scales each database independently but does not pool capacity across many databases, so simultaneous spikes are not absorbed by shared budget.
Explanation
Elastic pools are designed for many databases with varying, non-overlapping peaks to share a single budget of eDTUs or vCores and reduce cost.
Example9 · Deploy and Configure Azure SQL Resources
The LumenMart platform team must deploy identical Azure SQL Database resources across development, test, and production in a repeatable, version-controlled, idempotent way integrated into a CI/CD pipeline. Which deployment method best satisfies these requirements?
・Manually create each database through the Azure portal using the guided provisioning wizard for every environment
Incorrect. Portal provisioning is manual and not version-controlled, so it cannot guarantee repeatable, identical deployments across environments.
・Run interactive Azure CLI commands by hand in Azure Cloud Shell for each of the three target environments
Incorrect. Typing CLI commands by hand each time is imperative and error-prone, lacking the idempotency and source control the requirement demands.
✓Use declarative Bicep templates checked into source control and deployed through the pipeline
Correct. Bicep templates are declarative, idempotent, and source-controlled, making them ideal for repeatable CI/CD-driven deployments across environments.
・Script the deployment with Azure PowerShell cmdlets executed ad hoc from each engineer's workstation
Incorrect. Ad hoc PowerShell run from individual workstations is not centrally version-controlled and does not provide reliable idempotent pipeline deployment.
Explanation
Declarative, source-controlled Bicep (or ARM) templates provide the idempotent, repeatable infrastructure-as-code deployment that CI/CD pipelines require.
Example10 · Deploy and Configure Azure SQL Resources
A financial services firm is migrating an on-premises OLTP core banking database that uses SQL Server Agent jobs, cross-database queries, and CLR assemblies. The DBA team wants a fully managed PaaS service while keeping instance-level features and near-100% compatibility with minimal code changes. Which Azure SQL deployment option should you recommend?
・Azure SQL Database in the serverless compute tier
Incorrect. Single-database serverless does not provide SQL Server Agent, cross-database queries, or instance-scoped features out of the box.
・SQL Server on an Azure virtual machine in the IaaS model
Incorrect. A SQL Server VM supports every feature but is IaaS, so the team must patch the OS and engine rather than using a fully managed PaaS service.
✓Azure SQL Managed Instance
Correct. Managed Instance delivers near-100% engine compatibility with SQL Agent, cross-database queries, and CLR while remaining a fully managed PaaS offering.
・Azure SQL Database with an elastic pool
Incorrect. An elastic pool shares resources among single databases but still lacks SQL Agent and instance-level features.
Explanation
Managed Instance is the PaaS option that preserves instance-scoped SQL Server features such as SQL Agent, cross-database queries, and CLR, minimizing migration code changes.
Example11 · Deploy and Configure Azure SQL Resources
A trading analytics team runs an Azure SQL Database that is queried heavily during market hours but is almost idle overnight and on weekends. They want to automatically scale compute down during idle periods and pay only for compute actually used, while the database remains online. Which configuration should you choose?
・The provisioned compute tier with autoscale rules on DTUs
Incorrect. The provisioned tier bills for a fixed allocation continuously and has no built-in per-second idle scaling in the DTU model.
・The Hyperscale service tier with multiple read replicas added
Incorrect. Hyperscale targets very large databases and read scale-out, not automatic compute down-scaling to save on idle cost.
✓The serverless compute tier of the General Purpose vCore model
Correct. Serverless automatically scales compute based on workload and bills per second of usage, pausing or reducing during idle periods.
・A Business Critical provisioned database with manual scaling
Incorrect. Business Critical with manual scaling requires administrator action and bills for the allocated compute the entire time.
Explanation
The serverless compute tier auto-scales vCores to workload demand and bills per second, which fits a bursty, often-idle analytics workload.
Example12 · Deploy and Configure Azure SQL Resources
A manufacturing distributor runs an ERP application on an on-premises SQL Server instance that uses SQL Server Agent jobs, cross-database queries, and CLR assemblies. The team wants to migrate to Azure with minimal code changes while still offloading operating system patching. Which deployment option should they choose?
✓Deploy Azure SQL Managed Instance, which supports instance-scoped features like SQL Agent and cross-database queries
Correct. Azure SQL Managed Instance provides near-100% engine compatibility, including SQL Agent, cross-database queries, and CLR, while Azure manages OS patching.
・Deploy a single Azure SQL Database in the General Purpose tier
Incorrect. A single Azure SQL Database does not expose instance-level SQL Agent or native cross-database queries.
・Deploy SQL Server on an Azure virtual machine and manage the OS
Incorrect. SQL Server on an Azure VM still requires the team to patch and manage the operating system themselves.
・Deploy an Azure SQL Database elastic pool for the ERP databases
Incorrect. An elastic pool is still database-scoped and lacks instance features such as SQL Agent and cross-database queries.
Explanation
Managed Instance best fits lift-and-shift workloads that depend on instance-scoped features while still removing OS management from the customer.
Example13 · Deploy and Configure Azure SQL Resources
The distributor's analytics team wants predictable billing and the ability to independently scale compute and storage, and to optionally apply existing SQL Server licenses through Azure Hybrid Benefit. Which purchasing model for Azure SQL Database meets these requirements?
・The DTU-based purchasing model, which bundles compute and storage together
Incorrect. The DTU model bundles resources and does not support Azure Hybrid Benefit or independent compute and storage scaling.
・The serverless compute tier billed strictly by storage consumed per hour
Incorrect. Serverless bills for compute per second based on usage, not strictly by storage, and this does not describe Hybrid Benefit.
✓The vCore-based purchasing model with Azure Hybrid Benefit
Correct. The vCore model lets you scale compute and storage independently and apply Azure Hybrid Benefit to reuse existing licenses.
・The elastic DTU model that shares resources across pooled databases
Incorrect. Elastic DTU pools share a bundled resource pool and do not offer Azure Hybrid Benefit.
Explanation
Only the vCore model separates compute from storage and qualifies for Azure Hybrid Benefit licensing savings.
Example14 · Deploy and Configure Azure SQL Resources
A telecom operator needs to deploy 40 identical Azure SQL databases across its regional billing hubs, each with the same firewall rules, tier, and tags. The DBA team wants a repeatable, version-controlled deployment that can be reviewed in pull requests and reused for future hubs. Which deployment approach best meets these requirements?
✓Author an ARM template or Bicep file and deploy it through the CI/CD pipeline
Correct. An ARM/Bicep template is declarative, stored in source control, reviewable in pull requests, and can be redeployed consistently for every hub, satisfying all requirements.
・Manually create each database in the Azure portal and copy the firewall settings between hubs by hand each time
Incorrect. Manual portal creation with hand-copied settings is error-prone, not version-controlled, and does not scale to 40 identical deployments.
・Run an ad hoc az sql db create command once per hub from Cloud Shell
Incorrect. A one-off CLI command is imperative and not inherently version-controlled or reviewable in pull requests across many hubs.
・Use the portal's Deploy to Azure button after clicking through the blade
Incorrect. The Deploy to Azure button still relies on interactive clicks and is not a source-controlled, reviewable artifact for the team.
Explanation
Infrastructure-as-code templates (ARM/Bicep) provide the repeatable, version-controlled, reviewable deployment pattern required for many identical resources.
Example15 · Deploy and Configure Azure SQL Resources
A telecom operator is migrating a legacy provisioning application that depends on SQL Server Agent jobs, cross-database queries, and the CLR integration feature. The team wants a fully managed PaaS platform and prefers to avoid managing the operating system. Which Azure SQL deployment option should the DBA recommend?
・Azure SQL Database single database
Incorrect. A single database does not support SQL Server Agent or cross-database queries in the same way, so it does not fit the legacy dependencies.
✓Azure SQL Managed Instance
Correct. Azure SQL Managed Instance is a fully managed PaaS offering with near-complete SQL Server engine compatibility, including SQL Server Agent, cross-database queries, and CLR.
・SQL Server on an Azure virtual machine running in the operator's subscription
Incorrect. SQL Server on a VM is IaaS and requires the operator to manage and patch the operating system, which the team wants to avoid.
・Azure SQL Database elastic pool
Incorrect. An elastic pool shares resources among single databases but still lacks instance-scoped features like SQL Server Agent and cross-database queries.
Explanation
Managed Instance provides high engine compatibility (Agent, cross-database queries, CLR) as a managed PaaS, fitting legacy apps that need instance-level features without OS management.
▶ Try 10 free questions (graded)