title: Checking oracle sid and database name
body: <p>I want to check SID and current database name.</p>
  
  <p>I am using following query for checking oracle SID</p>
  
  <pre><code>select instance from v$thread;
  </code></pre>
  
  <p>but table or view does not exist error is coming.</p>
  
  <p>I am using following query for checking current database name</p>
  
  <pre><code>select name from v$database;
  </code></pre>
  
  <p>but table or view does not exist error is coming.</p>
  
  <p>Any idea for above two problems?</p>