RolapSecurityTool.sh 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. # Licensed Materials - Property of IBM
  3. # IBM Cognos Products: XQE
  4. # (C) Copyright IBM Corp. 2010, 2021
  5. # US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. # This batch file assumes it is being executed from bin or bin64 directory.
  7. # update the paths to run from a different location.
  8. # RolapSecurityTool - A tool to import and export security settings for ROLAP cube.
  9. # Usage:
  10. # Options:
  11. # -ds : Rolap datasource name
  12. # -i : Importing cube security by specifying an input file name.
  13. # -e : Exporting cube security by specifying an output file name.
  14. # -u : username [optional]
  15. # -p : password [optional]
  16. # -n : namespace [optional]
  17. # -dp : Dispatcher url, default is http://localhost:9300/p2pd/servlet/dispatch [optional]
  18. # -params : Specifies program parameters with a file. [optional]
  19. # Example:
  20. # rolapSecurityTool -ds SimpleCube_DB2 -i securityImp.xml
  21. # rolapSecurityTool -ds SimpleCube_DB2 -e securityExp.xml
  22. # rolapSecurityTool -u hmiller -p hillock -n LDAP -ds SimpleCube_DB2 -e securityExp.xml
  23. # rolapSecurityTool -params myParameters.txt
  24. OS_NAME=`uname`
  25. CWD=$PWD
  26. SEP=":"
  27. JAVA="../ibm-jre/jre/bin/java"
  28. CRN_LIB_HOME="../webapps/p2pd/WEB-INF/lib"
  29. CRN_CLASS_HOME="../webapps/p2pd/WEB-INF/classes"
  30. CRN_BIN_HOME="../bin"
  31. case "$OS_NAME" in
  32. "Linux"|"SunOS")
  33. LD_LIBRARY_PATH=$CWD:$CWD/bind:$CWD/lib
  34. export LD_LIBRARY_PATH
  35. ;;
  36. "AIX") export LIBPATH=$CWD:$CWD/bind:$CWD/lib
  37. ;;
  38. "HP-UX") export SHLIB_PATH=$CWD:$CWD/bind:$CWD/lib
  39. ;;
  40. "Windows_NT") SEP=";"
  41. ;;
  42. esac
  43. CLASSPATH="$CRN_CLASS_HOME$SEP$CRN_LIB_HOME/activation.jar$SEP$CRN_LIB_HOME/axis.jar$SEP$CRN_LIB_HOME/axisCrnpClient.jar$SEP$CRN_LIB_HOME/commons-discovery-0.2.jar$SEP$CRN_LIB_HOME/commons-logging-1.1.jar$SEP$CRN_LIB_HOME/commons-lang-2.6.jar$SEP$CRN_LIB_HOME/commons-configuration-1.9.jar$SEP$CRN_LIB_HOME/commons-beanutils.jar$SEP$CRN_LIB_HOME/commons-httpclient-3.1.jar$SEP$CRN_LIB_HOME/commons-codec.jar$SEP$CRN_LIB_HOME/CognosIPF.jar$SEP$CRN_LIB_HOME/jaxrpc.jar$SEP$CRN_LIB_HOME/p2pd.jar$SEP$CRN_LIB_HOME/cclcfgapi.jar$SEP$CRN_LIB_HOME/p2pd.jar$SEP$CRN_LIB_HOME/jaxen-1.1.1.jar$SEP$CRN_LIB_HOME/dom4j-2.1.1.jar$SEP$CRN_LIB_HOME/mail.jar$SEP$CRN_LIB_HOME/saaj.jar$SEP$CRN_LIB_HOME/dom4j.jar$SEP$CRN_LIB_HOME/xalan.jar$SEP$CRN_LIB_HOME/wsdl4j-1.5.1.jar$SEP$CRN_LIB_HOME/xqeService.jar$SEP$CRN_LIB_HOME/dom4j-2.1.1.jar$SEP$CRN_LIB_HOME/icu4j.jar$SEP$CRN_LIB_HOME/commons-collections-3.2.2.jar$SEP$CRN_LIB_HOME/logkit-1.2.jar$SEP$CRN_LIB_HOME/log4j-1.2.17.jar$SEP$CRN_LIB_HOME/CognosCCL4J.jar$SEP$CRN_BIN_HOME/jcam_jni.jar$SEP$CRN_LIB_HOME/zipi.jar$SEP$CRN_LIB_HOME/commons-parquet.jar$SEP$CRN_BIN_HOME/slf4j-api-1.7.23.jar$SEP$CRN_BIN_HOME/slf4j-nop-1.7.23.jar$SEP$CRN_LIB_HOME/commons-io-2.4.jar$SEP$CRN_LIB_HOME/bcprov.jar$SEP$CRN_LIB_HOME/bcpkix.jar"
  44. $JAVA -classpath ".$SEP$CLASSPATH" com.cognos.xqe.runtree.olap.mdx.rolapprovider.security.tool.ROLAPSecurityTool "$@"