Batch start/stop servers

We’re upgrading from XIR2 SP2.5 to XIR3.1. We had a batch script to stop and start our servers as needed. These no longer appear as services - how do we reference them to stop or start them? For example, in XIR2, I have “Web Intelligence Job Server” and “Web Intelligence Report Server” and “Web Intelligence Report Server(3)” I can use a “sc … start” command or a “net start” command to start the server. In XIR3.1, I don’t see these as services. Am I missing something?


RonTrimnell (BOB member since 2007-01-31)

The SIA or the server intelligence agent manages starting and stopping of eterprise services in 3.1. You can just /stoprestart the SIA from CCM or modify your batch file. Here is the command line from the services snap in.

E:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\sia.exe" //RS//BOE120SIAboxi32

Job servers ,CMC or other ent services start as a processes rather than services and can be found in the taskmanager. I need to did a little more digging to see if we can use batch script to start or stop them.


aamirmoh :us: (BOB member since 2006-07-31)

Hi,

You can use following command in batch file

TASKKILL /F /IM Servername.exe

it will kill the session in processes of windows server and SIA will start the server as it was stopped.

Thanks.


Kajal :us: (BOB member since 2006-09-08)

Is there any more elegant way to do this?

I don’t fancy killing services, and really defeats the purpose if I then have to bring down the whole SIA and re-start it to get the server back up.

One method I was thinking about was to create a second SIA to put my Input/Output FRS in (in isolation), so I can net stop/start these servers in isolation to all the others.

How are others going about this in XI 3.1?


The Emu :australia: (BOB member since 2002-09-13)

We use the Taskkill to kill the Webi Processing Servers once a day. They are immediately re-started by the SIA. It’s not elegant but it works and saves us running into various memory / perf. related issues with these ‘servers’.

The rest of the ‘servers’ run just fine and get re-started once a week over the weekend with a job that stops and starts the SIA and Apache.


chibby (BOB member since 2009-04-15)

I found a way to do this (with samples from SAP) via the SDK… I have my servers (Reportserver, jobserver, etc) stopping on a schedule via a java program…

Just a thought, it’s not terribly difficult (if I can do it). I posted snippets of it on Bob already, but the key parts are below.

find the process


  Query="select si_name from ci_systemobjects where si_kind= 'Server' and si_name like 'ServerName1%'  and  (si_name like  '%Destination%')";

  k_procs = infoStore.query(Query);

Then, for each result in that query (the sub i in Processes[] )

  rServer = infoStore.query("Select * From CI_SYSTEMOBJECTS Where  SI_NAME ='" + Processes[i]+"'" );
IServer server = (IServer) rServer.get(0);	


// Restart works in normal situations 
  server.setExpectedRunState(ExpectedRunState.RESTART);
  infoStore.commit(rServer);	

Brent


bdouglas :switzerland: (BOB member since 2002-08-29)

Hello,
i have the same problem, i need a script to stop BO servers.
I tried to use commands similar to the following:

“C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\ccm.exe” -managedstart CMS_NAME.AdaptiveJobServer -cms CMS_NAME:6400 -username XXX -password XXX -authentication secEnterprise

It work for all servers but it doens’t work for the CentralManagementServer … :frowning:

I tried to use command like: TASKKILL / F / IM sia.exe but it doesn’t work…it don’t stop the process sia.exe…

have you find a solution? If yes which?

bdouglas could you explain in detail you solution with sdk?

Thanks a lot!!!


jess2124 (BOB member since 2009-08-13)

I don’t think my solution will help you - it’s hard to kill the CMS, have not been able to do that without rebooting the server or using the BO restart app.

My routine emulates the CMC - find the individual server by querying the repository, then setting its state to disabled or terminated. There are good examples of this on the SAP site, better than mine.

Good luck,
Brent


bdouglas :switzerland: (BOB member since 2002-08-29)

Did you try using the -forceterminate option to the ccm.exe command (instead of the -managedrestart)? See if that enables you to kill the CMS…


brotting78 (BOB member since 2008-07-22)

Hello Champs…

in BO XI 3.1:

I am looking for the script which allow me to perform following task for specific servers:

  1. To Stop Server
  2. To disable Server
  3. To uncheck the checkbox “Automatically start this server when the Server Intelligence Agent starts” for that server

if anybody help me, that would be great help.

Thanks in advance …


Vills :india: (BOB member since 2007-10-24)

no reply :frowning:

can anyone share the argument similar to “-managedstart” and “-disable” …

thanks in advance


Vills :india: (BOB member since 2007-10-24)

Hi Everyone,

I came across this article on SAP’s site. It worked perfectly for me using a batch file with Net Stop / Start.

Take a look and let me know if it helps.

SAP Knowledge Base Article Printer-Friendly Version | [Add to browsers favorites] Add to favorites | Quick link | Disclaimer for SAP Knowledge Base Articles
1305228 - How to start or stop SIA and Tomcat with command line or Windows scrips in Business Objects XI3.x?
Overall Rating 0 Votes

Rating Details
0 Votes
0 Votes
0 Votes
0 Votes
0 Votes

Your Rating [click the star to rate this document from 1 to 5] [click the star to rate this document from 1 to 5] [click the star to rate this document from 1 to 5] [click the star to rate this document from 1 to 5] [click the star to rate this document from 1 to 5]

Version 2 Validity: 08/18/2010 - active

Language English

Content: Summary | Header Data | References | Product

Symptom

* How to start or stop SIA and Tomcat with command line or Windows scrips in Business Objects XI3.x?

Reproducing the Issue

* Business Objects Enterprise XI 3.0
* Business Objects Enterprise XI 3.1

Resolution

* Use the command net stop / start "service name"  
  1. Open the command line Run. Type the command tasklist /SVC. It shows that the service name of SIA is BOE120SIAJAXI31 in XI 3.1 and BOE120SIABOXIR3 in XI 3.0
  2. Type the command net stop BOE120SIAJAXI31 in XI 3.1. the SIA will be stopped. Then type net start BOE120SIAJAXI31, SIA will be started.
  3. Make sure the service name of Tomcat, eg. Apache Tomcat 5.5.20. Type net stop / start “Apache Tomcat 5.5.20”, the Tomcat will be stopped or started.

See Also

* SAP Note 1203539 - How to use a Windows script to start or stop BusinessObjects services
* SAP Note 1287046 - How to use Windows script to start or stop BusinessObjects services
  for Business Objects XI 3.0?

Keywords
Windows scrips, batch file, bat, restart

Header Data

Released on 08/18/2010 05:51:19
Release status Released to Customer
Component BOJ-BIP-ADM User & server configuration, InfoView refresh, user rights
Priority Normal
Category How To
Operating System
WIN 2003

References
Type

ID

Title
The table does not contain any entries

Product
Product

Product Version
SAP BusinessObjects Enterprise

BOBJ ENTERPRISE XI 3.0
BOBJ ENTERPRISE XI 3.1


joefonseca79 (BOB member since 2007-07-03)

Hi,

When a windows (or other) upgrade is needed there is a need to disable and stop the services. And of course after the upgrade; enable and start.
To accomplish this:
Disable and stop:

sc \srvXXX config BOE120SIASRVXX start= disable
sc \srvXXX stop BOE120SIASRVXXX

sleep 5

sc \srvXXX config BOE120Tomcat start= disable
sc \srvXXX stop BOE120Tomcat

=====

To enable and start:

sc \srvXXX config BOE120Tomcat start= auto
sc \srvXXX start BOE120Tomcat

sleep 5

sc \srvXXX config BOE120SIASRVXXX start= auto
sc \srvXXX start BOE120SIASRVXXX

======

Good luck!


eremmelts (BOB member since 2008-07-09)

Hi all,
Can anyone post .bat script for deletion of log files on BO servers.

thanks Inadvance


vk_0432 (BOB member since 2011-11-02)

If you are looking for a script, here’s most of what I use - vbs that reads the logs folder, deletes logs more than 10 days old… Tweak it to your log folder, etc - may need a little love, pulled it out of a longer script.

B

Option Explicit 

Dim fso, CutoffDate, DirName
CutoffDate = Date() - 10

Set fso = CreateObject("Scripting.FileSystemObject") 
DirName="..path... Enterprise 12.0\logging\"


DirWalk(DirName)  ' path to search


Sub DirWalk(parmPath) 
Dim oSubDir, oSubFolder, oFile, n 
Dim extension, DirLen 

extension = "LOG"




   'On Error Resume Next        

   Set oSubFolder = fso.getfolder(parmPath) 

   For Each oFile In oSubFolder.Files   ' look in the current dir 
      If Err.Number <> 0 Then   ' if we got an error, just skip this entry 
	         Err.Clear 
      ElseIf oFile.DateLastModified < CutoffDate Then 

      	if  (instr(1,oFile.ShortName,extension,1) > 0) then 
	      fso.DeleteFile oFile.Path, True 
	end if

      End If 
   Next 

   For Each oSubDir In oSubFolder.Subfolders 

      DirName=oSubDir.Path
      DirLen=len(DirName)
      DirWalk oSubDir.Path      ' recursive...

   Next 

   On Error Goto 0              ' Resume errors. 

End Sub 

bdouglas :switzerland: (BOB member since 2002-08-29)

hi,
Thanks for your reply, that script will delete all the files in logging . But i want to delete only .log files in that folder. Is there any modification in that script for this requirement.

thanks Inadvance


vk_0432 (BOB member since 2011-11-02)

No, it is Just log files - that’s what the line below does:

if  (instr(1,oFile.ShortName,extension,1) > 0) then 

I set extension above to be LOG - ta da.

Good luck!
B


bdouglas :switzerland: (BOB member since 2002-08-29)

Thanks bdouglas,

Is there any alternative script like the following

NET STOP “Web Intelligence Job Server”
NET START “Web Intelligence Job Server”

NET STOP “Program Job Server”
NET START “Program Job Server”

NET STOP “Report Application Server”
NET START “Report Application Server”

The above script is used for “auto restart of BO servers”.

Likewise is there any script for deletion of log files on BO servers.

Thanks Inadvance


vk_0432 (BOB member since 2011-11-02)

For BI4 it works fine as well:

net stop BOEXI40Tomcat
net stop BOEXI40SIA


its_vicky07 :us: (BOB member since 2007-09-02)