Named instance and TCP/IP

  • Hello Everyone,

    We have a problem connecting to a named instance.

    using osql here are the tests we have done:

    osql -S mymachine/mynamedinst -E

    1> exit

    It connect.

    But explicitely using TCP:

    osql -S tcp:mymachine/mynamedinst -E

    [DBNETLIB]SQL Server does not exist or access denied.

    [DBNETLIB]ConnectionOpen (Connect()).

    But if we use the same protocol (TCP) with the defaut instance it works:

    osql -S tcp:mymachine -E

    1> exit

    The named instance is "listening" for TCP/IP only.

    Here is an output from netstat:

    C:\Documents and Settings\giroinc>netstat -an

    Active Connections

      Proto  Local Address          Foreign Address        State

      TCP    0.0.0.0:80             0.0.0.0:0              LISTENING

      TCP    0.0.0.0:135            0.0.0.0:0              LISTENING

      TCP    0.0.0.0:443            0.0.0.0:0              LISTENING

      TCP    0.0.0.0:445            0.0.0.0:0              LISTENING

      TCP    0.0.0.0:1027           0.0.0.0:0              LISTENING

      TCP    0.0.0.0:1433           0.0.0.0:0              LISTENING

      TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING

      TCP    0.0.0.0:8181           0.0.0.0:0              LISTENING

      TCP    127.0.0.1:1025         0.0.0.0:0              LISTENING

      TCP    127.0.0.1:1028         127.0.0.1:1521         ESTABLISHED

      TCP    127.0.0.1:1029         0.0.0.0:0              LISTENING

      TCP    127.0.0.1:1076         127.0.0.1:1433         ESTABLISHED

      TCP    127.0.0.1:1433         127.0.0.1:1076         ESTABLISHED

      TCP    127.0.0.1:1521         0.0.0.0:0              LISTENING

      TCP    127.0.0.1:1521         127.0.0.1:1028         ESTABLISHED

      UDP    0.0.0.0:445            *:*

      UDP    0.0.0.0:500            *:*

      UDP    0.0.0.0:1434           *:*

      UDP    0.0.0.0:3456           *:*

      UDP    0.0.0.0:4500           *:*

      UDP    0.0.0.0:8181           *:*

      UDP    0.0.0.0:8182           *:*

      UDP    127.0.0.1:123          *:*

      UDP    127.0.0.1:1900         *:*

    Best regards.

    Carl

     

  • I was not sure but now I am: Service pack 4 solved this problem.

    Regards.

    Carl

  • Might be because when a server runs 2 instances of sql server the default instance uses the default port and named instance uses a dynamic port. Try to specify a port for the named instance and try connecting through that port and see if you are able to connect successfully.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Hello Sugest,

    I also tried with a static port for the named instance and the same problem arise.

    Regards.

    Carl

  • Why do you need to specify TCP: to connect? Is there something I'm missing?

  • Hello Steve,

    Its because I wanted to be sure Named pipe was not used without having to reconfigure the client network utility.

    In fact its a longer story...

    Our app is using ADO.NET to connect to this named instance with the connection string specifying the protocol (TCP) and the connection fails.

    We first try to use an alias using TCP/IP but it did not work either.

    But aplpying service pack 4 everythings work fine.

    Regards.

    Carl

Viewing 6 posts - 1 through 5 (of 5 total)

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