title: Alias database in oracle
body: <p>If I have an oracle 11g database set up so that I can access it with</p>
  
  <pre><code>sqlplus user/pass@localhost:1521/ora11
  </code></pre>
  
  <p>However, I was wondering whether it is possible to set an alias to access it via:</p>
  
  <pre><code>sqlplus user/pass@ora11
  </code></pre>
  
  <p>I can set the oracle SID and connect through</p>
  
  <pre><code>export ORACLE_SID=ora11
  sqlplus user/pass
  </code></pre>
  
  <p>However, if I have more than one database, ie ORA10 -> oracle 10 and ORA11 -> oracle 11, then I'd prefer to connect as</p>
  
  <pre><code>sqlplus user/pass@ORA10
  sqlplus user/pass@ORA11
  </code></pre>
  
  <p>rather than having to type out localhost or set ORACLE_SID each time. </p>
  
  <p>It would also be useful to do this if I'm trying to access remote oracle databases and don't want to have to remember the IP/PORT/SID everytime I wish to connect.</p>