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 —-
SET MONTH=%DATE:~4,2%
SET DAY=%DATE:~7,2%
SET YEAR=%DATE:~10,4%
SET HOUR=%TIME:~0,2%
SET MINUTE=%TIME:~3,2%
SET SECOND=%TIME:~6,4%

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—————————————–

9 comments:

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=http://www.001casino.com/]online casino[/url] coincide the latest [url=http://www.casinolasvegass.com/]online casino[/url] free no deposit bonus at the foremost [url=http://www.baywatchcasino.com/]baywatch casino
[/url].

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=http://www.ss12w12ws.info]Philan4335d[/url]

vivek mishra said...

Hi,
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 ?

Thanks,
Vivek Mishra

Unknown said...

Vivek, did you get any leads for the automated particular objects compilation instead of full compile.

I am looking for the same. Please share in case of any information.

Liam Coode said...

I never stop myself to say something about it. You’re doing a great job. Keep it up. Do you have any ideas about What are Black Spot on the laptop screen. If the black spots are caused by dirt and debris, you should clean the screen using a soft eraser or a microfiber cloth that has been slightly wet. Do not apply pressure on the screen.