Ok

En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies. Ces derniers assurent le bon fonctionnement de nos services. En savoir plus.

Scripts

  • [ORACLE] Check DB Activity HTML version

    check_db_activity_html.sh performs a quick health and activity snapshot across multiple Oracle database instances on a host. It automatically discovers instances from PMON processes or accepts an explicit list of SIDs, initializes the environment per SID, connects as SYSDBA, and captures key runtime indicators (state, sessions, waits, Data Guard lag, long operations).
    Output is written to a HTML file.

    Lire la suite

  • [ORACLE] Check DB Activity

    check_db_activity.sh performs a quick health and activity snapshot across multiple Oracle database instances on a host. It automatically discovers instances from PMON processes or accepts an explicit list of SIDs, initializes the environment per SID, connects as SYSDBA, and captures key runtime indicators (state, sessions, waits, Data Guard lag, long operations).
    Output is written to a timestamped log file.

    Lire la suite

  • [ORACLE] Diagnostic from the PID (top CPU) -> output HTML file

    Output file generated : HTML file.

     

    # Auto-detect top CPU process and generate HTML file in current dir
    ./diag_top_pid.sh

     

    # Explicit PID and output directory
    ./diag_top_pid.sh -p 3010886 -o /appli/home/oracle/diag

     

    # With explicit connect string (if not using / as sysdba)
    ./diag_top_pid.sh -c "sys/YourPwd@//host:1521/PDB as sysdba"

    Lire la suite

  • [ORACLE] Diagnostic from the PID (top CPU) -> output logfile

    Output file generated : log file.

     

    # Auto-detect top CPU process and generate logfile  in current dir
    ./diag_top_pid.sh

     

    # Explicit PID and output directory
    ./diag_top_pid.sh -p 3010886 -o /appli/home/oracle/diag

     

    # With explicit connect string (if not using / as sysdba)
    ./diag_top_pid.sh -c "sys/YourPwd@//host:1521/PDB as sysdba"

    Lire la suite

  • Oracle backup batch file

    Oracle backup batch file - Stack Overflow

    need to split in two files: a batch file and RMAN script

    Batch file: backup.bat

    @echo off
    echo Automatic Backup Oracle
    pushd .
    SET ORACLE_HOME=C:apporacleproduct12.2.0dbhome_1
    SET ORACLE_SID=ORCL
    echo ----------------------------------------------------
    echo ORACLE_HOME : %ORACLE_HOME%
    echo ORACLE_SID  : %ORACLE_SID%
    echo ----------------------------------------------------
    RMAN TARGET / @file.rman log=backup.log


    Script RMAN called file.rman or another name

    run {
    backup database;
    backup archivelog all delete input;
    } 
    

    This part is setup:

    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'c:backup%F';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:backup%d_%T_%u';
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'c:backupSNCFORCL.ORA';
    

    Can be removed from the script and run once for each bank. Once configured, the settings are permanent.

    script need two files: backup.bat and file.rman