RMAN Backup with Python

I want to start using Python to perform my backups. Here is a simple script to perform it. Insde both the Incremental_backup.cmd and Full_backup.cmd, you can put any rman commands you like. Archive log backup archivelog all delete all input; backup current controlfile; delete noprompt expired archivelog all; delete noprompt obsolete; Incremental level 0 backup … Read more

Automatic Shrink

The company I work for would rebuild their tables and indexes every quarter, this did cause some concern for me and they were adamant that this needed to be done. I compromised and came up with this script.

How to calculate DB time for a week

DB Time is a period demonstrate measurement that is the entirety of Oracle process CPU utilization and non-inert hold up time. While advancing Oracle frameworks we regularly center around decreasing “time”, however ordinarily database work is additionally part of the condition. SELECT sum(Round(NVL((e.value – s.value),-1)/60/1000000,2))/1440 ||’ days’ “DB Time” FROM DBA_HIST_SYS_TIME_MODEL s, DBA_HIST_SYS_TIME_MODEL e WHERE … Read more

How many log switches per hour

Calculate the log switches per hour over the last week. SET PAGESIZE 90 SET LINESIZE 150 set heading on column “00:00” format 9999 column “01:00” format 9999 column “02:00” format 9999 column “03:00” format 9999 column “04:00” format 9999 column “05:00” format 9999 column “06:00” format 9999 column “07:00” format 9999 column “08:00” format 9999 … Read more