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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s