Posts

Showing posts from December, 2017

How to Update Datasource Connect String ?

Scenario 1) Updating all datasource with same connect string  =============================================== step a) create updateds.py file at $DOMAIN_HOME dsURL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))" print("*** Wait for a moment trying to connect *****") connect('weblogic','xxxxxxx','t3://localhost:7001') print("*** Connected *****") cd('Servers/AdminServer') edit() startEdit() cd('JDBCSystemResources') for tmpDS in allDS:   dataSourceName=tmpDS.getName();   print  'changing datasource connect string for', dataSourceName   cd('/JDBCSystemResources/' + dataSourceName + '/JDBCResource/' + dataSourceName + '/JDBCDriverParams/' + dataSourceName)   cmo.setUrl(dsURL)   print("*** connect string changed for your: ", dataSourceName)   print ('')   print (...