title: Python - sqlalchemy - oracle connection fails to connect to SID
body: <p>I am trying to use <code>sqlalchemy</code> to connect to an oracle DB.  I was expecting the following to work given that it appears the exact syntax is shown in the <a href="http://docs.sqlalchemy.org/en/latest/dialects/oracle.html" rel="nofollow noreferrer">sqlalchemy documentation</a>.</p>
  
  <pre><code>oracle_db = sqlalchemy.create_engine('oracle://user:pass@server:1521/dev')
  </code></pre>
  
  <p>but this results in the error:</p>
  
  <blockquote>
    <p>dsn = self.dbapi.makedsn(url.host, port, **makedsn_kwargs)
    TypeError: makedsn() takes no keyword arguments</p>
  </blockquote>
  
  <p>The following call initially works without the service name</p>
  
  <pre><code>oracle_db = sqlalchemy.create_engine('oracle://user:pass@server:1521')
  </code></pre>
  
  <p>But when trying to connect it fails with an error complaining that the <code>SERVICE_NAME</code> was not provided.</p>
  
  <blockquote>
    <p>ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA</p>
  </blockquote>
  
  <p>Oddly this works with <code>cx_Oracle</code> directly:</p>
  
  <pre><code>con = cx_Oracle.connect('user/pass@server:1521/dev')
  </code></pre>
  
  <p>How am I supposed to connect to the specific service?</p>
  
  <p><strong>Attempts</strong></p>
  
  <p>I have tried to use <code>cx_Oracle.makedsn()</code> explicitly from <a href="https://stackoverflow.com/questions/14140902/using-oracle-service-names-with-sqlalchemy">this question</a> with no luck as well.</p>
  
  <p>Trying to use <code>?</code> options in the connection string</p>
  
  <pre><code>oracle_db = sqlalchemy.create_engine('oracle://user:pass@server:1521/?sid=dev')
  </code></pre>
  
  <p>works initially but when I try <code>oracle_db.connect()</code> I get the same <code>ORA-12504</code> error shown above.</p>