title: SQLPLUS error:ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
body: <p>I downloaded SQLPLUS from Oracle:</p>
  
  <p><a href="http://www.oracle.com/technetwork/topics/winx64soft-089540.html" rel="noreferrer">http://www.oracle.com/technetwork/topics/winx64soft-089540.html</a></p>
  
  <p>Basic Lite and SQL*Plus</p>
  
  <p>I then fired up SQL*Plus:</p>
  
  <pre><code>c:\Program Files\Oracle\instantclient_12_1&gt;sqlplus /nolog
  
  SQL*Plus: Release 12.1.0.2.0 Production on Wed Apr 15 15:25:36 2015
  
  Copyright (c) 1982, 2014, Oracle.  All rights reserved.
  </code></pre>
  
  <p>and tried to connect to a database:</p>
  
  <pre><code>connect user\password@hostname
  </code></pre>
  
  <p>and received the error message:</p>
  
  <pre><code>ERROR:
  ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>I ran the queries suggested by Jakub,  I got</p>
  
  <pre><code>SQL&gt; select sys_context('USERENV','SERVICE_NAME') from dual;
  
  SYS_CONTEXT('USERENV','SERVICE_NAME')
  --------------------------------------------------------------------------------
  
  SYS$USERS
  
  SQL&gt; select sys_context('USERENV','SID') from dual;
  
  SYS_CONTEXT('USERENV','SID')
  --------------------------------------------------------------------------------
  
  877
  
  SQL&gt;
  </code></pre>