Configuring the Shared FileStore for TLOGS in Weblogic Servers through WLST Script
WebLogic Server maintains transaction logs (referred to as tlog files). The server uses the transaction logs to track all current transactions. WebLogic Server only records information about uncommitted transactions in the transaction log. When a server restarts after a failure, it uses the information in the transaction log to recover transactions.
By default, weblogic uses FileStore and the default location of a WebLogic server’s file-store containing the TLOG is at:
<<DOMAIn_HOME>>/servers/<<SERVER_NAME>>/data/store/default/_WLS_<<SERVER_NAME>>000000.DAT
For High Availability, this TLog (Transaction Log) directory must be on shared file system (or in Database) so that after failover new WebLogic Server can pick transactions not yet completed. The JDBC Persistent store can also be used to store the TLOGS for High availability setup.
This tutorial explains the approach to configure shared FileStore for TLOGS to the weblogic servers in a domain through WLST script
WLST Script
ConfigureTLOGSSharedFileStore.py
import sysprint "@@@ Starting the script ..."from java.util import * from javax.management import * from java.io import FileInputStreamprint "@@@ Starting the script ..." global props #The directory of the domain configuration #/app/oracle/products/11g/admin/domains wlsDomain='C://Albin/SW/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain' print "WLSDOMAIN="+wlsDomainadminURL='t3://localhost:7001' adminUserName='weblogic' adminPassword='weblogic1' connect(adminUserName, adminPassword, adminURL)edit() startEdit()adminserverDir = File(wlsDomain+'/SOACoreDomain/soa_cluster/tlogs') bool = adminserverDir.mkdirs()cd('/Servers/MS1/DefaultFileStore/MS1') cmo.setDirectory(wlsDomain+'/SOACoreDomain/soa_cluster/tlogs')cd('/Servers/MS2/DefaultFileStore/MS2') cmo.setDirectory(wlsDomain+'/SOACoreDomain/soa_cluster/tlogs')cd('/Servers/MS3/DefaultFileStore/MS3') cmo.setDirectory(wlsDomain+'/SOACoreDomain/soa_cluster/tlogs')save() activate()
Script
https://github.com/techforum-repo/youttubedata/blob/master/scripts/wlst/ConfigureTLOGSSharedFileStore.py
Before executing the script, change the configurations as required.
Execute the script — <<Oracle_Home>>\oracle_common\common\bin\wlst.cmd ConfigureTLOGSSharedFileStore.py
Now the servers are configured with shared file store for TLOGS
No comments:
Post a Comment