I am trying to connect to 2 Oracle databases in a single Python script and am having some trouble connecting to the second database. The error I am receiving is:
"DatabaseError: ORA-01017: invalid username/password; logon denied"
My login information is correct so I am confused on why it is not allowing me to access the second database. Any insight would be appreciated.
Sample code below:
dsnStr = cx_Oracle.makedsn("database1", "port_for_db1", "sid_for_db1")
conn = cx_Oracle.connect("myusername","password_db1",dsn=dsnStr)
dsnStr2 = cx_Oracle.makedsn("database2", "port_for_db2", "sid_for_db2")
conn2 = cx_Oracle.connect("myusername","password_db2",dsn=dsnStr)
Thank you!