title: cx_Oracle doesn't connect when using SID instead of service name on connection string
body: <p>I have a connection string that looks like this</p>
  
  <pre><code>con_str = "myuser/mypass@oracle.sub.example.com:1521/ora1"
  </code></pre>
  
  <p>Where <code>ora1</code> is the SID of my database. Using this information in SQL Developer works fine, meaning that I can connect and query without problems.</p>
  
  <p>However, if I attempt to connect to Oracle using this string, it fails.</p>
  
  <pre><code>cx_Oracle.connect(con_str)
  
  DatabaseError:  ORA-12514:  TNS:listener  does  not  currently  know  of  service  requested  in  connect  descriptor
  </code></pre>
  
  <p>This connection string format works if the <code>ora1</code> is a service name, though. </p>
  
  <p>I have seen other questions that seem to have the reverse of my problem (it works with SID, but not Service name)</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/14140902/189134">Using Oracle Service Names with SQLAlachemy</a></li>
  <li><a href="https://stackoverflow.com/q/13691628/189134">Oracle SID and Service name; connection problems</a></li>
  <li><a href="https://stackoverflow.com/a/1181699/189134">cx_Oracle &amp; Connecting to Oracle DB Remotely</a></li>
  </ul>
  
  <p>What is the proper way to connect to Oracle, using <code>cx_Oracle</code>, using an <code>SID</code> and not a service name?  How do I do this without the need to adjust the <code>TNSNAMES.ORA</code> file? My application is distributed to many users internally and making changes to the <code>TNSNAMES</code> file is less than ideal when dealing with users without administrator privileges on their Windows machines. Additionally, when I use service name, I don't need to touch this file at all and would like it keep it that way. </p>