[R-sig-DB] ODBC driver in ubuntu

Lee Hachadoorian Lee@H@ch@door|@n+L @end|ng |rom gm@||@com
Wed Oct 30 17:05:04 CET 2013


Luis,

Respectfully, it is not the same. Previously the message was:

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

Now it:

ERROR: state HY000, code 12545, message [unixODBC][Oracle][ODBC][Ora]ORA-12545:
Connect failed because target host or object does not exist

So it *is* finding the DSN in your odbc.ini, but not the "target host or
object". Are you sure the server is running and responding to other
requests? Again, I'm not familiar with Oracle, but perhaps you have to
specify a database name as well as a host? (I know on Postgres you do...).

Best,
--Lee


On Wed, Oct 30, 2013 at 11:50 AM, Luis Ridao <luridao using gmail.com> wrote:

>
> I followed Lee's recommendations but still the same:
>
> > library(RODBC)
> > channel <- odbcConnect(dsn='BASTA', uid='******', pwd='*******')
> Warning messages:
> 1: In odbcDriverConnect("DSN=BASTA;UID=******;PWD=**********") :
>   [RODBC] ERROR: state HY000, code 12545, message
> [unixODBC][Oracle][ODBC][Ora]ORA-12545: Connect failed because target host
> or object does not exist
>
> 2: In odbcDriverConnect("DSN=BASTA;UID=luisr;PWD=juanayzakarias") :
>   ODBC connection failed
>
>  --------------------------------------------------------------------------------------------------
> /etc$ sudo gedit odbcinst.ini
> [OracleODBC-11g]
> Setup           =
> FileUsage =
> CPTimeout =
> CPReuse         =
>
> Description = Oracle ODBC driver for Oracle 11g
> Driver = /u01/app/oracle/product/11.1.0/client_2/lib/libsqora.so.11.1
> FileUsage = -1
>
> --------------------------------------------------------------------------------------------------
> /etc$ sudo gedit odbc.ini
> [BASTA]
>
> driver        = OracleODBC-11g
> description        = Oracle_ODBC_driver
> server        = 192.168.20.10
> port        = 1521
> user        = ******
> password        = ******
>
> 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
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> Luis Ridao Cruz
> Faroe Marine Research Institute
> N�at�n 1, P.O. Box 3051
> FO-110 T�rshavn
> Faroe Islands
> Tel   : (+298) 353900
> Fax: : (+298) 353901
> e-mail: luisr using hav.fo
>            luridao using gmail.com
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>
>
>
> On Wed, Oct 30, 2013 at 3:32 PM, Lee Hachadoorian <
> Lee.Hachadoorian+L using gmail.com> wrote:
>
>>
>>
>>
>> On Wed, Oct 30, 2013 at 9:30 AM, Luis Ridao <luridao using gmail.com> wrote:
>>
>>> You mean:
>>>
>>> > channel <- odbcConnect(dsn='BASTA', uid='*****', pwd='********')
>>>
>>> Warning messages:
>>> 1: In odbcDriverConnect("DSN=BASTA;UID=luisr;PWD=juanayzakarias") :
>>>   [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
>>> Manager]Data source name not found, and no default driver specified
>>> 2: In odbcDriverConnect("DSN=BASTA;UID=luisr;PWD=juanayzakarias") :
>>>   ODBC connection failed
>>>
>>> or in the odbc.ini file:
>>> /etc$ sudo gedit odbc.ini
>>>
>>> [oracle_driver]
>>> driver        = OracleODBC-11g
>>> description        = Oracle_ODBC_driver
>>> server        = BASTA
>>> port        = 1521
>>> sid        = 192.168.20.10
>>> user        = ********
>>> password        = *********
>>> 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
>>>
>>> It keeps on failing
>>>
>>> Best,
>>> Luis
>>>
>>>
>> Luis,
>>
>> The name between the braces in odbc.ini is the DSN. You have named the
>> DSN oracle_driver, not BASTA. So either rename it in odbc.ini, or refer to
>> it as oracle_driver in the odbcConnect() call.
>>
>> Also, I'm not really familiar with Oracle, but I can't seem to find any
>> information on the sid parameter you have set in the ini. The examples I
>> see use server, servername, and/or database. See
>> http://www.almahdi.cc/linux/setup-unixodbc-on-linux-for-oracle-and-sybase/
>> .
>>
>> Best,
>> --Lee
>>
>
>


-- 
Lee Hachadoorian
Asst Professor of Geography, Dartmouth College
http://freecity.commons.gc.cuny.edu/

	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list