Update show_alert.sh
ajout de diagnostic_dest en variable
This commit is contained in:
@@ -40,11 +40,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
NB_PROCESS=$(ps -ef | grep pmon_${ORACLE_SID}\$ | grep -v grep | wc -l)
|
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
|
if [ ${NB_PROCESS} -ne 1 ]; then
|
||||||
echo
|
echo
|
||||||
echo Base non active ... Tentative d\'ouverture du fichier alertlog par defaut
|
echo Base non active ... Tentative d\'ouverture du fichier alertlog par defaut
|
||||||
echo
|
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}" ]
|
if [ -e "${f_alert}" ]
|
||||||
then
|
then
|
||||||
show_alert
|
show_alert
|
||||||
@@ -56,7 +58,7 @@ if [ ${NB_PROCESS} -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
export DB_UNIQ_NAME=$(echo "show parameter db_unique_name" | sqlplus / as sysdba | grep "^db_unique_name" | awk '{print $3}')
|
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
|
show_alert
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user