Tuesday 7 February 2012

Automating the Oracle Weblogic, WLS_FORMS & WLS_REPORTS in Windows OS - Oracle 11g Fusion Middleware.

Step: 1

Create a text file
%MIDDLEWARE_HOME%\user_projects\domains\servers\AdminServer\security\boot.properties

Add the following lines
username=webadmin
password=system01

Reference:Oracle support Note 980292.1 How to Start a WebLogic 10.3.x Domain AdminServer Without Interactively Supplying the Username / Password?

Step: 2


For troubleshooting / debugging purposes it is helpful to redirect standard out and error to a text file. backup and edit installSvc.cmd available in the path D:\Oracle\Middleware\wlserver_10.3\server\bin and change the line at the bottom of the file so it include the -log parameter e.g

rem *** Install the service
"%WL_HOME%\server\bin\beasvc" -install
-svcname:"%DOMAIN_NAME%_%SERVER_NAME%"
-javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
-extrapath:"%WL_HOME%\server\bin" -password:"%WLS_PW%"
-cmdline:%CMDLINE%
-log:" D:\Oracle\Middleware\user_projects\domains\
oracle11gfmserver\%SERVER_NAME%-stdout.txt"

Step: 3

Create a command script having the lines given below:

SETLOCAL
set DOMAIN_NAME=ClassicDomain
set USERDOMAIN_HOME=C:\middleware\FMW11g\user_projects\domains\ClassicDomain
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "C:\middleware\FMW11g\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

create a script for installAdmServer_Service.cmd

SETLOCAL
set DOMAIN_NAME=oracle11gfmserver
set USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\
oracle11gfmserverset SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

Similarly create a script for installWLS_FORMS_Service.cmd

SETLOCAL
set DOMAIN_NAME=
oracle11gfmserverset USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\oracle11gfmserverset SERVER_NAME=WLS_FORMS
set PRODUCTION_MODE=true
set ADMIN_URL=http://oracle11gfmserver
:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

Similarly create a script for installWLS_REPORTS_Service.cmd

SETLOCAL
set DOMAIN_NAME=
oracle11gfmserverset USERDOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\oracle11gfmserver
 set SERVER_NAME=WLS_REPORTS
set PRODUCTION_MODE=true
set ADMIN_URL=http://oracle11gfmserver
:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

Note: the highlighted part should be modified wr.to the environment.

Step: 4

So at the end of step 3 we must be having three bat files

installAdmServer_Service.cmd
installWLS_FORMS_Service.cmd
installWLS_REPORTS_Service.cmd

Executing one by one will create a service in the services.msc starting with the name beasvc ClassicDomain_WLS_FORMS. The Service "Startup Type" will be 'Automatic.

Step: 5

So now after every reboot the Oracle weblogic, forms and reports services will startup automatically. If services statuses are not up please check the log files (%stdout.txt) available under the path D:\Oracle\Middleware\user_projects\domains\ornrep for troubleshooting the issues during starup.

Reference Metalink note: How to Install MS Windows Services For FMW 11g WebLogic Domain Admin and Managed Servers? [ID 1060058.1]

1 comment: