Forum Discussion
Problem with Linked Service to SQL Managed Instance
The hostname in the error is actually the public endpoint — the “public” label gives that away. A VNet-local Managed Instance endpoint has the form <mi>.<dns-zone>.database.windows.net and uses port 1433; the public endpoint adds “.public” and uses port 3342.
So yes, you can avoid a private endpoint. For a self-hosted IR, place its VM in the same VNet, a peered VNet, or a network connected by VPN/ExpressRoute. In the linked service, use the VNet-local Host value shown on the MI Overview page and verify from the SHIR machine that DNS resolves it and TCP 1433 is reachable.
For AutoResolve IR, the MI public endpoint must be enabled, inbound 3342 must be allowed in the MI subnet NSG, and the server value must include port 3342.
This error happens before SQL authentication. I would start with nslookup on the SHIR host; if public DNS cannot resolve, fix its DNS forwarding. If you intend private routing, switch the linked service to the VNet-local hostname.