Thursday, February 26, 2009

Virus shutting off access to outside world

A while back I ran into an issue when one of my PCs was infected with some kind of virus that stopped my access to go out to various virus protection websites, Google, etc. It turns out there is a file in Windows similar the one I am familiar with in UNIX called hosts. Here's a quick tip to help regaina ccess to the outside world if you run into a similar issue... C:\windows\system32\drivers\etc\hosts Make sure the only line in this file is "127.0.0.1 Localhost" If you've been infected by a spyware/Virus/Trojan/Adware... etc... it may have change this file so when you type in google.com or some other address it could redirect you over a specified ip, instead of looking up the address "normally."

Wednesday, February 25, 2009

My "virtual friend" Unnikrishnan Pillai, who I've worked with when calling Oracle Support in the past recently posted an example WLST script for creating JDBC datasources, which ended with "MultiDataSources coming soon..." (See Unni's Blog Post: http://unni-at-work.blogspot.com/2009/02/creating-jdbc-data-source-using-wlst_20.html ) I tried to add a comment to his blog with my own example WLST script for creating MultiDatasources, but received an error, so I figured I would post it here, and Unni... you can feel free to take this as a starting point and clean it up, or ignore it completely. But, I thought I would share in case there is anyone out there wondering how to do this. Feel free to post comments and/or ask questions if you need help with this script. The script creates a multiu datasource, pointing to 2 instances of an Oracle 10G RAC database...

connect('weblogic','weblogic','t3://localhost:70001')
edit()
startEdit(-1,-1,'false')

cd('/')
cmo.createJDBCSystemResource('DS1')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1')
set('Name','DS1')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCDataSourceParams/DS1')
set('JNDINames',jarray.array([String('DS1')], String))
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCDriverParams/DS1')
set('Url','jdbc:oracle:thin:@myDBServer1:1521:myDBSchema1')
set('DriverName','oracle.jdbc.xa.client.OracleXADataSource')
set('Password','myPass')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCConnectionPoolParams/DS1')
set('TestTableName','SQL SELECT 1 FROM DUAL')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCDriverParams/DS1/Properties/DS1')
cmo.createProperty('user')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCDriverParams/DS1/Properties/DS1/Properties/user') set('Value','myUser')
cd('/JDBCSystemResources/DS1/JDBCResource/DS1/JDBCDataSourceParams/DS1')
set('GlobalTransactionsProtocol','TwoPhaseCommit')
cd('/JDBCSystemResources/DS1')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

cd('/')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2')
set('Name','DS2')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCDataSourceParams/DS2')
set('JNDINames',jarray.array([String('DS2')], String))
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCDriverParams/DS2')
set('Url','jdbc:oracle:thin:@myDBServer2:1521:myDBSchema2')
set('DriverName','oracle.jdbc.xa.client.OracleXADataSource')
set('Password','myPass')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCConnectionPoolParams/DS2')
set('TestTableName','SQL SELECT 1 FROM DUAL')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCDriverParams/DS2/Properties/DS2')
cmo.createProperty('user')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCDriverParams/DS2/Properties/DS2/Properties/user')
set('Value','slims_upt')
cd('/JDBCSystemResources/DS2/JDBCResource/DS2/JDBCDataSourceParams/DS2')
set('GlobalTransactionsProtocol','TwoPhaseCommit')
cd('/JDBCSystemResources/DS2')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

cd('/')
cmo.createJDBCSystemResource('MultiDS')
cd('/JDBCSystemResources/MultiDS/JDBCResource/MultiDS')
set('Name','MultiDS')
cd('/JDBCSystemResources/MultiDS/JDBCResource/MultiDS/JDBCDataSourceParams/MultiDS')
set('JNDINames',jarray.array([String('MultiDS')], String))
set('AlgorithmType','Load-Balancing')
set('DataSourceList','DS1,DS2')
cd('/JDBCSystemResources/MultiDS')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

activate()