Python > Connection with JDBC to Oracle service name (jaydebeapi)
<p>This sample code is used to connect in Python to Oracle SID. </p>

<pre><code>import jpype
import jaydebeapi
jHome = jpype.getDefaultJVMPath()
jpype.startJVM(jHome, '-Djava.class.path=/path/to/ojdbc6.jar')
conn = jaydebeapi.connect('oracle.jdbc.driver.OracleDriver','jdbc:oracle:thin:user/password@DB_HOST_IP:1521:DB_NAME')
</code></pre>

<p>How can we connect to Oracle Service Name?</p>

<p>This way should work</p>

<pre><code>  conn = jaydebeapi.connect('oracle.jdbc.driver.OracleDriver','jdbc:oracle:thin:user/password@//DB_HOST_IP:1521/DB_NAME')
</code></pre>

java python oracle jdbc jaydebeapi