title: Check that a DB link is actually pointing to the right server
body: <p>I am currently trying to validate that an Oracle db_link is actually pointing to the correct server.
  When I query the db_links I get the definition of the DB_link referencing the TNSNames:</p>
  
  <pre><code>select * from all_db_links;
  </code></pre>
  
  <p>Gives me the following result:</p>
  
  <p>OWNER: user1<br/>
  DB_LINK: DBL_xxx.world<br/>
  Username: User2<br/>
  Host: tnsEntry1<br/>
  Created: 03-MAY-12<br/></p>
  
  <p>When I test the DB_link, everything works fine:</p>
  
  <pre><code>select * from dual@"DBL_xxx.world";
  </code></pre>
  
  <blockquote>
    <p>DUMMY: X</p>
  </blockquote>
  
  <p>However, as I do not have access to the server, I cannot make sure that the tns entry tnsEntry1 is pointed to the correct server.</p>
  
  <p>Locally, I can run:</p>
  
  <pre><code>select sys_context ( 'USERENV', 'DB_NAME' ) db_name,
   sys_context ( 'USERENV', 'SESSION_USER' ) user_name,
   sys_context ( 'USERENV', 'SERVER_HOST' ) db_host
   from dual;
  </code></pre>
  
  <p>I tried to run the same command remotely:</p>
  
  <pre><code>select sys_context ( 'USERENV', 'DB_NAME' ) db_name,
   sys_context ( 'USERENV', 'SESSION_USER' ) user_name,
   sys_context ( 'USERENV', 'SERVER_HOST' ) db_host
   from dual@DBL_xxx.world;
  </code></pre>
  
  <p>But it returns only local data.</p>
  
  <p>Is there a way to check the remote info? Or check the tnsnames from a sql query?</p>