September 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

September 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Configuring the DefaultFileStore for TLOGS through WLST script

The below script will help us to set the shared location to the tlogs for the weblogic servers in a domain.

import sys

print “@@@ Starting the script …”

from java.util import *
from javax.management import * 
from java.io import FileInputStream

print “@@@ Starting the script …”
global props
 
#The directory of the domain configuration
#/app/oracle/products/11g/admin/domains
wlsDomain=os.environ[“WLSDOMAIN”]
print “WLSDOMAIN=”+wlsDomain

adminURL=’t3://’+domainProps.get(‘domain1.AdminIP’)+’:’+domainProps.get(‘domain1.AdminPort’)
adminUserName=’weblogic’
adminPassword=domainProps.get(“domain1.AdminPasswd”)
connect(adminUserName, adminPassword, adminURL)

edit()
startEdit()

adminserverDir = File(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)
bool = adminserverDir.mkdirs()

cd(‘/Servers/SOA1/DefaultFileStore/SOA1′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)

cd(‘/Servers/SOA2/DefaultFileStore/SOA2′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)

cd(‘/Servers/SOA3/DefaultFileStore/SOA3′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)

save()
activate()

Execute the script:
cd %WLS_HOME%\common\bin
wlst.sh DomainLogConfigurtionChange.py

weblogicssrrerew-16

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>