cancel
Showing results for 
Search instead for 
Did you mean: 

BusinessObjects Housekeeping activities Automation

Former Member
0 Kudos

Hi Experts,


We all know that as a part of housekeeping activities, we have to clear the below things.

Click the below link to have complete details about Monitoring and housekeeping

http://scn.sap.com/community/bi-platform/blog/2012/10/22/businessobjects-monitoring-and-housekeeping...

  1. Delete the contents under the Local host folder in order to clear Tomcat Cache
  2. Delete contents under the Data Folder in order to clear Web Intelligence Cache

BusinessObjects Monitoring and Housekeeping activities

do anyone have  automated the above two process by using any script or batch file or OS level scripting.

If yes, Could  you please share?

Thanks in Advance.

Regards,

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey JRK Prasad,

Got it to work, this is the final batch file that I used. However, it did say that the path to 'PlatformSearchScheduleDurationBean.java' was too long, so it couldn't be deleted. If you share out that drive, map the drive to about half way down, you can delete half the folders yourself, and then disconnect the shared drive to delete the other half.

At any rate, here is the final batch file that I used:

net stop Tomcat7&&rename "D:\www\Tomcat 7.0\work\Catalina" %Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina&&net start Tomcat7&&rmdir "D:\www\Tomcat 7.0\work\"%Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina /S /Q

Again, outside of the above file that couldn't be deleted, it works as expected. Also, I'm on Windows Server 2008 R2, thus I had to run this as an administrator.

Try running the above script and see if it works as you expect it to. If it doesn't, let me know what, if any, error messages you got and I'll help you work through it.

EDIT: I changed around the batch file, as if I'm just going to automatically delete it, no need to date it. I changed it and I was able to delete the entire directory without having the fore mentioned error:

net stop Tomcat7&&rename "D:\www\Tomcat 7.0\work\Catalina" old.Catalina&&net start Tomcat7&&rmdir "D:\www\Tomcat 7.0\work\old.Catalina" /S /Q

Hopefully that gets you going. Let me know if it doesn't and I'll continue to help you get it going. Thanks,

-Victor

Answers (1)

Answers (1)

Former Member
0 Kudos

Experts... Need your help to automate

former_member182521
Active Contributor
0 Kudos

Hi Prasad,

Have added a similar script in the below blog. http://scn.sap.com/docs/DOC-40837

Clearing Tomcat Cache & WebI Cache is required only when there is any update in Web Application deployment. Make sure your Web Application server is stopped so as to avoid any file lock.  Please be informed Users might face performance issue during their first document access.

Get back to me incase of query if any.

Regards,

Mani

Former Member
0 Kudos

Thank you Mani for sharing this.I am able to find the VB script to move the logs in the Blog.

But i am looking for a script which will complete stop & rename Data/catlina & restart process to  clear the Tomcat/Webi Cache.

I have tried some thing as below, but it is not working with Batch file.

net stop BOEXI40Tomcat&&ping -n 10 localhost&&rename "G:\Program Files (x86)\SAP BusinessObjects\Tomcat6\work\Catalina" %Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina&&net %1 start BOEXI40Tomcat

Former Member
0 Kudos

Hi JRK,

I'm currently working on this, to see if I can figure out how to do it, as I think this would be a pretty neat way to clean up the Tomcat directory. As I was testing this out, I ran the following, as a test:

@echo off
net stop Tomcat7
if ERRORLEVEL 1 goto error
exit
:error
echo There was a problem
pause

Within there, I got the following error:

System error 5 has occurred.

Access is denied.

There was a problem

Press any key to continue . . .

As such, I re-ran it by right clicking on it and selecting 'Run As Administrator', and it ran successfully. Just out of curiosity, did you run the batch file as an administrator, to see if it runs it successfully? I know that might be rudimentary, but I wondering if that will solve the problem.

Let me know as I'm still going to keep working on this, as it'll be a nice to know how to do, just in case.

EDIT: I just ran your script, under mine, and it worked like a charm. It wrote to a new directory and it's begun to build out a new localhost directory, with all brand new cache files. I only changed the service name & the directory, to match what it looks on my end. Try running it as an administrator, that might be your issue.

Let me know if it isn't and I'll keep working on it with you.

EDIT2: Correction, I did make one modification, this is the script that I'm able to run:

net stop Tomcat7&&ping -n 10 localhost&&rename "D:\www\Tomcat 7.0\work\Catalina" %Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina&&net start Tomcat7

Still working on getting the batch file to automatically delete this new directory as well. However, I at least wanted to correct myself as I did make a small modification to it. See if that works for you.

-Victor