Home All Groups Group Topic Archive Search About

SQL Server Instance Name

Author
6 Jan 2006 3:21 PM
joey.powell
I have installation of SQL Server 2005 where I must use the machine
name to reference SQL server. I want to be able to use (local), but it
doesn't work. How can I make it work?

Author
12 Jan 2006 5:01 AM
joey.powell
Does anyone know how to do this?
Author
13 Jan 2006 10:41 PM
Sethu Srinivasan [MSFT]
Hello Joey,
You could add a new alias in SQL Server configuration manager with Alias
name  as(local)
To add a alias:
1) Launch Start -> All Programs -> Microsoft SQL Server 2005 ->
Configuration Tools -> SQL Server Configuration Manager
2) Expand SQL Native Client configuration
3) Click on Alias Node
4) Right click , Add new Alias, in Alias name you can have name set as (local)
and set the target server name , protocol
5) to test this, launch sqlcmd /S (local) /Q "select @@servername"

Here is the help link
http://msdn2.microsoft.com/en-us/library/ms174212(en-US,SQL.90).aspx

Thanks
Sethu
SQL Server Manageabilty Dev team

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.


Show quote
"joey.pow***@topscene.com" wrote:

> I have installation of SQL Server 2005 where I must use the machine
> name to reference SQL server. I want to be able to use (local), but it
> doesn't work. How can I make it work?
>
>
Author
17 Jan 2006 9:40 PM
joey.powell
Thanks, but (local) works just fine in SQL Server Management Studio. My
Visual Studio .net apps will not use (local) in any of my DB connection
strings, however. In fact, the only way I can access the DB from there
is to use the machine name (or presumably the IP address). local,
(local), localhost, (localhost), and 127.0.0.1 will NOT work. This is
not good because I need to be able to use different boxes for
development. I keep having to change the name each time.

AddThis Social Bookmark Button