Benutzer-Werkzeuge

Webseiten-Werkzeuge


dba:oracle_ahf_oracle_health_checks_collection_manager

Oracle Health Checks Collection Manager

Installation DB Umgebung

Ablauf:

  • Tablespace für das Repostiory anlegen
    #falls container!
    #ALTER SESSION SET CONTAINER = ans;
    CREATE TABLESPACE oraahf  DATAFILE '/opt/oracle/oradata/GPIDB/ans/oraahf01.dbf' SIZE 1G AUTOEXTEND ON NEXT 1M MAXSIZE 8G UNIFORM SIZE 10M;
    ALTER TABLESPACE oraahf ADD  DATAFILE '/opt/oracle/oradata/GPIDB/ans/oraahf02.dbf' SIZE 1G AUTOEXTEND ON NEXT 1M MAXSIZE 8G;  
    ALTER TABLESPACE oraahf ADD  DATAFILE '/opt/oracle/oradata/GPIDB/ans/oraahf03.dbf' SIZE 1G AUTOEXTEND ON NEXT 1M MAXSIZE 8G;  
    ALTER TABLESPACE oraahf ADD  DATAFILE '/opt/oracle/oradata/GPIDB/ans/oraahf04.dbf' SIZE 1G AUTOEXTEND ON NEXT 1M MAXSIZE 8G;     
  • User „orachkcm“ anlegen und Rechte vergeben:
    • #falls container!
      #ALTER SESSION SET CONTAINER = ans; 
      CREATE USER orachkcm 
        IDENTIFIED BY secret45 
        DEFAULT tablespace oraahf  QUOTA UNLIMITED ON oraahf ;
       
      GRANT CONNECT, resource TO ORACHKCM;
      GRANT CREATE VIEW TO ORACHKCM;
       
      GRANT EXECUTE ON DBMS_RLS  TO ORACHKCM;
      GRANT CREATE JOB TO ORACHKCM;
      GRANT EXECUTE ON UTL_SMTP TO ORACHKCM;
  • APEX Workspace anlegen und Schema ORACHKCM zuordnen (als Admin im INTERNAL Workspace)
  • Im Workspache Applikation importieren (Source <AHF_HOME>/orachk/Apex5_CollectionManager_App.sql )
  • Im Workspace einen Anwender wie „ORACHKCM“ anlegen
  • AHF auf dem Host mit einem Connectstring zur DB konfigurieren
  • Bericht erzeugen und in das Repository laden lassen

Siehe auch ⇒ https://docs.oracle.com/en/engineered-systems/health-diagnostics/autonomous-health-framework/ahfug/apex20-2-managing-oracle-health-check-collection-manager.html


Upload Manuell konfigurieren

Hier wird für die Konfiguration „ahfctl“ verwendet, „tfactl“ ist veraltet und sollte nicht mehr verwendet werden!

Eine evlt. alten Konfiguration entfernen:

/opt/oracle.ahf/bin/ahfctl  unsetupload  -all  -name orachkcm

Als Root konfigurieren:

cd /opt/oracle.ahf/bin
 
./ahfctl setupload -type sqlnet -name orachkcm -user orachkcm  -password  -connectstring "(DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.10.1)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=gpidb)))" -uploadtable RCA13_DOC
 
 
Enter orachkcm.sqlnet.password :
Successfully synced AHF configuration
Upload configuration set for: orachkcm
type: sqlnet
 
orachkcm.sqlnet.user: orachkcm
 
orachkcm.sqlnet.password: ******
 
orachkcm.sqlnet.connectstring: (DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.1)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=gpidb)))
 
orachkcm.sqlnet.uploadtable: RCA13_DOC
 
 
Database upload parameters successfully stored.
AHF will continue to upload the collections to the database until unset using ahfctl unsetupload [-all]

Überprüfen mit:

 /opt/oracle.ahf/bin/ahfctl getupload -all -name orachkcm

Daten hochladen:

[root bin]# ./ahfctl orachk  -a -dball

Upload per Script konfigurieren

Ärgerlicherweise muss das Password interaktiv eingegeben werden.

Um nun das zu automatisieren bietet sich expect an siehe dazu auch ⇒ https://likegeeks.com/expect-command/

Ablauf als Ansible Tasks:

Im ersten Schritt alles konfigurieren das sich so übergeben läßt:

 

Problem: MEMORYCRUNCH: Does not have enough space in data base to process collection...exiting.

Ursache:

Ein internes SQL fragt die freien Platz des Tablespaces ab, ist der relativ voll und auf auto Exented wird die Collection nicht verarbeitet, da eine zu niedriger Wert ermittelt wird.

Aus dem Code:

..
'  minRequiredFreeSpace number := 100; -- Size in MB',
..
'  -- Check whether there is enough space to process collection or not  ',
'  begin',
'   select tablespace_name into tsName from user_tables where table_name = ''RCA13_DOCS'';',
'   SELECT sum(bytes)/1048576 into freeSpace FROM user_free_space  where tablespace_name = tsName;',
'   exception when others then null;',
'  end;',
'  if freeSpace < minRequiredFreeSpace then     ',
'    log_text(''MEMORYCRUNCH: Does not have enough space in data base to process collection...exiting.'',collectionId,docId);',
'    update_collection_status(collectionId,''Failed'',''NO_ENOUGH_SPACE'');',
'    return;    ',
'  end if;',

Lösung:

Datendatei des Tablespaces mit entsprechender Größe gleich anlegen!


User Definied Checks

Quellen

Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
dba/oracle_ahf_oracle_health_checks_collection_manager.txt · Zuletzt geändert: 2022/01/06 18:30 von gpipperr