[freetds] freetds and mssql 2008 with name instance and dynamic port allocation?

Lukasz Szybalski szybalski at gmail.com
Fri Jul 16 14:42:46 EDT 2010


On Fri, Jul 16, 2010 at 1:22 PM, Lukasz Szybalski <szybalski at gmail.com> wrote:
> On Fri, Jul 16, 2010 at 11:41 AM, Lukasz Szybalski <szybalski at gmail.com> wrote:
>> Hello,
>> I'm trying to connected to named instance of sql2008. This is not a
>> default instance. As I read the :
>>
>> http://support.microsoft.com/kb/823938
>>
>> I see that 2008 defaults to dynamic allocated port for its named
>> instances, which means port 1433 is no longer active. (telneting port
>> 1433 does not respond.)
>> How can I setup freetds to use the name instance, will it figure out
>> the port number on its own.
>>
>>
>>  [unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is
>> unavailable or does not exist (20009) (SQLDriverConnectW)'
>>
>>
>> [SQLServer2008]
>> Description     = Production Server
>> Driver          = TDS
>> Trace           = No
>> Server          = servername
>> TDS_Version     = 8.0
>> Instance = instancename_production
>>
>>
>> What are my options here at this point?
>> How can I get this to work?
>
> I did confirm that sql is setup on port 0 = dynamic ports. Currently
> the instance I'm trying to connect is on port 1079. If server restarts
> or this port becomes busy the port # will change.
>
> How is freetds discovering the port location, when using dynamic
> ports, and how do I set it up?
>


Sorry for the triple post.

Solution is:

http://www.freetds.org/userguide/portoverride.htm

Correct:  (instance name in the config file is not read, it needs to
be specified in the server name)
[SQLServer2008]
Description     = Production Server
Driver          = TDS
Trace           = No
Server          = servername\instance_name
TDS_Version     = 8.0


Incorrect (instance name in the config file is not read, it needs to
be specified in the server name)
[SQLServer2008]
Description     = Production Server
Driver          = TDS
Trace           = No
Server          = servername
TDS_Version     = 8.0
instance        = instance_name


I'll update the docs on my end.
http://lucasmanual.com/mywiki/unixODBC


Debian Lenny


Thanks,
Lucas



More information about the FreeTDS mailing list