SHELL script

Shell script to monitor goldengate process

OBJECTIVE: Write a script is to monitor goldengate processes like extract and replicat, And in case extract or replicat is down, it will send alert to the respective email ids. SOLUTION: Below is the ...

Shell script to delete old archives using RMAN

If the requirement is to delete archive log backups automatically (without taking backup), then below shell script can be configured in crontab. prepare the shell script. cat rman_arch_del.sh #!/bin/b...

Shell script to monitor asm diskgroup usage

REQUIREMENT: Write a shell script, which will trigger a mail alert, if the utilization of the asm diskgroup reached 90 percent. SOLUTION: 1. Below is the shell script. Make sure to update ORACLE_HOME,...

Shell script to report failed login attempt in oracle

Requirement: Configure a shell script in crontab, that will send alert to DB support Team, in the case of any invalid login attempts in the database.   1. First, enable audit for create session S...

Alert log rotation script in oracle

Day by day, alert log size will grow in Oracle database. So for housekeeping, we need to move the existing alert log to a backup location and compress there. Upon moving the alert log, the database wi...

Tablespace monitoring shell script

Below script can be configured in crontab to send a notification to the support DBAs in case tablespace usage crosses a threshold. 1. First, make the below .sql file, which will be used inside the she...

Shell script for monitoring Alert log

Requirement: Configure a shell script to monitor alert log for all the databases on a server once in every 15 min.And in the case of any ORA- error mail to the DBA TEAM. Below script is prepared using...

RMAN backup using shell script

REQUIREMENT: Configure shell script to take rman Full backup . SCRIPT: ( rman_full_bkp.sh) # $Header: rman_full_bkp.sh # *=============================================================================...

Kill snipped sessions in oracle db

REQUIREMENT: Configure a shell script, to kill the snipped sessions in the database regularly.   SHELL SCRIPT: # $Header: kill_snipped.sh # *======================================================...

expdp backup using shell script

Requirement: Configure a shell script, to take export backup of table daily at 3 PM  and send the log to stake holders. Script: ( EXP_TAB_cmprss.sh) # $Header: EXP_TAB_cmprss.sh # *==================...