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.( cat

Now configure the script in crontab with 30 min interval.

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 #!/bin/bash export ORACLE_HOME=/oracle/app/oracle/product/ export ORACLE_SID=PARIS12C export PATH=$ORACLE_HOME/bin:$PATH delBackup () { rman log=/home/oracle/arch_del.log << EOF connect target / DELETE noprompt ARCHIVELOG ALL COMPLETED BEFORE ‘sysdate-1’; CROSSCHECK ARCHIVELOG ALL; […]

Shell script for monitoring blocking sessions

Below is the shell script, to be configured in crontab, which will send mail incase of blocking session observed in the database . In the mail body it will contain the blocking sessions details also. 1. Prepare the blocker.sql file.[ for blocking sessions more than 10 seconds)

2. Shell script.(/home/oracle/monitor/ ) You need to […]

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, ORACLE_SID inside the shell script. cat /export/home/oracle/

2. Give proper permission:

3. Configure in crontab:

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

2. Final shell script Below script for any invalid login attempts in last 15 minutes. cat /export/home/oracle/

3. provide […]

shell script for file system alert

Below is script for sending notification ,when a mount point or filesystem crosses a threshold value. For solaris

Put in crontab:

For monitoring zpool usage in solaris:

Put in crontab as below:

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 will create a fresh alert log automatically. Below is the shell script. WE need to define the ORACLE_HOME in […]

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 shell script. In this script we have defined the threshold as 90%. You can change it as per your requirement. […]

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 the ADRCI utility of oracle 11g. It will monitor alert log for all the databases having same […]

RMAN backup using shell script

REQUIREMENT: Configure shell script to take rman Full backup . SCRIPT: (

Give 755 permission

Configure script in crontab:

For taking incremental backup,Just update the backup command with the below one. backup as compressed backupset incremental level 1 check logical database plus archivelog;

Page 1 of 212
Skip to toolbar