Skip to Content.
Sympa Menu

freetds - RE: [freetds] dbi:sybase:server SQL Server connection issue serve rname\instancename

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bort, Paul" <pbort AT tmwsystems.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] dbi:sybase:server SQL Server connection issue serve rname\instancename
  • Date: Mon, 11 Oct 2004 11:09:03 -0400

Instances are really just SQL servers listening on a different port.

If you set up the server in freetds.conf, you can alter the default port,
then use the entry in freetds.conf to connect.

You may have to use Enterprise Manager to discover what port has been
assigned to the instance you are looking for.

For example:

In freetds.conf:
[SQLINSTANCE]
name = sql.foo.com
tdsver = 8.0
port = 1435

In your program:

$dbh = DBI->connect("dbi:Sybase:server=SQLINSTANCE", $user, $pass )
or die "Can't connect: " . DBI->errstr;



> -----Original Message-----
> From: Kirk Anderson [mailto:dba_1_1 AT yahoo.com]
> Sent: Monday, October 11, 2004 11:00 AM
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] dbi:sybase:server SQL Server connection issue
> servername\instancename
>
>
> Problem connecting with DBI and sql server using
> servername\instancename. I have had no issues connecting when
> the servername is used.
> Here is my connect :
>
> $dbh = DBI->connect("dbi:Sybase:server=wyn-dfwimobile2",
> 'userid', 'password') or die 'connect';
>
> I log into the sql database using sql query analyzer with the
> userid/password with no problems.
>
> I issue the select @@servername and get wyn-dfwimobile2\synchsql
>
> I issue hostname from the cmd prompt and get wyn-dfwimobile2
>
> I am unable to get the right combinations to connect to this
> sql server using DBI. What am I missing?
>
> Thanks in advance, Kirk
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> vote.yahoo.com - Register online to vote today!
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page