Could not connect to computer '.' - Debugging requires you to connect by name on windows 7
One shortcut for connecting to the local instance of SQL
Server is to use a period as the name i.e."." (no quotes).
However on Windows 7 I found today that if you do that, debugging in
management studio doesn't work. It says
"---------------------------
Microsoft SQL Server Management
Studio
---------------------------
Unable to start T-SQL Debugging. Could
not connect to computer '.'. The requested name is valid, but no data of the
requested type was found."
The solution is simple.Just reconnect to the SQL Server using the
server name (and possibly instance).
Now if you use (local) you get the following (well I do on windows 7). A pop
up
"The Windows Firewall on this machine is currently blocking remote debugging.
Remote Debugging requires that the debugger be allowed to receive information
from the network. Remote debugging also requires DCOM (TCP Port 135) and IPSEC
(UDP 4500/UDP 500) be unblocked.
What would you like to do?
Cancel remote debugging.
Unblock remote
debugging from computers on the local network (subnet)
Unblock remote
debugging from any computer"
If you select either of the unblock options you may get.
"---------------------------
Microsoft SQL Server Management
Studio
---------------------------
Could not configure the Windows
Firewall. Cannot add a port to the Windows Firewall exception list. Use the
Control Panel to manually configure the Windows Firewall.
"
or if you click Cancel you get
"---------------------------
Microsoft SQL Server Management
Studio
---------------------------
Unable to start T-SQL Debugging. Could
not connect to computer '(local)'. %1
"
again The solution is simple.Just reconnect to the SQL Server using
the server name (and possibly instance).
Interestingly localhost works.
-