From c32e4e9dd4e8edbe210afab7f5ae5335714bd538 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Mon, 20 Mar 2023 19:20:23 +0100 Subject: [PATCH] Update check_rman_backup.sh --- check_rman_backup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/check_rman_backup.sh b/check_rman_backup.sh index 58499e1..003fe36 100755 --- a/check_rman_backup.sh +++ b/check_rman_backup.sh @@ -13,8 +13,7 @@ unset NLS_LANG function test_dba { if test "$(id|grep dba)" then - #return 0 - echo " OK => Test Utilisateur DBA" + return 0 else echo "" echo "=============================================================" @@ -31,15 +30,14 @@ test_dba; # reporter toutes les instances préntes sur ce serveur #--------------------------------------------------------------------------- -# for r in $(ps -eaf | grep pmon | grep -v grep | cut -d '_' -f3) for r in $(ps -eaf | grep pmon | egrep -v 'grep|ASM1|APX1' | cut -d '_' -f3) do echo "-----------------------------------------------------" echo " Base de donnee a traiter: " $r echo "-----------------------------------------------------" export ORACLE_SID=$r -. oraenv -s -echo $ORACLE_SID $ORACLE_HOME +. oraenv -s > /dev/null +# echo $ORACLE_SID $ORACLE_HOME sqlplus -S / as sysdba << EOF alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS' ; set serveroutput on