none
Connecting to sql server

    Question

  • I can use Servername. or Servername\ to connect to a servername. I always thought it is just Servername.

    Why can I connect to a Servername using  Servername. (Servername and a dot) or Servername\(Servername and a slash)?

    lundi 26 mars 2012 19:32

Réponses


  • Will have to admit these two are new to me.

    SERVERNAME\ is logical, since the syntax for a named instance is
    SERVERNAME\INSTANCE So only SERVERNAME\ would mean the default instance.

    But SERVERNAME followed by a dot beats me. SERVERNAME.INSTANCE does not work.

    A single dot is legal, this denotes the local instance. Maybe there is some connection.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    lundi 26 mars 2012 21:32
  • Hi

    You have to use SERVERNAME to connect to the default instance

    if the server host a second instance or a named instance you have to use SERVERNAME\INSTANCENAME


    Javier Villegas | @javier_villhttp://sql-javier-villegas.blogspot.com/

    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you

    mardi 27 mars 2012 00:00

Toutes les réponses


  • Will have to admit these two are new to me.

    SERVERNAME\ is logical, since the syntax for a named instance is
    SERVERNAME\INSTANCE So only SERVERNAME\ would mean the default instance.

    But SERVERNAME followed by a dot beats me. SERVERNAME.INSTANCE does not work.

    A single dot is legal, this denotes the local instance. Maybe there is some connection.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    lundi 26 mars 2012 21:32
  • Hi

    You have to use SERVERNAME to connect to the default instance

    if the server host a second instance or a named instance you have to use SERVERNAME\INSTANCENAME


    Javier Villegas | @javier_villhttp://sql-javier-villegas.blogspot.com/

    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you

    mardi 27 mars 2012 00:00