Skip to Content.
Sympa Menu

freetds - RE: [freetds] Named Instances of MS SQL Server 2000

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Daniel Morgan" <danmorg AT sc.rr.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Named Instances of MS SQL Server 2000
  • Date: Fri, 7 Feb 2003 12:29:20 -0500

Looking at the sample C# source code that was sent earlier:

"DANPC\\NETSDK" would get parsed into two parts:
the ServerName (hostname) - "DANPC"
the InstanceName - "NETSDK"

The UDP socket on port 1434 is connected to "DANPC" and sent the data
0x02 and the InstanceName "NETSDK". The Microsoft SQL Server SQL Monitor
listens here.

The SQL Monitor responds with the result string that I showed below.

You send and receive ASCII.

Based on the data I got for ServerName "DANPC and InstanceName "NETSDK",
I have two options of connecting to that instance:

- connect via TCP port 1335
- connect via named pipes at \\DANPC\pipe\MSSQL$NETSDK\sql\query

Basically, I have discovered how to connect to the named instance "NETSDK"
at "DANPC".
However, for a Unix client, only the TCP port really matters.

-----Original Message-----
From: freetds-admin AT lists.ibiblio.org
[mailto:freetds-admin AT lists.ibiblio.org]On Behalf Of ZIGLIO Frediano
Sent: Friday, February 07, 2003 6:20 AM
To: 'freetds AT lists.ibiblio.org'
Subject: RE: [freetds] Named Instances of MS SQL Server 2000


>
> To answer your question, named pipes.
>
> NETSDK is the MSDE (Microsoft SQL Server Desktop Engine)
> sample database
> that comes with .NET Framework.
>
> Here is what I got when I ran the program:
>
> Sent: "DANPC\\NETSDK"
>

How this data is sent ? To what server ? I think DANPC, UDP port 1434 ...
but data sound weird to me...

> Returned RawString with length of 121 octet bytes:
> .v.ServerName;DANPC;
> InstanceName;NETSDK;
> IsClustered;No;Versi
> on;8.00.194;tcp;1335
> ;np;\\DANPC\pipe\MSS
> QL$NETSDK\sql\query;
> ;
>
> ASCII Hex:
> 05

Information type ? server information ?

> 76 00

Information length (bytes)

> 53 65 72 76 65 72 4e 61 6d 65 3b 44 41 4e 50 43 3b
> 49 6e 73 74 61 6e 63 65 4e 61 6d 65 3b 4e 45 54 53 44 4b 3b
> 49 73 43 6c 75 73 74 65 72 65 64 3b 4e 6f 3b 56 65 72 73 69
> 6f 6e 3b 38 2e 30 30 2e 31 39 34 3b 74 63 70 3b 31 33 33 35
> 3b 6e 70 3b 5c 5c 44 41 4e 50 43 5c 70 69 70 65 5c 4d 53 53
> 51 4c 24 4e 45 54 53 44 4b 5c 73 71 6c 5c 71 75 65 72 79 3b
> 3b
>

ASCII information (UTF8, Latin1) ???

> Based on the above:
> ServerName = DANPC
> InstanceName = NETSDK
> IsClustered = No
> Version = 8.00.194
> tcp = 1335
> np = \\DANPC\pipe\MSSQL$NETSDK\sql\query
>

Request in one byte 02 , correct ? Port 1434, UDP.

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page