title: Connecting Oracle with unixODBC: TNS:net service name is incorrectly specified
body: <p>I am trying to connect from Ubuntu to Oracle in Windows Server. I have installed unixODBC and Oracle driver to Ubuntu. When I try to connect using isql it gives following error:</p>
  
  <pre><code>user@user:~$ isql -v oracle-jono username password
  [S1000][unixODBC][Oracle][ODBC][Ora]ORA-12545: Connect failed because target host or object does not exist
  [ISQL]ERROR: Could not SQLConnect
  </code></pre>
  
  <p>And when I run it with sudo I get different error:</p>
  
  <pre><code>[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12162: TNS:net service name is incorrectly specified
  </code></pre>
  
  <p>I have tried many combinations of enviranment variables without success (ORACLE_HOME, ORACLE_SID, TNS_ADMIN, TWO_TASK). This is my very first time I am doing anything with Oracle so practically I don't know anything about it. I have also tried to modify odbc.ini and tnsnames.ora files.</p>
  
  <p>My odbc.ini for this Oracle connection:</p>
  
  <pre><code>[oracle-jono]
  Description = ...
  Driver      = OracleDriver
  Server      = 111.222.111.222
  User        = ...
  Password    = ...
  Port        = 1521
  Database    = mydatabase
  </code></pre>
  
  <p>My tnsnames.ora:</p>
  
  <pre><code>Data Source=
      (DESCRIPTION=
          (ADDRESS_LIST=
              (ADDRESS=
                  (PROTOCOL=TCP)
                  (HOST=111.222.111.222)
                  (PORT=1521)
              )
          )
          (CONNECT_DATA=
              (SERVER=DEDICATED)
              (SERVICE_NAME=mydatabase)
          )
  );User Id=...;Password=...;
  </code></pre>
  
  <p>Is there something clearly wrong? What should I put to environment variables? Do I have to do something in Windows Server where Oracle database exits (for example Oracle listeners)?</p>