title: oracle connection string with SID in c#
body: <p>Hi I have to connect to an Oracle Database( about which I know a little) using a windows application.
  The windows application will not necessarily be in the same system.
  I just needed the connection string.
  So I Used Add connection functionality in Visual Studio 2014 to test the connection and get the string.
  eedb is the SID which i read in <a href="https://stackoverflow.com/questions/43866/how-sid-is-different-from-service-name-in-oracle-tnsnames-ora/">stackoverflow question</a></p>
  
  <p><img src="https://i.stack.imgur.com/KlPIv.png" alt="enter image description here"></p>
  
  <p>Now using above, i was able to connect to the database using this functionality and even in my visual studio server explorer all the tables of the oracle database were showing but I needed to use the connection string in the windows application.
  So I used following string:</p>
  
  <pre><code>DATA SOURCE=172.31.8.21:1521/eedb;USER ID=PDB_E_GND_R
  </code></pre>
  
  <p>I added password too to this string as </p>
  
  <pre><code>DATA SOURCE=172.31.8.21:1521/eedb;USER ID=PDB_E_GND_R;PASSWORD=123
  </code></pre>
  
  <p>when i run the application i get error.</p>
  
  <pre><code>System.Data.OracleClient.OracleException: ORA-01017: invalid username/password; logon denied.
  </code></pre>
  
  <p>So :
  Why I am getting this error. Now some may mark this question as duplicate and even point out the answer can be found in issue <a href="https://stackoverflow.com/questions/14476875/ora-01017-invalid-username-password-when-connecting-to-11g-database-from-9i-clie">stackoverflow question</a></p>
  
  <p>Coz if this was the case I would have been unable to establish connection through add connection functionality of Visual Studio at all.
  Please note: I added the reference: Oracle.DataAccess</p>
  
  <p>And also for a programmer like me who has very little knowledge regarding the oracle.
  How I can know which connection string I have to use for a particular oracle db.</p>