#!/bin/sh # Arguments: # arg 1 -- connect script # arg 2 -- repository username # arg 3 -- repository passwd # arg 4 -- -job (optional) # arg 5 -- oms hostname (optional) if [ -z $ORACLE_HOME ]; then echo "ORACLE_HOME environment variable not set. Exiting..."; exit; fi; ERROR_MSG="\nUsage is: \"./purgeDeploymentLibrary [-job ]\"; where \n is of form: \"jdbc:oracle:thin:@dbhost:dbport:sid\" where dbhost, dbport and sid to be replaced appropriately \n is repository username \n is repository passwd \n[-job ] is optional; if provided a job would be submitted (schedule is immediate). User can see the status of the job by navigating to the Jobs page on EM console. is OMS hostname\n" if [ -z $3 ]; then echo -e $ERROR_MSG; exit; fi; JOB=false; if [ -z $4 ]; then JOB=false; elif [ "-job" == $4 ]; then if [ -z $5 ]; then echo -e $ERROR_MSG; exit; else JOB=true; fi; else echo -e $ERROR_MSG; exit; fi; ORAXDK=$ORACLE_HOME/xdk/lib CLASSPATH=$ORACLE_HOME/sysman/jlib/emCORE.jar:$ORACLE_HOME/oc4j/jdbc/lib/ojdbc5dms.jar:$ORACLE_HOME/oc4j/jdbc/lib/ojdbc14dms.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-net-ee.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-utility.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-collation.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-net.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-internal.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-servlet.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-lcsd.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-tools.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-mapping.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n-translation.jar:$ORACLE_HOME/oc4j/jdbc/lib/orai18n.jar:$ORACLE_HOME/oc4j/lib/dms.jar:$ORACLE_HOME/jdbc/lib/ojdbc14.jar:$ORACLE_HOME/sysman/jlib/log4j-core.jar:$ORAXDK/xml.jar:$ORAXDK/xmlmesg.jar:$ORAXDK/xmlparserv2.jar:$ORAXDK/xschema.jar:$ORAXDK/classgen.jar:$ORACLE_HOME/sysman/jlib/emagentSDK.jar JAVA_HOME=$ORACLE_HOME/jdk JAVA_MAIN=oracle.sysman.eml.swlib.LibraryScripts ${JAVA_HOME}/bin/java -classpath ${CLASSPATH} ${JAVA_MAIN} purge $1 $2 $3 $JOB $5;