On Sep 7, 2012, at 8:26 AM, Luis Ridao <luri...@gmail.com> wrote:
> HI,
>
> i think this problem has come up pretty often on this and other lists
> and still have not managed to solved it.
>
> i need to connect to a an Oracle database through R.
>
> I have installed the oracle install client and the package RODBC in R
> but still get the same error:
>
> [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data
> source name not found, and no default driver specified
> 2: In odbcDriverConnect("DSN=MAGNUS;UID=my_uid;PWD=my_pwd") :
> ODBC connection failed
>
> /etc/odbc.ini looks like:
>
> odbc.ini
> ---------------------------------------
> [ORACLE_SAMPLE]
> driver = Easysoft ODBC-Oracle WP
> description = Easysoft Oracle ODBC WP driver
> server = oserver
> port = 1521
> sid = 192.168.20.129/MAGNUS
> user = luisr
> password =my_pwd
> logging = No
> logfile =
> enable_user_catalog = yes
> enable_synonyms = yes
> metadata_dont_change_case = no
> metadata_dont_do_schema = no
> metadata_id = no
> limit_long = 0
>
> i know i need another odbcinst.ini file
> but i don't know a stanza for it (i actually made the odbc.ini file above
> from some other source)
>
> the unixODBC driver is also installed in my linux system
>
> any ideas?
>
> thanks in advance
The content above is unlikely to be correct, as the EasySoft ODBC driver for
Oracle is rather expensive as I recall, so I would doubt that you are using it
on Ubuntu. The errors above suggest that you have not configured the DNS
connection properly.
In R use:
vignette("RODBC")
which will bring up the package vignette, which has additional details on
configuring the DNS settings.
As noted in the above document, if you have the Oracle client set up correctly,
you should be able to login to the server from the command line. If you can,
then that leaves RODBC related configuration issues to resolve. If you cannot,
then you still have Oracle client related configuration issues and you may need
assistance from your SysAdmin/DBAdmin.
Regards,
Marc Schwartz
_______________________________________________
R-sig-DB mailing list -- R Special Interest Group
R-sig-DB@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-db