corrections de syntaxe

This commit is contained in:
Yacine31
2023-12-26 00:10:40 +01:00
parent 42b98bbf44
commit a28db35228
3 changed files with 13 additions and 9 deletions

View File

@@ -109,18 +109,20 @@ install -d ${BKP_LOG_DIR}
#
# si une autre sauvegarde est en cours, on quitte
#
{RUNNING_RMAN}=$($ORACLE_HOME/bin/sqlplus -S / as sysdba <<EOF
RUNNING_RMAN=$($ORACLE_HOME/bin/sqlplus -S / as sysdba <<EOF
set heading off
set feedback off
set echo off
select count(*) from v\$rman_backup_job_details where STATUS IN ('RUNNING', 'EXECUTING');
EOF
)
{RUNNING_RMAN}=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g')
RUNNING_RMAN=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g')
if [ -n "${RUNNING_RMAN}" ]; then
# RUNNING_RMAN n'est pas vide, donc backup RMAN en cours ... on quitte
f_print("Sauvegarde RMAN en cours ... fin du script")
if [ "${RUNNING_RMAN}" -gt 0 ]; then
# RUNNING_RMAN retourne une valeur > 0, donc backup RMAN en cours ... on quitte
f_print "... "
f_print "Sauvegarde RMAN en cours ... fin du script"
f_print "... "
exit 2
fi

View File

@@ -111,9 +111,11 @@ EOF
)
RUNNING_RMAN=$(echo ${RUNNING_RMAN} | sed 's/^\s*//g')
if [ ${RUNNING_RMAN} -eq 0 ]; then
# RUNNING_RMAN n'est pas vide, donc backup RMAN en cours ... on quitte
f_print("Sauvegarde RMAN en cours ... fin du script")
if [ "${RUNNING_RMAN}" -gt 0 ]; then
# RUNNING_RMAN retourne une valeur > 0, donc backup RMAN en cours ... on quitte
f_print "... "
f_print "Sauvegarde RMAN en cours ... fin du script"
f_print "... "
exit 2
fi

View File

@@ -24,7 +24,7 @@ do
# Variables d'initialisation
script_dir=/home/oracle/scripts
pct_limit=80
pct_limit=85
action_script="${script_dir}/backup_rman_AL.sh ${ORACLE_SID}"
#