Connecting to different named instances on MS SQL 2005 from Linux



Hi all again!

As my work progress, I've encountered some more problems.
I'm connecting to many a few different MS SQL servers. However,
one is using named instances eg. 192.168.1.1/<instance-name>.
When connecting using the following syntax, it fails as suspected:

my $dbh = DBI->connect("DBI:Sybase:server=192.168.1.1/somedb", 'user',
'passwd', {PrintError => 1, AutoCommit => 1});

Are there any limitations in DBI/DBD::Sybase/FreeTDS that makes
this kind of connection impossible? If not, what would be the
correct syntax? Are there any other ways to get around this?

I've seen some mention methods like finding out on which particular
port each instance is working on, since the SQL server itself as
I understand it just "resolves" the instance name to the running
server and its assigned port. Then use this information in the
freetds.conf. However, this is not very smooth and I have trouble
gaining this inormation since I'm only given an IP address and an
instance name. The program I'm writing is supposed to be somewhat
scalable and dynamic as well. So, in short, I'd like to avoid this approach.

Any ideas?

Best regards
/Thomas M
.



Relevant Pages

  • Re: Forest Prep Failure due to OS X Schema
    ... > Connecting to "servername.domain.domain.domain.domain" ... > Logging in as current user using SSPI ... Maybe a syntax in that section to change RDN? ...
    (microsoft.public.win2000.active_directory)
  • Re: Unable to open data source
    ... The syntax rules for Jet queries (whether you're connecting via DATABASE or ... square brackets (Jet syntax AFAIK): ... if you were connecting via OLE DB rather than ODBC you ... pull information out of an Access database into my word doc. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: tclodbc, SQL Server, date nighmare
    ... another one where "db" is the handle you get after connecting to the ... database. ... It has similar syntax as your example and has the embedded ... Hmmm... ...
    (comp.lang.tcl)
  • Re: Connect to SQL programatically
    ... > I can't find documentation that explains the syntax for ... > disconnecting from a SQL Server and connecting to another ...
    (microsoft.public.access.adp.sqlserver)
  • trying to locate a specific port that I forget the name of
    ... I originally saw it in the ports tree, IIRC, about a year ago or ... What it was was a massive piece of software for connecting multiple ... connecting to IMAP, LDAP, several SQL servers, and a few other ...
    (freebsd-questions)