Update is_standby.sh

This commit is contained in:
Yacine31
2023-12-22 05:56:00 +01:00
parent 9fc9653eac
commit 9b5f89de78

View File

@@ -31,10 +31,11 @@ dbrole=$(sqlplus -s '/ as sysdba' << EOF
set pages 0 feedback off;
SELECT DATABASE_ROLE FROM V\$DATABASE;
EOF
)
if [ "$dbrole" == "PHYSICAL STANDBY" ]
then
return true
exit 0 # base standby
else
return false
exit 1 # base autre
fi