Connecting to ASM instance through cx_Oracle Python library
Hi,
I am trying to connect to an ASM instance through cx_Oracle python library & the code-snippet is like below :
<start>
#!/usr/bin/python
from pprint import pprint
import sys
import os
import cx_Oracle
SID = "+ASM1"
HOME= "/u01/app/gridhome"
INSTANCE_TYPE = "ASM"
os.environ['ORACLE_SID']= SID
os.environ['ORACLE_HOME']= HOME
os.environ['INSTANCE_TYPE']= INSTANCE_TYPE
conn = cx_Oracle.Connection("sys", "password", mode=cx_Oracle.SYSASM)
<end>
Manually if i try to login to ASM, after exporting SID, HOME, INSTANCE_TYPE, i am able to run ASM views, queries etc.
BUT After running python code, it's giving following error :