Wednesday, June 15, 2011

Create and configure Cluster

wls:/offline/hal>create ('hamdy', 'Cluster')
Proxy for hamdy: Name=hamdy, Type=Cluster
wls:/offline/hal>assign ('Server', 'la,usa','Cluster', 'hamdy')
wls:/offline/hal>cd ('Cluster/hamdy')
wls:/offline/hal/Cluster/hamdy>set ('MulticastAddress', '239.2.0.3')
wls:/offline/hal/Cluster/hamdy>set ('MulticastPort',9200)
wls:/offline/hal/Cluster/hamdy>

Write your update to the domain & close the domain template

wls:/offline/hal/Cluster/hamdy>updateDomain()
wls:/offline/hal/Cluster/hamdy>closeDomain()
wls:/offline>exit()

Create and Configure Manged Servers

wls:/offline/hal>create ('ManagedServer Name "example la"', 'Server')
Proxy for la: Name=la, Type=Server
wls:/offline/hal>cd ('Server/la')
wls:/offline/hal/Server/la>set ('ListenPort', 8102)
wls:/offline/hal/Server/la>set ('ListenAddress', 'Host Name')

wls:/offline/hal/Server/la>cd ('/')

Create The second Managed Server
wls:/offline/hal>create ('usa', 'Server')
Proxy for usa: Name=usa, Type=Server
wls:/offline/hal>cd ('Server/usa')
wls:/offline/hal/Server/usa>set ('ListenPort', 8103)
wls:/offline/hal/Server/usa>set ('ListenAddress', 'Host Name')

Create Domain in Silent Mode

1- D:\oracle\standalone-wl\wlserver_10.3\common\bin>config_builder.cmd
create domain
wls:/offline> createDomain ('D:/Middleware/wlserver_10.3/common/templates/domains/basic_Domain10.3.4.0.jar','D:/Middleware/user_project s/domains/hal','weblogic','PASSWORD')
wls:/offline>


wls:/offline> createDomain ('D:/Middleware/wlserver_10.3/common/templates/domains/basic_Domain10.3.4.0.jar','D:/Middleware/user_project
s/domains/hal','weblogic','PASSWORD')


wls:/offline> readTemplate ('D:/Middleware/wlserver_10.3/common/templates/domains/basic_Domain10.3.4.0.jar')
wls:/offline/base_domain>cd ('Server/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set ('ListenAddress','HOST Name for AdminServer')
wls:/offline/base_domain/Server/AdminServer>set ('Listenport', 7003)
wls:/offline/base_domain/Server/AdminServer>cd ('/')
wls:/offline/base_domain>cd ('Security/base_domain/User/weblogic')

wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword ('PASSWORD')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption ('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain ('D:\Middleware\user_projects\domains\hal')
wls:/offline/hal/Security/hal/User/weblogic>closeTemplate ()
wls:/offline>readDomain ('D:\Middleware\user_projects\domains\hal')

Configure NodeManager

===========================
Configure NodeManager
========================
1- D:\oracle\Middleware\wlserver_10.3\server\bin>setWLSEnv.cmd

2- D:\oracle\Middleware\wlserver_10.3\server\bin>uninstallNodeMgrSvc.cmd

Stopping Oracle WebLogic NodeManager (D_oracle_Middleware_wlserver_10.3).
Oracle WebLogic NodeManager (D_oracle_Middleware_wlserver_10.3) stopped.
Oracle WebLogic NodeManager (D_oracle_Middleware_wlserver_10.3) removed.

3- Edit installNodeMgrSVC.cmd with the following parameter

set NODEMGR_HOST=(your host name)
4- Run installNodeMgrSVC.cmd

5- Crash recovery, we want to enbale nodemanager to restore server to their last known state after reboot

open nodemanager.properties & change CrashRecoveryEnabled=true
also for Smartupdate that manages weblogic patches it is adviceable to put

StartScriptEnabled=true
Also because the domain's script bin\startWeblogic has classpath configured which use smartupdate that manage Weblogic Patches
U will need to change StartScriptEnabled=true in nodemanager.properties file

6- stop/start node manager after update nodemanager.properties

Enroll the domain with nodemanager
----------------------------------
USE WLST Commond line

D:\oracle\Middleware\wlserver_10.3\common\bin>wlst.cmd

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> connect ('weblogic','XXXXXX','t3://Host Name of AdminServer:7001')

or
wls:/offline> connect('weblogic','XXXXXXX')

wls:/base_domain/serverConfig>

wls:/base_domain/serverConfig> nmEnroll('D://oracle//Middleware//user_projects//domains//base_domain','D://oracle//Middleware//wlserver_10.3//common//nodemanager')

nmEnroll('D://oracle//Standalone//user_projects//domains//base_domain','D://oracle//Standalone//wlserver_10.3//common//nodemanager')

nmEnroll('D://oracle//standalone-wl//user_projects//domains//base_domain','D://oracle//standalone-wl//wlserver_10.3//common//nodemanager')
Enrolling this machine with the domain directory at D://oracle//Middleware//user
_projects//domains//base_domain ...
Successfully enrolled this machine with the domain directory at D:\oracle\Middle
ware\user_projects\domains\base_domain.
wls:/base_domain/serverConfig>

Friday, April 9, 2010

Drop or Recreate DB Control In A 10g R2/11g Data

In Order to drop or reinstall Database Control (repository), you'll need to execute the following steps:

- /bin/emca -deconfig dbcontrol db -repos drop

This single command will delete both configuration files and repository objects.

- Create DB Control Objects
to create the DB Control Repository Objects and Configuration Files excute the following command:
bin/emca -config dbcontrol db -repos create

Thursday, April 8, 2010

Reducing disk I/O on Oracle database

How do we reduce disk I/O in UNIX? There are three generally accepted techniques for the DBA to reduce disk I/O:
1-Tune SQL statements to retrieve data with a minimum of disk I/O - This is generally performed by finding large-table full-table scans and replacing the full-table scan with an index scan.

2- Change the Oracle SGA - When we increase the shared_pool_size, large_pool_size, or db_cache_size, the resulting performance improvement is related to the reduction in disk I/O.

3-Reorganize tables to reduce disk I/O – This is done by selectively moving tables to tablespaces with a different blocksize, and re-sequencing table rows into the primary key