Python - Sqlalchemy - Oracle Connection Fails To Connect To Sid
I am trying to use sqlalchemy to connect to an oracle DB. I was expecting the following to work given that it appears the exact syntax is shown in the sqlalchemy documentation. or
Solution 1:
Based on the documentation at Sqlalchemy Documentation, you should probably use the cx_oracle engine. The connect string is:
oracle+cx_oracle://user:pass@host:port/dbname[?key=value&key=value...]
with an option of service_name or sid as follows:
oracle+cx_oracle://user:pass@host:1521/?service_name=hr
oracle+cx_oracle://user:pass@host:1521/?sid=hr
Post a Comment for "Python - Sqlalchemy - Oracle Connection Fails To Connect To Sid"