Forum Stats

  • 3,740,555 Users
  • 2,248,272 Discussions
  • 7,861,323 Comments

Discussions

Trouble trying to install ODBC driver 12.2 on MAC

Camilo E. Zamorano
Camilo E. Zamorano Member Posts: 3
edited Aug 8, 2018 8:45AM in ODBC

I've been having a really hard time trying to install the ODBC driver on mac, i followed several instructions, for example these two:

- https://community.oracle.com/thread/4120787

- https://blogs.oracle.com/opal/installing-the-oracle-odbc-driver-on-macos

And i just can't make it work. I have been searching tutorials on a bunch of sites: stackoverflow, youtube, etc but i just can't make it work.

About the blog link: when trying to run the following statement

sudo odbc_update_ini.sh /usr/local

I got the following error:

sudo: odbc_update_ini.sh: command not found

So i just used

sudo sh odbc_update.ini.sh /usr/local

And got:

 *** ODBCINI environment variable not set,defaulting it to HOME directory! *** ODBCINI environment variable not set,defaulting it to HOME directory!

No idea what that means honestly.

Lastly i tried connecting to the database through isql on the terminal as follows:

isql OracleODBC-12c dsn user password  | isql OracleODBC-12c  user password

and it doesn't work .

Please help me, i'm kind of freaking out.

Thanks in advance!

cfca456b-de60-4cb3-afd2-a648552be510

Answers

  • Sdhamoth-Oracle
    Sdhamoth-Oracle Member Posts: 184 Employee
    edited Jul 4, 2018 7:44PM

    You have missed to prefix the path './'.

    You need to execute it as:

    sudo ./odbc_update.ini.sh /usr/local

    What is the error message displayed by isql?

    Have you checked whether the TNS setting using SQL*Plus? Were you able to connect to database using SQL*Plus?

  • Camilo E. Zamorano
    Camilo E. Zamorano Member Posts: 3
    edited Jul 6, 2018 10:46AM

    Ok, so i executed:

    sudo ./odbc_update.ini.sh /usr/local

    And i got the same message:

    *** ODBCINI environment variable not set,defaulting it to HOME directory!

    Can you tell what does that mean?

    When i try:

    isql OracleODBC-12c user pwd

    i get [ISQL]ERROR: Could not SQLConnect

    I did sudo nano ~./odbc.ini and changed the following parts:

    ServerName=

    to

    ServerName=localhost/myservicename

    i'm trying to connect to a local server using ethernet connection on a lan.

    UserID=

    to UserID=myuserid

    Thanks so much for you help!

  • Sdhamoth-Oracle
    Sdhamoth-Oracle Member Posts: 184 Employee
    edited Jul 6, 2018 11:00AM

    > *** ODBCINI environment variable not set,defaulting it to HOME directory!

    It says that the .odbc.ini is created in the default path (i.e. $HOME directory).

    > ServerName=localhost/myservicename

    If the DB server is not running in the default port 1521, you need to specify the port number too. Best way to troubleshoot this scenario is by using SQL*Plus  to cross the connectivity with the TNS information provided in 'ServerName' attribute in ~/.odbc.ini file.

  • Camilo E. Zamorano
    Camilo E. Zamorano Member Posts: 3
    edited Jul 6, 2018 11:40AM

    I tried

    isql -v localhost:1521/TNSName user pwd

    and i got

    [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified

    I suppose it's an advance?

  • 3758246
    3758246 Member Posts: 1
    edited Aug 8, 2018 8:36AM

    Hey, I'm in the same error now, any update?

  • Sdhamoth-Oracle
    Sdhamoth-Oracle Member Posts: 184 Employee
    edited Aug 8, 2018 8:45AM

    We shouldn't be passing the Oracle ez connection string in unixODBC isql.utility.

    Proper syntax for unixODBC isql is :

    <strong>isql</strong> <em>DSN</em> [<em>USER</em> [<em>PASSWORD</em>]] [<em>options</em>]

This discussion has been closed.