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: Thu, 6 Feb 2003 17:53:30 -0500

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"

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 76 00 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

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

-----Original Message-----
From: freetds-admin AT lists.ibiblio.org
[mailto:freetds-admin AT lists.ibiblio.org]On Behalf Of Steve Langasek
Sent: Wednesday, February 05, 2003 9:35 PM
To: freetds AT lists.ibiblio.org
Subject: Re: [freetds] Named Instances of MS SQL Server 2000


On Wed, Feb 05, 2003 at 09:12:10PM -0500, Daniel Morgan wrote:

> Here is an attachment thanks to Phillip Jerkins that discovers the port to
> connect to via a named instance. It is in C# though.

> I did test it on .NET, and it does work. Hopefully, we will get it to
work
> for Mono too.

Strikingly simple protocol -- too simple for MS's own good, to judge by
the worm...

One thing that caught my attention in the code was this block --

string[] rawtokens = rs.Split(';');
Hashtable data = new Hashtable();
for(int i=0; i<rawtokens.Length/2; i++) {
data[rawtokens[i*2]] = rawtokens[i*2+1];
}
if(!data.ContainsKey("tcp")) throw new +TcpNotSupportedException();
Port = int.Parse((string)data["tcp"]);

I wonder what other options this thing throws back besides the 'tcp' port
option? Hmm...

--
Steve Langasek
postmodern programmer





Archive powered by MHonArc 2.6.24.

Top of Page