Create datasource 11g in silent mode

Today I will provide scripts to help create datasource(DS) in weblogic 11g in silent mode.

Necessary files:
createDS.py
DS.properties
DSnoXA.properties

After downloading the files, edit DS.properties to XA datasource or edit DSnoXA.properties to noXA datasource with enviroment data where will be created datasource.

For example, DS.properties:

# AdminServer connection details.
admin.username=weblogic
admin.password=teste123
admin.url=t3://app1weblogic002d:7001

ds.name=DsDoJackXA
ds.jndi.name=jdbc/DoJackXA
ds.url=jdbc:oracle:thin:@db1grepora1p:1521/dbcore
ds.driver=oracle.jdbc.xa.client.OracleXADataSource
ds.username=scott
ds.password=tiger

ds.target.type=Cluster
ds.target.name=WLS_Teste_Cluster

After editing property file, execute the script in python.

To create XA datasource:

[oracle@app1weblogic002d ]$ source setDomainEnv.sh
[oracle@app1weblogic002d DS11G]$ java weblogic.WLST createDS.py -p DS.properties

and create NoXA datasource:

[oracle@app1weblogic002d ~]$ source setDomainEnv.sh
[oracle@app1weblogic002d DS11G]$ java weblogic.WLST createDS.py -p DSnoXA.properties

Enjoy!!
That’s all for today.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from grepOra

Subscribe now to keep reading and get access to the full archive.

Continue reading