freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Connecting to Sybase ASA - Embedded Database
- From: Sharan Rao <sharanrao AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Connecting to Sybase ASA - Embedded Database
- Date: Sun, 9 Dec 2007 16:22:14 +0530
On Saturday 08 Dec 2007 12:42:05 am James K. Lowden wrote:
> "An embedded database, designed for use by a single application, runs
> on
> the same computer as the application...."
>
> Is there an actual server running, listening on a a TCP port?
>
> This sounds like it might be more like SQLite, where the database engine
> is a shared object, linked into the application's process space, accessed
> by function calls.
>
> "When an application uses an embedded database, the personal server is
> generally not running when the application connects. In this case, you can
> start the database using the connection string, and by specifying the
> database file in the DatabaseFile (DBF) parameter of the connection
> string."
>
> As noted in the User Guide, for ASA the freetds.conf [servername] string
> has to match the database name. In the above example, it would have to be
> called [demo].
>
> If there's a real honest-to-goodness server running, something like this
> should do:
>
> [demo]
> host = localhost
> port = # you tell me
> tds version = 5.0
>
> and TDSDUMP should show you connecting, or why not.
>
> If the log shows the connection is refused, there's no process listening
> to that port. If the connection is created and you get an error about the
> database not existing, then maybe some twiddling with freetds.conf will
> help.
>
> If you use use Sybase's tools to connect to the server, and use tcpdump(8)
> to capture the login packet, it might be possible to modify FreeTDS to use
> the DBF notation. But the short way home is to have the server declare
> the database such that the client need not know its location on the disk.
>
Quoting from the site ( http://tinyurl.com/25xwc2 )
" The DatabaseFile (DBF) parameter specifies which database file to use. The
database file automatically loads onto the default server, or starts a server
if none are running."
So I guess, no server is assumed to be running.
"The following connection parameters show how to load the sample database as
an embedded database:
DBF=samples-dir\demo.db
UID=DBA
PWD=sql"
I tried exactly that on Sybase Central. I just passed the connection string,
and it started a server. I had wireshark on ( capturing loopback interface ),
but couldn't see any live packets being captured :( Also, as the server is
started automatically, I was wondering what the role of freetds.conf is in
this connection.
The one other thing that I was disappointed with was that "Use database"
didn't work for changing the database ( both on tsql and using the dbuse()
function in dblibrary) on Sybase ASA , even when I had loaded the server
with multiple databases. That was one reason I was wondering if I could just
connect using the embedded database concept :)
Please tell me, if there's any more information I can give ?
Cheers!
Sharan Rao
-
[freetds] Connecting to Sybase ASA - Embedded Database,
Sharan Rao, 12/07/2007
-
Re: [freetds] Connecting to Sybase ASA - Embedded Database,
James K. Lowden, 12/07/2007
- Re: [freetds] Connecting to Sybase ASA - Embedded Database, Sharan Rao, 12/09/2007
-
Re: [freetds] Connecting to Sybase ASA - Embedded Database,
James K. Lowden, 12/07/2007
Archive powered by MHonArc 2.6.24.