MDT 2010: SQL server does not exist or access denied
While setup some MDT lab environments this SQL error crossed my path a couple of times.
ZTI error opening SQL Connection. SQL server does not exist or access denied.
Unable to establish database connection using [CSETTINGS] properties. SQL Server does not exist or access denied.
Unable to establish database connection using [CROLES] properties. SQL Server does not exist or access denied.
I’m using a hidden share on the SQL Server box that MDT will use for authentication to the SQL Server. The same credentials are used to connect to the MDT database. So I had granted sufficient share and NTFS permissions to the hidden share and granted this user the db_datareader role on the MDT database.
If we read the error again it is clear that MDT cannot contact the SQL Server, it even cannot find the server.
Troubleshooting-time!
I hit F8 during deployment to get into a command prompt. Once in the command prompt I could contact the SQL Server box with the ping command.
A ping to the server gave a response of a wrong IP address. Turns out that the DNS server was holding an old IP address from the previous MDT and SQL Server installation. Deleting this A-record and register (ipconfig /registerdns) the SQL Machine again, was the solution for this issue.
In another lab environment I could ping and map a share on the SQL Server box.
net use * \\Servername\Hiddenshare$
Turns out that we forgot to open the Windows Firewall for SQL Server. Add an exception for sqlservr.exe and sqlbrowser.exe is enough. You don’t have to turn the complete firewall off.
With the firewall configured as it should and all DNS records registered, no error occurred and deployment went successfully.