Search This Blog

Showing posts with label GridLink. Show all posts
Showing posts with label GridLink. Show all posts

Thursday, April 11, 2013

Home

Do you know this fun thing about Python scripting sing a poem of quotations just by by importing 'this' module.
wls:/offline> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
wls:/offline>

Content

You are invited for the contribution of WLST scripts and articles.

Technorati Claim token code JDU3DCFE66EH

Monday, February 21, 2011

Configuring GridLink DataSources

WebLogic 10.3.4 is having new feature as High availability and fail over control with Oracle Notifying Service (ONS) as client at WebLogic sever side. Which enables your environment to track if one of RAC node is down or Listener down.

edit()
cd('/')
cmo.createJDBCSystemResource('ds1')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1')
cmo.setName('ds1')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDataSourceParams/ds1')
set('JNDINames',jarray.array([String('GLDS01')], String))

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1')
cmo.setUrl('jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=dbhost.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)
(HOST=dbhost.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORASERVICE)))\r\n\r\n')
cmo.setDriverName('oracle.jdbc.OracleDriver')
cmo.setPassword(DBPASS)

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCConnectionPoolParams/ds1')
cmo.setTestTableName('SQL SELECT 1 FROM DUAL\r\n\r\n')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1/Properties/ds1')
cmo.createProperty('user')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDriverParams/ds1/Properties/ds1/Properties/user')
cmo.setValue('DBUSER')

cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCDataSourceParams/ds1')
cmo.setGlobalTransactionsProtocol('TwoPhaseCommit')
 
cd('/SystemResources/ds1')
set('Targets',jarray.array([ObjectName('com.bea:Name=appclstr,Type=Cluster')], ObjectName))

 cd('/JDBCSystemResources/ds1/JDBCResource/ds1/JDBCOracleParams/ds1')
cmo.setFanEnabled(true)
cmo.setOnsNodeList('node1host.com:6200,node2host.com:6200')

save()
activate()


Before you configure this, make sure ONS service configure at RAC nodes. So, please confirm it from your ORACLE DBA. One more things, this is applicable only when your environment have Oracle Database 10.2.+ for RAC.






This GridLink datasource is the alternative for Multi datasource. You don't need to configure individual data sources for each node. In this GridLink you can enter all the RAC node details at once. Targeting and testing is same as generic data source you can verify on your WebLogic console.

Best References
1. http://download.oracle.com/docs/cd/E17904_01/web.1111/e13737/gridlink_datasources.htm
2. http://www.cnblogs.com/mengheyun/archive/2011/02/13/1953114.html
3. http://theblasfrompas.blogspot.com/2011/02/jruby-script-to-monitor-oracle-weblogic.html
4. http://www.youtube.com/watch?v=THBUr_x7mUE
5. http://www.youtube.com/watch?v=5icksYdkj-c

Popular Posts