Script created by: Shawn Penner, SAP
- This script loops through the input and output FRS and looks for any orphan objects. If it finds any, it deletes them.
NOTE: This sample is destructive. It deletes files. It is strongly recommended that you make a backup of your CMS database and your Input and Output FRS before running it in Delete mode.
EXTRA NOTE: Due to how objects in the recycle bin are handled by Enterprise, this sample will not detect recycled objects as valid and will delete the associated files. It is strongly recommended that you empty the recycle bin before running the sample.
- Copy the jsp page into the folder C:\Program Files (x86)\SAP BusinessObjects\tomcat\webapps\AdminTools
- Edit the file and change the values in the following section:
Boolean Run_In_Test_Mode = true;
-If set to True, it will just list the files it would have deleted, but won't actually delete them.
-If set to False, it will list the files and actually delete it. By default this is set to true.
Note: true and false are Case Sensitive. You must use the values of "true" or "false". Do not use "True" or "False"
String pathToInputFRS = "C:\\Program Files (x86)\\SAP BusinessObjects\\SAP BusinessObjects Enterprise XI 4.0\\FileStore\\Input";
String pathToOutputFRS = "C:\\Program Files (x86)\\SAP BusinessObjects\\SAP BusinessObjects Enterprise XI 4.0\\FileStore\\Output";
-This is the path to the FRS folders. Because this is java, all slashes must be double slashes and there should not be a slash at the end of the file path.
String fileToLogTo = "C:\\Program Files (x86)\\SAP BusinessObjects\\tomcat\\webapps\\AdminTools\\TestOutput.txt";
-This is the path and filename of the logging file it will create. If the file already exists, it will append the new logs to the end. It will not over-write the log file.
// User Credentials
String username = "Administrator";
String password = "Password1";
String cmsname = "localhost";
String authType = "secEnterprise";
-The logon credentials for the Enterprise server. You MUST use the Administrator user for this. The script requires the ability to verify if an object exists. If the account does not have the rights to see the object, it will assume it does not exist and delete it.
Open up a browser and go to http://myserver:8080/AdminTools/scanFRS.jsp
You can download the script from Kbase 2827214 - Sample to Remove Orphaned files from the Input and Output FRS