title: Connection to Oracle without a username or password
body: <p>Oracle has this concept of allowing database users to be identified by the operating system user who is running the program that is connecting to Oracle. See <a href="http://www.oracle-base.com/articles/misc/OsAuthentication.php" rel="noreferrer">here</a>.</p>
  
  <p>This allows you to do, as that user on a unix machine for example, a command such as:</p>
  
  <pre><code>sqlplus /
  </code></pre>
  
  <p>I am attempting to write a Java program for Oracle 10.2 which connects without a username or password. The obvious choice of url:</p>
  
  <pre><code>jdbc:oracle:thin:/@localhost:1521:MYDBSID
  </code></pre>
  
  <p>doesn't work, giving an error (Sorry I don't have the error available right now).</p>
  
  <p>I have attempted many other forms of doing this as well, but with no luck.</p>
  
  <p>Does anyone have any suggestions on how I can connect a Java program to Oracle using the OS identification method?</p>