Update show_alert.sh

ajout de diagnostic_dest en variable
This commit is contained in:
Yacine31
2021-11-24 05:44:32 +01:00
parent 7e3ccb3892
commit 0fa2f05aef

View File

@@ -40,11 +40,13 @@ else
fi
NB_PROCESS=$(ps -ef | grep pmon_${ORACLE_SID}\$ | grep -v grep | wc -l)
DIAG_DEST=$(echo "show parameter diagnostic_dest" | sqlplus / as sysdba | grep "^diagnostic_dest" | awk '{print $3}')
if [ ${NB_PROCESS} -ne 1 ]; then
echo
echo Base non active ... Tentative d\'ouverture du fichier alertlog par defaut
echo
f_alert="/u01/app/oracle/diag/${SUB_DIR}/$(echo ${ORACLE_SID} | tr 'A-Z' 'a-z')/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log"
f_alert="${DIAG_DEST}/diag/${SUB_DIR}/$(echo ${ORACLE_SID} | tr 'A-Z' 'a-z')/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log"
if [ -e "${f_alert}" ]
then
show_alert
@@ -56,7 +58,7 @@ if [ ${NB_PROCESS} -ne 1 ]; then
fi
else
export DB_UNIQ_NAME=$(echo "show parameter db_unique_name" | sqlplus / as sysdba | grep "^db_unique_name" | awk '{print $3}')
f_alert="/u01/app/oracle/diag/${SUB_DIR}/$(echo ${DB_UNIQ_NAME} | tr 'A-Z' 'a-z')/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log"
f_alert="${DIAG_DEST}/diag/${SUB_DIR}/$(echo ${DB_UNIQ_NAME} | tr 'A-Z' 'a-z')/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log"
show_alert
fi