Skip to Content
author's profile photo Former Member
Former Member

BusinessObjects Housekeeping activities Automation

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-activities

  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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2013 at 08:47 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2013 at 04:46 AM

    Experts... Need your help to automate

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.