How to run a sql query inside a WLST script
<p>As it is possible to access a specific weblogic jdbc datasource in wlst, how can we run a sql query on this datasource ?</p>

<p>Here is how i retreive the specific datasource : </p>

<pre><code># Load the properties file with all necessary values
loadProperties('domain.properties')
# Go online
connect(adminusername, adminpassword,'t3://' + adminurl)
serverRuntime()
dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans()
oamDS = 'oamDS'
for ds in dsMBeans:
    if (ds.getName() == oamDS):
              #how to do something like this : ds.query('Select * from AM_REPLICATION_SETTINGS') ?
disconnect()
exit()
</code></pre>

<p>Try this WLST command</p>

<p>loadDB('12C', 'myDataSource', 'select name from emp')</p>

python oracle weblogic wlst