cd /home/oracle/dxmc nowdate=$(date +"%m-%d-%Y") # echo $nowdate unixtime=$(date +"%s") # echo $unixtime # echo $HOSTNAME conname="${HOSTNAME}_${ORACLE_SID}_${nowdate}_${unixtime}" # echo $conname checkpmonfile=${unixtime}pmonchecks.out #echo $checkpmonfile ps -ef | grep pmon > ${checkpmonfile} if grep -q $ORACLE_SID ${checkpmonfile}; then rm ${checkpmonfile} ./dxmc connector add --connectorname $conname --envname 'Oracle_Remote_Masking' --connectortype oracle --host mdslesora112-src.dcol2.delphix.com --port 1521 --sid=$ORACLE_SID --username SCOTT --schemaname SCOTT --password scott if [ $? -eq 0 ] then # exit 0 ./dxmc job start --jobname MD_mdslesora112-src_EMP2 --tgt_connector $conname --tgt_connector_env 'Oracle_Remote_Masking' if [ $? -eq 0 ] then echo $conname >> /tmp/maskingattempts.out exit 0 else # echo "Mssking Failed - Bombed out" exit 1 fi else # echo "Bombed out" exit 1 fi else # echo "Not found" rm ${checkpmonfile} exit 1 fi