由于可以访问wlst中的特定weblogic jdbc数据源,我们如何在此数据源上运行sql查询?
以下是我如何检索特定数据源:
# 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()
答案 0 :(得分:-1)
尝试此WLST命令
loadDB('12C','myDataSource','从emp中选择名称')