@echo off REM Licensed Materials - Property of IBM REM IBM Cognos Products: XQE REM (C) Copyright IBM Corp. 2009, 2022 REM US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. setlocal CD %~dp0 if "%1" == "1" goto findJava if "%1" == "2" goto findJava if "%1" == "3" goto finish if "%1" == "4" goto finish if "%1" == "-help" goto help echo. echo ERROR Encountered!! Invalid input value passed to utility QueryServiceAdminTask. For help use command [ queryServiceAdminTask.bat -help ] . goto finish :findJava set J_HOME=..\ibm-jre\jre echo Looking for JRE in: %J_HOME%\bin... if exist "%J_HOME%\bin\java.exe" goto gotJava rem JAVA_HOME should be defined first. if "%JAVA_HOME%" == "" goto JavaHomeError set J_HOME=%JAVA_HOME% echo Looking for JRE in: %J_HOME%\bin... if exist "%J_HOME%\bin\java.exe" goto gotJava set J_HOME=%JAVA_HOME%\jre echo Looking for JRE in: %J_HOME%\jre\bin... if exist "%J_HOME%\bin\java.exe" goto gotJava :help echo. echo Use the QueryServiceAdminTask to specify query service operations. This utility expects two input parameters: TaskType(String Input) and TaskParameter(String Input). echo. echo The first (mandatory) parameter, TaskType(String Input), identifies the type of operation. Use one of the following values. For TaskType 2, a file called SALDump.xml is created in the "/logs/XQE" folder. echo. echo. echo ------------------------------------------------------------------------ echo 1 - Clear Secure Cache. echo 2 - Write Secure Cache State. echo ------------------------------------------------------------------------ echo. echo. echo The second (optional) parameter, TaskParameter(String Input), identifies the values used to perform the operation specified by the first parameter. echo. echo Use the format, "//". You can use the wild card character "*" for any datasource, catalog, or cube name. For example, "*/*/*" or "DS_TEMP/*/*". When no input is used for this parameter, it uses the value "*/*/*" by default. echo. echo In this example, [ queryServiceAdminTask.bat 1 "*/*/*" ] the secured cache is cleared for all cubes in all catalogs under all datasources. goto finish :JavaHomeError echo Could not find path to java. echo The environment variable JAVA_HOME is not defined or incorrectly defined. echo Please define JAVA_HOME first. goto finish :gotJava set emptyStr = "" set J_OPTS=%emptyStr% set _RUNJAVA="%J_HOME%\bin\java" set CP=.;..\webapps\p2pd\WEB-INF\classes;..\webapps\p2pd\WEB-INF\lib\cclcfgapi.jar;..\webapps\p2pd\WEB-INF\lib\jaxen-1.1.1.jar;..\webapps\p2pd\WEB-INF\lib\dom4j-2.1.1.jar;..\webapps\p2pd\WEB-INF\lib\jcam_crypto.jar;..\webapps\p2pd\WEB-INF\lib\jcam_jni.jar;..\webapps\p2pd\WEB-INF\lib\CognosIPF.jar;..\webapps\p2pd\WEB-INF\lib\xqeService.jar;..\webapps\p2pd\WEB-INF\lib\hessian-3.0.20.jar;..\webapps\p2pd\WEB-INF\lib\mx4j-tools.jar;..\webapps\p2pd\WEB-INF\lib\CognosCCL4J.jar;..\webapps\p2pd\WEB-INF\lib\commons-lang-2.6.jar;..\webapps\p2pd\WEB-INF\lib\commons-configuration-1.9.jar;..\webapps\p2pd\WEB-INF\lib\commons-logging-1.1.jar;..\webapps\p2pd\WEB-INF\lib\commons-collections-3.2.2.jar;..\webapps\p2pd\WEB-INF\lib\commons-httpclient-3.1.jar;..\webapps\p2pd\WEB-INF\lib\commons-codec.jar;..\webapps\p2pd\WEB-INF\lib\commons-io-2.4.jar;..\webapps\p2pd\WEB-INF\lib\cclcoreutil.jar;..\webapps\p2pd\WEB-INF\lib\zipi.jar;..\webapps\p2pd\WEB-INF\lib;..\webapps\p2pd\WEB-INF\lib\commons-discovery-0.2.jar;..\webapps\p2pd\WEB-INF\lib\jaxrpc.jar;..\webapps\p2pd\WEB-INF\lib\axis.jar;..\webapps\p2pd\WEB-INF\lib\axisCrnpClient.jar;..\webapps\p2pd\WEB-INF\lib\mfw4j.jar;..\webapps\p2pd\WEB-INF\lib\mfwa4j.jar;..\webapps\p2pd\WEB-INF\lib\commons-pool-1.3.jar;..\webapps\p2pd\WEB-INF\lib\p2pd.jar;..\webapps\p2pd\WEB-INF\lib\logkit-1.2.jar;..\webapps\p2pd\WEB-INF\lib\trove-3.0.2.jar;..\webapps\p2pd\WEB-INF\lib\commons-parquet.jar;..\bin\slf4j-api-1.7.35.jar;..\bin\slf4j-nop-1.7.35.jar;..\webapps\p2pd\WEB-INF\lib\bcprov.jar;..\webapps\p2pd\WEB-INF\lib\bcpkix.jar;..\webapps\p2pd\WEB-INF\lib\commons-configuration2.jar;..\webapps\p2pd\WEB-INF\lib\commons-lang3.jar;..\webapps\p2pd\WEB-INF\lib\commons-beanutils.jar;..\webapps\p2pd\WEB-INF\lib\flint-launcher.jar;..\webapps\p2pd\WEB-INF\lib\config-api.jar;..\webapps\p2pd\WEB-INF\lib\config-core.jar;..\webapps\p2pd\WEB-INF\lib\archaius-core.jar;..\webapps\p2pd\WEB-INF\lib\guava-15.0-cdi1.0.jar;..\webapps\p2pd\WEB-INF\lib\icu4j.jar;..\webapps\p2pd\WEB-INF\lib\i18nj.jar;..\webapps\p2pd\WEB-INF\lib\parquet-hadoop-isv.jar;..\webapps\p2pd\WEB-INF\lib\log4j-api-2.17.1.jar;..\webapps\p2pd\WEB-INF\lib\log4j-core-2.17.1.jar;..\webapps\p2pd\WEB-INF\lib\log4j-over-slf4j-1.7.35.jar @echo Using CLASSPATH: %CP% @echo Using J_HOME: %J_HOME% @echo Using J_OPTS: %J_OPTS% %_RUNJAVA% -cp %CP% %J_OPTS% com.cognos.xqebifw.adminconsole.commandlineutility.QueryServiceAdminTask %1 %2 goto finish :finish endlocal