diff --git a/rapport_bdd.sh b/rapport_bdd.sh index 058a9a3..4dec20e 100644 --- a/rapport_bdd.sh +++ b/rapport_bdd.sh @@ -74,5 +74,4 @@ do done # execution des scripts de synthèse : -cd summary -bash run.sh \ No newline at end of file +bash summary.sh \ No newline at end of file diff --git a/run.sh b/summary.sh similarity index 90% rename from run.sh rename to summary.sh index 46212bc..2b27cf4 100644 --- a/run.sh +++ b/summary.sh @@ -24,9 +24,6 @@ do export ORACLE_SID=$sid . oraenv -s > /dev/null - # ajout du titre : - echo '

base '${sid}' - Détail des datafiles :

' >> ${HTML_FILE} - # ajouter le resultat du script sql dans la page html cat 01_sql_header.txt $sqlfile | sqlplus -s / as sysdba >> ${HTML_FILE} done diff --git a/summary/25_last_alertlog_errors.sql b/summary/25_last_alertlog_errors.sql new file mode 100644 index 0000000..e0b58b8 --- /dev/null +++ b/summary/25_last_alertlog_errors.sql @@ -0,0 +1,13 @@ +prompt

Les dernières erreurs de la base de données (Les 30 derniers jours et les 50 dernières lignes)

+ +SELECT + TO_CHAR(ORIGINATING_TIMESTAMP, 'DD-MM-YYYY HH:MM:SS') "Date", + MESSAGE_TEXT "Message" +FROM + X$DBGALERTEXT +WHERE + ORIGINATING_TIMESTAMP > SYSTIMESTAMP - 30 + AND REGEXP_LIKE(MESSAGE_TEXT, '(ORA-)') + AND ROWNUM <=50 +ORDER BY + ORIGINATING_TIMESTAMP DESC; \ No newline at end of file