To go into the database you have to
setup oracle_clientthen
sqlplus stt_param/password@d0onprdThen you may apply SQL statements like
desc STC_MODULE; select * from STC_MODULE;(please give me a call for the password: extension 2736)
To fetch/put data into the database with python code say:
setup python_dcoracle setup oracle_clientAn example.py:
import dcoracle
import string
#open database connection
def opendb(passwd):
constr='stt_param/%s@d0onprd' % (passwd)
global dbc
dbc=dcoracle.Connect(constr)
global dbCursor
dbCursor = dbc.cursor()
#close database connection
def closedb():
global dbc
dbc.close()
if len(sys.argv)>1:
schema = sys.argv[1]
else:
print "database keyword needeed!"
exit
opendb(schema)
cmd='select SEQ_SERIAL_NO,SEQ_CHANNEL_ID, STC_CHANNEL_NO from STT_PARAM.STC_MODULE where
CRATE_ID='+str(crate)+' and STC_CARD_NO='+str(stc)
dbCursor.execute(cmd)
result=dbCursor.fetchall()
print "result=",result
for jrow in result: #loop over STC channels
print "STC_CHANNEL_NO=",jrow[2]
closedb()
Have fun with it