Monitor DG LAG
Scripts
-
[ORACLE] Monitor DG lag
-
[ORACLE] Dulicate noopen
Scripte de restore de base de données Oracle via Duplicate noopen
cat .dba
sys:<mdp sys> -
[ORACLE] Restore
Script de restore d'une instance Oracle
-
[ORACLE] Check DB Activity HTML version
check_db_activity_html.shperforms 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. -
[ORACLE] Check DB Activity
check_db_activity.shperforms 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. -
[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" -
[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" -
[POSTGRES] Easy to migrate
Little bash script
-
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.logScript 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
-
[Postgres] Mettre à jour les séquences
Script pour mettre à jour les séquences. Indispensable pour la réplication logique.