plusieurs màj mineures
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
COL_NORMAL=$(tput sgr0)
|
||||
COL_ROUGE=$(tput setaf 1)
|
||||
COL_VERT=$(tput setaf 2)
|
||||
COL_JAUNE=$(tput setaf 3)
|
||||
COL_BLUE=$(tput setaf 4)
|
||||
COL_VIOLET=$(tput setaf 5)
|
||||
COL_CYNA=$(tput setaf 6)
|
||||
COL_BLANC=$(tput setaf 7)
|
||||
COL_GRIS=$(tput setaf 8)
|
||||
|
||||
|
||||
tail -100f /u01/app/oracle/diag/rdbms/$(echo ${ORACLE_SID} | tr 'A-Z' 'a-z')/${ORACLE_SID}/trace/alert_${ORACLE_SID}.log | sed -E \
|
||||
-e "s,^($(date +'%a %b')).*,${COL_JAUNE}&${COL_NORMAL},g" \
|
||||
-e "s,.*(ALTER|alter).*,${COL_VERT}&${COL_NORMAL},g" \
|
||||
-e "s,.*WARNING.*,${COL_VIOLET}&${COL_NORMAL},g" \
|
||||
-e "s,.*(ERROR:|ORA-).*,${COL_ROUGE}&${COL_NORMAL},g" \
|
||||
-e "s,.*,${COL_NORMAL}&${COL_NORMAL},"
|
||||
|
||||
|
||||
@@ -144,7 +144,6 @@ then
|
||||
echo
|
||||
echo "-----------------------------------------------------"
|
||||
echo "Vous devez etre $ORACLE_OWNER pour lancer ce script"
|
||||
echo
|
||||
echo "-----------------------------------------------------"
|
||||
exit 2
|
||||
fi
|
||||
@@ -186,7 +185,6 @@ DELETE NOPROMPT ARCHIVELOG ALL;
|
||||
DELETE NOPROMPT OBSOLETE;
|
||||
DELETE NOPROMPT EXPIRED BACKUPSET;
|
||||
|
||||
# SQL 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
|
||||
sql \"ALTER DATABASE BACKUP CONTROLFILE TO TRACE as ''${BKP_LOCATION}/controlfile_${ORACLE_SID}.trc'' reuse\";
|
||||
SQL \"CREATE PFILE=''${BKP_LOCATION}/pfile_${ORACLE_SID}.ora'' FROM SPFILE\";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#---------------------------------------------------------------------------
|
||||
# 24/01/2019 - YAO Adaptation après migration Crossway vers oda-cw
|
||||
# 24/01/2019 - YOU : Premiere version pour liter les backup RMAN de 30j
|
||||
#---------------------------------------------------------------------------
|
||||
# Environnement Variables
|
||||
export NLS_DATE_FORMAT='DD/MM/YYYY HH24:MI:SS'
|
||||
@@ -34,7 +34,9 @@ test_dba;
|
||||
# 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
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
export SCRIPTS_DIR=/home/oracle/exploit
|
||||
/home/oracle/scripts/running_instances.sh | while read d
|
||||
do
|
||||
export ORAENV_ASK=NO
|
||||
export ORACLE_SID=$d
|
||||
. oraenv > /dev/null
|
||||
sqlplus -S / as sysdba @${SCRIPTS_DIR}/check_rman_backup_1day.sql
|
||||
done
|
||||
@@ -1,7 +0,0 @@
|
||||
# genérer 2 fichiers avec les ordres grant
|
||||
# ensuite comparer les deux pour garder uniquement les ordres présents dans la source et pas dans la destination
|
||||
|
||||
# dans cet exemple :
|
||||
# La commande pour extraire les GRANT qui sont dans la version 12 mais pas dans la 19 :
|
||||
diff -w <(cat /tmp/grant_12 | grep '^GRANT' | grep -v '^$' | sort -u) <(cat /tmp/grant_19 | grep '^GRANT' | grep -v '^$' | sort -u) | grep '^<' | sed 's/< //g' | sort
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Historique :
|
||||
# 14/09/2011 : YOU - Creation
|
||||
# 14/10/2015 : YOU - script générique pour toutes les bases
|
||||
# 15/12/2022 : YOU - retention de 7 jour, nommage avec nom du jour
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# fonction init : c'est ici qu'il faut modifier toutes les variables liées
|
||||
@@ -19,7 +20,7 @@ f_init() {
|
||||
export NLS_LANG=AMERICAN_AMERICA.${NLS_CHARACTERSET}
|
||||
|
||||
# répertoire destination de l'export
|
||||
export EXP_LOCATION=/u03/backup/$ORACLE_SID/export_dpump
|
||||
export EXP_LOCATION=/u03/backup/$ORACLE_SID/export
|
||||
# nom du répertoire au niveau de la base de données
|
||||
export DPDIR=EXPDP_DIR
|
||||
|
||||
@@ -116,4 +117,4 @@ EOF
|
||||
#------------------------------------------------------------------------------
|
||||
# export des données
|
||||
#------------------------------------------------------------------------------
|
||||
$ORACLE_HOME/bin/expdp \'/ as sysdba\' full=y directory=$DPDIR dumpfile=export_${ORACLE_SID}_${JOUR_SEMAINE}.dmp logfile=export_${ORACLE_SID}_${JOUR_SEMAINE}.log flashback_time=systimestamp reuse_dumpfiles=yes
|
||||
$ORACLE_HOME/bin/expdp \'/ as sysdba\' full=y directory=$DPDIR dumpfile=${ORACLE_SID}_${JOUR_SEMAINE}.dmp logfile=${ORACLE_SID}_${JOUR_SEMAINE}.log flashback_time=systimestamp reuse_dumpfiles=yes
|
||||
|
||||
Reference in New Issue
Block a user