All<br>I have a sql script that I've included in a simple Py file that gives an error in the SQL. The problem is that the SQL code executes correctly in a database IDE environment (in this case ora developer). So, I'm concluding that I'm doing something amiss in the Py code. Does anyone see why this code would return a 'missing expression' sql error?<br>
Essentially, the code should start, ask for a privilege, and then collect the priv, role, and user data. Any input is appreciated.<br><br>#!/bin/bash<br>import time<br>import cx_Oracle<br><br>dbConn = cx_Oracle.connect('juser', 'pass', '1.2.3.4:/orcl:DEDICATED', <br>
             cclass = "ABC", purity = cx_Oracle.ATTR_PURITY_SELF)<br><br>pStart = time.time()<br><br>dbVersion = dbConn.version.split(".")<br><br>majVer = dbVersion[0]<br><br>print "Oracle Version: %s" %(majVer)<br>
print "Full Version: %s" %(dbConn.version)<br><br>dbCursor1 = dbConn.cursor()<br>dbCursor1.execute('select lpad(' ', 2*level) || c "Privilege, Roles and Users" from ( select null p, name c from system_privilege_map where name like upper(\'%&enter_privliege%\') union select granted_role p, grantee c from dba_role_privs union select privilege p, grantee c from dba_sys_privs) start with p is null connect by p = prior c')<br>
dbRowResult = dbCursor1.fetchall()<br>for dbRow in dbRowResult:<br>    print dbRow<br>              <br>dbCursor1.close()<br><br>pElapsed = (time.time() - pStart)<br><br>print pElapsed, " seconds"<br><br>dbConn.close()<br>
<br>