I used sqlalchemy to connect to the oracle server from python. (cx_oracle installation and oracle instant client setup are completed.)
The code I used is as follows: (I used the ip address instead of the hostname. The ip address is a sample value.)
engine = create_engine('oracle://scott:[email protected]:1521/sidname')
q = engine.execute(test_query)
q.fetchone()
But I got the error like below.
sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-24454: client host name is not set
I didn't use hostname, but I don't know why this error occurred. Shouldn't I use the ip address?
Is there a solution?