All Microsoft exams
Free DP-300 practice test: 30 questions with answers
30 original questions for Administering Microsoft Azure SQL Solutions, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 DP-300 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Secure and monitor data platform (5 questions)
Question 1
Administrators must sign in to an Azure SQL logical server with their corporate identities instead of a shared SQL login. Which configuration achieves this?
- ASet a Microsoft Entra administrator on the server and enable Entra authentication
- BDisable authentication on the server so sign-in skips credential checks
- CPublish the admin password in the wiki where every staff member can read it
- DCreate one shared SQL login and give its password to each administrator
Show answer and explanationHide answer
Correct answer: AA Microsoft Entra administrator with Entra authentication enables individual, auditable sign-in with corporate identities. Shared logins lose accountability, and disabling authentication or publishing passwords are unsafe.
Question 2
Which two features help meet an audit requirement to record database access and data changes? (Choose two.)
- AAuditing that only records server restarts
- BWriting audit records to the same table that users can edit
- CDynamic data masking that hides values from auditors
- DSQL auditing with logs sent to a storage account or Log Analytics workspace
- EDisabling all logging to reduce storage cost
Show answer and explanationHide answer
Correct answer: A, DAuditing that sends logs to a durable destination records access and changes for review. Disabling logs, auditing only restarts, and tables users can edit do not provide trustworthy evidence, and masking hides data rather than recording activity.
Question 3
Data at rest in an Azure SQL database must be encrypted without application changes, and the keys must be managed by the platform. Which feature provides this?
- AHashing every column in the table
- BClient-side application encryption that changes every query
- CStoring the data as plain text in a separate folder
- DTransparent data encryption
Show answer and explanationHide answer
Correct answer: DTransparent data encryption encrypts data at rest with platform-managed keys and requires no application changes. Client-side encryption changes application behavior, plain text is unprotected, and hashing columns breaks their usability.
Question 4
The database must be reachable only from the company's private network, and not from the public internet. Which feature enforces this?
- ASharing the server name in a public forum post
- BA private endpoint with public network access disabled
- CA firewall rule that allows the 0.0.0.0/0 range
- DA public IP address for the server with a password and a shared login
Show answer and explanationHide answer
Correct answer: BA private endpoint with public access disabled restricts connectivity to the private network. Open firewall rules, public addresses, and publicizing the server name expose the database.
Question 5
A support engineer must troubleshoot a database but should not see sensitive customer values in query results. Which feature helps?
- APrinting customer tables for review
- BSharing the production password
- CGiving the engineer the sysadmin role for all data
- DDynamic data masking on sensitive columns
Show answer and explanationHide answer
Correct answer: DDynamic data masking hides sensitive values from users without the right privilege while allowing troubleshooting on structure. Administrative rights, printouts, and shared passwords expose the data.
Plan and implement data platform resources (5 questions)
Question 6
A company is moving an on-premises SQL Server database to Azure and needs fine control over vCores, memory, and storage with the ability to use Azure Hybrid Benefit. Which purchasing model fits?
- AThe DTU-based model with fixed bundles only
- BThe vCore-based model
- CA free tier with no SLA
- DA file share with nightly copies
Show answer and explanationHide answer
Correct answer: BThe vCore model exposes compute and storage separately and supports Azure Hybrid Benefit for licensing. DTU bundles limit that control, and free tiers and file shares are not production database hosting models.
Question 7
Which purchasing choice is most appropriate when several small databases have unpredictable and uneven usage and should share resources?
- AManual scaling of each database every hour
- BA separate dedicated server with maximum capacity for each database
- CAn elastic pool that shares a set of resources among the databases
- DA single database with the maximum capacity for all of them combined
Show answer and explanationHide answer
Correct answer: CElastic pools share capacity among databases with uneven usage, which lowers cost while covering peaks. Dedicated maximum capacity for each database and manual scaling waste resources or respond too slowly.
Question 8
A company migrates a SQL Server database with minimal downtime and needs continuous replication until cutover. Which migration service fits?
- AA one-time file copy that stops the application for a week
- BExporting data to a spreadsheet
- CAzure Database Migration Service with an online migration
- DPrinting the schema and retyping it
Show answer and explanationHide answer
Correct answer: CAn online migration with continuous replication keeps the target in sync until cutover, minimizing downtime. A week-long stop, spreadsheet export, and retyping the schema are slow and error-prone.
Question 9
A new application needs a database that scales compute automatically between a minimum and a maximum during the day and pauses when idle. Which tier fits?
- AA fixed provisioned tier that runs at maximum vCores around the clock
- BA serverless compute tier with auto-pause and auto-scaling limits
- CA blob file in a storage account container with a cool access tier configured
- DA spreadsheet for storing transactions and daily totals
Show answer and explanationHide answer
Correct answer: BA serverless tier scales compute within limits and pauses when idle, which matches intermittent workloads. Fixed maximum tiers pay for idle capacity, while files and spreadsheets are not transactional database platforms.
Question 10
A workload depends on SQL Server Agent jobs and needs near-complete compatibility with an on-premises instance. Which deployment option fits best?
- AA table in Azure Table Storage
- BA SQLite file on a virtual machine
- CAzure SQL Managed Instance
- DAzure SQL Database single database
Show answer and explanationHide answer
Correct answer: CManaged Instance provides near-complete SQL Server compatibility, including SQL Agent and cross-database features. A single database lacks several of those features, and table storage and SQLite are different products.
Plan and implement high availability and disaster recovery (5 questions)
Question 11
An application needs automatic failover to a secondary region with a stable listener endpoint, so connection strings do not change during a failover. Which feature fits?
- AA file export to a USB drive
- BAn auto-failover group
- CA read-only replica with no failover
- DA manual copy of the database every week
Show answer and explanationHide answer
Correct answer: BAuto-failover groups provide automatic failover to a secondary region with listener endpoints that stay constant. Weekly copies, read-only replicas without failover, and file exports do not meet the requirement.
Question 12
A team needs to restore a database to its state from 6 hours ago after an accidental deletion of rows. Which capability should be used?
- APoint-in-time restore within the configured retention period
- BRestoring a long-term backup taken from last year
- CAsking users to re-enter the deleted rows from memory by hand
- DCreating a new empty database and hoping the rows return
Show answer and explanationHide answer
Correct answer: APoint-in-time restore recovers the database to a specific moment within the retention window, which fits this need. Old backups and manual re-entry lose recent data, and an empty database contains nothing to recover.
Question 13
Which two options provide read scaling or read offload for an Azure SQL workload? (Choose two.)
- AA read-only replica that serves reporting queries
- BA geo-replica used for read-only workloads
- CRouting all writes to the read replica
- DDeleting read traffic so that writes are faster
- EDisabling indexes on the replica
Show answer and explanationHide answer
Correct answer: A, BRead replicas and geo-replicas can serve read-only queries, offloading the primary. Writes cannot be sent to a read replica, and deleting read traffic or disabling indexes does not offload anything.
Question 14
Which two settings improve resilience of a database to failures within a single region? (Choose two.)
- AKeeping all replicas in a single rack in one data center
- BEnabling automated backups with a suitable retention period
- CTurning off backups to reduce costs
- DDisabling monitoring so that the database is not interrupted
- EZone-redundant configuration spreading replicas across availability zones
Show answer and explanationHide answer
Correct answer: B, EZone redundancy keeps service running through a zone failure, and automated backups enable recovery. A single rack, disabled backups, and disabled monitoring each reduce resilience or visibility.
Question 15
A business needs a readable copy of its database in another region for reporting, without an automatic failover. Which feature fits?
- AActive geo-replication
- BA weekly export file
- CA failover group that switches automatically
- DA local backup on the same server
Show answer and explanationHide answer
Correct answer: AActive geo-replication provides a readable secondary in another region without automatic failover. A failover group switches roles automatically, and exports and local backups do not provide a live readable copy.
Optimize query performance (5 questions)
Question 16
The team sees a query that scans a large table and suggests a missing index. What is the best next step?
- ADelete the table that the query scans so the scan operation is removed from the plan and the cost disappears from the workload profile
- BRestart the server every hour through a scheduled task so cached execution plans are cleared before the scan
- CReview the suggested index against the workload, test it, and create it if it improves performance without harming writes
- DCreate every suggested index automatically through the advisor without review by a DBA or the team lead
Show answer and explanationHide answer
Correct answer: CSuggested indexes must be evaluated against the real workload because each index adds write cost. Automatic creation can produce many unnecessary indexes, and deleting data or restarting does not fix the query.
Question 17
Which two actions can reduce blocking between sessions in a busy Azure SQL database? (Choose two.)
- AKeep transactions short so that locks are held for less time
- BHold a transaction open while waiting for user input
- CUse the appropriate isolation level for the workload
- DLock whole tables for every update to be safe
- EDisable indexes so there are fewer locks
Show answer and explanationHide answer
Correct answer: A, CShort transactions release locks sooner, and an appropriate isolation level limits unnecessary lock holding. Transactions held during user input, table-wide locks, and disabled indexes all increase blocking or hurt performance.
Question 18
After a plan change, a critical query became much slower. Query Store shows the previous plan. What can the administrator do?
- ARestart the database every hour to clear the plan cache
- BForce the previously good plan for that query in Query Store
- CDelete the cached statistics and wait for a rebuild
- DIncrease the number of users connecting to the server
Show answer and explanationHide answer
Correct answer: BForcing the previously good plan restores the known performance while the root cause is investigated. Deleting statistics can make things worse, restarts do not fix plan choice, and more users add load.
Question 19
After large data loads, queries have become slow because the optimizer's estimates are out of date. What should the administrator do?
- AUpdate statistics on the affected tables so the optimizer has current information
- BDelete the table and reload it weekly from the source extract, then rebuild its indexes
- CTurn off the query optimizer entirely and force every query to use a fixed hint for each session
- DAdd a fixed wait of ten minutes before each query on the server so statistics can settle
Show answer and explanationHide answer
Correct answer: AUpdating statistics refreshes the information the optimizer uses to choose plans. Deleting tables, disabling the optimizer, and adding waits do not correct stale estimates.
Question 20
A team wants the database to recommend and, where safe, apply index and plan fixes automatically. Which feature provides this?
- ASetting the database size to the maximum service objective by default in the portal
- BManually deleting every nonclustered index on each table and recreating them every week
- CDisabling statistics updates to reduce background work overnight
- DAutomatic tuning with recommendations and optional automatic application
Show answer and explanationHide answer
Correct answer: DAutomatic tuning analyzes workload behavior and recommends or applies safe fixes, with rollback when a change does not help. Manual index deletion, disabled statistics, and maximum sizing do not tune the workload.
Monitor and optimize operational resources (5 questions)
Question 21
A team wants to find which queries consumed the most CPU over the last week and whether their plans changed. Which feature provides this?
- AQuery Store
- BApplication logs only
- CThe database's file size on disk
- DThe server's time zone setting
Show answer and explanationHide answer
Correct answer: AQuery Store records query runtime statistics and plan history over time, which shows heavy queries and plan changes. File size, application logs, and time zone do not capture query execution history.
Question 22
An administrator wants an alert when CPU use stays above 80 percent for 15 minutes on a database. Which capability provides this?
- AA manual check of the CPU chart in the portal every morning by hand
- BIgnoring CPU because storage is the main issue for this server
- CA printed report of CPU use each month reviewed in a meeting weeks after the spike
- DA metric alert rule in Azure Monitor with a threshold and time window
Show answer and explanationHide answer
Correct answer: DA metric alert rule with threshold and time window notifies the team automatically when the condition holds. Manual checks and monthly printouts react too late, and ignoring CPU overlooks a real symptom.
Question 23
Which tool captures detailed events inside the database engine for deep troubleshooting of rare failures?
- AThe browser's developer tools
- BA desktop calculator
- CExtended events
- DThe server's wallpaper settings
Show answer and explanationHide answer
Correct answer: CExtended events capture detailed engine events with low overhead, which suits rare failure analysis. Browser tools, calculators, and wallpapers do not observe database engine behavior.
Question 24
An administrator wants to see which kinds of waits are holding back query execution the most. Which source provides this information?
- AThe server's firmware version as listed in the update log
- BThe list of users who logged into the server last week
- CWait statistics in the dynamic management views
- DThe file names of the database backups in the vault
Show answer and explanationHide answer
Correct answer: CWait statistics in the dynamic management views show where time is spent waiting, such as on locks or I/O. Backup names, login lists, and firmware versions do not explain query waits.
Question 25
Database logs must be sent to a central Log Analytics workspace for queries across resources. Which configuration does this?
- ADiagnostic settings that route the database logs and metrics to the workspace
- BKeeping logs on the database server's local disk for internal troubleshooting, purged by hand
- CTurning off diagnostic settings across the instance for even better query performance
- DPrinting the database logs on paper every week and filing the printouts in a locked cabinet
Show answer and explanationHide answer
Correct answer: ADiagnostic settings route logs and metrics to a central workspace where they can be queried across resources. Printing, local-only logs, and disabling diagnostics do not provide central analysis.
Automate tasks and maintenance (5 questions)
Question 26
A maintenance job that rebuilds indexes must run across many databases in a pool every Sunday at 2 AM. Which capability fits?
- AManual execution by a developer each Sunday from a laptop with no scheduling
- BRunning the job during business hours when user sessions compete for resources
- CElastic jobs or an automation runbook scheduled for that time
- DA calendar reminder to rebuild indexes with no job
Show answer and explanationHide answer
Correct answer: CElastic jobs or a scheduled automation runbook run maintenance across databases on a schedule, which avoids manual work. Manual runs depend on memory, and business-hour execution affects users.
Question 27
Azure SQL server and database settings must be deployed the same way in dev and prod from source control. Which approach fits?
- AInfrastructure as code templates such as Bicep applied through a pipeline
- BCopying the settings manually from a screenshot of the portal blade into a spreadsheet
- CConfiguring each environment from memory using the settings each engineer recalls
- DManual portal changes in each environment, one resource at a time, without a change request
Show answer and explanationHide answer
Correct answer: AInfrastructure as code templates applied through a pipeline produce consistent environments that can be reviewed. Manual portal steps, screenshots, and memory-based setup produce drift.
Question 28
A team wants to be notified in near real time when a scheduled maintenance job fails. Which configuration fits?
- ANo notification is sent, because job failures are rare in this environment
- BA monthly check of the job history log by an operator who reviews the output
- CA text file on a shared drive that nobody reads after each run, saved by the job
- DAn alert on the job's failure event, sent to an action group that notifies the on-call team
Show answer and explanationHide answer
Correct answer: DAn event-driven alert with an action group notifies the team as soon as the job fails. Monthly checks, no notification, and unread files delay or prevent response.
Question 29
A script must create fifty databases with identical settings. Which approach is most efficient and repeatable?
- ACopying one database file fifty times on a desktop PC and renaming each copy by hand via Explorer
- BCreating each database by hand in the Azure portal, using manual form entry
- CLetting users create their own SQL databases with different collations, tiers, and settings
- DA loop in CLI or PowerShell, or an infrastructure template that defines the databases
Show answer and explanationHide answer
Correct answer: DScripts and templates create identical resources consistently and can be rerun. Manual creation is slow and error-prone, and copying files or letting users choose settings produces inconsistency.
Question 30
A database should scale up at 8 AM and scale down at 8 PM on weekdays. What is the best approach?
- AA scheduled automation runbook or job that changes the service tier at those times
- BScaling when users complain about slowness reported in support tickets
- CKeeping the database at the largest size throughout the week for safety
- DAsking the operations team to change it by hand each day, with no automation
Show answer and explanationHide answer
Correct answer: AA scheduled automation changes the tier on time without manual steps. Manual changes depend on people, maximum sizing wastes money, and waiting for complaints delays scaling.
Want more DP-300 questions?
The full bank has 100 questions with answers and explanations, as a PDF, an online practice exam, or both.
Both formats together. The best value.
Instant access after payment, with 90 days of updates. Checkout is on our store, AIExamCerts.