title: Connecting to Oracle Database Using Python with cx_oracle
body: <p>I am using cx_oracle to connect the Oracle DB using python.I need your assistance in connecting DB. I'm using following code till date it worked well </p>
  
  <p>Code-1:</p>
  
  <pre><code>import cx_Oracle as cx
  dsn_tns = cx.makedsn(HOST,PORT, service_name=SERVICE_NAME)
  conn = cx.connect(user=USER, password=PW, dsn=dsn_tns)
  </code></pre>
  
  <p>Recently TCP port is disabled and we are using jdbc connection string to connect DB which has TCPS port number.can you help where I need to pass the protocol in above/ suggest any other method.</p>
  
  <p>i tried following code </p>
  
  <p>code-2:</p>
  
  <pre><code>dsn_tns='(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcps)(HOST =hostdetails)(PORT =port))) (CONNECT_DATA = (SERVICE_NAME = servicename)))'
  conn = cx.connect(user=USER, password=PW, dsn=dsn_tns)
  print(cx.version)
  </code></pre>
  
  <p>I got <code>error: ORA-28759: failure to open file</code>. </p>
  
  <p>Any suggestion is appreciated. Thank you in advance.</p>