title: Error ORA-12162: TNS:net service name is incorrectly specified on Ubuntu 18.04 after installing sqlplus
body: <p>This is the first time I interact with a database or with sqlplus, but I'm coursing a subject called Data Bases in my college and we were told to install sqlplus with no further assistance and &quot;to type <code>sqlplus</code> with the user <code>SYS</code> and the password we choosed during the installation&quot;, so I followed the described procedure to install it in my Ubuntu 18.04 computer in the upvoted question here <a href="https://askubuntu.com/questions/159939/how-to-install-sqlplus">https://askubuntu.com/questions/159939/how-to-install-sqlplus</a> and everything worked out fine, except that I wasn't asked to write a password, and when I tried the instruction my professor gave me (to type sqlplus with the user SYS) I get the error <strong>ORA-12162: TNS:net service name is incorrectly specified.</strong></p>
  <p>After a long time reading, I jumped into the conclusion that I should export my SID, and I exported the one described here: <a href="http://www.dba-oracle.com/t_ora_12162_tns_net_service_name.htm" rel="nofollow noreferrer">http://www.dba-oracle.com/t_ora_12162_tns_net_service_name.htm</a></p>
  <pre><code>ORACLE_HOME=/u01/oracle; export ORACLE_HOME
  ORACLE_SID=asdb; export ORACLE_SID
  </code></pre>
  <p>but that didn't work either, and I read I should export <em>my</em> SIDE, which I tried to find by writing</p>
  <pre><code>sqlplus \nolog
  SELECT instance FROM v$thread;
  </code></pre>
  <p>but then I get <strong>SP2-0640: Not connected</strong>, so I don't really get what I'm suppose to do when my professor asks us to type sqlplus (I think is to connect with my own database that I installed when I installed sqlplus, but I'm not sure) and why is not working.</p>
  <p>When I exposed the whole problem to my professor he extended the assignment due time in one day, but just that.</p>