[unixODBC-support] Acessing Remote Access DB

Martin J. Evans martin.evans at easysoft.com
Sat Mar 1 09:23:29 GMT 2008


Ryan Churches wrote:
> I have a remote Windows Server which I have set up an ODBC connection
> for, pointing to a .mdb file I would like to be able to querry.  I
> have also opened what I beleive is the appropriate port, 3306.
>
> Based on a past correspondence on this mailing list here...
> http://mail.easysoft.com/pipermail/unixodbc-support/2005-December/000842.html
> ...i set up freeTDS and unixODBC as follows:
>
> #/etc/freetds.conf
> [irpor]
> host = remote.gotdns.com
> port = 3306
> tds version = 8.0
>
> #/etc/unixODBC/odbc.ini
> [irpor]
> Driver          = TDS
> Description     = ODBC connection via FreeTDS
> Trace           = No
> Servername      = irpor
> Database        = por
> Username       = null
> Password        = null
>
> #/etc/unixODBC/odbcinst.ini
> [MS ACCESS]
> Description = MDB Tools ODBC drivers
> Driver = /usr/lib/libmdbodbc.so
> Setup           =
> FileUsage               = 1
> CPTimeout               =
> CPReuse         =
> UsageCount              = 3
>
>
> # isql -v irpor
> [IM002][unixODBC][Driver Manager]Data source name not found, and no
> default driver specified
> [ISQL]ERROR: Could not SQLConnect
>
> I'm sure the libmdbodbc.so file is there, and on the windows side I
> didn't see anything about setting a DSN name.  I would have recognized
> that from other times I've used unixODBC.
>
> On the windows side, I created a new system and user dsn for MS ACCESS
> and pointed the database to the mdb file I'd like to query.
>
> Any help is much appreciated.
> -Ryan
>
>   
Ryan,

I think you are getting mixed up. The link you refer to has nothing to 
do with ms access.
If you have a ms access database on a windows machine there are 3 ways I 
know of to access it:

1. share the folder containing the mdb file or copy the mdb file to unix 
and use mdbtools
  you seem to have started down this path since you mention 
libmdbodbc.so and have added
  it as a driver to your odbcinst.ini

2. create a link from sql server to your access database and use a sql 
server odbc driver
  on unix to access it.
  you seem to have started down this path since you mention freetds and 
have a freetds dsn
  in your odbc.ini file.

3. use an ODBC-ODBC bridge where you install a service on the windows 
machine and an ODBC
  driver on the UNIX machine which can talk to the remote service and 
the remote service
  uses the ms ODBC driver for ms access.

There are issues to consider with all 3. 1 is problematic since you'll 
need to use SMB from UNIX to
access the share and ms access mdbs are notoriously difficult to access 
on a share. In addition
mdbtools is not a very complete ODBC driver. 2 introduces a second link 
in the chain - odbc through sql
server driver through ms access driver and some versions of sql server 
won't allow a linked
server through ODBC. 3 requires you to install an additional bit of 
software on the server and
is not free.

Some people have tried mdbtools and had problems - see this list 
history. I don't know of
anyone who has done 2. I know 3 works well  and you can get a commercial 
ODBC-ODBC Bridge
from various companies including www.easysoft.com though I should 
mention I have an interest
here as I work for Easysoft.

Martin



More information about the unixODBC-support mailing list