Cannot access local sql server 2008 instance via "localhost" ???

  • Hi,

    I have a local instance of SQL 2008 installed called ComputerName\SQL2008.

    When I try to for example connect to this local instance of SQL 2008 using management studio etc.

    I have to use "ComputerName\SQL2008"

    I cannot use "localhost"

    why not?

  • because you have a named instance.

    'localhost' by itself will connect you to the default instance, not a named instance.

    _______________________________________________________________________
    For better assistance in answering your questions, click here[/url]

  • Hi,

    I found a solution:

    Open Sql Server Configuration Manager.

    GoTo: SQL Native Client 10.0 Configuration, Aliases.

    Create a new Alias with the following settings:

    Alias Name: localhost

    Pipe Name: \\MyComputerName\pipe\MSSQL$sql2008\sql\query

    Protocol: Named Pipes

    Server: MyComputerName

    Now I can connect to localhost and it will point to the correct SQL 2008 instance locally.

  • That's indeed a solution, as you now have the alias pointing to the named instance, but originally, localhost would only work if you have a default instance and no named instances...

    _______________________________________________________________________
    For better assistance in answering your questions, click here[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply