I'm trying to connect to Oracle SQL on AWS using Python. I have cx_Oracle installed, ORacle Instant Client path set, and can't seem to figure out the host and service_name. I've checked some past posts, googled, and can't seem to find it. Sorry if this is obvious, thank you for your time
Python Script:
import cx_Oracleusername = 'Think I have this one done'password = 'assuming this is just the password'host = 'is this the endpoint?'port = 'This one is figured out'service_name = 'is this the endpoint?'dsn = cx_Oracle.makedsn(host, port, service_name=service_name)connection = cx_Oracle.connect(username, password, dsn)cursor = connection.cursor()query = "SELECT * FROM your_table"cursor.execute(query)for row in cursor: print(row)cursor.close()connection.close()
I've tried Google, checking tutorials, looking through stack overflow and other resources.