Wednesday, April 30, 2008

Automated Script/Batch File: To Stop Server, Compile SRF, Generate Scripts, Start Server

The batch file will perform the following Siebel Administrative Tasks:

Backup the SRF from servers
Perform Full Compile
Stop Siebel Services
Copy Compiled SRF
Start Siebel Services
Run the Genbscript Utility
Copy Genbfolder
Restart Web Server

Batch File:

@echo off
REM ——————————————————————————————————————————————————————————————————
REM Batch compiles Siebel SRF and places on the server
REM ——————————————————————————————————————————————————————————————————

REM —- Step1 : Create Backup —-

copy “\\siebel\siebsrvr\OBJECTS\ENU\siebel_sia.srf” “\\siebel\siebsrvr\OBJECTS\ENU\back\siebel_sia_%YEAR%_%MONTH%_%DAY%_%HOUR%_%MINUTE%.srf” /y
E: <>
cd \\siebel\siebsrvr\OBJECTS\ENU\

REM —- Step2 : Stop Siebel Service —-
net stop <> -- Sample : “siebsrvr_DEVENT_DEVSRVR1″

REM —- Step3 : Stop Siebel Service on second server —-
SC \\<> STOP <> -- Sample : “siebsrvr_DEVENT_DEVSRVR2″

REM —- Step4 : Complie it in local directory —-
\\siebel\Tools\BIN\siebdev.exe /C “\\siebel\Tools\BIN\ENU\tools.cfg” /d ServerDataSrc /u sadmin /p sadmin /bc “Siebel Repository” siebel_sia_new.srf

ping -n 3600 localhost > nul

REM —- Step5 : Copy to siebsrvr folder on both server —-

copy \\siebel\Tools\OBJECTS\ENU\siebel_sia_new.srf \\siebel\siebsrvr\OBJECTS\ENU\siebel_sia.srf /y

ping -n 120 localhost > nul

REM —- Step6 : Run Genb script———–
E: <>
cd \\siebel\siebsrvr\bin
genbscript “\\siebel\siebsrvr\bin\enu\Test.cfg” \\enu

REM —- Step7 : Start Siebel Service —-
net start “siebsrvr_DEVENT_DEVSRVR1″

REM —- Step8 : Start Siebel Service on Second Server —-
SC \\<> START “siebsrvr_DEVENT_DEVSRVR2″

REM —- Step9 : Stop Web Server —-
net stop “W3SVC”

ping -n 180 localhost > nul

REM —- Step10 : start Web Server —-
net start “W3SVC”

—————End of Batch Script—————————————–


Anonymous said...

Excellent post Rajesh. Do you have any idea how to go about doing the same (in a scripted manner) using siebdev.exe for selected projects only, instead of a full compile?

Anonymous said...

Can we somehow automate the incremental compiles. or some commande to compile selective projects?

Preethi said...

We cannot automate an incremental compile

Anonymous said...

This is great thanks. I noticed that you stop the services before doing the compile - is there a reason for this? When I've done this manually I always compiled then stopped the services to minimize downtime.

Anonymous said...

top [url=]online casino[/url] coincide the latest [url=]online casino[/url] free no deposit bonus at the foremost [url=]baywatch casino

Anonymous said...

Travel to a vineyard. When there is a single located in your area, transform it into a working day getaway. If not, consider taking a brief getaway to just go and check out. A journey similar to this may help you enjoy and really like wine even more than you probably did before. [url=]Philan4335d[/url]

vivek mishra said...

I'm looking for a batch script file which can compile siebel objects incrementally. i.e. we have a excel where users enter their respective objects like BC,Applet etc. for incremental compilation. batch file should take the object's name from that excel file and compile them on incrementally on server SRF and replace the SRF in server,

could you please help me with this ?

Vivek Mishra