I need to access data that is inside an oracle database using a python script. Its a Unix server running oracle 10g. I dont have much access to the database server.
It works fine on model builder when the connection is open and I add my data, but exporting it to python means all the connection properties are gone (they are just "TABLE NAME" etc.)
Bascially the script grabs this information based on a query, lets say "SELECT id WHERE Status = 0", and it writes it to a new table in a filegeodatabase. I need to do it through python as I am processing it further, but thats not my issue.
I just cant get it to connect. I've tried to use pyodbc plugin using the syntax below:
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=rtsprod;DATABASE=DBNAME;UID=USERID;PWD=PASSWORD')
Now i know its an oracle database but cant find any doco on how exactly to connect using the pyodbc plugin. Is there a better way?
Thanks for any help!