dsn_tns = cx_Oracle.makedsn(\'myip\', \'1521\', service_name=\'myservicename\') connection = cx_Oracle.connect(user=\'username\', password=\'passwd\', dsn=dsn_tns)