Configure Private Endpoint and DNS for Azure SQL Database
An app running on an Azure VM must access Azure SQL Database over a private IP inside the VNet. The team also wants the SQL server name to resolve to that private address without using custom host-file entries. What should be configured?
Quick Answer
The answer is a private endpoint for Azure SQL Database paired with a linked private DNS zone. This combination works because the private endpoint assigns the SQL server a private IP from the VM’s VNet, keeping traffic entirely on the Microsoft backbone, while the linked private DNS zone automatically resolves the SQL server’s FQDN (like server.database.windows.net) to that private address—no host-file edits needed. On the AZ-104 exam, this scenario tests your understanding of how to secure PaaS services within a VNet, often appearing as a multi-step configuration question where candidates mistakenly rely on Service Endpoints or manual DNS records. A common trap is forgetting that a private endpoint alone does not handle DNS resolution; you must explicitly link the private DNS zone to the VNet. Memory tip: “Endpoint gives the IP, DNS zone gives the name—together they make private connectivity tame.”
⚠ Common exam trap
Test-takers frequently confuse service endpoints with private endpoints; candidates often think a service endpoint provides a private IP, but it only provides source VNet identity while the destination remains a public endpoint, failing the private IP and DNS resolution requirements.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A private endpoint for Azure SQL Database and a linked private DNS zone.
A private endpoint assigns Azure SQL Database a private IP address from the VM's VNet, enabling traffic to stay within Microsoft's backbone. Linking a private DNS zone automatically resolves the SQL server's FQDN (e.g., server.database.windows.net) to that private IP, eliminating the need for custom host-file entries. This meets both requirements: private IP connectivity and DNS resolution without manual configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A service endpoint on the VM subnet and a firewall rule on Azure SQL Database.
Why it's wrong here
Service endpoints do not create a private IP address for the SQL resource, so the name will still not resolve to a private endpoint address.
When this WOULD be correct
If the requirement is only to restrict access to Azure SQL Database from a specific VNet subnet without needing private IP resolution, a service endpoint on the subnet and a firewall rule on the SQL server would be correct.
- ✓
A private endpoint for Azure SQL Database and a linked private DNS zone.
Why this is correct
A private endpoint places the service on a private IP in your virtual network, which satisfies the requirement for private network access. Linking the appropriate private DNS zone to the VNet lets the SQL server name resolve to that private IP automatically. This combination gives the application private connectivity and avoids manual host-file updates or reliance on public endpoints.
- ✗
A public IP address on the VM and a SQL server firewall exception.
Why it's wrong here
This keeps traffic on the public internet path and does not satisfy the private IP or private DNS requirement.
- ✗
An NSG rule that allows outbound TCP 1433 to the SQL server.
Why it's wrong here
NSGs can permit traffic, but they do not provide private service IPs or DNS name resolution changes.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓A private endpoint for Azure SQL Database and a linked private DNS zone.Correct answer▾
Why this is correct
A private endpoint places the service on a private IP in your virtual network, which satisfies the requirement for private network access. Linking the appropriate private DNS zone to the VNet lets the SQL server name resolve to that private IP automatically. This combination gives the application private connectivity and avoids manual host-file updates or reliance on public endpoints.
✗A service endpoint on the VM subnet and a firewall rule on Azure SQL Database.Wrong answer — click to see why▾
Why this is wrong here
A service endpoint and firewall rule allow access over the public endpoint using the VM's private IP, but the SQL server name still resolves to a public IP, not a private IP inside the VNet.
★ When this WOULD be the correct answer
If the requirement is only to restrict access to Azure SQL Database from a specific VNet subnet without needing private IP resolution, a service endpoint on the subnet and a firewall rule on the SQL server would be correct.
Why candidates choose this
Candidates often confuse service endpoints with private endpoints, thinking both provide private connectivity, but service endpoints do not change DNS resolution to a private IP.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Private endpoint
A private endpoint is a network interface that securely connects a service over a private IP address inside a virtual network, keeping traffic off the public internet.
Key term
VNet
A virtual private network inside a cloud provider that lets you securely connect and isolate your cloud resources.
About these practice questions
One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on AZ-104
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. An app must resolve a storage account name to the private IP address created by a private endpoint. Which two actions are required? Select two.
easy- ✓ A.Create the private endpoint in the same virtual network as the app
- ✓ B.Link the virtual network to the private DNS zone for the storage service
- C.Enable a service endpoint on the subnet
- D.Add a public DNS record pointing to the storage account
- E.Turn on blob versioning
Why A: A private endpoint must be created in the same virtual network as the app so that the app can reach the private IP address directly. In addition, the virtual network must be linked to the private DNS zone for the storage service (e.g., privatelink.blob.core.windows.net) so that the DNS name of the storage account resolves to the private IP address of the private endpoint. Without both actions, the app cannot resolve and connect to the storage account using its private IP.
Variation 2. A storage account should use a private IP address inside a virtual network, and workloads in that VNet must resolve the storage name to the private address. Which two items are required? Select two.
easy- ✓ A.Create a private endpoint for the storage account in the virtual network so the service gets a private IP.
- ✓ B.Create and link the appropriate private DNS zone so the storage account name resolves to the private IP.
- C.Enable a service endpoint on the subnet, because service endpoints create a private IP for the storage service.
- D.Assign a Reader role on the storage account, because RBAC determines the private address used by clients.
- E.Disable the storage account firewall, because private endpoints only work when the public endpoint is open.
Why A: A private endpoint assigns a private IP address from the virtual network to the storage account, enabling secure, direct connectivity over the Microsoft backbone without traversing the public internet. This is achieved by creating a network interface in the VNet that receives a private IP from the subnet range, which then routes traffic to the storage service via a private link.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.