This discussion is archived
0 Replies Latest reply: Nov 15, 2012 9:11 AM by 948255 RSS

ODI access- what type of access do i need to be able to run oracle commands

948255 Newbie
Currently Being Moderated
All Guru's

I have modifies KM to be able to run a sql script using sqlplus. i made sure it runs OK in jython from command line D:\jython2.5.1>jython TEST_SQLPLUS_JYTHON.py. Please find the script below which fails when i execute in the studio using admin and does not populate the E:\ODI_file\TEST_SQL.log.

fyi.. I have also created SUPERVISOR id and gave admin access just to make sure I am covered from ODI.
please help.

import java.lang.String
import java.lang.Runtime as Runtime
from jarray import array
import java.io.File
import os
import re
output_write=open('E:\ODI_file\TEST_SQL_LOG.log','w')

retVal = os.system(r'D:\oracle\product\11.2.0\client_1\BIN\sqlplus mdm_stage/xxxxxx@d1odi1 @E:\ODI_FILE\TEST.sql > E:\ODI_file\TEST_SQL.log')

if retVal >= 1:
print retVal
str1 = 'SQLPLUS failed. Please check the for details '
else:
print retVal
str1 = 'SQLPLUS SUCCESSFULL'

output_write.write(str1)
output_write.close()

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points