When using SQL Server Management Studio for SQL Server 2008 R2 connecting to a local SQL Server 2008 R2 instance (version 10.50.2500), I know that if I am using the instance name (local)\sql2008
it will fail to attach the debugger to any queries I attempt to debug with the error message
Unable to start T-SQL Debugging. Could not connect to computer '(local)'. The requested name is valid, but no
data of the requested type was found.
However, If I change that connection to src\sql2008
the debugger runs happily.
Are there any other differences in having your connection use the (local)
alias other than the debugger issue I pointed out above?
Best Answer
(local) will work with any programs that understand to change
(local)
or.
orlocalhost
into the machine's network location. I would imagine that is the issue with the debugger. But as long as the program you are using (i.e. SSMS) understands that translation, there is no behavior difference to worry about.I would imagine for most production servers, most connections will not be happening from a local machine as you would have a separate database server for security, availability and performance. So for that reason, it may be better to refer to the server as you will from other machines, but most of the time when working locally I just connect to
.
or.\instanceName
since I hate typing ;-)