WLST Script to start and stop Datasource

  Script to start Datasource connect('weblogic','weblogic123','t3://localhost:7001') domainRuntime() cd('ServerRuntimes/AdminServer/JDBCServiceRuntime/AdminServer/JDBCDataSourceRuntimeMBeans/PegaRULES') objArray = jarray.array([], java.lang.Object) strArray = jarray.array([], java.lang.String) invoke('start', objArray, strArray) exit()

Continue reading

Creating Datasource using WLST

connect(‘weblogic’,’weblogic’,’t3://localhost:7001′) edit() startEdit() cd(‘/’) cmo.createJDBCSystemResource(‘PegaRULES’) cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES’) cmo.setName(‘PegaRULES’) cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDataSourceParams/PegaRULES’) set(‘JNDINames’,jarray.array([String(‘jdbc/PegaRULES’)], String)) cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES’) cmo.setUrl(‘jdbc:sqlserver://localhost:1433’) cmo.setDriverName(‘com.microsoft.sqlserver.jdbc.SQLServerDriver’) cmo.setPassword(‘pega612’) cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCConnectionPoolParams/PegaRULES’) cmo.setTestTableName(‘SQL SELECT 1rnrn’) cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES/Properties/PegaRULES’) cmo.createProperty(‘user’)

Continue reading