Skip to Content.
Sympa Menu

freetds - RE: [freetds] Sybase ASA 7, unixODBC problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Sybase ASA 7, unixODBC problem
  • Date: Tue, 9 Nov 2004 09:03:21 +0100

>
> > From: Gene Dymarskiy
> > Sent: Monday, November 08, 2004 10:49 AM
> >
> > > The correct server name can be obtained from the odbc.ini
> > > file by specifying the keys "server"' and "address".
> > > "address" is used to determine the host name/ip address of
> > > the database server and "server" is used as the name sent off
> > > with the login packet.
> >
> > I can confirm that this works. Do not define "Servername"
> in odbc.ini
> >
> > Instead specify Server, Address and Port keys. If you do not specify
> > "port" key it defaults to 4000.
> >
> > Sample odbc.ini entry
> >
> > [ASA7]
> > Description = ASA Sybase
> > Driver = /usr/local/lib/libtdsodbc.so
> > Server = [ASA server name]
> > Address = [IP address of the ASA server]
> > Port = 2638
> > Trace = Yes
> > TraceFile = /tmp/odbc_sql.log
> >
> > This is much better than using DSQUERY. For one you can specify
> > connections to multiple ASA servers ;)
>
> Ugh. OK, it works. That's about the best that can be said
> for it, not
> that that's nothing. I mean, to pass a database name, we have to give
> up minor features like DNS-lookup of the server's address. :-/
>
> Expect this to change one day. When you upgrade, check the
> README. At
> least, there'll be an attribute in the DSN or freetds.conf entry that
> supports a default database name. Maybe maybe, we'll add
> 'DatabaseName'
> as a connection string attribute, like (AIUI) Sybase does. (cf.
> http://manuals.sybase.com/onlinebooks/group-sas/awg0703e/dbrfe
> n7/@ebt-li
> nk;pt=5012;uf=0?target=0;window=new;showtoc=true;book=dbrfen7 ).
>
> They also mention that if no database name is indicated, you'll be
> connected to the Master database by default. Is there such thing in
> ASA? If so, that should be our default, too. As far as we know,
> non-ASA servers ignore this field, so we could set it to 'master' by
> default all the time, not just for ASA servers.

??? I'm going mad :(
We are confusing DatabaseName and ServerName (called also EngineName on
ASA).
cf
http://manuals.sybase.com/onlinebooks/group-sas/awg0703e/dbrfen7/@ebt-li
nk;pt=7964?target=%25N%14_7331_START_RESTART_N%25 and
http://manuals.sybase.com/onlinebooks/group-sas/awg0703e/dbrfen7/@Generi
c__BookTextView/7054;pt=7331#X.

EngineName connection parameter [ENG]
Function
Synonym for ServerName. The name of a running database server to which
you want to connect.
Usage
Network servers or running personal servers.
Default
The default local database server.

Here what do they mean with "The default local database server" ?? In
login should we not set server_name ??

DatabaseName connection parameter [DBN]
Function
Identifies a loaded database to which a connection needs to be made.
Usage
Running local databases or network servers.
Default
There is no default setting.

This it's Database. I don't know how to pass database in login packet
(it's possible??)

>From TDS 5.0 specifications

lservname (page 177)
The name of the serve to which the client is attempting to establish a
dialog. CTLib and DBLib set this field to the interfaces file entry
which was specified by the application explicitly or via the $DBQUERY
environment variable. This field SHOULD correspond with the @@servername
of the server for best results. In server-server rpc's this servername
fiels is passed on to the remote server.If that remote server needs to
open a connection back to this server for some reason, it will often use
this value to access its local interfaces file.
With some gateways (DirectConnect for DB2) this field indicates the name
of the desired backend subsystem. For Adaptive Server Anywhere this
field indicates the name of the database which the connection should be
made to (the database must already be loaded). If the name in this field
doesn't match any currently loaded database the connection silently ends
up in the "default" database.

Here they mix server name with database name

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page