0

I want to import some data from a non-local database to RStudio. I've searched and I found that I could use RODBC library at RStudio, like:

channel <- odbcDriverConnect('driver={SQL Server}; server= servername; database=dbname; trusted_connection=true')

But I cant import my data. I got an error:

[RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified

I don't know what my driver should be and I don't know how to find it. I tried to search at the internet, but all forums or answers didn't seem evident, because I don't understand anything about this topic and didn't understand nothing the forums or answers gave me.

I think if I find my drivers name I will probably be able to import data.

I use ubuntu 14.04, Firebird.

If you need any other info. and want to help me, just ask. I will be very glad.

Update

Now I can connect to the external database. But I still can't import data to RStudio. To connect to the external db, I just figured out how to do the correct ssh command. So, I have access to the database, but I can't import it to RStudio.

1 Answers1

1

I don't use ODBC, and I never used UnixODBC, so this answer is guesswork: feel free to improve it.

To connect to Firebird using ODBC, you need to install the Firebird ODBC driver (you'll need the Linux AMD64 Library variant). Copy the libOdbcFb.so to /usr/lib. Also make sure you have the Firebird client library installed.

As a connection string you need to use:

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=servername:/path/to/your/db/myData.fdb;

You may also need to add an entry in /etc/odbcinst.ini as described on https://help.ubuntu.com/community/ODBC to make UnixODBC aware of the existence of the driver; I'm not sure.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197