This section focuses on steps to be taken post-upgrade to the Delphix 5.2 release for all dSources and VDBs present on the Delphix Engine.

For all 12.2 EBS Database VDB

  • Update the pre snapshot hook as follows
# NOTE: Ensure the below environment variables will be set up correctly by the shell. If not, hardcode or generate the values below.
# CONTEXT_NAME=${ORACLE_SID}_$(hostname -s)
# APPS_PASSWD=<source apps passwd>
# TARGET_APPS_PASSWD=<new apps password>
 
timeout=3600
waittime=0
. ${ORACLE_HOME}/${CONTEXT_NAME}.env
 
testAppsPassword() {
    local passwordInQuestion=$1
    ERROR=`sqlplus "apps/${passwordInQuestion}" <<< "exit;"`
 
    grep ORA-01017 <<< ${ERROR} >/dev/null && return 1
    return 0
 
}
 
testAppsPassword ${SOURCE_APPS_PASSWD}
testResult=$?
 
if [[ ${testResult} == 0 ]]; then
    APPS_PASSWD=${SOURCE_APPS_PASSWD}
else
    APPS_PASSWD=${TARGET_APPS_PASSWD}
fi
 
while [[ -f "${ORACLE_HOME}/.delphix_adpreclone.lck" || "$(ps -Ao args | grep "^${ORACLE_HOME}" | grep -v grep |  grep "adpreclone")" ]] ; do
if [[ $waittime -gt $timeout  ]]; then
        echo "Another adpreclone process is still running from last 60 mins.Delphix cannot proceed until it is complete. Exiting Now."
        exit 1
    fi
    echo  " Another adpreclone process is running. waiting for the process to complete before starting adpreclone of the database...."
    (( timeout += 10 ))
    sleep 10
done
echo "No other adpreclone process is running on database, proceeding ...."
. ${ORACLE_HOME}/${CONTEXT_NAME}.env
${ORACLE_HOME}/perl/bin/perl ${ORACLE_HOME}/appsutil/scripts/${CONTEXT_NAME}/adpreclone.pl database <<-EOF
${APPS_PASSWD}
EOF

Related Topics